/* ============================================================
   EVERCART — DESIGN TOKENS
   Theme: Dark Obsidian Luxe
   ============================================================ */
:root {
  /* Color */
  --bg: #0f0f11;
  --surface: #17171a;
  --surface-2: #1e1e22;
  --border: #26262b;
  --text: #f4f4f2;
  --text-muted: #9a9a9f;
  --text-faint: #6c6c72;
  --accent: #d4af37;
  --accent-hover: #e6c250;
  --accent-soft: rgba(212, 175, 55, 0.12);
  --danger: #e05a5a;
  --success: #4ade80;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);

  /* Type */
  --font-display: "Plus Jakarta Sans", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-data: "IBM Plex Mono", "Menlo", monospace;

  /* Layout */
  --container: 1280px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--accent-soft); color: var(--accent); }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Focus visibility (accessibility floor) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.price {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   HEADER — glassmorphism sticky
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(15, 15, 17, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo svg { color: var(--accent); }

.header-nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-muted);
}
.header-nav a:hover { color: var(--text); }

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 420px;
  margin: 0 20px;
}
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 38px;
  font-size: 14px;
  transition: border-color 0.15s ease;
}
.search-input:focus { border-color: var(--accent); outline: none; }
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  max-height: 360px;
  overflow-y: auto;
  z-index: 70;
  display: none;
}
.search-results.open { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--surface); }
.search-result-item img {
  width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0;
}
.search-empty { padding: 16px; font-size: 13px; color: var(--text-faint); text-align: center; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.currency-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 13px;
  padding: 7px 10px;
}

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.15s ease;
}
.icon-btn:hover { border-color: var(--accent); }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: #14140f;
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 85% 10%, var(--accent-soft), transparent 70%),
    radial-gradient(500px 260px at 10% 90%, rgba(212,175,55,0.06), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 720px;
}
.hero .eyebrow { display: inline-block; margin-bottom: 18px; }
.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero p.sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 24px;
}
.social-proof {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 32px;
}
.social-proof .stars { color: var(--accent); letter-spacing: 1px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--accent);
  color: #14140f;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   SECTION HEADERS — hairline + eyebrow, not numbered steps
   ============================================================ */
.section { padding: 72px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.section-head h2 { font-size: 28px; }
.section-head .eyebrow { display: block; margin-bottom: 8px; }
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.filter-chip:hover { color: var(--text); }
.filter-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   PRODUCT GRID / CARDS
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 22px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.product-card:hover { border-color: rgba(212,175,55,0.4); transform: translateY(-2px); }

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-2);
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.product-card:hover .card-media img { transform: scale(1.06); }

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(15,15,17,0.85);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 4px 8px;
  border-radius: 4px;
}

.quick-add {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.product-card:hover .quick-add,
.product-card:focus-within .quick-add { opacity: 1; transform: translateY(0); }

.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.card-price { font-size: 15px; font-weight: 700; }
.card-price .was { color: var(--text-faint); text-decoration: line-through; font-weight: 400; font-size: 13px; margin-right: 6px; }

.swatches { display: flex; gap: 6px; }
.swatch {
  width: 16px; height: 16px; border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
}
.swatch.selected { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============================================================
   PRODUCT DETAIL MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(6,6,7,0.7);
  backdrop-filter: blur(4px);
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 960px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 768px) { .modal-grid { grid-template-columns: 1fr 1fr; } }

.modal-close {
  position: sticky;
  top: 12px;
  float: right;
  margin-right: 12px;
  z-index: 5;
}

.gallery-main {
  aspect-ratio: 1/1;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 10px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; }
.gallery-thumbs img {
  width: 56px; height: 56px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--border); cursor: pointer; opacity: 0.6;
}
.gallery-thumbs img.active { opacity: 1; border-color: var(--accent); }

.modal-info { padding: 24px; }
.modal-info h3 { font-size: 22px; margin-bottom: 8px; }
.modal-price { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.modal-desc { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

.option-group { margin-bottom: 18px; }
.option-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; display: block; }
.option-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.option-pill {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  font-size: 13px; background: var(--surface-2);
}
.option-pill.selected { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.qty-control button { width: 34px; height: 34px; background: transparent; color: var(--text); border: none; }
.qty-control span { width: 32px; text-align: center; font-family: var(--font-data); }

.trust-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.trust-badge {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; font-size: 11px; color: var(--text-muted);
}
.trust-badge svg { color: var(--accent); width: 20px; height: 20px; }

.shipping-calc {
  margin-top: 18px; padding: 14px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-md);
}
.shipping-calc-row { display: flex; gap: 8px; margin-bottom: 10px; }
.shipping-calc select, .shipping-calc input {
  flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px;
}
.shipping-result { font-size: 13px; color: var(--text-muted); min-height: 18px; }
.shipping-result strong { color: var(--success); }

/* ============================================================
   CART DRAWER
   ============================================================ */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(6,6,7,0.6);
  z-index: 95; display: none;
}
.cart-overlay.open { display: block; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 96;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px; border-bottom: 1px solid var(--border);
}
.cart-header h3 { font-size: 17px; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-item img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-title { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.cart-item-opts { font-size: 12px; color: var(--text-faint); margin-bottom: 8px; }
.cart-item-row { display: flex; align-items: center; justify-content: space-between; }
.remove-link { font-size: 12px; color: var(--text-faint); }
.remove-link:hover { color: var(--danger); }

.cart-empty { padding: 60px 20px; text-align: center; color: var(--text-faint); }
.cart-empty svg { width: 40px; height: 40px; margin: 0 auto 14px; opacity: 0.4; }

.cart-footer { padding: 20px; border-top: 1px solid var(--border); }
.cart-subtotal-row { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 15px; }
.cart-subtotal-row strong { font-family: var(--font-data); }
.cart-note { font-size: 11.5px; color: var(--text-faint); text-align: center; margin-top: 10px; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-2);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  color: var(--text-muted);
  font-size: 13.5px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 { font-size: 12px; color: var(--text); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-col a { display: block; margin-bottom: 8px; color: var(--text-muted); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12px; }

/* ============================================================
   BLOG
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.blog-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.blog-card-body { padding: 20px; }
.blog-card-body .eyebrow { display: block; margin-bottom: 10px; }
.blog-card-body h3 { font-size: 18px; margin-bottom: 8px; }
.blog-card-body p { color: var(--text-muted); font-size: 13.5px; }

.adsense-placeholder {
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 40px 20px;
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
  margin: 32px 0;
  background: var(--surface);
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.75;
}
.article-body h2 { color: var(--text); font-size: 24px; margin: 32px 0 14px; }
.article-body p { margin-bottom: 18px; }

/* ============================================================
   UTILITY
   ============================================================ */
.hidden { display: none !important; }
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #14140f; padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25); border-top-color: var(--text);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .header-nav, .search-wrap { display: none; }
  .hero { padding: 64px 0 56px; }
}
