/* ============================================
   Savvy Custom Digital Creations — Design System
   Niche: Custom Personalized Photo Gifts & Digital Creations
   Brand personality: Creative, modern, personal, digital-savvy, warm
   ============================================ */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); background: var(--color-bg); color: var(--color-text-primary); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* --- CSS Variables --- */
:root {
  --color-bg: #F8F6F3;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F0EDE8;
  --color-border: #E5E0D8;
  --color-border-strong: #D0CABF;
  --color-text-primary: #1E1B2E;
  --color-text-secondary: #5C5470;
  --color-text-muted: #9B95A8;
  --color-accent: #6C5CE7;
  --color-accent-hover: #5A4BD1;
  --color-accent-light: #F0EDFF;
  --color-accent-fg: #FFFFFF;
  --color-sale: #E84545;
  --color-success: #27AE60;
  --color-warning: #F39C12;
  --color-error: #E84545;
  --color-star: #F39C12;

  --font-heading: 'Poppins', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(30, 27, 46, 0.06);
  --shadow-md: 0 4px 12px rgba(30, 27, 46, 0.08);
  --shadow-lg: 0 12px 32px rgba(30, 27, 46, 0.12);

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  --container-max: 1280px;
  --header-height: 72px;
}

/* --- Accessibility --- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* --- Container --- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-md); width: 100%; }
@media (min-width: 768px) { .container { padding: 0 var(--space-lg); } }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; color: var(--color-text-primary); }
h1 { font-size: clamp(1.75rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.625rem); }
h4 { font-size: 1.125rem; }
p { margin-bottom: var(--space-md); }
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }

/* --- Announcement Bar --- */
.announcement-bar { background: var(--color-text-primary); color: #FFF; text-align: center; padding: 10px var(--space-md); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.3px; }

/* --- Header / Nav --- */
.header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-height); gap: var(--space-md); }
.nav-logo { font-family: var(--font-heading); font-weight: 800; font-size: 1.125rem; color: var(--color-text-primary); white-space: nowrap; letter-spacing: -0.5px; display: flex; align-items: center; gap: 2px; }
.nav-logo span { color: var(--color-accent); }
.nav-links { display: none; align-items: center; gap: var(--space-lg); }
.nav-link { font-size: 0.9375rem; font-weight: 500; color: var(--color-text-secondary); transition: color var(--transition-fast); position: relative; }
.nav-link:hover { color: var(--color-accent); }
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: flex; align-items: center; gap: 4px; }
.nav-dropdown-arrow { width: 14px; height: 14px; transition: transform var(--transition-fast); }
.nav-dropdown:hover .nav-dropdown-arrow { transform: rotate(180deg); }
.nav-dropdown-menu { position: absolute; top: 100%; left: 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: var(--space-sm); min-width: 280px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: all var(--transition-base); z-index: 101; }
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-item { display: block; padding: 10px var(--space-md); border-radius: var(--radius-sm); font-size: 0.875rem; color: var(--color-text-secondary); transition: all var(--transition-fast); }
.nav-dropdown-item:hover { background: var(--color-surface-alt); color: var(--color-accent); }
.nav-actions { display: flex; align-items: center; gap: var(--space-sm); }
.nav-search-wrap { display: none; align-items: center; background: var(--color-surface-alt); border-radius: var(--radius-full); padding: 6px 14px; }
.nav-search-icon { color: var(--color-text-muted); display: flex; }
.nav-search-icon svg { width: 18px; height: 18px; }
.nav-search-input { border: none; background: transparent; outline: none; padding: 4px 8px; font-size: 0.875rem; width: 180px; color: var(--color-text-primary); }
.nav-action-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); color: var(--color-text-secondary); transition: all var(--transition-fast); position: relative; }
.nav-action-btn:hover { background: var(--color-surface-alt); color: var(--color-accent); }
.nav-action-btn svg { width: 22px; height: 22px; }
.nav-cart-count { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; border-radius: var(--radius-full); background: var(--color-accent); color: var(--color-accent-fg); font-size: 0.6875rem; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.hamburger { display: flex; flex-direction: column; gap: 4px; width: 40px; height: 40px; align-items: center; justify-content: center; }
.hamburger span { width: 22px; height: 2px; background: var(--color-text-primary); border-radius: 2px; transition: all var(--transition-base); }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .hamburger { display: none; }
  .nav-search-wrap { display: flex; }
  .nav-search-mobile { display: none; }
  .nav-logo { font-size: 1rem; }
}
@media (min-width: 1024px) { .nav-search-input { width: 220px; }
  .nav-logo { font-size: 1.0625rem; } }
@media (max-width: 480px) { .nav-logo { font-size: 0.75rem; } }

/* --- Mobile Menu --- */
.mobile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200; opacity: 0; visibility: hidden; transition: all var(--transition-base); }
.mobile-overlay.active { opacity: 1; visibility: visible; }
.mobile-menu { position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 85vw; background: var(--color-surface); z-index: 201; transform: translateX(-100%); transition: transform var(--transition-base); overflow-y: auto; padding: var(--space-xl) var(--space-lg); }
.mobile-menu.active { transform: translateX(0); }
.mobile-menu-close { position: absolute; top: var(--space-md); right: var(--space-md); font-size: 1.5rem; color: var(--color-text-secondary); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.mobile-menu-search { margin-bottom: var(--space-lg); }
.mobile-menu-search input { width: 100%; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-md); font-size: 0.9375rem; }
.mobile-menu-links { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu-link { padding: 12px 0; font-size: 0.9375rem; font-weight: 500; color: var(--color-text-secondary); border-bottom: 1px solid var(--color-border); }
.mobile-menu-link:hover { color: var(--color-accent); }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; font-family: var(--font-body); font-size: 0.9375rem; font-weight: 600; border-radius: var(--radius-md); transition: all var(--transition-fast); cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
.btn-primary { background: var(--color-accent); color: var(--color-accent-fg); }
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-secondary { background: var(--color-surface); color: var(--color-text-primary); border-color: var(--color-border-strong); }
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-ghost { background: transparent; color: var(--color-text-secondary); }
.btn-ghost:hover { color: var(--color-accent); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: 0.8125rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }

/* --- Badges --- */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-sale { background: var(--color-sale); color: #FFF; }
.badge-new { background: var(--color-success); color: #FFF; }
.badge-out { background: var(--color-text-muted); color: #FFF; }
.badge-count { background: var(--color-accent); color: var(--color-accent-fg); }

/* --- Hero --- */
.hero { position: relative; min-height: 480px; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(30,27,46,0.65) 0%, rgba(30,27,46,0.35) 100%); }
.hero-content { position: relative; z-index: 1; padding: var(--space-2xl) 0; max-width: 640px; }
.hero-eyebrow { display: inline-block; padding: 4px 14px; background: rgba(108,92,231,0.9); color: #FFF; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--space-md); }
.hero-title { color: #FFF; font-size: clamp(2rem, 6vw, 3.5rem); margin-bottom: var(--space-md); }
.hero-subtitle { color: rgba(255,255,255,0.9); font-size: 1.0625rem; margin-bottom: var(--space-xl); max-width: 520px; }
.hero-actions { display: flex; gap: var(--space-md); flex-wrap: wrap; }

/* --- Sections --- */
.section { padding: var(--space-2xl) 0; }
.section-alt { background: var(--color-surface-alt); }
.section-header { text-align: center; margin-bottom: var(--space-xl); }
.section-title { margin-bottom: var(--space-sm); }
.section-subtitle { color: var(--color-text-secondary); font-size: 1.0625rem; max-width: 600px; margin: 0 auto; }

/* --- Grids --- */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: var(--space-lg); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-lg); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* --- Category Grid --- */
.category-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-lg); }
@media (min-width: 640px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }

/* --- Collection Card --- */
.collection-card { position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition-base), transform var(--transition-base); }
.collection-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.collection-card img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.collection-card:hover img { transform: scale(1.05); }
.collection-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(30,27,46,0.75) 0%, rgba(30,27,46,0.15) 60%, transparent 100%); display: flex; align-items: flex-end; padding: var(--space-lg); }
.collection-card-title { color: #FFF; font-family: var(--font-heading); font-size: 1.125rem; font-weight: 700; margin-bottom: 2px; }
.collection-card-count { color: rgba(255,255,255,0.8); font-size: 0.8125rem; }

/* --- Product Card --- */
.product-card { background: var(--color-surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition-base), transform var(--transition-base); display: flex; flex-direction: column; }
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card-img { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--color-surface-alt); }
.product-card-img a { display: block; width: 100%; height: 100%; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-badges { position: absolute; top: var(--space-sm); left: var(--space-sm); display: flex; gap: 6px; z-index: 1; }
.product-card-body { padding: var(--space-md); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card-vendor { font-size: 0.75rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.product-card-title { font-size: 0.875rem; font-weight: 600; line-height: 1.4; color: var(--color-text-primary); }
.product-card-title a:hover { color: var(--color-accent); }
.product-card-price-wrap { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.product-card-price { font-family: var(--font-mono); font-size: 0.9375rem; font-weight: 600; color: var(--color-text-primary); }
.product-card-compare { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--color-text-muted); text-decoration: line-through; }
.product-card-atc { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; background: var(--color-surface-alt); color: var(--color-text-primary); border: 1px solid var(--color-border); border-radius: var(--radius-md); font-size: 0.8125rem; font-weight: 600; transition: all var(--transition-fast); margin-top: var(--space-sm); }
.product-card-atc:hover { background: var(--color-accent); color: var(--color-accent-fg); border-color: var(--color-accent); }
.product-card-atc svg { width: 16px; height: 16px; }

/* --- Collection Hero --- */
.collection-hero { position: relative; min-height: 320px; display: flex; align-items: center; overflow: hidden; }
.collection-hero-bg { position: absolute; inset: 0; }
.collection-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.collection-hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(30,27,46,0.6) 0%, rgba(30,27,46,0.3) 100%); }
.collection-hero-content { position: relative; z-index: 1; padding: var(--space-2xl) 0; max-width: 720px; }
.collection-hero-content h1 { color: #FFF; margin-bottom: var(--space-sm); }
.collection-hero-content p { color: rgba(255,255,255,0.9); font-size: 1.0625rem; }

/* --- Sort Bar --- */
.sort-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-lg); flex-wrap: wrap; gap: var(--space-md); }
.sort-count { font-size: 0.875rem; color: var(--color-text-secondary); }
.sort-bar select { padding: 8px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-md); font-size: 0.875rem; background: var(--color-surface); color: var(--color-text-primary); cursor: pointer; }

/* --- Breadcrumb --- */
.breadcrumb { padding: var(--space-md) 0; font-size: 0.8125rem; color: var(--color-text-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb-item { color: var(--color-text-secondary); }
.breadcrumb-item:hover { color: var(--color-accent); }
.breadcrumb-sep { color: var(--color-text-muted); }
.breadcrumb-current { color: var(--color-text-primary); font-weight: 500; }

/* --- Product Layout --- */
.product-layout { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); padding: var(--space-lg) 0 var(--space-2xl); align-items: start; }
.product-info { display: flex; flex-direction: column; }
@media (min-width: 768px) { .product-layout { grid-template-columns: 1fr 1fr; gap: 32px; } .product-info { min-height: 100%; } }
@media (min-width: 1024px) { .product-layout { grid-template-columns: 1fr 1fr; gap: 48px; } .product-info { min-height: 100%; } }

/* --- Product Gallery --- */
.product-gallery { display: flex; flex-direction: column; gap: var(--space-md); }
.gallery-main-wrap { border-radius: var(--radius-lg); overflow: hidden; background: var(--color-surface-alt); aspect-ratio: 1; }
.gallery-main-wrap img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery-thumbs { display: flex; gap: var(--space-sm); overflow-x: auto; }
.gallery-thumb { width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid transparent; cursor: pointer; flex-shrink: 0; transition: border-color var(--transition-fast); }
.gallery-thumb.active { border-color: var(--color-accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* --- Product Info --- */
.product-vendor { font-size: 0.8125rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--space-xs); }
.product-title { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: var(--space-sm); }
.product-price-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: var(--space-md); }
.product-price { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--color-text-primary); }
.product-compare-price { font-family: var(--font-mono); font-size: 1.125rem; color: var(--color-text-muted); text-decoration: line-through; }
.product-save-badge { display: inline-flex; padding: 3px 10px; background: var(--color-sale); color: #FFF; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; }

/* --- Option Selectors --- */
.option-group { margin-bottom: var(--space-md); }
.option-label { font-size: 0.875rem; font-weight: 600; margin-bottom: var(--space-sm); color: var(--color-text-primary); }
.option-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.option-btn { padding: 8px 16px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 500; background: var(--color-surface); color: var(--color-text-secondary); transition: all var(--transition-fast); }
.option-btn:hover { border-color: var(--color-accent); }
.option-btn.active { background: var(--color-accent); color: var(--color-accent-fg); border-color: var(--color-accent); }
.option-btn.unavailable { opacity: 0.4; text-decoration: line-through; cursor: not-allowed; }

/* --- Quantity Control --- */
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); overflow: hidden; }
.qty-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 1.125rem; color: var(--color-text-secondary); transition: all var(--transition-fast); }
.qty-btn:hover { background: var(--color-surface-alt); color: var(--color-accent); }
.qty-input { width: 48px; height: 40px; text-align: center; border: none; border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border); font-size: 0.9375rem; font-weight: 600; outline: none; }

/* --- Product Actions --- */
.product-actions { display: flex; gap: var(--space-md); margin: var(--space-md) 0; flex-wrap: wrap; }
.product-actions .btn { flex: 1; min-width: 160px; }

/* --- Availability --- */
.availability-msg { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; margin-bottom: var(--space-md); }
.availability-msg.in-stock { color: var(--color-success); }
.availability-msg.out-stock { color: var(--color-error); }
.availability-msg svg { width: 18px; height: 18px; }

/* --- Product Short Desc --- */
.product-short-desc { color: var(--color-text-secondary); font-size: 0.9375rem; line-height: 1.7; margin-bottom: var(--space-md); }

/* --- Accordions --- */
.product-accordions { margin-top: var(--space-lg); }
.accordion { border-bottom: 1px solid var(--color-border); }
.accordion-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-md) 0; cursor: pointer; font-weight: 600; font-size: 0.9375rem; color: var(--color-text-primary); }
.accordion-header:hover { color: var(--color-accent); }
.accordion-icon { width: 20px; height: 20px; transition: transform var(--transition-base); }
.accordion.open .accordion-icon { transform: rotate(180deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height var(--transition-base); }
.accordion.open .accordion-body { max-height: 1000px; }
.accordion-body-inner { padding: 0 0 var(--space-md); color: var(--color-text-secondary); font-size: 0.9375rem; line-height: 1.7; }
.accordion-body-inner h3 { font-size: 1rem; margin: var(--space-md) 0 var(--space-sm); }
.accordion-body-inner ul { padding-left: var(--space-lg); list-style: disc; }
.accordion-body-inner li { margin-bottom: 4px; }

/* --- Sticky ATC --- */
.sticky-atc { position: fixed; bottom: 0; left: 0; right: 0; background: var(--color-surface); border-top: 1px solid var(--color-border); box-shadow: 0 -4px 12px rgba(0,0,0,0.08); padding: var(--space-sm) var(--space-md); z-index: 90; transform: translateY(100%); transition: transform var(--transition-base); display: flex; align-items: center; gap: var(--space-md); max-width: var(--container-max); margin: 0 auto; }
.sticky-atc.visible { transform: translateY(0); }
.sticky-atc-product { display: flex; align-items: center; gap: var(--space-sm); flex: 1; min-width: 0; }
.sticky-atc-product img { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.sticky-atc-product-info { min-width: 0; }
.sticky-atc-product-title { font-size: 0.8125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-atc-product-price { font-family: var(--font-mono); font-size: 0.875rem; font-weight: 700; color: var(--color-accent); }

/* --- Cart Drawer --- */
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 300; opacity: 0; visibility: hidden; transition: all var(--transition-base); }
.cart-overlay.active { opacity: 1; visibility: visible; }
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 90vw; background: var(--color-surface); z-index: 301; transform: translateX(100%); transition: transform var(--transition-base); display: flex; flex-direction: column; }
.cart-drawer.active { transform: translateX(0); }
.cart-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-lg); border-bottom: 1px solid var(--color-border); }
.cart-drawer-header h2 { font-size: 1.25rem; display: flex; align-items: center; gap: 8px; }
.cart-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; color: var(--color-text-muted); }
.cart-lines { flex: 1; overflow-y: auto; padding: var(--space-md); }
.cart-empty { text-align: center; padding: var(--space-2xl) var(--space-md); color: var(--color-text-muted); }
.cart-empty svg { width: 48px; height: 48px; margin: 0 auto var(--space-md); opacity: 0.4; }
.cart-empty p { margin-bottom: var(--space-md); }
.cart-item { display: flex; gap: var(--space-md); padding: var(--space-md) 0; border-bottom: 1px solid var(--color-border); }
.cart-item-img { width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--color-surface-alt); }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 2px; }
.cart-item-variant { font-size: 0.75rem; color: var(--color-text-muted); margin-bottom: 4px; }
.cart-item-price { font-family: var(--font-mono); font-size: 0.875rem; font-weight: 600; color: var(--color-text-primary); }
.cart-item-controls { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-sm); }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.cart-item-qty button { width: 28px; height: 28px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 0.875rem; color: var(--color-text-secondary); }
.cart-item-qty button:hover { border-color: var(--color-accent); color: var(--color-accent); }
.cart-item-qty span { font-size: 0.875rem; font-weight: 600; min-width: 24px; text-align: center; }
.cart-item-remove { font-size: 0.75rem; color: var(--color-text-muted); }
.cart-item-remove:hover { color: var(--color-error); }
.cart-footer { padding: var(--space-lg); border-top: 1px solid var(--color-border); }
.cart-subtotal { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-sm); }
.cart-subtotal strong { font-family: var(--font-mono); font-size: 1.125rem; }
.cart-tax-note { font-size: 0.75rem; color: var(--color-text-muted); margin-bottom: var(--space-md); }

/* --- Cart Page --- */
.cart-page { padding: var(--space-lg) 0 var(--space-2xl); }
.cart-page-layout { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); }
@media (min-width: 768px) { .cart-page-layout { grid-template-columns: 1fr 360px; } }
.cart-page-items { display: flex; flex-direction: column; gap: var(--space-md); }
.cart-page-item { display: flex; gap: var(--space-md); padding: var(--space-md); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.cart-page-item-img { width: 100px; height: 100px; border-radius: var(--radius-md); overflow: hidden; flex-shrink: 0; background: var(--color-surface-alt); }
.cart-page-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-page-item-info { flex: 1; }
.cart-page-item-title { font-weight: 600; margin-bottom: 4px; }
.cart-page-item-variant { font-size: 0.8125rem; color: var(--color-text-muted); margin-bottom: var(--space-sm); }
.cart-page-item-price { font-family: var(--font-mono); font-weight: 600; }
.cart-page-item-controls { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-sm); }
.cart-page-summary { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-lg); align-self: start; }
.cart-page-summary h3 { margin-bottom: var(--space-md); }
.cart-page-summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.9375rem; }
.cart-page-summary-total { border-top: 1px solid var(--color-border); margin-top: var(--space-sm); padding-top: var(--space-md); font-size: 1.125rem; font-weight: 700; }
.cart-page-empty { text-align: center; padding: var(--space-3xl) var(--space-md); }

/* --- Checkout --- */
.checkout-page { padding: var(--space-lg) 0 var(--space-2xl); }
.checkout-layout { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); }
@media (min-width: 768px) { .checkout-layout { grid-template-columns: 1fr 360px; } }
.checkout-form-section { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-lg); margin-bottom: var(--space-md); }
.checkout-form-section h3 { display: flex; align-items: center; gap: 10px; margin-bottom: var(--space-md); font-size: 1.125rem; }
.step-num { width: 28px; height: 28px; border-radius: var(--radius-full); background: var(--color-accent); color: var(--color-accent-fg); display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 700; }
.checkout-summary { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-lg); align-self: start; }
.checkout-summary h3 { margin-bottom: var(--space-md); }
.checkout-summary-item { display: flex; gap: var(--space-sm); padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.checkout-summary-item img { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; }
.checkout-summary-item-info { flex: 1; }
.checkout-summary-item-title { font-size: 0.8125rem; font-weight: 600; }
.checkout-summary-item-variant { font-size: 0.75rem; color: var(--color-text-muted); }
.checkout-summary-item-qty { font-size: 0.75rem; color: var(--color-text-muted); }
.checkout-summary-item-price { font-family: var(--font-mono); font-size: 0.875rem; font-weight: 600; }
.checkout-summary-totals { margin-top: var(--space-md); }
.checkout-summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.9375rem; }
.checkout-summary-row.total { border-top: 1px solid var(--color-border); margin-top: var(--space-sm); padding-top: var(--space-md); font-weight: 700; font-size: 1.125rem; }

/* --- Card Preview --- */
.card-preview { background: linear-gradient(135deg, var(--color-text-primary), #3D3656); border-radius: var(--radius-md); padding: var(--space-lg); margin-bottom: var(--space-md); color: #FFF; min-height: 120px; }
.card-preview-number { font-family: var(--font-mono); font-size: 1.125rem; letter-spacing: 2px; margin-bottom: var(--space-md); }
.card-preview-row { display: flex; justify-content: space-between; }
.card-preview-label { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; }
.card-preview-name { font-size: 0.875rem; text-transform: uppercase; }
.card-field { position: relative; }
.card-field-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); }
.card-field-icon svg { width: 24px; height: 16px; }
.payment-security { display: flex; align-items: center; gap: 10px; padding: var(--space-md); background: var(--color-surface-alt); border-radius: var(--radius-md); margin-top: var(--space-md); }
.payment-security svg { width: 20px; height: 20px; color: var(--color-success); flex-shrink: 0; }
.payment-security p { font-size: 0.75rem; color: var(--color-text-secondary); margin: 0; }

/* --- Form Elements --- */
.form-group { margin-bottom: var(--space-md); }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; color: var(--color-text-primary); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); font-size: 0.9375rem; background: var(--color-surface); color: var(--color-text-primary); transition: border-color var(--transition-fast); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--color-accent); }
.form-group input.error { border-color: var(--color-error); }
.form-row { display: flex; gap: var(--space-md); }
.form-row.two { flex-direction: column; }
@media (min-width: 640px) { .form-row.two { flex-direction: row; } .form-row.two .form-group { flex: 1; } }
.required { color: var(--color-error); }

/* --- Thank You Page --- */
.thank-you-page { padding: var(--space-2xl) 0; max-width: 720px; margin: 0 auto; text-align: center; }
.thank-you-icon { width: 80px; height: 80px; margin: 0 auto var(--space-lg); background: var(--color-success); border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; }
.thank-you-icon svg { width: 40px; height: 40px; color: #FFF; }
.thank-you-details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-lg); margin: var(--space-lg) 0; text-align: left; }
.thank-you-detail-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--color-border); font-size: 0.9375rem; }
.thank-you-detail-row:last-child { border-bottom: none; }
.thank-you-actions { display: flex; gap: var(--space-md); justify-content: center; margin-top: var(--space-lg); flex-wrap: wrap; }

/* --- Trust Badges --- */
.trust-badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); padding: var(--space-xl) 0; }
@media (min-width: 768px) { .trust-badges { grid-template-columns: repeat(4, 1fr); } }
.trust-item { text-align: center; }
.trust-item svg { width: 32px; height: 32px; margin: 0 auto var(--space-sm); color: var(--color-accent); }
.trust-item-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 2px; }
.trust-item-desc { font-size: 0.75rem; color: var(--color-text-muted); }

/* --- Brand Story --- */
.brand-story { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); align-items: center; }
@media (min-width: 768px) { .brand-story { grid-template-columns: 1fr 1fr; } }
.brand-story-img { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; }
.brand-story-img img { width: 100%; height: 100%; object-fit: cover; }
.brand-story-content h2 { margin-bottom: var(--space-md); }
.brand-story-content p { color: var(--color-text-secondary); margin-bottom: var(--space-md); }

/* --- CTA Section --- */
.cta-section { padding: var(--space-2xl) 0; }
.promo-banner-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); align-items: center; }
@media (min-width: 768px) { .promo-banner-grid { grid-template-columns: 1fr 1fr; } }
.promo-banner-img { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; }
.promo-banner-img img { width: 100%; height: 100%; object-fit: cover; }

/* --- Blog Card --- */
.blog-card { background: var(--color-surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition-base), transform var(--transition-base); }
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.blog-card-img { aspect-ratio: 16/9; overflow: hidden; background: var(--color-surface-alt); }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-body { padding: var(--space-lg); }
.blog-card-meta { font-size: 0.75rem; color: var(--color-accent); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--space-sm); }
.blog-card-title { font-size: 1.125rem; margin-bottom: var(--space-sm); }
.blog-card-title a:hover { color: var(--color-accent); }
.blog-card-excerpt { font-size: 0.875rem; color: var(--color-text-secondary); line-height: 1.6; }

/* --- Newsletter --- */
.newsletter { background: var(--color-text-primary); color: #FFF; padding: var(--space-2xl) 0; text-align: center; }
.newsletter h2 { color: #FFF; margin-bottom: var(--space-sm); }
.newsletter p { color: rgba(255,255,255,0.7); margin-bottom: var(--space-lg); }
.newsletter-form { display: flex; max-width: 480px; margin: 0 auto; gap: var(--space-sm); }
.newsletter-form input { flex: 1; padding: 12px 16px; border: none; border-radius: var(--radius-md); font-size: 0.9375rem; }

/* --- Contact --- */
.contact-info-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); margin: var(--space-xl) 0; }
@media (min-width: 640px) { .contact-info-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-info-item { text-align: center; padding: var(--space-lg); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.contact-info-item svg { width: 32px; height: 32px; margin: 0 auto var(--space-sm); color: var(--color-accent); }
.contact-info-item h4 { margin-bottom: 6px; }
.contact-info-item p { font-size: 0.875rem; color: var(--color-text-secondary); margin: 0; }
.contact-form { max-width: 600px; margin: 0 auto; }

/* --- FAQ --- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-question { display: flex; align-items: center; justify-content: space-between; padding: var(--space-md) 0; cursor: pointer; font-weight: 600; font-size: 0.9375rem; }
.faq-question:hover { color: var(--color-accent); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height var(--transition-base); }
.faq-item.open .faq-answer { max-height: 500px; }
.faq-answer-inner { padding: 0 0 var(--space-md); color: var(--color-text-secondary); font-size: 0.9375rem; line-height: 1.7; }

/* --- Page Content --- */
.page-content { padding: var(--space-lg) 0 var(--space-2xl); }
.page-content-inner { max-width: 800px; margin: 0 auto; }
.page-content-inner h1 { margin-bottom: var(--space-md); }
.page-content-inner h2 { margin: var(--space-lg) 0 var(--space-sm); }
.page-content-inner p { color: var(--color-text-secondary); margin-bottom: var(--space-md); }
.page-content-inner ul { padding-left: var(--space-lg); list-style: disc; margin-bottom: var(--space-md); }
.page-content-inner li { margin-bottom: 6px; color: var(--color-text-secondary); }

/* --- Policy Layout --- */
.policy-layout { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); padding: var(--space-lg) 0 var(--space-2xl); }
@media (min-width: 768px) { .policy-layout { grid-template-columns: 240px 1fr; } }
.policy-sidebar { }
.policy-sidebar a { display: block; padding: 10px var(--space-md); border-radius: var(--radius-sm); font-size: 0.875rem; color: var(--color-text-secondary); transition: all var(--transition-fast); }
.policy-sidebar a:hover, .policy-sidebar a.active { background: var(--color-surface-alt); color: var(--color-accent); }
.policy-content { max-width: 800px; }
.policy-content h1 { margin-bottom: var(--space-md); }
.policy-content h2 { margin: var(--space-lg) 0 var(--space-sm); }
.policy-content p { color: var(--color-text-secondary); margin-bottom: var(--space-md); }
.policy-content ul { padding-left: var(--space-lg); list-style: disc; margin-bottom: var(--space-md); }
.policy-content li { margin-bottom: 6px; color: var(--color-text-secondary); }

/* --- Search --- */
.search-bar { position: relative; }
.search-results-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); max-height: 400px; overflow-y: auto; z-index: 101; display: none; }
.search-results-dropdown.active { display: block; }
.search-item { display: flex; gap: var(--space-sm); padding: 10px var(--space-md); border-bottom: 1px solid var(--color-border); cursor: pointer; }
.search-item:hover { background: var(--color-surface-alt); }
.search-item img { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; }
.search-item-info { flex: 1; }
.search-item-title { font-size: 0.875rem; font-weight: 600; }
.search-item-price { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--color-accent); }
.search-empty { padding: var(--space-lg); text-align: center; color: var(--color-text-muted); font-size: 0.875rem; }

/* --- Pagination --- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: var(--space-xl); }
.pagination-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 600; color: var(--color-text-secondary); transition: all var(--transition-fast); }
.pagination-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.pagination-btn.active { background: var(--color-accent); color: var(--color-accent-fg); border-color: var(--color-accent); }

/* --- Toast --- */
.toast { position: fixed; bottom: var(--space-xl); left: 50%; transform: translateX(-50%) translateY(100px); background: var(--color-text-primary); color: #FFF; padding: 12px 20px; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); z-index: 999; display: flex; align-items: center; gap: 10px; font-size: 0.875rem; font-weight: 500; opacity: 0; transition: all var(--transition-base); }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-success { background: var(--color-success); }
.toast-error { background: var(--color-error); }
.toast svg { width: 20px; height: 20px; flex-shrink: 0; }

/* --- Footer --- */
.footer { background: var(--color-text-primary); color: rgba(255,255,255,0.7); padding: var(--space-2xl) 0 var(--space-lg); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-col h4 { color: #FFF; margin-bottom: var(--space-md); font-size: 0.9375rem; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 0.875rem; color: rgba(255,255,255,0.6); transition: color var(--transition-fast); }
.footer-col ul li a:hover { color: var(--color-accent); }
.footer-logo { font-family: var(--font-heading); font-weight: 800; font-size: 1.125rem; color: #FFF; margin-bottom: var(--space-md); white-space: nowrap; display: flex; align-items: center; gap: 2px; }
.footer-logo span { color: var(--color-accent); }
.footer-desc { font-size: 0.875rem; color: rgba(255,255,255,0.5); margin-bottom: var(--space-md); line-height: 1.6; }
.social-links { display: flex; gap: var(--space-sm); }
.social-links a { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); transition: all var(--transition-fast); }
.social-links a:hover { background: var(--color-accent); color: #FFF; }
.social-links svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: var(--space-xl); padding-top: var(--space-lg); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-md); }
.footer-bottom p { font-size: 0.8125rem; color: rgba(255,255,255,0.4); margin: 0; }
.footer-contact { display: flex; gap: var(--space-md); flex-wrap: wrap; }
.footer-contact a, .footer-contact span { font-size: 0.8125rem; color: rgba(255,255,255,0.5); }
.footer-contact a:hover { color: var(--color-accent); }
@media (max-width: 480px) { .footer-logo { font-size: 0.8125rem; } }

/* --- Error Page --- */
.error-page { text-align: center; padding: var(--space-3xl) var(--space-md); }
.error-page h1 { font-size: 6rem; color: var(--color-accent); margin-bottom: var(--space-sm); }
.error-page p { color: var(--color-text-secondary); margin-bottom: var(--space-lg); }

/* --- Skeleton --- */
.skeleton { background: linear-gradient(90deg, var(--color-surface-alt) 25%, var(--color-border) 50%, var(--color-surface-alt) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* --- Animations --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.5s ease; }
.slide-up { animation: slideUp 0.5s ease; }

/* --- Spinner --- */
.spinner { width: 20px; height: 20px; border: 2px solid var(--color-border); border-top-color: var(--color-accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Product page sticky ATC spacing --- */
body:has(.sticky-atc.visible) main { padding-bottom: 80px; }
@media (max-width: 768px) { body:has(.sticky-atc.visible) main { padding-bottom: 70px; } }