/*
 * BestSkinSpecialists — Shared Templates Stylesheet
 * Covers: front-page.php, single.php, single-pinterest.php
 * Brand System v1.0 | Mobile-First
 *
 * This file is the global token + structural base.
 * No page-specific rules go here.
 */

/* ── GOOGLE FONTS PRECONNECT ──────────────────────────────────
   Fonts: Cormorant Garant (display) + Plus Jakarta Sans (body) + IBM Plex Mono
   ─────────────────────────────────────────────────────────── */

/* ── BRAND TOKENS ─────────────────────────────────────────── */
:root {
  /* INK */
  --ink:        #1A2422;
  --ink-2:      #2E3E3B;
  --ink-3:      #607370;
  --ink-4:      #A0B0AD;

  /* SAGE — primary brand */
  --sage:       #4E7A6A;
  --sage-d:     #3A5E51;
  --sage-dd:    #274038;
  --sage-l:     #7FA896;
  --sage-ll:    #AECFC4;
  --sage-f:     #EBF4F1;

  /* PEARL — backgrounds */
  --pearl:      #F5F1EC;
  --pearl-2:    #EDE8E2;
  --surface:    #FDFCFA;
  --surface-2:  #F8F5F1;
  --border:     rgba(26,36,34,0.09);
  --border-2:   rgba(26,36,34,0.05);

  /* CTA — terracotta */
  --cta:        #C4573F;
  --cta-d:      #A3432E;
  --cta-l:      #F0D4CE;

  /* BLUSH — pinterest / accent */
  --blush:      #D4907A;
  --blush-d:    #B87060;
  --blush-l:    #F2DDD7;
  --blush-f:    #FAF3F1;

  /* SEMANTIC */
  --ok:         #1D5C40;
  --ok-bg:      #D5EFE3;
  --warn:       #7A5200;
  --warn-bg:    #FEF3C5;
  --err:        #A02E24;
  --err-bg:     #FDECEA;

  /* TYPOGRAPHY */
  --f-d:   'Cormorant Garant', Georgia, serif;
  --f-b:   'Plus Jakarta Sans', system-ui, sans-serif;
  --f-m:   'IBM Plex Mono', 'Courier New', monospace;

  /* TYPE SCALE */
  --t-xs:   0.75rem;
  --t-sm:   0.875rem;
  --t-base: 1rem;
  --t-lg:   1.125rem;
  --t-xl:   1.25rem;
  --t-2xl:  1.5rem;
  --t-3xl:  clamp(1.75rem, 3vw, 2.25rem);
  --t-4xl:  clamp(2.25rem, 4.5vw, 3rem);
  --t-hero: clamp(2.75rem, 6vw, 4.5rem);

  /* LAYOUT */
  --r-sm:       6px;
  --r-md:       12px;
  --r-lg:       20px;
  --r-xl:       28px;
  --r-2xl:      40px;
  --r-pill:     999px;
  --sh-sm:      0 1px 4px rgba(26,36,34,0.06);
  --sh-md:      0 4px 16px rgba(26,36,34,0.08);
  --sh-lg:      0 12px 40px rgba(26,36,34,0.10);
  --max-w:      1280px;
  --pg:         clamp(20px, 4vw, 40px);
  --sidebar-w:  248px;
}

/* ── BASE ─────────────────────────────────────────────────── */
.bss-tmpl *, .bss-tmpl *::before, .bss-tmpl *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}

html { overflow-x: hidden; max-width: 100%; }

.bss-tmpl {
  font-family: var(--f-b);
  font-weight: 300;
  background: var(--pearl);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}
.bss-tmpl img  { max-width: 100%; height: auto; display: block; }
.bss-tmpl a    { color: inherit; text-decoration: none; }
.bss-tmpl button { font-family: var(--f-b); cursor: pointer; border: none; }

/* ── NAVIGATION ───────────────────────────────────────────── */
.bss-tmpl #bss-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(253,252,250,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.bss-tmpl .bss-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pg);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.bss-tmpl .bss-logo {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
  gap: 0;
}
.bss-tmpl .bss-logo-best {
  font-family: var(--f-d);
  font-style: italic;
  font-weight: 600;
  font-size: 1.3125rem;
  color: var(--sage-d);
  letter-spacing: -0.01em;
}
.bss-tmpl .bss-logo-skin {
  font-family: var(--f-d);
  font-style: normal;
  font-weight: 500;
  font-size: 1.3125rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.bss-tmpl .bss-logo-specialists {
  font-family: var(--f-b);
  font-weight: 300;
  font-size: 1.125rem;
  color: var(--ink-3);
}

/* Nav links */
.bss-tmpl .bss-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.bss-tmpl .bss-nav-links a {
  font-size: var(--t-sm);
  font-weight: 400;
  color: var(--ink-3);
  transition: color 0.2s;
}
.bss-tmpl .bss-nav-links a:hover { color: var(--ink); }

/* Nav CTA */
.bss-tmpl .bss-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  background: var(--cta);
  color: #fff !important;
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  flex-shrink: 0;
  text-decoration: none;
}
.bss-tmpl .bss-nav-cta:hover {
  background: var(--cta-d);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(196,87,63,0.28);
}

/* Hamburger */
.bss-nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  align-items: center;
}
.bss-nav-hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink-2);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── BREADCRUMB ───────────────────────────────────────────── */
.bss-breadcrumb {
  background: var(--surface);
  border-bottom: 1px solid var(--border-2);
}
.bss-breadcrumb-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px var(--pg);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bss-breadcrumb-item {
  font-family: var(--f-m);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--ink-4);
}
.bss-breadcrumb-item a {
  color: var(--sage-d);
  text-decoration: none;
  transition: color 0.2s;
}
.bss-breadcrumb-item a:hover { color: var(--sage-dd); }
.bss-breadcrumb-sep {
  color: var(--border);
  font-size: 0.625rem;
}

/* ── THREE-COLUMN LAYOUT ──────────────────────────────────── */
.bss-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px var(--pg) clamp(80px, 12vw, 120px);
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--sidebar-w);
  gap: 48px;
  align-items: start;
}

/* ── LEFT SIDEBAR ─────────────────────────────────────────── */
.bss-sidebar-left {
  position: sticky;
  top: 96px;
}
.bss-sidebar-nav-label {
  font-family: var(--f-m);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 14px;
}
.bss-condition-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bss-condition-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  font-weight: 400;
  color: var(--ink-3);
  text-decoration: none;
  transition: all 0.18s;
  gap: 8px;
  border: 1.5px solid transparent;
}
.bss-condition-nav-link:hover {
  background: var(--sage-f);
  color: var(--ink);
}
.bss-condition-nav-link.is-active {
  background: var(--sage-f);
  border-color: var(--sage-ll);
  color: var(--ink);
  font-weight: 500;
}
.bss-condition-nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage-ll);
  flex-shrink: 0;
}
.bss-condition-nav-link.is-active .bss-condition-nav-dot {
  background: var(--sage);
}

/* Sidebar related */
.bss-sidebar-related { margin-top: 28px; }
.bss-sidebar-related-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bss-sidebar-related-link {
  display: block;
  padding: 8px 10px;
  border-radius: var(--r-md);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ink-3);
  text-decoration: none;
  line-height: 1.4;
  transition: all 0.18s;
  border: 1.5px solid transparent;
}
.bss-sidebar-related-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* ── RIGHT SIDEBAR ────────────────────────────────────────── */
.bss-sidebar-right {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Find Specialist CTA card */
.bss-sidebar-cta {
  background: var(--ink);
  border-radius: var(--r-xl);
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
}
.bss-sidebar-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(78,122,106,0.18) 0%, transparent 60%);
  pointer-events: none;
}
.bss-sidebar-cta-kicker {
  font-family: var(--f-m);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage-ll);
  margin-bottom: 8px;
  position: relative;
}
.bss-sidebar-cta-heading {
  font-family: var(--f-d);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--surface);
  line-height: 1.2;
  margin-bottom: 10px;
  position: relative;
}
.bss-sidebar-cta-sub {
  font-size: var(--t-xs);
  color: rgba(253,252,250,0.45);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 18px;
  position: relative;
}
.bss-btn-sidebar-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 20px;
  background: var(--cta);
  color: #fff !important;
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  position: relative;
}
.bss-btn-sidebar-cta:hover {
  background: var(--cta-d);
  transform: translateY(-1px);
}

/* Conditions compare card */
.bss-sidebar-conditions {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px;
}
.bss-sidebar-conditions-label {
  font-family: var(--f-m);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 14px;
}
.bss-compare-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: background 0.18s;
  gap: 8px;
  border: 1px solid transparent;
}
.bss-compare-link:hover {
  background: var(--sage-f);
  border-color: var(--sage-ll);
}
.bss-compare-condition-name {
  font-size: var(--t-sm);
  font-weight: 400;
  color: var(--ink-2);
}
.bss-compare-note {
  font-family: var(--f-m);
  font-size: 0.5625rem;
  letter-spacing: 0.06em;
  color: var(--sage);
  margin-top: 1px;
}
.bss-compare-arrow {
  flex-shrink: 0;
  color: var(--sage-ll);
  transition: color 0.18s, transform 0.18s;
}
.bss-compare-link:hover .bss-compare-arrow {
  color: var(--sage);
  transform: translateX(2px);
}

/* ── FOOTER ───────────────────────────────────────────────── */
.bss-tmpl-footer {
  background: var(--ink);
  color: var(--surface);
  padding: 56px var(--pg) 32px;
  position: relative;
  overflow: hidden;
}
.bss-tmpl-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(78,122,106,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78,122,106,0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}
.bss-tmpl-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}
.bss-tmpl-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.bss-footer-brand-name {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin-bottom: 12px;
}
.bss-footer-brand-best {
  font-family: var(--f-d);
  font-style: italic;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--sage-ll);
}
.bss-footer-brand-skin {
  font-family: var(--f-d);
  font-weight: 500;
  font-size: 1.125rem;
  color: rgba(253,252,250,0.75);
}
.bss-footer-brand-specialists {
  font-family: var(--f-b);
  font-weight: 300;
  font-size: 1rem;
  color: rgba(253,252,250,0.35);
}
.bss-footer-tagline {
  font-size: var(--t-sm);
  color: rgba(253,252,250,0.38);
  font-weight: 300;
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 20px;
}
.bss-footer-trust {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.bss-footer-trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-m);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  color: rgba(174,207,196,0.55);
  text-transform: uppercase;
}
.bss-footer-trust-badge svg { flex-shrink: 0; }
.bss-footer-col-label {
  font-family: var(--f-m);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage-ll);
  margin-bottom: 16px;
}
.bss-footer-col-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bss-footer-col-links a {
  font-size: var(--t-sm);
  color: rgba(253,252,250,0.45);
  font-weight: 300;
  text-decoration: none;
  transition: color 0.2s;
}
.bss-footer-col-links a:hover { color: rgba(253,252,250,0.85); }
.bss-tmpl-footer-bottom {
  border-top: 1px solid rgba(78,122,106,0.15);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.bss-footer-copy {
  font-family: var(--f-m);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: rgba(253,252,250,0.25);
}
.bss-footer-legal-links {
  display: flex;
  gap: 20px;
  list-style: none;
  flex-wrap: wrap;
}
.bss-footer-legal-links a {
  font-size: 0.75rem;
  color: rgba(253,252,250,0.28);
  text-decoration: none;
  transition: color 0.2s;
}
.bss-footer-legal-links a:hover { color: rgba(253,252,250,0.65); }

/* ── STICKY MOBILE CTA ────────────────────────────────────── */
.bss-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 800;
  padding: 12px var(--pg);
  background: rgba(26,36,34,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(78,122,106,0.2);
}
.bss-btn-sticky {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  background: var(--cta);
  color: #fff !important;
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
  letter-spacing: 0.01em;
}
.bss-btn-sticky:hover { background: var(--cta-d); }

/* ── MOBILE RESPONSIVE ────────────────────────────────────── */
@media (max-width: 1024px) {
  .bss-layout {
    grid-template-columns: 200px 1fr;
  }
  .bss-sidebar-right { display: none; }
}

@media (max-width: 760px) {
  .bss-nav-links { display: none; }
  .bss-nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px var(--pg) 20px;
    gap: 4px;
    z-index: 900;
    box-shadow: var(--sh-md);
  }
  .bss-nav-links.is-open li { border-bottom: 1px solid var(--border-2); }
  .bss-nav-links.is-open a { display: block; padding: 12px 0; font-size: var(--t-base); color: var(--ink-2); }
  .bss-nav-cta { display: none; }
  .bss-nav-hamburger { display: flex; }

  .bss-layout {
    grid-template-columns: 1fr;
    padding-top: 32px;
  }
  .bss-sidebar-left { display: none; }

  .bss-sticky-bar { display: block; }

  .bss-tmpl-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .bss-tmpl-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .bss-tmpl-footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ── KICKER ───────────────────────────────────────────────── */
.bss-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-m);
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage-ll);
  margin-bottom: 20px;
}
.bss-kicker-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
}
