/* ===== PEARL BACKGROUND ===== */
#pearl-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--color-bg-fixed);
  overflow: hidden;
  pointer-events: none;
}
#pearl-a {
  position: absolute;
  inset: -20%;
  will-change: transform;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(210,185,150,.55) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 75% 20%, rgba(230,205,165,.45) 0%, transparent 65%),
    radial-gradient(ellipse 70% 45% at 50% 80%, rgba(195,165,125,.4) 0%, transparent 60%),
    radial-gradient(ellipse 40% 55% at 85% 70%, rgba(220,195,155,.35) 0%, transparent 60%);
  filter: blur(30px);
}
#pearl-b {
  position: absolute;
  inset: 0;
  width: 200%;
  background: repeating-linear-gradient(
    135deg,
    rgba(180,150,110,.08) 0px,
    transparent 2px,
    transparent 28px,
    rgba(200,170,130,.06) 30px
  );
  filter: blur(22px);
  mix-blend-mode: soft-light;
}

/* ===== PAGE WRAPPER ===== */
#page-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ===== ANNOUNCEMENT BAR ===== */
#announcement-bar {
  background: var(--color-dark);
  color: #e8cf9c;
  font-family: var(--font-brand);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-align: center;
  padding: 10px var(--gutter-h);
  position: relative;
}
#announcement-bar .bar-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #e8cf9c;
  font-size: 16px;
  line-height: 1;
  opacity: .7;
  cursor: pointer;
}
#announcement-bar .bar-close:hover { opacity: 1; }

/* ===== SITE HEADER ===== */
/* ===== SITE HEADER — exact handoff values ===== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  /* all layout/padding/bg handled by inline style from handoff; no overrides here */
}

/* ===== SITE FOOTER ===== */
#site-footer {
  background: rgba(246,241,236,.7);
  backdrop-filter: blur(6px);
  padding: 48px var(--gutter-h) 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  font-size: 14px;
  border-top: 1px solid var(--color-border);
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-brand .logo {
  font-family: var(--font-brand);
  font-size: 22px;
  color: var(--color-dark);
  letter-spacing: 0.08em;
}
.footer-brand p,
.footer-brand small,
.footer-brand a {
  font-size: 13px;
  color: var(--color-text-2);
  line-height: 1.6;
}
.footer-brand a { color: var(--color-gold); }
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--color-dark);
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--color-text-2);
  margin-bottom: 8px;
  transition: color .2s;
}
.footer-col a:hover { color: var(--color-gold); }
.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid var(--color-border-2);
  padding-top: 20px;
  font-size: 13px;
  color: var(--color-text-2);
}

/* ===== AFFILIATE SECTION (above footer) ===== */
#affiliate-section {
  background: var(--color-near-black);
  color: #f3ece4;
  padding: clamp(44px,5vw,64px) var(--gutter-h);
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: center;
}
#affiliate-section h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(28px,3vw,42px);
  color: #f3ece4;
  margin-bottom: 8px;
}
#affiliate-section p {
  color: #cfc4b9;
  font-size: 15px;
}
.affiliate-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-width: min(100%, 420px);
}
.affiliate-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  background: var(--color-near-black);
  border: 0;
  border-radius: var(--r-pill);
  box-shadow: inset 4px 4px 10px rgba(0,0,0,.5), inset -4px -4px 10px rgba(255,255,255,.05);
  color: #fff;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
}
.affiliate-form button {
  border: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(145deg,#322c28,#241f1c);
  box-shadow: 6px 6px 14px rgba(0,0,0,.5), -5px -5px 12px rgba(255,255,255,.06);
  color: #e8cf9c;
  padding: 14px 32px;
  font-size: 15px;
  font-family: var(--font-body);
  transition: box-shadow .25s, color .25s;
}
.affiliate-form button:hover {
  box-shadow: 3px 3px 8px rgba(0,0,0,.5), -3px -3px 8px rgba(255,255,255,.06);
  color: #f5e3bd;
}

.affiliate-success {
  background: rgba(165,127,78,.15);
  border: 1px solid #a57f4e;
  border-radius: 8px;
  padding: 14px 22px;
  color: #d4b57e;
  font-size: 15px;
  letter-spacing: .02em;
  margin-top: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #primary-nav { display: none; }
  .nav-toggle { display: flex; }
  #primary-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 68px 0 0;
    background: rgba(248,244,240,.97);
    padding: 32px var(--gutter-h);
    gap: 20px;
    z-index: 99;
  }
  #primary-nav.open a { font-size: 14px; }
}

/* ===== MOBILE RESPONSIVE (Phase 6) ===== */
@media (max-width: 600px) {
  /* Hero */
  #main-content section:first-child {
    min-height: 480px;
  }
  /* Trust bar: 2-col on small */
  #main-content section[aria-label="Why Beautheca"] {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Categories: 2-col */
  #main-content section[aria-label="Categories"] {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Reviews: full-width cards */
  #rev-track figure {
    flex: 0 0 calc(100vw - 40px) !important;
  }
  /* TikTok grid: 2-col */
  #tiktok > div:last-child {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Products: single col */
  #prod-grid {
    grid-template-columns: 1fr 1fr;
  }
  /* Cookie notice stacked */
  #cookie-notice {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  #prod-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== SKIP TO CONTENT ===== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10000;
  padding: 10px 18px;
  background: #a57f4e;
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  transition: top .2s;
}
.skip-link:focus { top: 0; }
