/* ============================================================
   HerFIT — common.css
   Shared styles across all pages (light-theme default)
   ============================================================ */

/* ============================================================
   1. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }

/* ============================================================
   2. CSS VARIABLES (Light Theme)
   ============================================================ */
:root {
  --brand:        #9B7650;
  --brand-dark:   #7A5535;
  --brand-light:  #C4A882;
  --brand-pale:   #F0E4D4;
  --bg:           #ffffff;
  --bg-light:     #F7F0E8;
  --bg-dark:      #1C1B1B;
  --heading:      #1C1B1B;
  --text:         #3A3530;
  --text-light:   #7A7068;
  --border:       #E5DDD4;
  --font:         'Outfit', 'Noto Sans TC', sans-serif;
  --font-serif:   'Cormorant Garamond', 'Noto Serif TC', Georgia, serif;
}

/* ============================================================
   3. TYPOGRAPHY
   (Minimal — most heading styles are page-specific)
   ============================================================ */

/* ============================================================
   4. HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo img { height: 36px; }

.header-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.header-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.header-nav a:hover,
.header-nav a.active { color: var(--brand); }

/* Nav dropdown */
.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-dropdown-toggle {
  background: none; border: none; cursor: pointer;
  font: inherit; font-size: 0.9rem; font-weight: 600;
  color: var(--text-light);
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0; transition: color 0.2s;
}
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active-page { color: var(--brand); }
.nav-dropdown-toggle svg { transition: transform 0.2s; }
.nav-dropdown:hover .nav-dropdown-toggle svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.5rem;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  flex-direction: column;
  gap: 0.2rem;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -0.75rem; left: 0; right: 0;
  height: 0.75rem;
}
.nav-dropdown-menu a {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active { background: var(--bg-light); color: var(--brand); }

/* Header CTA (shared pill style) */
.header-cta {
  background: var(--brand);
  color: #fff;
  padding: 0.55rem 1.25rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 0.2s;
}
.header-cta:hover { background: var(--brand-dark); }

/* ============================================================
   5. FOOTER  (unified grid footer across all pages)
   ============================================================ */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.5);
  padding: 76px 0 32px;
  font-size: 0.82rem;
}
.site-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}
.site-footer p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 56px;
}
.footer-brand .footer-logo {
  height: 38px;
  width: auto;
  margin-bottom: 18px;
}
.footer-brand p {
  font-size: 14px;
  color: rgba(255,255,255,0.48);
  line-height: 1.8;
  margin-bottom: 24px;
}
.footer-social {
  display: flex;
  gap: 10px;
}
.footer-social a {
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: all 0.25s;
}
.footer-social a:hover {
  border-color: var(--brand-light);
  color: var(--brand-light);
  background: rgba(155,118,80,0.1);
}
.footer-col h5 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 22px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col ul li a {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--brand-light); }
.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.3); }
.payment-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.payment-badge {
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.5px;
}

/* ============================================================
   6. BUTTONS
   (index.html comprehensive button system — kept here for reuse)
   ============================================================ */

/* ============================================================
   7. UTILITY / LAYOUT
   ============================================================ */

/* ============================================================
   8. RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 768px) {
  .header-inner { padding: 0 16px; }
  .header-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .site-footer .container { padding: 0 20px; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   9. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
}

/* Skip navigation */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--brand);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}
