/*
Theme Name: BuffetPromo 自助餐及玩樂優惠
Description: 香港自助餐及玩樂優惠網站主題，深紫金色系設計。
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: buffetpromo_theme
*/

/* ═══════════════════════════════════
   VARIABLES
═══════════════════════════════════ */
:root {
  --purple-dark:  #1a0a2e;
  --purple-mid:   #2d1554;
  --purple-light: #4a2080;
  --gold:         #d4a843;
  --gold-light:   #f0c860;
  --gold-dim:     #a07820;
  --text-main:    #f5ecd7;
  --text-sub:     #c8b89a;
  --card-bg:      #231040;
  --card-border:  #5a3090;
  --radius:       14px;
  --content-max:  1280px;
}

/* ═══════════════════════════════════
   RESET & BASE
═══════════════════════════════════ */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--purple-dark);
  color: var(--text-main);
  font-family: 'Noto Sans HK', sans-serif;
  min-height: 100vh;
}

/* ═══════════════════════════════════
   HEADER
═══════════════════════════════════ */
.site-header {
  background: linear-gradient(90deg, var(--purple-mid), #3a1a6e);
  border-bottom: 2px solid var(--gold);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(212,168,67,0.25);
}
.logo {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--gold-light);
  letter-spacing: 1px;
  text-decoration: none;
}
.logo-em { color: var(--gold-light); }

/* ═══════════════════════════════════
   SOCIAL ICONS (Header 右側)
═══════════════════════════════════ */
.social-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-dim);
  color: var(--gold);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.social-icon svg {
  width: 17px;
  height: 17px;
  fill: var(--gold);
}
.social-icon:hover {
  background: rgba(212,168,67,0.2);
  border-color: var(--gold-light);
  transform: scale(1.1);
}
.social-icon:hover svg {
  fill: var(--gold-light);
}

/* ═══════════════════════════════════
   HERO (首頁)
═══════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, #2d1554 0%, #1a0a2e 50%, #3a1060 100%);
  text-align: center;
  padding: 56px 24px 48px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212,168,67,0.18) 0%, transparent 70%);
}
.hero-tag {
  display: inline-block;
  background: var(--gold);
  color: var(--purple-dark);
  font-size: 0.75rem;
  font-weight: 900;
  padding: 4px 16px;
  border-radius: 30px;
  letter-spacing: 2px;
  margin-bottom: 16px;
  position: relative;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 12px;
  position: relative;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold-light);
}
.hero p {
  color: var(--text-sub);
  font-size: 1rem;
  position: relative;
}

/* ═══════════════════════════════════
   CATEGORY TABS
═══════════════════════════════════ */
.category-bar,
.cat-switch {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 28px 24px 0;
  flex-wrap: wrap;
}
.cat-btn {
  padding: 10px 28px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--gold);
  transition: all 0.2s;
  text-decoration: none;
}
.cat-btn.active {
  background: var(--gold);
  color: var(--purple-dark);
}
.cat-btn:not(.active) {
  background: transparent;
  color: var(--gold);
}
.cat-btn:hover:not(.active) {
  background: rgba(212,168,67,0.15);
}

/* ═══════════════════════════════════
   SECTION HEADER
═══════════════════════════════════ */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 32px 32px 0;
  max-width: var(--content-max);
  margin: 0 auto;
}
.section-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gold-light);
  white-space: nowrap;
}
.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), transparent);
}
.section-count {
  font-size: 0.8rem;
  color: var(--text-sub);
  white-space: nowrap;
}

/* ═══════════════════════════════════
   GRID
═══════════════════════════════════ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 20px 32px 40px;
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ═══════════════════════════════════
   CARD
═══════════════════════════════════ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(212,168,67,0.2);
}
.card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #3a1a6e 0%, #5a2090 50%, #3a1a6e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  text-decoration: none;
}
.card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-cat {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
  text-decoration: none;
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}
.card-price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.price-label { font-size: 0.78rem; color: var(--text-sub); }
.price-val   { font-size: 1.5rem; font-weight: 900; color: var(--gold-light); }
.price-unit  { font-size: 0.8rem; color: var(--text-sub); }
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.btn-detail {
  flex: 1;
  padding: 9px 0;
  border-radius: 8px;
  background: var(--purple-light);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-detail:hover { background: #6030a0; }
.btn-affiliate {
  flex: 1;
  padding: 9px 0;
  border-radius: 8px;
  background: var(--gold);
  color: var(--purple-dark);
  font-size: 0.85rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-affiliate:hover { background: var(--gold-light); }

/* ═══════════════════════════════════
   LOAD MORE
═══════════════════════════════════ */
.load-more-wrap {
  text-align: center;
  padding: 0 0 48px;
}
.btn-load-more {
  padding: 14px 48px;
  border-radius: 30px;
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Noto Sans HK', sans-serif;
}
.btn-load-more:hover {
  background: var(--gold);
  color: var(--purple-dark);
}
.btn-load-more:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ═══════════════════════════════════
   CATEGORY HERO (分類頁)
═══════════════════════════════════ */
.cat-hero {
  background: linear-gradient(135deg, #2d1554 0%, #1a0a2e 50%, #3a1060 100%);
  padding: 40px 24px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--gold-dim);
}
.cat-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212,168,67,0.15) 0%, transparent 70%);
}
.breadcrumb {
  position: relative;
  font-size: 0.82rem;
  color: var(--text-sub);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--gold); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.cat-icon {
  font-size: 2.8rem;
  display: block;
  margin-bottom: 10px;
  position: relative;
}
.cat-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  color: var(--gold-light);
  position: relative;
  margin-bottom: 8px;
}
.cat-hero p {
  color: var(--text-sub);
  font-size: 0.92rem;
  position: relative;
}
.cat-badge {
  display: inline-block;
  background: rgba(212,168,67,0.15);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-top: 12px;
  position: relative;
}

/* ═══════════════════════════════════
   SINGLE POST — 內文頁
═══════════════════════════════════ */
.page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 24px 60px;
}
.cover-img-wrap {
  width: 100%;
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
}
.cover-img-wrap img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  display: block;
}
.cover-img-placeholder {
  aspect-ratio: 16/7;
  background: linear-gradient(135deg, #3a1a6e 0%, #5a2090 40%, #3a1060 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

/* META ROW */
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.cat-tag {
  display: inline-block;
  background: rgba(212,168,67,0.15);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 1px;
  text-decoration: none;
}
.post-date {
  font-size: 0.78rem;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* STAR RATING */
.star-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.stars-display {
  display: flex;
  gap: 2px;
}
.stars-display .star {
  font-size: 1.2rem;
  line-height: 1;
  color: #4a2080;
}
.stars-display .star.filled { color: var(--gold-light); }
.stars-display .star.half {
  background: linear-gradient(90deg, var(--gold-light) 50%, #4a2080 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rating-text { font-size: 0.78rem; color: var(--text-sub); }

/* TITLE */
h1.post-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 24px;
}

/* HIGHLIGHT BOX */
.highlight-box {
  background: linear-gradient(135deg, #2d1554, #3a1a6e);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 4px 30px rgba(212,168,67,0.15);
}
.price-label-sm { font-size: 0.82rem; color: var(--text-sub); margin-bottom: 4px; }
.price-big {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
}
.price-big span { font-size: 1.1rem; font-weight: 400; color: var(--text-sub); margin-left: 4px; }
.cta-block { display: flex; flex-direction: column; gap: 10px; min-width: 200px; }
.btn-affiliate-big {
  display: block;
  padding: 16px 32px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--purple-dark);
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.5px;
}
.btn-affiliate-big:hover { background: var(--gold-light); transform: scale(1.02); }
.affiliate-note { font-size: 0.75rem; color: var(--text-sub); text-align: center; }

/* DIVIDER */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
  margin: 32px 0;
}

/* CONTENT */
.content-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--gold-light);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.content-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), transparent);
}
.content-body {
  font-size: 0.98rem;
  line-height: 1.9;
  color: var(--text-main);
}
.content-body p { margin-bottom: 16px; }
.content-body ul { padding-left: 20px; margin-bottom: 16px; }
.content-body ul li { margin-bottom: 8px; color: var(--text-sub); }
.content-body ul li strong { color: var(--text-main); }

/* BOTTOM CTA */
.bottom-cta {
  background: linear-gradient(135deg, #2d1554, #1a0a2e);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin-top: 40px;
}
.bottom-cta p { color: var(--text-sub); font-size: 0.9rem; margin-bottom: 16px; }
.bottom-cta p strong { color: var(--gold-light); }

/* BACK BUTTON */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  margin-top: 32px;
  padding: 8px 0;
  transition: gap 0.2s;
}
.back-btn:hover { gap: 10px; }

/* ═══════════════════════════════════
   PROMO TAGS
═══════════════════════════════════ */
.promo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.promo-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(212,168,67,0.2), rgba(212,168,67,0.08));
  border: 1px solid var(--gold-dim);
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ═══════════════════════════════════
   FOOTER
═══════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--purple-light);
  padding: 24px;
  text-align: center;
  color: var(--text-sub);
  font-size: 0.82rem;
}

/* ═══════════════════════════════════
   RESPONSIVE
═══════════════════════════════════ */
@media (max-width: 600px) {
  .grid { padding: 16px; gap: 16px; }
  .section-header { padding: 24px 16px 0; }
  .highlight-box { flex-direction: column; }
  .cta-block { width: 100%; }
  .page-wrap { padding: 24px 16px 48px; }
  .post-meta { gap: 8px; }
  .seo-intro-container { padding: 0 16px; }
}

/* ═══════════════════════════════════
   SEO INTRO SECTION
═══════════════════════════════════ */
.seo-intro-section {
  background: linear-gradient(135deg, #1f0d3a 0%, #160828 100%);
  border-top: 1px solid var(--gold-dim);
  padding: 2.5rem 0 3rem;
  margin-top: 0;
}

.seo-intro-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 32px;
}

.seo-intro-section h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.3px;
}

.seo-intro-section p {
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--text-sub);
  margin-bottom: 0.5rem;
  max-width: 72ch;
}

.seo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.seo-tags span {
  font-size: 0.72rem;
  color: var(--gold);
  background: rgba(212,168,67,0.1);
  border: 1px solid var(--gold-dim);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}

.seo-back-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

.seo-back-link:hover {
  color: var(--gold-light);
  text-decoration: underline;
}