/* 公共样式 - 展会展商网站 */

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 卡片悬停效果 */
.exhibitor-card {
  transition: all 0.2s ease;
}
.exhibitor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(18, 102, 227, 0.15), 0 4px 10px -5px rgba(0, 0, 0, 0.1);
  border-color: #1266e3;
}

/* Logo 占位渐变 */
.logo-placeholder {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

/* 标签（展品标签，每个展商可自定义、选填） */
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  background: #eef4ff;
  color: #1266e3;
  border-radius: 4px;
  margin: 2px 4px 2px 0;
  border: 1px solid #c7dcff;
}

/* 分页按钮 */
.page-btn {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.page-btn:hover:not(:disabled) {
  border-color: #1266e3;
  color: #1266e3;
}
.page-btn.active {
  background: #1266e3;
  border-color: #1266e3;
  color: #fff;
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1a1; }

/* Toast 提示 */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 9999;
  animation: toastIn 0.3s ease;
}
.toast.success { background: #10b981; color: #fff; }
.toast.error { background: #ef4444; color: #fff; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 后台表格 */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th {
  background: #f9fafb;
  text-align: left;
  padding: 12px;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
}
.admin-table tr:hover td {
  background: #f2f7ff;
}

/* 表单 */
.form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: #1266e3;
  box-shadow: 0 0 0 3px rgba(18, 102, 227, 0.1);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.btn-primary { background: #1266e3; color: #fff; }
.btn-primary:hover { background: #0b4bb3; }
.btn-secondary { background: #fff; color: #374151; border-color: #d1d5db; }
.btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; }
.btn-danger { background: #fff; color: #ef4444; border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* 展品标签编辑器（自定义 + 选填） */
.tag-editor {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #f9fafb;
  padding: 10px 12px 12px;
}
.tag-editor:focus-within {
  border-color: #1266e3;
  box-shadow: 0 0 0 3px rgba(18, 102, 227, 0.1);
}
.tag-editor__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  align-items: center;
}
.tag-editor__empty {
  font-size: 12px;
  color: #9ca3af;
}
.tag-editor__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px 4px 10px;
  background: #eef4ff;
  border: 1px solid #c7dcff;
  color: #1266e3;
  border-radius: 999px;
  font-size: 12.5px;
  line-height: 1;
  max-width: 100%;
}
.tag-editor__del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: rgba(18, 102, 227, 0.12);
  color: #1266e3;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.tag-editor__del svg { width: 10px; height: 10px; }
.tag-editor__del:hover { background: #1266e3; color: #fff; }
.tag-editor__row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.tag-editor__row .form-input { flex: 1; }
.tag-editor__row .btn { flex-shrink: 0; }

/* 快捷添加标签的建议按钮 */
.tag-suggest {
  display: inline-block;
  padding: 2px 9px;
  margin: 0 4px 4px 0;
  font-size: 12px;
  line-height: 1.6;
  color: #1266e3;
  background: #fff;
  border: 1px dashed #a9c8ff;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tag-suggest:hover {
  background: #eef4ff;
  border-color: #1266e3;
  border-style: solid;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-content {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
}

/* ==================== 展商详情页 ==================== */
.detail-wrap {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0 4px;
  font-size: 13px;
  color: #6b7280;
}
.breadcrumb a { color: #6b7280; transition: color 0.15s; }
.breadcrumb a:hover { color: #1266e3; }
.breadcrumb .sep { color: #d1d5db; }
.breadcrumb .crumb-current { color: #9ca3af; }

/* 展商头部信息卡 */
.detail-head {
  background: linear-gradient(100deg, #eef4ff 0%, #f7faff 55%, #ffffff 100%);
  border: 1px solid #eef0f3;
  border-radius: 8px;
  padding: 30px 32px;
}
.detail-logo {
  width: 180px;
  height: 112px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
}
.detail-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* 区块标题（左侧竖条） */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
}
.section-title::before {
  content: '';
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: #1266e3;
  flex-shrink: 0;
}

.link-primary { color: #1266e3; }
.link-primary:hover { text-decoration: underline; }

/* ---------- 展品轮播 ---------- */
.carousel {
  position: relative;
  padding: 0 4px;
}
.carousel-viewport {
  overflow: hidden;
}
.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #1266e3;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(18, 102, 227, 0.35);
  transition: background 0.15s, opacity 0.15s, transform 0.15s;
}
.carousel-arrow:hover:not(:disabled) {
  background: #0b4bb3;
  transform: translateY(-50%) scale(1.06);
}
.carousel-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.carousel-arrow.left { left: -20px; }
.carousel-arrow.right { right: -20px; }

/* 只有一屏时不显示箭头 */
.carousel.is-single .carousel-arrow { display: none; }

/* 展品卡片 */
.product-card {
  background: #fff;
  border: 1px solid #e8eaee;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.product-card:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  border-color: #c7dcff;
}
.product-thumb {
  aspect-ratio: 4 / 3;
  background: #f7f8fa;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-thumb .ph {
  font-size: 34px;
  font-weight: 700;
  color: #d1d5db;
}
.product-body {
  padding: 12px 14px 14px;
  flex: 1;
}
.product-body h3 {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.5;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-top: 1px solid #f1f3f5;
}
.product-foot .label {
  font-size: 12px;
  color: #b0b6bf;
}
.btn-detail {
  background: #1266e3;
  color: #fff;
  font-size: 12px;
  padding: 5px 15px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-detail:hover { background: #0b4bb3; }

/* 指示点（短横线样式） */
.dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
}
.dots:empty { display: none; }
.dot {
  width: 20px;
  height: 3px;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: #e2e5ea;
  cursor: pointer;
  transition: background 0.2s, width 0.2s;
}
.dot:hover { background: #c9ccd2; }
.dot.active {
  background: #1266e3;
  width: 28px;
}

/* 展商活动卡片 */
.activity-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e8eaee;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s;
}
@media (min-width: 640px) {
  .activity-card { flex-direction: row; }
}
.activity-card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07); }
.activity-thumb {
  width: 100%;
  height: 150px;
  flex-shrink: 0;
  background: #f7f8fa;
  overflow: hidden;
}
@media (min-width: 640px) {
  .activity-thumb { width: 220px; height: auto; min-height: 130px; }
}
.activity-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.activity-body { padding: 16px 20px; }
.activity-body .date {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 6px;
}
.activity-body h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}
.activity-body p {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.7;
}

/* 响应式：箭头位置与移动端隐藏 */
@media (max-width: 1180px) {
  .carousel-arrow.left { left: -6px; }
  .carousel-arrow.right { right: -6px; }
}
@media (max-width: 640px) {
  .detail-wrap { padding-left: 12px; padding-right: 12px; }
  .detail-head { padding: 20px; }
  .detail-logo { width: 100%; height: 120px; }
  .carousel-arrow { display: none; }
}

/* 响应式 */
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
}

/* ============================================================
   首页资源按钮（展位图 / 展商名录）+ 列表左侧栏布局
   ============================================================ */
.list-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
}
.list-main {
  flex: 1 1 auto;
  min-width: 0;
}
.res-rail {
  flex: 0 0 auto;
  /* 宽屏时把按钮推进左侧留白区，卡片位置保持不变 */
  margin-left: -138px;
  padding-top: 2px;
}
@media (max-width: 1535px) {
  .res-rail { margin-left: 0; }
}
@media (max-width: 1023px) {
  .list-layout { flex-direction: column; gap: 16px; }
  .res-rail { width: 100%; }
}

.res-btn-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.res-btn-group .res-btn {
  justify-content: center;
  min-width: 118px;
}

.res-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid #c7dcff;
  background: #ffffff;
  color: #1266e3;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(18, 102, 227, 0.08);
  transition: background .18s ease, color .18s ease, transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.res-btn:hover {
  background: #1266e3;
  color: #ffffff;
  border-color: #1266e3;
  box-shadow: 0 4px 10px rgba(18, 102, 227, 0.22);
  transform: translateY(-1px);
}
.res-btn:active { transform: translateY(0); }
.res-btn:focus-visible { outline: 2px solid #1266e3; outline-offset: 2px; }

/* ============================================================
   图片查看器（展位图 / 展商名录）
   ============================================================ */
.iv {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.iv[hidden] { display: none; }

.iv__mask {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: iv-fade .18s ease;
}
.iv__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1200px, 100%);
  height: min(880px, 100%);
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.45);
  animation: iv-pop .2s ease;
}
@keyframes iv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes iv-pop {
  from { opacity: 0; transform: translateY(10px) scale(.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 头部 */
.iv__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.iv__title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.iv__tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.iv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #4b5563;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.iv-btn:hover { background: #f9fafb; border-color: #d1d5db; color: #1f2937; }
.iv-btn:disabled { opacity: .45; cursor: not-allowed; }
.iv-btn:disabled:hover { background: #ffffff; border-color: #e5e7eb; color: #4b5563; }
.iv-btn--primary {
  background: #1266e3;
  border-color: #1266e3;
  color: #ffffff;
}
.iv-btn--primary:hover { background: #0b4bb3; border-color: #0b4bb3; color: #ffffff; }
.iv-btn--close { padding: 0; width: 34px; }
.iv-btn--close:hover { background: #eef4ff; border-color: #c7dcff; color: #1266e3; }
.iv-btn.is-disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

.iv__zoom {
  min-width: 52px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

/* 图片区域 */
.iv__body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #f3f4f6;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.iv__body.is-zoomed {
  align-items: flex-start;
  justify-content: flex-start;
}
.iv__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.iv__img.is-zoomed {
  max-width: none;
  max-height: none;
  margin: 0;
}

.iv__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #1266e3;
  font-size: 14px;
}
.iv__loading[hidden] { display: none; }

.iv__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #9ca3af;
  text-align: center;
  padding: 40px 16px;
}
.iv__empty[hidden] { display: none; }
.iv__empty-title { font-size: 15px; font-weight: 600; color: #6b7280; }
.iv__empty-hint { font-size: 13px; }

/* 底部 */
.iv__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
  border-top: 1px solid #e5e7eb;
  background: #fafbfc;
  flex-shrink: 0;
}
.iv__tip { font-size: 12px; color: #9ca3af; }

/* 打开时锁定页面滚动 */
body.iv-open { overflow: hidden; }

@media (max-width: 640px) {
  .iv { padding: 0; }
  .iv__panel { width: 100%; height: 100%; border-radius: 0; }
  .iv__head { flex-wrap: wrap; }
  .iv__tools { flex-wrap: wrap; }
  .iv-btn span { display: none; }
  .iv-btn--primary { padding: 0 10px; }
  .iv-btn--primary span { display: inline; }
  .iv__foot { display: none; }
  .iv__body { padding: 8px; }
}

/* ============================================================
   后台上传控件（首页展位图 / 展商名录）
   ============================================================ */
.img-uploader {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.img-uploader__box {
  position: relative;
  flex: 0 0 148px;
  width: 148px;
  height: 104px;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-uploader__box img {
  display: none;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.img-uploader__box img.is-on { display: block; }
.img-uploader__ph { font-size: 12px; color: #9ca3af; }
.img-uploader__ph[hidden] { display: none; }
.img-uploader__side { flex: 1; min-width: 0; }

@media (max-width: 640px) {
  .img-uploader { flex-direction: column; }
  .img-uploader__box { width: 100%; flex: none; }
}

/* 站点图标专用：方形小预览框 */
.img-uploader--icon .img-uploader__box {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
}

/* ============================================================
   站点图标（左上角，可在后台上传替换）
   ============================================================ */
.brand-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3f8bfa 0%, #1266e3 55%, #0b4bb3 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(18, 102, 227, 0.28);
}
.brand-logo--lg { width: 40px; height: 40px; }
.brand-logo--sm { width: 30px; height: 30px; border-radius: 7px; font-size: 14px; }
/* 上传了图标：白底衬托，图片 contain 居中 */
.brand-logo--img {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: none;
  padding: 3px;
}
.brand-logo--img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ============================================================
   首页 Banner 蓝色渐变
   ============================================================ */
.hero-gradient {
  background: linear-gradient(115deg, #062a6e 0%, #10499f 32%, #1266e3 68%, #3f8bfa 100%);
}

/* ============================================================
   多设备响应式适配
   ============================================================ */

/* ---------- 首页筛选区：小屏两行、≥640px 单行 ---------- */
.filter-bar {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}
/* 显式定位，避免自动排布把第二个下拉挤到第一行 */
.filter-search { grid-column: 1 / 3; grid-row: 1; }
.filter-reset { grid-column: 3; grid-row: 1; }
#categoryFilter { grid-column: 1; grid-row: 2; }
#hallFilter { grid-column: 2; grid-row: 2; }

.filter-select {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  color: #374151;
  font-size: 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.filter-select:focus {
  outline: none;
  border-color: #1266e3;
  box-shadow: 0 0 0 3px rgba(18, 102, 227, .1);
}
.filter-reset {
  height: 40px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  color: #4b5563;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.filter-reset:hover { background: #f9fafb; border-color: #9ca3af; color: #1f2937; }

@media (min-width: 640px) {
  .filter-bar {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 12px;
  }
  .filter-search, .filter-reset, #categoryFilter, #hallFilter {
    grid-column: auto;
    grid-row: auto;
  }
  .filter-select { width: auto; min-width: 134px; }
}
@media (min-width: 1024px) {
  .filter-select { min-width: 150px; }
}

/* ---------- 卡片：长名称/长标签不撑破布局 ---------- */
.exhibitor-card h3 { overflow-wrap: anywhere; }
.tag {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 分页：小屏换行、按钮缩小 ---------- */
@media (max-width: 640px) {
  #pageNav { flex-wrap: wrap; justify-content: center; gap: 6px; }
  .page-btn { min-width: 34px; height: 34px; padding: 0 8px; font-size: 13px; }
  #pagination { text-align: center; }
  .list-layout { gap: 14px; }
}

/* ---------- 详情页：小屏收窄留白 ---------- */
@media (max-width: 640px) {
  .detail-head { padding: 16px; }
  .breadcrumb { font-size: 12px; gap: 6px; padding: 14px 0 2px; }
  .breadcrumb .crumb-current { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .section-title { font-size: 15px; }
}
/* 长链接不撑破详情卡 */
#contactWebsiteText, #description { overflow-wrap: anywhere; }

/* ---------- 首页企业卡片：手机端两列紧凑布局 ---------- */
/* 桌面端继续使用 Tailwind 原有的 3 / 4 列尺寸，只在手机端调整密度。 */
@media (max-width: 639px) {
  .list-layout .list-main { width: 100%; }
  .res-rail .res-btn-group { flex-direction: row; }
  .res-rail .res-btn { flex: 1; min-height: 40px; }
  #grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  #grid .exhibitor-card {
    min-width: 0;
    border-radius: 8px;
  }
  #grid .exhibitor-card > div:first-child {
    height: 92px;
  }
  #grid .exhibitor-card__body {
    padding: 10px;
  }
  #grid .exhibitor-card h3 {
    font-size: 13px;
    line-height: 1.45;
    min-height: 38px;
    margin-bottom: 7px;
  }
  #grid .exhibitor-card__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    line-height: 1.35;
    margin-bottom: 6px;
  }
  #grid .exhibitor-card__meta > span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #grid .exhibitor-card__meta > .text-gray-300 {
    display: none;
  }
  #grid .exhibitor-card .min-h-\[44px\] {
    min-height: 30px;
  }
  #grid .exhibitor-card .tag {
    max-width: calc(100% - 4px);
    padding: 2px 5px;
    margin-right: 2px;
    font-size: 10px;
  }
}
/* 展品弹层图片高度：随视口收缩 */
.pm-image { height: 320px; }
@media (max-width: 640px) {
  .pm-image { height: 200px; }
  .modal-backdrop { padding: 10px; }
}

/* ---------- 后台：小屏侧栏转顶部横向标签栏 ---------- */
/* 注意：Tailwind 的工具类（w-56 / min-h-[...] / p-6）是运行时注入到 <head> 末尾的，
   与本文件同优先级时会覆盖本文件；所以这里一律用 .admin-shell 前缀提高特异性。 */
@media (max-width: 1023px) {
  .admin-shell { flex-direction: column; }
  .admin-shell .admin-side {
    width: 100%;
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 56px;
    z-index: 30;
  }
  .admin-shell .admin-side nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  /* 覆盖 space-y-1 的纵向外边距，避免横向排列时错位 */
  .admin-shell .admin-side nav > * + * { margin-top: 0 !important; }
  .admin-shell .admin-side nav::-webkit-scrollbar { display: none; }
  .admin-shell .admin-side .tab-btn {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .admin-shell .admin-main { padding: 16px; }
}
/* 只有手机/小平板才用固定表宽横滚；768 以上让表格自适应，避免操作列被切 */
@media (max-width: 767px) {
  .admin-shell .admin-table { min-width: 780px; }
}
@media (max-width: 640px) {
  .admin-shell .admin-main { padding: 12px; }
  .admin-main h2 { font-size: 17px; }
  .form-actions { flex-wrap: wrap; }
  /* 移动端触控目标不小于 42px */
  .form-input { min-height: 42px; }
  .btn:not(.btn-sm) { min-height: 42px; }
  .tag-editor__row .btn { min-height: 42px; }
  .admin-table td, .admin-table th { padding: 10px; }
}

/* ---------- 提示条：小屏撑满，避免溢出 ---------- */
@media (max-width: 640px) {
  .toast {
    left: 12px;
    right: 12px;
    transform: none;
    text-align: center;
    top: 72px;
  }
}
