/*
 * base.css — LUNAR GOLD (Theme 13)
 * --------------------------------
 * Purpose: Global baseline stylesheet adapted for the **Lunar Gold** theme
 * (theme id: 13). This version updates the root variables to Lunar Gold
 * colors and introduces a theme-aware Button Style 3 (gold outline with
 * glow). Documentation below clarifies permitted edits for team members.
 *
 * DOCUMENTATION / RULES (READ BEFORE EDITING)
 * 1. ROOT VARIABLES
 *    The design system is driven by CSS custom properties defined under :root.
 *    Editors MUST NOT rename or remove these variables (they are referenced
 *    by components and JS theme switches):
 *      --accent         (primary accent color)
 *      --accent-2       (accent gradient end)
 *      --bg             (page background)
 *      --surface        (card / surface background)
 *      --text           (primary text color)
 *      --muted          (secondary / meta text color)
 *      --button-text    (button text color)
 *      --button-bg      (button background gradient or color)
 *      --card-radius    (global card border-radius)
 *      --shadow-soft    (soft drop shadow)
 *      --shadow-strong  (strong drop shadow)
 *      --glass          (glass overlay / subtle background)
 *      --max-w          (maximum page width)
 *      --hero-aside-w   (hero aside width)
 *      --font           (primary font family stack)
 *
 *    These variables are the single source of truth for theming. Change them
 *    only when you intentionally change the theme. Per-theme font choices are
 *    allowed here (see rule #2 below) but prefer switching fonts via the
 *    theme loader when possible.
 *
 * 2. FONTS
 *    The primary site font is set via --font. Historically we discouraged
 *    changing font-family in base.css, but per-theme font choices are now
 *    permitted here so themes can declare the preferred family (e.g. Quicksand
 *    for Lunar Gold). That said, do not hard-import font files inside this
 *    stylesheet — include <link> tags in your HTML head and reference them
 *    via --font here. Avoid overriding font-family elsewhere; use weight/size.
 *
 * 3. BUTTONS & INTERACTIONS
 *    Button visuals, hover, active, and persistent active state classes are
 *    enforced here and MUST NOT BE REMOVED. The canonical button system is:
 *      .btn           - base button (3D hover + transition)
 *      .btn:hover     - elevated 3D hover lift
 *      .btn.is-pressed - applied on pointerdown to create pressed look
 *      .btn.is-active  - persistent / selected state (e.g., added to cart)
 *
 *    JavaScript may toggle is-pressed/is-active. You may add theme-aware
 *    companion classes (for example .btn-style-3) but do NOT change the
 *    core .btn transition/transform behaviors.
 *
 * 4. THEME-SPECIFIC BUTTON STYLE 3
 *    This file introduces `.btn-style-3` which is the "Lunar Gold outline"
 *    style: transparent base, subtle golden border, and a soft gold glow on
 *    hover. It intentionally relies on --accent / --accent-2 / --text so it
 *    automatically adapts when the root variables change.
 *
 * 5. IMPORTANT: This file intentionally avoids `!important` declarations and
 *    CSS resets that break component libraries. It provides sensible defaults
 *    for HTML tags and common components.
 *
 * 6. USAGE:
 *    - Include this file early (before component-specific CSS).
 *    - Use the :root variables to adapt the theme.
 *    - Include the font via a <link> in your HTML head (e.g. Quicksand for
 *      Lunar Gold) and then set --font to reference it.
 *
 * End of documentation.
 */

/* ---------- LUNAR GOLD (Theme 13) ROOT VARIABLES ---------- */
:root{
  /* Theme colors (Lunar Gold) */
  --accent: #f6e84f;         /* primary gold */
  --accent-2: #fff7a6;       /* lighter gold */
  --bg: #1a160a;             /* deep warm background */
  --surface: #241d0f;        /* card surfaces (slightly lighter) */
  --text: #fffbe6;           /* warm cream text */
  --muted: #cdbf8f;         /* muted / meta text */
  --button-text: #2b2702;    /* dark text used on gold buttons */
  --button-bg: linear-gradient(135deg, var(--accent), var(--accent-2));

  /* Layout & geometry */
  --card-radius: 12px;
  --card-padding: 16px;
  --max-w: 1400px;
  --hero-aside-w: 480px;

  /* Elevation (warmer subtle shadows) */
  --shadow-soft: 0 8px 28px rgba(10,8,6,0.48);
  --shadow-strong: 0 24px 58px rgba(10,8,6,0.56);

  /* Glass / subtle layers */
  --glass: rgba(255,255,245,0.04);

  /* Typography (theme's preferred family) */
  /* NOTE: include Quicksand in HTML head and reference it here */
  --font: 'Quicksand', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Spacing scale */
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 36px;

  /* Utilities */
  --radius-pill: 999px;
}

/* ---------- GLOBAL RESET (sane defaults) ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html,body { height: 100%; }
html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.38;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-kerning: normal;
  font-kerning: normal;
  -moz-font-feature-settings: "liga" on;
  font-feature-settings: "liga" on;
}

/* ---------- DEFAULT TAG STYLES ---------- */
h1,h2,h3,h4,h5,h6 {
  margin: 0 0 var(--space-sm) 0;
  font-weight: 700;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(24px, 3.4vw, 40px); }
h2 { font-size: clamp(20px, 2.6vw, 32px); }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
h6 { font-size: 13px; }

p {
  margin: 0 0 var(--space-md) 0;
  color: var(--text);
  font-size: 15px;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .16s ease, transform .12s ease;
}
a:hover { color: var(--accent-2); text-decoration: underline; }

/* Lists */
ul, ol { margin: 0 0 var(--space-md) 0; padding-left: 1.25rem; color: var(--text); }
li { margin-bottom: .35rem; }

/* Images & media */
img, picture, video { max-width: 100%; display: block; height: auto; border-radius: 6px; }

/* Form elements */
input, textarea, select, button {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid rgba(0,0,0,0.16);
  padding: 10px 12px;
  border-radius: 8px;
  transition: box-shadow .14s ease, border-color .12s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(246,232,79,0.08);
}

/* Tables */
table { width: 100%; border-collapse: collapse; margin-bottom: var(--space-md); }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.03); }

/* Accessibility helper */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ---------- LAYOUT UTILITIES ---------- */
.container, .wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--space-lg);
}

.row { display:flex; gap: var(--space-lg); align-items: center; }
.col { flex: 1; }

/* cards */
.card {
  background: var(--surface);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

/* ---------- HERO / PRODUCT ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr var(--hero-aside-w);
  gap: 32px;
  align-items: center;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255,245,220,0.02), transparent);
  border-radius: 14px;
  box-shadow: var(--shadow-strong);
}

/* product media */
.product-media {
  width: 100%;
  height: 360px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,245,220,0.03), rgba(255,245,220,0.01));
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

/* ---------- SKELETON (shimmer) ---------- */
.skeleton {
  background: linear-gradient(90deg, rgba(200,200,200,0.03) 0%, rgba(200,200,200,0.08) 50%, rgba(200,200,200,0.03) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 8px;
}
@keyframes shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }

/* ---------- BUTTONS (STRICT — DO NOT REMOVE CORE BEHAVIOR) ---------- */
/* The base button system is kept intact. Theme authors may add companion
   styles (e.g. .btn-style-3) but must not change core .btn transitions. */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  transform-style: preserve-3d;
  transition: transform .16s cubic-bezier(.2,.9,.2,1), box-shadow .16s ease;
  will-change: transform, box-shadow;
  box-shadow: 0 12px 34px rgba(10,8,6,0.06);
  background: var(--button-bg);
  color: var(--button-text);
}

/* 3D hover lift */
.btn:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 36px 90px rgba(10,8,6,0.12);
}

/* active press effect (JS toggles 'is-pressed' on pointerdown) */
.btn.is-pressed {
  transform: translateY(2px) scale(.996);
  box-shadow: inset 0 6px 18px rgba(2,6,4,0.05);
}

/* persistent active state (e.g., 'Added') */
.btn.is-active {
  box-shadow: 0 12px 40px rgba(10,8,6,0.06), inset 0 -8px 30px rgba(246,232,79,0.04);
  outline: 3px solid rgba(246,232,79,0.08);
}

/* --------- LUNAR GOLD — BUTTON STYLE 3 (Outline + Gold Glow) ---------- */
/* This companion class is theme-aware and will pick up the --accent vars. */
.btn-style-3 {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,247,166,0.08); /* soft pale-gold border */
  box-shadow: 0 6px 18px rgba(10,8,6,0.06);
}
.btn-style-3:hover {
  transform: translateY(-6px);
  border-color: rgba(246,232,79,0.22);
  box-shadow: 0 18px 54px rgba(246,232,79,0.12), 0 6px 20px rgba(10,8,6,0.10);
  color: var(--accent-2);
  text-shadow: 0 2px 8px rgba(246,232,79,0.06);
}
.btn-style-3:active {
  transform: translateY(2px) scale(.995);
  box-shadow: inset 0 6px 16px rgba(10,8,6,0.06);
}

/* alternate button variants (retain existing variants) */
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px dashed rgba(0,0,0,0.06);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(0,0,0,0.08);
}
.btn-pill {
  background: var(--button-bg);
  color: var(--button-text);
  border-radius: var(--radius-pill);
  padding: 12px 26px;
}

/* ripple helper (JS creates .ripple element inside .btn-wrap) */
.btn-wrap { position: relative; display:inline-block; overflow: visible; }
.ripple {
  position: absolute;
  border-radius: 999px;
  transform: scale(0);
  opacity: 0.6;
  pointer-events: none;
  background: rgba(255,255,255,0.6);
  transition: transform .5s cubic-bezier(.2,.9,.2,1), opacity .6s ease;
}

/* ---------- NAVBAR ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,245,220,0.68), rgba(255,245,220,0.62));
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 14px;
  z-index: 120;
}
.logo { display:flex; align-items:center; gap:14px; }
.logo .mark {
  width: 56px; height: 56px; border-radius: 12px;
  display:grid; place-items:center; color: var(--button-text);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 800; font-size: 18px;
  box-shadow: 0 12px 36px rgba(10,8,6,0.10);
}
nav.primary { display:flex; gap: 18px; align-items:center; }
nav.primary a {
  padding: 10px 12px; border-radius: 10px; font-weight:700;
  color: var(--text); text-decoration:none;
}
nav.primary a.is-active {
  background: linear-gradient(90deg, rgba(246,232,79,0.12), rgba(255,247,166,0.06));
  box-shadow: inset 0 -4px 20px rgba(246,232,79,0.03);
}

/* search */
.search {
  display:flex; align-items:center; gap:8px;
  padding: 8px; border-radius:12px;
  background: rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.04);
}

/* icon buttons */
.icon-btn {
  width: 48px; height: 48px; border-radius: 12px; display:grid; place-items:center;
  background: transparent; border: 1px solid rgba(0,0,0,0.04); cursor: pointer;
}

/* cart badge */
.cart-badge {
  font-size:12px; font-weight:800;
  background: var(--accent); color: var(--button-text);
  padding: 5px 8px; border-radius: 999px;
}

/* ---------- COLLECTIONS GRID ---------- */
.collections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

/* ---------- FOOTER ---------- */
footer.site-footer {
  margin-top: 36px;
  color: var(--muted);
  font-size: 14px;
  display:flex; justify-content:space-between; align-items:center;
  padding-bottom: 28px;
}

/* ---------- UTILITIES ---------- */
.text-muted { color: var(--muted); }
.badge { background: var(--accent); color: var(--button-text); padding: 6px 10px; border-radius: 999px; font-weight:700; font-size:13px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .wrap { padding: 24px; }
  .hero { grid-template-columns: 1fr 420px; }
  .product-media { height: 320px; }
  .collections { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  nav.primary { display: none; }
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .collections { grid-template-columns: 1fr; }
  .search input { width: 120px; }
}

@media (max-width: 520px) {
  .wrap { padding: 14px; }
  .search input { width: 90px; }
}

/* ---------- END OF base.css (Lunar Gold variant) ---------- */