/* =========================================================
   舒禾精品外約 - Main Stylesheet
   ========================================================= */

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Nunito', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  background: #F0F2F5;
  color: #2C2C2C;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --primary:        #FF6B9D;
  --primary-dark:   #D63384;
  --primary-light:  #FFB3CF;
  --secondary:      #4ECDC4;
  --accent:         #FFE66D;
  --header-bg:      #2C2C54;
  --bg-page:        #F0F2F5;
  --bg-card:        #FFFFFF;
  --text-primary:   #2C2C2C;
  --text-secondary: #666666;
  --text-muted:     #999999;
  --border:         rgba(0,0,0,0.08);
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.18);
  --radius:         12px;
  --radius-sm:      8px;
  --transition:     0.2s ease;
  --header-h:       64px;
  --catbar-h:       0px;
  --regionbar-h:    72px;
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  box-shadow: 0 2px 16px rgba(0,0,0,0.35);
  height: var(--header-h);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Logo */
.logo a {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-shadow: 0 0 24px rgba(255,107,157,0.6);
  transition: transform var(--transition);
}
.logo a:hover { transform: scale(1.05); }
.logo-emoji {
  font-size: 1.7rem;
  animation: logoBounce 2.4s ease-in-out infinite;
}
@keyframes logoBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  40%       { transform: translateY(-5px) rotate(-5deg); }
  60%       { transform: translateY(-3px) rotate(3deg); }
}

/* Search */
.search-box {
  flex: 1;
  max-width: 520px;
  display: flex;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 10px 52px 10px 20px;
  border-radius: 25px;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  outline: none;
}
.search-box input::placeholder { color: rgba(255,255,255,0.45); }
.search-box input:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--primary);
}
.btn-search {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: white;
  transition: background var(--transition);
}
.btn-search:hover { background: var(--primary-dark); }

/* Header Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.header-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 22px;
  transition: all var(--transition);
}
.header-nav .btn-login {
  border: 2px solid rgba(255,255,255,0.3);
}
.header-nav .btn-login:hover {
  border-color: white;
  color: white;
}
.header-nav .btn-register {
  background: var(--primary);
  color: white;
}
.header-nav .btn-register:hover { background: var(--primary-dark); }

/* =========================================================
   CATEGORY NAV BAR
   ========================================================= */
.category-nav {
  background: var(--header-bg);
  border-top: 1px solid rgba(255,255,255,0.07);
  position: sticky;
  top: var(--header-h);
  z-index: 99;
}
.category-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  height: var(--catbar-h);
  align-items: center;
}
.category-nav-inner::-webkit-scrollbar { display: none; }
.category-nav-inner a {
  color: rgba(255,255,255,0.65);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 18px;
  white-space: nowrap;
  transition: all var(--transition);
}
.category-nav-inner a:hover { color: white; background: rgba(255,255,255,0.1); }
.category-nav-inner a.active { background: var(--primary); color: white; }

/* =========================================================
   REGION BAR
   ========================================================= */
.region-bar {
  background: #fff;
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: sticky;
  top: calc(var(--header-h) + var(--catbar-h));
  z-index: 98;
}
.region-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
}
.region-label {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
/* 讓 chips 區域可橫向捲動；cursor: grab 提示桌面拖曳 */
.region-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-items: center;
  flex: 1 1 0%;
  min-width: 0;
  padding: 6px 2px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.region-chips.dragging { cursor: grabbing; }
.region-chips::-webkit-scrollbar { display: none; }
.region-chip {
  padding: 8px 22px;
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-page);
  border: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  pointer-events: auto;
}
.region-chips.dragging .region-chip { pointer-events: none; }
.region-chip:hover {
  color: var(--secondary);
  border-color: var(--secondary);
  background: rgba(78,205,196,0.06);
}
.region-chip.active {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

/* =========================================================
   MAIN LAYOUT
   ========================================================= */
.main-container {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 20px;
}
.content-area {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-h) + var(--catbar-h) + var(--regionbar-h) + 20px);
  max-height: calc(100vh - var(--header-h) - var(--catbar-h) - var(--regionbar-h) - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.sidebar-widget h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg-page);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Category List */
.category-list { display: flex; flex-direction: column; gap: 2px; }
.category-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.category-list li a:hover { background: var(--bg-page); color: var(--primary); }
.category-list li a.active { background: rgba(255,107,157,0.1); color: var(--primary); }
.cat-count {
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 0.73rem;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Tag Cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  background: var(--bg-page);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.tag-chip:hover,
.tag-chip.active {
  background: rgba(255,107,157,0.1);
  color: var(--primary);
  border-color: var(--primary-light);
}

/* Hot List */
.hot-list { display: flex; flex-direction: column; gap: 10px; }
.hot-item {
  display: flex;
  gap: 10px;
  cursor: pointer;
  transition: transform var(--transition);
}
.hot-item:hover { transform: translateX(4px); }
.hot-item-rank {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.hot-item:nth-child(1) .hot-item-rank { background: #FFD700; color: #7a5c00; }
.hot-item:nth-child(2) .hot-item-rank { background: #C0C0C0; color: #555; }
.hot-item:nth-child(3) .hot-item-rank { background: #CD7F32; color: #fff; }
.hot-item-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================================
   CONTENT MAIN AREA
   ========================================================= */
.content-main { min-width: 0; }
.grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.grid-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sort-bar { display: flex; gap: 6px; }
.sort-btn {
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 2px solid var(--border);
  transition: all var(--transition);
}
.sort-btn:hover,
.sort-btn.active {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(255,107,157,0.06);
}

/* =========================================================
   CONTENT GRID & CARDS
   ========================================================= */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.content-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.content-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Thumbnail */
.card-thumbnail {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  background: var(--bg-page);
}
.card-thumbnail img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.content-card:hover .card-thumbnail img { transform: scale(1.06); }

.card-badge {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.68);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  backdrop-filter: blur(4px);
}
.card-badge-today {
  background: rgba(220, 38, 38, 0.85);
}
.card-category-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 10px;
}

/* Card Body */
.card-body {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.content-card:hover .card-title { color: var(--primary); }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; min-height: 22px; }
.card-tag {
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: auto;
}
.card-meta span { display: flex; align-items: center; gap: 3px; }
.card-views {
  margin-left: auto;
  color: #e25822;
  font-weight: 800;
  font-size: 0.78rem;
}

/* =========================================================
   SKELETON LOADING
   ========================================================= */
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.card-skeleton {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.thumb-skel {
  padding-top: 56.25%;
  background: linear-gradient(90deg, #ececec 25%, #ddd 50%, #ececec 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.body-skel { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.line-skel {
  height: 13px;
  border-radius: 7px;
  background: linear-gradient(90deg, #ececec 25%, #ddd 50%, #ececec 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.pagination button {
  min-width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 2px solid var(--border);
  transition: all var(--transition);
  padding: 0 10px;
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); border-color: var(--primary); color: white; }
.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }
.pagination .page-ellipsis { padding: 0 4px; color: var(--text-muted); font-weight: 700; }

/* =========================================================
   EMPTY STATE
   ========================================================= */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-emoji { font-size: 4rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state p { font-size: 0.9rem; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--header-bg);
  color: rgba(255,255,255,0.55);
  padding: 30px 20px 18px;
  margin-top: 40px;
}
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 18px;
}
.footer-links a {
  color: rgba(255,255,255,0.45);
  font-size: 0.83rem;
  font-weight: 700;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary); }
.footer-copyright { text-align: center; font-size: 0.8rem; color: rgba(255,255,255,0.3); }

/* =========================================================
   TOAST
   ========================================================= */
.toast-container {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--header-bg);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}
@keyframes toastIn  { from { transform: translateX(80px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; pointer-events: none; } }

/* =========================================================
   DETAIL PAGE
   ========================================================= */
.detail-header {
  background: var(--header-bg);
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.breadcrumb {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.87rem;
  color: rgba(255,255,255,0.55);
  font-weight: 700;
}
.breadcrumb a { color: rgba(255,255,255,0.65); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: rgba(255,255,255,0.25); }
.breadcrumb .current { color: rgba(255,255,255,0.9); }

.detail-container {
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
.detail-main { min-width: 0; }

.detail-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.detail-media img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.detail-media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: rgba(255,255,255,0.4);
}

.detail-info {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}
.detail-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 14px;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--bg-page);
}
.detail-meta span { display: flex; align-items: center; gap: 4px; }
.category-link { color: var(--secondary) !important; }
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.detail-tag {
  background: rgba(255,107,157,0.07);
  color: var(--primary);
  border: 2px solid var(--primary-light);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition);
}
.detail-tag:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Action buttons */
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.btn-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 22px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-like {
  background: rgba(255,107,157,0.1);
  color: var(--primary);
  border: 2px solid var(--primary-light);
}
.btn-like:hover,
.btn-like.active { background: var(--primary); color: white; border-color: var(--primary); }
.btn-dislike {
  background: var(--bg-page);
  color: var(--text-secondary);
  border: 2px solid var(--border);
}
.btn-dislike:hover { border-color: var(--text-secondary); }
.btn-share {
  background: rgba(78,205,196,0.1);
  color: var(--secondary);
  border: 2px solid rgba(78,205,196,0.35);
}
.btn-share:hover { background: var(--secondary); color: white; border-color: var(--secondary); }

.detail-description {
  margin-top: 18px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* Detail sidebar */
.detail-sidebar { display: flex; flex-direction: column; gap: 16px; }

.related-list { display: flex; flex-direction: column; gap: 12px; }
.related-item {
  display: flex;
  gap: 10px;
  cursor: pointer;
  transition: transform var(--transition);
}
.related-item:hover { transform: translateX(4px); }
.related-thumb {
  width: 104px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-page);
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-info { flex: 1; min-width: 0; }
.related-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  transition: color var(--transition);
}
.related-item:hover .related-title { color: var(--primary); }
.related-meta { font-size: 0.74rem; color: var(--text-muted); font-weight: 700; }

/* ── Detail page: photo gallery ────────────────────────── */
.photo-gallery { margin-bottom: 0; }
.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #111;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  cursor: zoom-in;
}
.gallery-main-img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.2s;
}
.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 4px 16px;
  cursor: pointer;
  border-radius: 6px;
  z-index: 2;
  transition: background 0.2s;
}
.gallery-btn:hover { background: rgba(0,0,0,0.8); }
.gallery-btn-prev { left: 8px; }
.gallery-btn-next { right: 8px; }
.gallery-zoom-hint {
  position: absolute;
  bottom: 8px; right: 10px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.65);
  pointer-events: none;
}
.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.gallery-thumb {
  width: 72px; height: 72px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  opacity: 0.7;
  transition: all 0.2s;
}
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active {
  border-color: var(--primary);
  opacity: 1;
}

/* ── Detail page: loading/error states ─────────────────── */
.detail-loading {
  text-align: center;
  padding: 80px 20px;
  font-size: 1.1rem;
  color: var(--text-muted);
}
.detail-loading .loading-spinner { font-size: 3rem; margin-bottom: 12px; }
.detail-error {
  text-align: center;
  padding: 80px 20px;
}
.detail-error .empty-emoji { font-size: 4rem; }
.btn-back {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border-radius: 22px;
  font-weight: 700;
  text-decoration: none;
}

/* ── Detail page: info sections ────────────────────────── */
.detail-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.detail-title { margin-bottom: 0; }
.detail-today-badge {
  background: #dc2626;
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 12px;
  white-space: nowrap;
}
.detail-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px solid var(--bg-page);
}
.section-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.info-item {
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.info-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.info-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}
.info-empty { color: var(--text-muted); font-size: 0.88rem; }
.promo-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.8;
}
.detail-pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.75;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 0;
}
.excluded-text { font-size: 0.92rem; color: #dc2626; font-weight: 700; }
.detail-footer-meta {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 2px solid var(--bg-page);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  gap: 16px;
}
.detail-actions { margin-bottom: 4px; }
.no-related { font-size: 0.85rem; color: var(--text-muted); text-align: center; padding: 20px 0; }

/* ── Lightbox ───────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
}
.lightbox-close {
  position: fixed;
  top: 16px; right: 20px;
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  font-size: 1.5rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 9001;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev, .lightbox-next {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  font-size: 2.5rem;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  z-index: 9001;
  transition: background 0.2s;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.3); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .content-area { grid-template-columns: 200px 1fr; }
}

@media (max-width: 900px) {
  .content-area { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    max-height: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .detail-container { grid-template-columns: 1fr; }
  .detail-sidebar { order: -1; }
}

@media (max-width: 768px) {
  .header-inner { gap: 10px; }
  .logo a > span:last-child { display: none; }
  .content-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .main-container { padding: 12px; }
  .detail-container { padding: 0 12px; }
  .content-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .search-box { max-width: 160px; }
  .header-nav .btn-login { display: none; }
  .sort-bar { display: none; }
}
