/*
Theme Name: Vickie BeiBei
Theme URI: https://vickiebeibei.com
Author: Kelly
Description: Custom WordPress theme for Vickie BeiBei — group buy site with mobile-first client admin panel (/vickie-admin/). Khaki / white / black palette with terracotta-rosewood accent.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: vickie
*/

:root {
  --white: #FBF9F4;
  --khaki: #C6B78F;
  --khaki-deep: #8F7E58;
  --black: #1C1A16;
  --link: #9C6659;
  --hero-bg: #25231D;
  --cream: #F4EFE1;
  --border: #E4DCC7;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--white);
  color: var(--black);
  font-family: 'Work Sans', 'Noto Sans SC', sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--link); }

.display { font-family: 'Fraunces', 'Noto Serif SC', serif; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}

/* STICKY TOP — hero + socials + nav pinned together */
.vb-sticky-top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
}

.vb-hero {
  background: var(--cream);
  padding: 28px 20px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.vb-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--khaki), var(--link), var(--khaki));
}

.vb-avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  border: 1.5px solid var(--khaki);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--khaki-deep);
}

.vb-avatar img { width: 100%; height: 100%; object-fit: cover; }

.vb-hero-name {
  font-family: 'Fraunces', 'Noto Serif SC', serif;
  font-weight: 400;
  font-size: 26px;
  color: var(--black);
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.vb-hero-name em { font-style: italic; color: var(--link); }

.vb-hero-tagline { font-size: 13px; color: #4A473F; margin-top: 8px; line-height: 1.5; }
.vb-hero-sub { font-size: 11.5px; color: #6B6656; margin-top: 4px; line-height: 1.5; }
.vb-hero-loc { font-size: 11.5px; color: var(--link); margin-top: 5px; letter-spacing: 0.02em; }

/* SOCIAL ROW */
.vb-socials {
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 0.5px solid var(--border);
  background: var(--cream);
  justify-content: center;
}

.vb-social-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--white);
  border: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vb-social-btn svg { width: 16px; height: 16px; color: var(--khaki-deep); }

/* NAV TABS */
.vb-nav {
  display: flex;
  background: rgba(244, 239, 225, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--border);
}

.vb-tab {
  flex: 1;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8A8474;
  padding: 12px 6px;
  position: relative;
  text-decoration: none;
}

.vb-tab.active { color: var(--black); font-weight: 500; }

.vb-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--link);
}

/* SECTION LABELS */
.eyebrow {
  color: var(--khaki-deep);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--khaki-deep);
  display: inline-block;
}

.section { padding: 56px 24px; }
.section-alt { background: #F3EFE5; }
.section-head { margin-bottom: 28px; }
.section-head .eyebrow { color: var(--link); }
.section-head .eyebrow::before { background: var(--link); }

.section-head h2 { font-size: 28px; font-weight: 500; color: var(--black); }

.section-head h2 small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--khaki-deep);
  margin-top: 6px;
  letter-spacing: 0.03em;
}

/* 团购总结 BANNER */
.vb-summary {
  padding: 24px 24px 0;
}

.vb-summary-inner {
  border: 1px solid var(--border);
  background: var(--cream);
  overflow: hidden;
}

.vb-summary-inner img { width: 100%; height: auto; cursor: zoom-in; }

.vb-summary-cap {
  padding: 14px 18px;
  font-size: 12.5px;
  color: var(--khaki-deep);
  letter-spacing: 0.04em;
}

.vb-summary-cap b { color: var(--black); font-weight: 500; }

/* GROUP BUY CARDS */
.gb-list { display: flex; flex-direction: column; gap: 18px; }

.gb-card {
  border: 1px solid #E7E1D2;
  background: var(--white);
  display: flex;
  flex-direction: column;
}

.gb-card .thumb {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--cream);
  position: relative;
  cursor: zoom-in;
}

.gb-card .thumb.no-poster { cursor: default; }

.gb-card .tag {
  position: absolute;
  top: 14px; left: 14px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
  background: var(--black);
  color: var(--white);
}

.gb-card.closed .tag { background: #9B9382; color: var(--white); }
.gb-card.closed .thumb { filter: grayscale(0.4); }
.gb-card.closed .body { opacity: 0.55; }

.gb-card .body { padding: 20px; }
.gb-card h3 { font-size: 19px; font-weight: 500; margin-bottom: 6px; }

.gb-card .meta {
  font-size: 12.5px;
  color: var(--khaki-deep);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.gb-card .meta b { color: var(--black); }

.gb-card p.desc {
  font-size: 13.5px;
  color: #4A473F;
  line-height: 1.6;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--white);
  background: var(--black);
  padding: 12px 20px;
  width: fit-content;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn::after { content: '→'; font-size: 14px; }

.closed-label { font-size: 13px; color: #8A8474; font-weight: 500; }
.pending-label { font-size: 13px; color: var(--khaki-deep); font-weight: 500; }

.vb-empty {
  border: 1px dashed var(--border);
  padding: 28px 20px;
  text-align: center;
  color: #8A8474;
  font-size: 13.5px;
  letter-spacing: 0.02em;
}

/* LIVE */
.live { background: var(--khaki); }
.live .eyebrow, .live .eyebrow::before { color: var(--black); background: var(--black); }
.live .section-head h2 small { color: #3D3627; }

.live-list { display: flex; flex-direction: column; gap: 16px; }

.live-card {
  background: var(--white);
  border: 1px solid rgba(28, 26, 22, 0.12);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.live-info h3 { font-size: 18px; font-weight: 500; margin-bottom: 8px; }

.live-info .live-when {
  font-size: 12.5px;
  color: var(--khaki-deep);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.live-info .live-when b { color: var(--black); }

.live-info p {
  font-size: 13.5px;
  line-height: 1.7;
  color: #4A473F;
  max-width: 520px;
}

.live-poster { width: 100%; border: 1px solid var(--border); cursor: zoom-in; }

.live-badge {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
  background: var(--link);
  color: var(--white);
  margin-bottom: 12px;
}

.live-badge.past { background: #9B9382; }

/* TELEGRAM CTA */
.telegram {
  background: var(--hero-bg);
  padding: 56px 24px;
  text-align: left;
}

.telegram .eyebrow { color: var(--khaki); }
.telegram .eyebrow::before { background: var(--khaki); }

.telegram h2 { color: var(--white); font-size: 26px; font-weight: 500; margin-bottom: 12px; }

.telegram p {
  color: rgba(251, 249, 244, 0.65);
  font-size: 13.5px;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 360px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--khaki);
  color: var(--khaki);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 12px 20px;
  text-decoration: none;
}

/* PAGE CONTENT (fallback template) */
.vb-page { padding: 56px 24px; }
.vb-page h1 { font-family: 'Fraunces', 'Noto Serif SC', serif; font-size: 30px; font-weight: 400; margin-bottom: 20px; }
.vb-page .entry { font-size: 14.5px; line-height: 1.8; color: #3E3B34; }
.vb-page .entry p { margin-bottom: 16px; }
.vb-page .entry h2 { font-size: 22px; margin: 28px 0 12px; font-weight: 500; }

/* LIGHTBOX (class toggle — never the hidden attribute) */
.vb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(28, 26, 22, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.vb-lightbox.vb-show { display: flex; }
.vb-lightbox img { max-width: 100%; max-height: 88vh; object-fit: contain; }

.vb-lightbox-close {
  position: absolute;
  top: 16px; right: 18px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--khaki);
  background: transparent;
  color: var(--khaki);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* FOOTER */
footer.vb-footer { background: var(--black); padding: 44px 24px 32px; text-align: center; }
footer.vb-footer .name { color: var(--white); font-size: 20px; font-family: 'Fraunces', serif; margin-bottom: 6px; }
footer.vb-footer .tag { color: var(--khaki); font-size: 12px; letter-spacing: 0.08em; margin-bottom: 24px; }

footer.vb-footer .socials { display: flex; justify-content: center; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
footer.vb-footer .socials svg { width: 19px; height: 19px; color: var(--white); opacity: 0.8; }
footer.vb-footer .copy { color: #6B675C; font-size: 11px; letter-spacing: 0.04em; }

@media(min-width:760px) {
  .vb-hero { padding: 36px 40px 28px; }
  .vb-avatar { width: 96px; height: 96px; }
  .vb-hero-name { font-size: 32px; }
  .vb-socials, .vb-nav { padding-left: 40px; padding-right: 40px; }
  .gb-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .section, .telegram, .vb-page { padding: 72px 60px; }
  .vb-summary { padding: 32px 60px 0; }
  .live-card { flex-direction: row; align-items: center; justify-content: space-between; padding: 32px 40px; }
  .live-poster { max-width: 260px; }
  footer.vb-footer { padding: 56px 60px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
