/* ============================================
   Tech Etcetera — Coffee Maker Storefront
   Design System: Warm Industrial Coffee
   ============================================ */

/* --- 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}
ul,ol{list-style:none}
input,select,textarea{font-family:inherit;font-size:inherit}

/* --- CSS Variables / Design Tokens --- */
:root{
  /* Color Palette — Warm Industrial Coffee */
  --color-bg:#FAF7F2;
  --color-surface:#FFFFFF;
  --color-surface-alt:#F2EDE4;
  --color-border:#E0D9CC;
  --color-text-primary:#2B1D14;
  --color-text-secondary:#5C4A3A;
  --color-text-muted:#8B7B6B;
  --color-accent:#8B5E3C;
  --color-accent-hover:#6B4423;
  --color-accent-fg:#FFFFFF;
  --color-coffee-dark:#3B2F2F;
  --color-coffee-medium:#6F4E37;
  --color-coffee-light:#A67B5B;
  --color-cream:#F5E6D3;
  --color-success:#4A7C59;
  --color-warning:#C77D3B;
  --color-error:#B33A3A;
  --color-sale:#B33A3A;

  /* Typography */
  --font-heading:'Playfair Display',Georgia,serif;
  --font-body:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --font-mono:'JetBrains Mono','Courier New',monospace;

  /* Radius */
  --radius-sm:4px;
  --radius-md:8px;
  --radius-lg:16px;
  --radius-full:9999px;

  /* Shadows */
  --shadow-sm:0 1px 3px rgba(43,29,20,0.08);
  --shadow-md:0 4px 12px rgba(43,29,20,0.10);
  --shadow-lg:0 12px 32px rgba(43,29,20,0.15);

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

  /* Transitions */
  --transition-fast:150ms ease;
  --transition-base:250ms ease;

  /* Layout */
  --container-max:1280px;
  --header-height:64px;
}

/* --- 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){
  *{animation-duration:0.01ms!important;transition-duration:0.01ms!important;scroll-behavior:auto!important}
}

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

/* --- Buttons --- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-sm);padding:12px 24px;font-size:14px;font-weight:600;border-radius:var(--radius-md);transition:all var(--transition-base);text-align:center;line-height:1.4;white-space:nowrap}
.btn-primary{background:var(--color-accent);color:var(--color-accent-fg)}
.btn-primary:hover{background:var(--color-accent-hover);transform:translateY(-1px);box-shadow:var(--shadow-md)}
.btn-secondary{background:var(--color-surface);color:var(--color-text-primary);border:1.5px solid var(--color-border)}
.btn-secondary:hover{border-color:var(--color-accent);color:var(--color-accent)}
.btn-ghost{background:transparent;color:var(--color-text-secondary);padding:8px 16px}
.btn-ghost:hover{color:var(--color-accent)}
.btn-lg{padding:16px 32px;font-size:16px}
.btn-sm{padding:8px 16px;font-size:13px}
.btn-block{width:100%}
.btn:disabled{opacity:0.5;cursor:not-allowed;transform:none!important}

/* --- Badges --- */
.badge{display:inline-flex;align-items:center;padding:4px 10px;font-size:11px;font-weight:600;border-radius:var(--radius-full);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);min-width:20px;height:20px;border-radius:var(--radius-full);font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;padding:0 6px}

/* --- Announcement Bar --- */
.announcement-bar{background:var(--color-coffee-dark);color:var(--color-cream);text-align:center;padding:10px var(--space-md);font-size:13px;font-weight:500;letter-spacing:0.3px}
.announcement-bar strong{color:#fff}

/* --- Navigation --- */
.nav{position:sticky;top:0;z-index:100;background:var(--color-surface);border-bottom:1px solid var(--color-border);height:var(--header-height);display:flex;align-items:center}
.nav-inner{display:flex;align-items:center;justify-content:space-between;width:100%;gap:var(--space-md)}
.nav-logo{font-family:var(--font-heading);font-size:20px;font-weight:700;color:var(--color-text-primary);white-space:nowrap;letter-spacing:-0.5px;display:flex;align-items:center;gap:6px}
.nav-logo .logo-icon{width:28px;height:28px;flex-shrink:0}
.nav-links{display:none;align-items:center;gap:var(--space-lg)}
.nav-link{font-size:14px;font-weight:500;color:var(--color-text-secondary);transition:color var(--transition-fast);position:relative;padding:4px 0}
.nav-link:hover{color:var(--color-accent)}
.nav-link::after{content:'';position:absolute;bottom:-2px;left:0;width:0;height:2px;background:var(--color-accent);transition:width var(--transition-base)}
.nav-link:hover::after{width:100%}
.nav-actions{display:flex;align-items:center;gap:var(--space-sm)}
.nav-action-btn{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-md);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:20px;height:20px}
.nav-cart-count{position:absolute;top:2px;right:2px}

/* Search in nav */
.nav-search-wrap{display:none;position:relative;flex:1;max-width:400px}
.nav-search-input{width:100%;padding:8px 12px 8px 36px;border:1px solid var(--color-border);border-radius:var(--radius-md);font-size:14px;background:var(--color-surface-alt);color:var(--color-text-primary);transition:border-color var(--transition-fast)}
.nav-search-input:focus{border-color:var(--color-accent);outline:none}
.nav-search-icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--color-text-muted)}

@media(min-width:768px){
  .nav-links{display:flex}
  .nav-search-wrap{display:flex}
}
@media(min-width:1024px){
  .nav-logo{font-size:24px}
}

/* --- Mobile Menu --- */
.hamburger{display:flex;flex-direction:column;gap:4px;width:40px;height:40px;align-items:center;justify-content:center;border-radius:var(--radius-md)}
.hamburger span{width:22px;height:2px;background:var(--color-text-primary);transition:all var(--transition-base)}
.hamburger.open span:nth-child(1){transform:rotate(45deg) translate(4px,4px)}
.hamburger.open span:nth-child(2){opacity:0}
.hamburger.open span:nth-child(3){transform:rotate(-45deg) translate(4px,-4px)}
@media(min-width:768px){.hamburger{display:none}}

.mobile-menu{position:fixed;top:var(--header-height);left:0;right:0;bottom:0;background:var(--color-surface);z-index:99;transform:translateX(-100%);transition:transform var(--transition-base);overflow-y:auto;padding:var(--space-lg) var(--space-md)}
.mobile-menu.open{transform:translateX(0)}
.mobile-menu-link{display:block;padding:14px 0;font-size:16px;font-weight:500;color:var(--color-text-primary);border-bottom:1px solid var(--color-border)}
.mobile-menu-link:hover{color:var(--color-accent)}
.mobile-menu-search{margin-bottom:var(--space-lg)}
.mobile-menu-search input{width:100%;padding:12px 16px;border:1px solid var(--color-border);border-radius:var(--radius-md);font-size:15px}

/* --- Search Results Dropdown --- */
.search-results{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;display:none;z-index:200}
.search-results.show{display:block}
.search-item{display:flex;align-items:center;gap:12px;padding:10px 16px;border-bottom:1px solid var(--color-border);transition:background var(--transition-fast)}
.search-item:hover{background:var(--color-surface-alt)}
.search-item img{width:48px;height:48px;border-radius:var(--radius-sm);object-fit:cover}
.search-item-info{flex:1;min-width:0}
.search-item-title{font-size:14px;font-weight:500;color:var(--color-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-item-price{font-size:13px;color:var(--color-accent);font-weight:600}

/* --- Hero --- */
.hero{position:relative;min-height:520px;display:flex;align-items:center;overflow:hidden;background:var(--color-coffee-dark)}
.hero-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0.45}
.hero-overlay{position:absolute;inset:0;background:linear-gradient(135deg,rgba(43,29,20,0.85) 0%,rgba(59,47,47,0.6) 100%)}
.hero-content{position:relative;z-index:2;padding:var(--space-3xl) 0;max-width:640px}
.hero-eyebrow{display:inline-block;font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:2px;color:var(--color-coffee-light);margin-bottom:var(--space-md)}
.hero-title{font-family:var(--font-heading);font-size:40px;font-weight:700;color:#fff;line-height:1.15;margin-bottom:var(--space-md);letter-spacing:-1px}
.hero-subtitle{font-size:17px;color:rgba(255,255,255,0.85);margin-bottom:var(--space-xl);line-height:1.6;max-width:520px}
.hero-actions{display:flex;gap:var(--space-md);flex-wrap:wrap}
@media(min-width:768px){
  .hero{min-height:600px}
  .hero-title{font-size:56px}
  .hero-subtitle{font-size:19px}
}
@media(min-width:1024px){
  .hero-title{font-size:64px}
}

/* --- 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{font-family:var(--font-heading);font-size:32px;font-weight:700;color:var(--color-text-primary);margin-bottom:var(--space-sm)}
.section-subtitle{font-size:16px;color:var(--color-text-secondary);max-width:600px;margin:0 auto}
@media(min-width:768px){
  .section-title{font-size:40px}
}

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

/* --- Product Card --- */
.product-card{background:var(--color-surface);border-radius:var(--radius-lg);overflow:hidden;transition:all var(--transition-base);border:1px solid var(--color-border);display:flex;flex-direction:column}
.product-card:hover{box-shadow:var(--shadow-lg);transform:translateY(-2px)}
.product-card-img-wrap{position:relative;aspect-ratio:1;overflow:hidden;background:var(--color-surface-alt)}
.product-card-img-wrap img{width:100%;height:100%;object-fit:cover;transition:transform var(--transition-base)}
.product-card:hover .product-card-img-wrap img{transform:scale(1.05)}
.product-card-badges{position:absolute;top:8px;left:8px;display:flex;flex-direction:column;gap:4px;z-index:2}
.product-card-body{padding:var(--space-md);display:flex;flex-direction:column;gap:6px;flex:1}
.product-card-vendor{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.5px;color:var(--color-text-muted)}
.product-card-title{font-size:14px;font-weight:600;color:var(--color-text-primary);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:40px}
.product-card-title a:hover{color:var(--color-accent)}
.product-card-price-wrap{display:flex;align-items:baseline;gap:6px;margin-top:2px}
.product-card-price{font-family:var(--font-mono);font-size:16px;font-weight:700;color:var(--color-text-primary)}
.product-card-compare-price{font-size:13px;color:var(--color-text-muted);text-decoration:line-through}
.product-card-atc{margin-top:auto;padding-top:8px}
.product-card-atc .btn{width:100%}

/* --- Collection Card --- */
.collection-card{position:relative;aspect-ratio:4/3;border-radius:var(--radius-lg);overflow:hidden;display:block}
.collection-card img{width:100%;height:100%;object-fit:cover;transition:transform var(--transition-base)}
.collection-card:hover img{transform:scale(1.05)}
.collection-card-overlay{position:absolute;inset:0;background:linear-gradient(to top,rgba(43,29,20,0.8) 0%,rgba(43,29,20,0.2) 60%,transparent 100%);display:flex;flex-direction:column;justify-content:flex-end;padding:var(--space-lg)}
.collection-card-title{font-family:var(--font-heading);font-size:22px;font-weight:700;color:#fff;margin-bottom:4px}
.collection-card-count{font-size:13px;color:rgba(255,255,255,0.8)}
.collection-card-placeholder{background:linear-gradient(135deg,var(--color-coffee-medium),var(--color-coffee-dark))}

/* --- Blog Card --- */
.blog-card{background:var(--color-surface);border-radius:var(--radius-lg);overflow:hidden;border:1px solid var(--color-border);transition:all var(--transition-base);display:flex;flex-direction:column}
.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}
.blog-card-body{padding:var(--space-md);display:flex;flex-direction:column;gap:8px;flex:1}
.blog-card-date{font-size:12px;color:var(--color-text-muted);font-weight:500}
.blog-card-title{font-size:16px;font-weight:600;color:var(--color-text-primary);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.blog-card-excerpt{font-size:14px;color:var(--color-text-secondary);line-height:1.5;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.blog-card-read-more{font-size:13px;font-weight:600;color:var(--color-accent);margin-top:auto}

/* --- 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;padding:var(--space-md)}
.trust-item svg{width:32px;height:32px;color:var(--color-accent);margin:0 auto var(--space-sm)}
.trust-item-title{font-size:14px;font-weight:600;color:var(--color-text-primary);margin-bottom:2px}
.trust-item-desc{font-size:12px;color:var(--color-text-muted)}

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

/* --- Product Page Layout --- */
.product-layout{display:grid;grid-template-columns:1fr;gap:var(--space-xl);padding:var(--space-lg) 0 var(--space-2xl)}
@media(min-width:768px){
  .product-layout{grid-template-columns:1fr 1fr;gap:var(--space-2xl)}
}
@media(min-width:1024px){
  .product-layout{grid-template-columns:1.1fr 0.9fr;gap:var(--space-3xl);padding:var(--space-xl) 0 var(--space-3xl)}
}

/* Product Gallery — STATIC on mobile, no floating */
.product-gallery{position:relative}
.gallery-main-wrap{width:100%;aspect-ratio:1;border-radius:var(--radius-lg);overflow:hidden;background:var(--color-surface-alt);border:1px solid var(--color-border);position:relative}
.gallery-main-img{width:100%;height:100%;object-fit:cover}
.gallery-thumbs{display:flex;gap:8px;margin-top:var(--space-md);overflow-x:auto;padding-bottom:4px}
.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}
@media(min-width:768px){
  .gallery-thumb{width:80px;height:80px}
}

/* Product Info */
.product-info{display:flex;flex-direction:column;gap:var(--space-md)}
.product-vendor{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:1px;color:var(--color-text-muted)}
.product-title{font-family:var(--font-heading);font-size:26px;font-weight:700;color:var(--color-text-primary);line-height:1.25}
@media(min-width:768px){.product-title{font-size:32px}}
.product-rating{display:flex;align-items:center;gap:6px}
.rating-stars{display:inline-flex;gap:1px;color:#D4A055;font-size:16px}
.rating-stars .star-empty{color:var(--color-border)}
.rating-count{font-size:13px;color:var(--color-text-muted)}
.product-price-wrap{display:flex;align-items:baseline;gap:var(--space-sm);flex-wrap:wrap}
.product-price{font-family:var(--font-mono);font-size:28px;font-weight:700;color:var(--color-text-primary)}
.product-compare-price{font-size:18px;color:var(--color-text-muted);text-decoration:line-through}
.product-save-badge{font-size:12px;font-weight:600;color:var(--color-sale);background:rgba(179,58,58,0.08);padding:2px 8px;border-radius:var(--radius-full)}

/* Option Selectors */
.option-group{margin-bottom:var(--space-md)}
.option-label{font-size:13px;font-weight:600;color:var(--color-text-secondary);margin-bottom:6px;display:block;text-transform:uppercase;letter-spacing:0.5px}
.option-btns{display:flex;flex-wrap:wrap;gap:8px}
.option-btn{padding:8px 16px;border:1.5px solid var(--color-border);border-radius:var(--radius-md);font-size:14px;font-weight:500;color:var(--color-text-secondary);background:var(--color-surface);transition:all var(--transition-fast)}
.option-btn.active{border-color:var(--color-accent);background:var(--color-accent);color:var(--color-accent-fg)}
.option-btn:hover:not(.active){border-color:var(--color-coffee-light)}
.option-btn.unavailable{opacity:0.4;text-decoration:line-through;cursor:not-allowed}

/* Quantity Control */
.qty-control{display:inline-flex;align-items:center;border:1.5px solid var(--color-border);border-radius:var(--radius-md);overflow:hidden}
.qty-btn{width:40px;height:44px;display:flex;align-items:center;justify-content:center;font-size:18px;color:var(--color-text-secondary);transition:background var(--transition-fast)}
.qty-btn:hover{background:var(--color-surface-alt);color:var(--color-accent)}
.qty-input{width:50px;height:44px;text-align:center;border:none;font-size:16px;font-weight:600;color:var(--color-text-primary);background:var(--color-surface)}
.qty-input:focus{outline:none}

/* Availability */
.availability-msg{font-size:13px;font-weight:500;padding:6px 12px;border-radius:var(--radius-sm);display:inline-flex;align-items:center;gap:6px}
.availability-msg.in-stock{color:var(--color-success);background:rgba(74,124,89,0.08)}
.availability-msg.out-stock{color:var(--color-warning);background:rgba(199,125,59,0.08)}

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

/* Product Short Desc */
.product-short-desc{font-size:15px;color:var(--color-text-secondary);line-height:1.7;padding:var(--space-md) 0;border-top:1px solid var(--color-border);border-bottom:1px solid var(--color-border)}

/* Accordions */
.product-accordions{display:flex;flex-direction:column;gap:0}
.accordion{border-bottom:1px solid var(--color-border)}
.accordion-header{display:flex;justify-content:space-between;align-items:center;padding:16px 0;font-size:15px;font-weight:600;color:var(--color-text-primary);cursor:pointer;transition:color var(--transition-fast)}
.accordion-header:hover{color:var(--color-accent)}
.accordion-icon{width:20px;height:20px;transition:transform var(--transition-base);flex-shrink:0}
.accordion.open .accordion-icon{transform:rotate(45deg)}
.accordion-body{max-height:0;overflow:hidden;transition:max-height var(--transition-base);font-size:14px;color:var(--color-text-secondary);line-height:1.7}
.accordion.open .accordion-body{max-height:600px;padding-bottom:var(--space-md)}
.accordion-body-inner{padding-top:var(--space-sm)}
.accordion-body p{margin-bottom:var(--space-sm)}
.accordion-body ul{padding-left:var(--space-md);margin-bottom:var(--space-sm)}
.accordion-body li{list-style:disc;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:12px var(--space-md);z-index:90;transform:translateY(100%);transition:transform var(--transition-base);display:flex;align-items:center;gap:var(--space-md)}
.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:13px;font-weight:600;color:var(--color-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sticky-atc-product-price{font-size:14px;font-weight:700;color:var(--color-accent);font-family:var(--font-mono)}
@media(min-width:768px){
  .sticky-atc{padding:12px var(--space-xl)}
}

/* --- Reviews --- */
.reviews-section{padding:var(--space-2xl) 0;border-top:1px solid var(--color-border)}
.reviews-summary{display:flex;flex-direction:column;gap:var(--space-md);margin-bottom:var(--space-xl)}
@media(min-width:768px){.reviews-summary{flex-direction:row;align-items:center;gap:var(--space-2xl)}}
.reviews-avg{text-align:center}
.reviews-score{font-family:var(--font-heading);font-size:48px;font-weight:700;color:var(--color-text-primary)}
.reviews-score-out{font-size:20px;color:var(--color-text-muted)}
.reviews-bars{flex:1;max-width:400px;display:flex;flex-direction:column;gap:6px}
.rating-bar{display:flex;align-items:center;gap:8px;font-size:13px}
.rating-bar-label{width:40px;color:var(--color-text-muted)}
.rating-bar-track{flex:1;height:8px;background:var(--color-surface-alt);border-radius:var(--radius-full);overflow:hidden}
.rating-bar-fill{height:100%;background:#D4A055;border-radius:var(--radius-full);transition:width var(--transition-base)}
.rating-bar-count{width:30px;text-align:right;color:var(--color-text-muted)}

.review-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:var(--space-lg);margin-bottom:var(--space-md)}
.review-header{display:flex;justify-content:space-between;align-items:start;margin-bottom:var(--space-sm)}
.review-author{font-size:14px;font-weight:600;color:var(--color-text-primary)}
.review-verified{font-size:12px;color:var(--color-success);display:inline-flex;align-items:center;gap:4px}
.review-title{font-size:15px;font-weight:600;color:var(--color-text-primary);margin-bottom:6px}
.review-body{font-size:14px;color:var(--color-text-secondary);line-height:1.6}
.review-date{font-size:12px;color:var(--color-text-muted)}

/* --- Cart Drawer --- */
.cart-overlay{position:fixed;inset:0;background:rgba(43,29,20,0.5);z-index:200;opacity:0;visibility:hidden;transition:all var(--transition-base)}
.cart-overlay.show{opacity:1;visibility:visible}
.cart-drawer{position:fixed;top:0;right:0;bottom:0;width:100%;max-width:420px;background:var(--color-surface);z-index:201;transform:translateX(100%);transition:transform var(--transition-base);display:flex;flex-direction:column;box-shadow:var(--shadow-lg)}
.cart-drawer.open{transform:translateX(0)}
.cart-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:var(--space-md) var(--space-lg);border-bottom:1px solid var(--color-border);flex-shrink:0}
.cart-drawer-header h2{font-size:18px;font-weight:700;display:flex;align-items:center;gap:8px}
.cart-close{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-sm);font-size:20px;color:var(--color-text-secondary);transition:background var(--transition-fast)}
.cart-close:hover{background:var(--color-surface-alt)}
.cart-lines{flex:1;overflow-y:auto;padding:var(--space-md) var(--space-lg)}
.cart-item{display:flex;gap:12px;padding:var(--space-md) 0;border-bottom:1px solid var(--color-border)}
.cart-item-img{width:72px;height:72px;border-radius:var(--radius-md);object-fit:cover;flex-shrink:0;background:var(--color-surface-alt)}
.cart-item-info{flex:1;min-width:0}
.cart-item-title{font-size:14px;font-weight:600;color:var(--color-text-primary);margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cart-item-variant{font-size:12px;color:var(--color-text-muted);margin-bottom:6px}
.cart-item-price{font-size:14px;font-weight:700;color:var(--color-accent);font-family:var(--font-mono)}
.cart-item-controls{display:flex;align-items:center;justify-content:space-between;margin-top:8px}
.cart-item-qty{display:inline-flex;align-items:center;border:1px solid var(--color-border);border-radius:var(--radius-sm);overflow:hidden}
.cart-item-qty button{width:28px;height:28px;display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--color-text-secondary)}
.cart-item-qty button:hover{background:var(--color-surface-alt)}
.cart-item-qty span{width:32px;text-align:center;font-size:13px;font-weight:600}
.cart-item-remove{font-size:12px;color:var(--color-text-muted);transition:color var(--transition-fast)}
.cart-item-remove:hover{color:var(--color-error)}
.cart-empty{text-align:center;padding:var(--space-3xl) var(--space-md);color:var(--color-text-muted)}
.cart-empty svg{width:48px;height:48px;margin:0 auto var(--space-md);opacity:0.3}
.cart-footer{border-top:1px solid var(--color-border);padding:var(--space-md) var(--space-lg);flex-shrink:0}
.cart-subtotal{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--space-sm);font-size:16px}
.cart-subtotal strong{font-family:var(--font-mono);font-size:20px;font-weight:700;color:var(--color-text-primary)}
.cart-tax-note{font-size:12px;color:var(--color-text-muted);margin-bottom:var(--space-md);text-align:center}
.cart-footer .btn{width:100%;margin-bottom:8px}

/* --- Toast --- */
.toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%) translateY(100px);background:var(--color-text-primary);color:#fff;padding:12px 24px;border-radius:var(--radius-md);font-size:14px;font-weight:500;z-index:300;opacity:0;transition:all var(--transition-base);box-shadow:var(--shadow-lg);max-width:90vw;text-align:center}
.toast.show{transform:translateX(-50%) translateY(0);opacity:1}
.toast-success{background:var(--color-success)}
.toast-error{background:var(--color-error)}

/* --- Pagination --- */
.pagination{display:flex;justify-content:center;align-items:center;gap:6px;padding:var(--space-xl) 0}
.pagination-btn{min-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:14px;font-weight:500;color:var(--color-text-secondary);transition:all var(--transition-fast);padding:0 12px}
.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)}
.pagination-btn:disabled{opacity:0.4;cursor:not-allowed}

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

/* --- Collection Hero --- */
.collection-hero{position:relative;min-height:280px;display:flex;align-items:center;overflow:hidden;background:var(--color-coffee-dark)}
.collection-hero-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0.4}
.collection-hero-overlay{position:absolute;inset:0;background:linear-gradient(135deg,rgba(43,29,20,0.8) 0%,rgba(59,47,47,0.5) 100%)}
.collection-hero-content{position:relative;z-index:2;padding:var(--space-2xl) 0;text-align:center;width:100%}
.collection-hero-title{font-family:var(--font-heading);font-size:36px;font-weight:700;color:#fff;margin-bottom:var(--space-sm)}
.collection-hero-desc{font-size:15px;color:rgba(255,255,255,0.85);max-width:600px;margin:0 auto}
@media(min-width:768px){
  .collection-hero{min-height:340px}
  .collection-hero-title{font-size:48px}
}

/* --- Footer --- */
.footer{background:var(--color-coffee-dark);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);margin-bottom:var(--space-xl)}
@media(min-width:640px){.footer-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:768px){.footer-grid{grid-template-columns:repeat(4,1fr)}}
.footer-col h3{font-family:var(--font-heading);font-size:16px;font-weight:600;color:#fff;margin-bottom:var(--space-md)}
.footer-col a{display:block;font-size:14px;padding:4px 0;color:rgba(255,255,255,0.6);transition:color var(--transition-fast)}
.footer-col a:hover{color:var(--color-coffee-light)}
.footer-logo{font-family:var(--font-heading);font-size:24px;font-weight:700;color:#fff;margin-bottom:var(--space-sm);display:flex;align-items:center;gap:6px}
.footer-logo .logo-icon{width:28px;height:28px;flex-shrink:0}
.footer-tagline{font-size:14px;color:rgba(255,255,255,0.5);margin-bottom:var(--space-md);line-height:1.6}
.social-links{display:flex;gap:12px}
.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);transition:all var(--transition-fast)}
.social-links a:hover{background:var(--color-accent);transform:translateY(-2px)}
.social-links svg{width:18px;height:18px;color:#fff}
.footer-bottom{border-top:1px solid rgba(255,255,255,0.1);padding-top:var(--space-lg);display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:var(--space-sm);font-size:13px;color:rgba(255,255,255,0.4)}

/* --- Page Content --- */
.page-content{max-width:800px;margin:0 auto;padding:var(--space-xl) 0}
.page-content h1{font-family:var(--font-heading);font-size:32px;font-weight:700;margin-bottom:var(--space-lg)}
.page-content h2{font-family:var(--font-heading);font-size:24px;font-weight:600;margin:var(--space-lg) 0 var(--space-md)}
.page-content h3{font-size:18px;font-weight:600;margin:var(--space-lg) 0 var(--space-sm)}
.page-content p{margin-bottom:var(--space-md);line-height:1.7;color:var(--color-text-secondary)}
.page-content ul,.page-content ol{padding-left:var(--space-lg);margin-bottom:var(--space-md)}
.page-content li{margin-bottom:6px;list-style:disc;color:var(--color-text-secondary)}
.page-content img{border-radius:var(--radius-lg);margin:var(--space-md) 0}
.page-content table{width:100%;border-collapse:collapse;margin:var(--space-md) 0}
.page-content th,.page-content td{border:1px solid var(--color-border);padding:10px 14px;text-align:left;font-size:14px}
.page-content th{background:var(--color-surface-alt);font-weight:600}

/* --- Policy Layout --- */
.policy-layout{display:grid;grid-template-columns:1fr;gap:var(--space-xl);padding:var(--space-xl) 0}
@media(min-width:768px){.policy-layout{grid-template-columns:240px 1fr;gap:var(--space-2xl)}}
.policy-sidebar{display:flex;flex-direction:column;gap:4px}
.policy-sidebar a{padding:10px 14px;border-radius:var(--radius-md);font-size:14px;font-weight:500;color:var(--color-text-secondary);transition:all var(--transition-fast)}
.policy-sidebar a:hover{background:var(--color-surface-alt);color:var(--color-accent)}
.policy-sidebar a.active{background:var(--color-accent);color:var(--color-accent-fg)}
.policy-content{max-width:800px}
.policy-content h1{font-family:var(--font-heading);font-size:32px;font-weight:700;margin-bottom:var(--space-lg)}
.policy-content h2{font-size:22px;font-weight:600;margin:var(--space-xl) 0 var(--space-md)}
.policy-content p{margin-bottom:var(--space-md);line-height:1.7;color:var(--color-text-secondary)}
.policy-content ul{padding-left:var(--space-lg);margin-bottom:var(--space-md)}
.policy-content li{margin-bottom:6px;list-style:disc;color:var(--color-text-secondary)}

/* --- Contact Form --- */
.contact-form{max-width:600px;margin:0 auto}
.form-group{margin-bottom:var(--space-md)}
.form-label{display:block;font-size:14px;font-weight:600;color:var(--color-text-primary);margin-bottom:6px}
.form-input,.form-textarea,.form-select{width:100%;padding:12px 16px;border:1.5px solid var(--color-border);border-radius:var(--radius-md);font-size:15px;background:var(--color-surface);color:var(--color-text-primary);transition:border-color var(--transition-fast)}
.form-input:focus,.form-textarea:focus,.form-select:focus{border-color:var(--color-accent);outline:none}
.form-textarea{min-height:120px;resize:vertical}
.form-row{display:grid;grid-template-columns:1fr;gap:var(--space-md)}
@media(min-width:640px){.form-row{grid-template-columns:1fr 1fr}}

/* --- 404 --- */
.error-page{text-align:center;padding:var(--space-3xl) 0}
.error-page h1{font-family:var(--font-heading);font-size:80px;font-weight:700;color:var(--color-accent)}
.error-page p{font-size:18px;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)}}
@keyframes spin{to{transform:rotate(360deg)}}
.fade-in{animation:fadeIn 0.5s ease}
.slide-up{animation:slideUp 0.5s ease}

/* --- Cart Page --- */
.cart-page{padding:var(--space-xl) 0}
.cart-page-title{font-family:var(--font-heading);font-size:32px;font-weight:700;margin-bottom:var(--space-xl)}
.cart-page-table{width:100%;border-collapse:collapse;margin-bottom:var(--space-xl)}
.cart-page-table th{text-align:left;padding:12px 16px;font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:0.5px;color:var(--color-text-muted);border-bottom:2px solid var(--color-border)}
.cart-page-table td{padding:16px;border-bottom:1px solid var(--color-border);vertical-align:middle}
.cart-page-item{display:flex;align-items:center;gap:12px}
.cart-page-item img{width:64px;height:64px;border-radius:var(--radius-md);object-fit:cover;flex-shrink:0}
.cart-page-item-info{min-width:0}
.cart-page-item-title{font-size:14px;font-weight:600;color:var(--color-text-primary)}
.cart-page-item-variant{font-size:12px;color:var(--color-text-muted)}
.cart-page-summary{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:var(--space-lg)}
.cart-page-summary h3{font-size:18px;font-weight:700;margin-bottom:var(--space-md)}
.cart-page-summary-row{display:flex;justify-content:space-between;padding:8px 0;font-size:14px;color:var(--color-text-secondary)}
.cart-page-summary-total{border-top:1px solid var(--color-border);margin-top:var(--space-sm);padding-top:var(--space-md);font-size:18px;font-weight:700;color:var(--color-text-primary)}
.cart-page-summary-total strong{font-family:var(--font-mono);font-size:22px}
.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}}

/* --- Checkout Page --- */
.checkout-page{padding:var(--space-xl) 0;max-width:900px;margin:0 auto}
.checkout-title{font-family:var(--font-heading);font-size:32px;font-weight:700;margin-bottom:var(--space-xl)}
.checkout-section{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:var(--space-lg);margin-bottom:var(--space-lg)}
.checkout-section h3{font-size:18px;font-weight:700;margin-bottom:var(--space-md);display:flex;align-items:center;gap:8px}
.checkout-section-number{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:14px;font-weight:700}
.checkout-order-summary{background:var(--color-surface-alt);border-radius:var(--radius-lg);padding:var(--space-lg)}
.checkout-order-summary h3{font-size:16px;font-weight:700;margin-bottom:var(--space-md)}
.checkout-order-item{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid var(--color-border)}
.checkout-order-item img{width:56px;height:56px;border-radius:var(--radius-sm);object-fit:cover;flex-shrink:0}
.checkout-order-item-info{flex:1;min-width:0}
.checkout-order-item-title{font-size:13px;font-weight:600;color:var(--color-text-primary)}
.checkout-order-item-qty{font-size:12px;color:var(--color-text-muted)}
.checkout-order-item-price{font-size:13px;font-weight:700;color:var(--color-accent);font-family:var(--font-mono);white-space:nowrap}
.checkout-layout{display:grid;grid-template-columns:1fr;gap:var(--space-lg)}
@media(min-width:768px){.checkout-layout{grid-template-columns:1fr 340px;align-items:start}}

/* Card Payment Form */
.card-form{margin-top:var(--space-md)}
.card-form .form-group{margin-bottom:var(--space-md)}
.card-number-wrap{position:relative}
.card-number-wrap .form-input{padding-right:48px}
.card-icon{position:absolute;right:12px;top:50%;transform:translateY(-50%);width:32px;height:20px;border-radius:3px;background:linear-gradient(135deg,var(--color-coffee-medium),var(--color-coffee-dark));display:flex;align-items:center;justify-content:center}
.card-icon::after{content:'';width:12px;height:8px;background:rgba(255,215,0,0.7);border-radius:2px}
.card-row{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-md)}
.card-cvv-group{position:relative}
.card-cvv-help{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:12px;color:var(--color-text-muted);cursor:pointer}

/* --- Thank You Page --- */
.thank-you-page{text-align:center;padding:var(--space-3xl) 0}
.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-title{font-family:var(--font-heading);font-size:36px;font-weight:700;margin-bottom:var(--space-md)}
.thank-you-subtitle{font-size:17px;color:var(--color-text-secondary);max-width:500px;margin:0 auto var(--space-xl)}
.thank-you-order{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:var(--space-lg);max-width:500px;margin:0 auto var(--space-xl);text-align:left}
.thank-you-order h3{font-size:16px;font-weight:700;margin-bottom:var(--space-md)}
.thank-you-order-row{display:flex;justify-content:space-between;padding:6px 0;font-size:14px}
.thank-you-actions{display:flex;gap:var(--space-md);justify-content:center;flex-wrap:wrap}

/* --- Brand Story Section --- */
.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{font-family:var(--font-heading);font-size:32px;font-weight:700;margin-bottom:var(--space-md)}
.brand-story-content p{font-size:15px;color:var(--color-text-secondary);line-height:1.7;margin-bottom:var(--space-md)}

/* --- Benefits Section --- */
.benefits-grid{display:grid;grid-template-columns:1fr;gap:var(--space-md)}
@media(min-width:640px){.benefits-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:768px){.benefits-grid{grid-template-columns:repeat(3,1fr)}}
.benefit-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:var(--space-lg);text-align:center}
.benefit-card-icon{width:48px;height:48px;margin:0 auto var(--space-md);background:var(--color-surface-alt);border-radius:var(--radius-full);display:flex;align-items:center;justify-content:center;color:var(--color-accent)}
.benefit-card-icon svg{width:24px;height:24px}
.benefit-card h3{font-size:16px;font-weight:600;margin-bottom:6px}
.benefit-card p{font-size:14px;color:var(--color-text-secondary)}

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

/* --- 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}

/* --- Responsive header logo fix for mobile --- */
@media(max-width:480px){
  .nav-logo{font-size:16px;gap:4px}
  .nav-logo .logo-icon{width:24px;height:24px}
  .nav-action-btn{width:36px;height:36px}
  .nav-action-btn svg{width:18px;height:18px}
}
@media(max-width:380px){
  .nav-logo{font-size:14px}
  .nav-logo .logo-icon{width:22px;height:22px}
}
