:root {
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --bg: #e9efe6;
  --surface: #f8fbf3;
  --surface-alt: #dbe7d5;
  --text: #1f3323;
  --muted: #58705c;
  --accent: #4e7a4b;
  --accent-hover: #3d6239;
  --accent-soft: #cfe2c8;
  --border: rgba(31,51,35,0.13);
  --btn-text: #f8fbf3;
  --radius: 26px;
  --shadow: 0 8px 32px rgba(43,84,47,0.10);
  --shadow-hover: 0 20px 56px rgba(43,84,47,0.20);
  --glow: radial-gradient(ellipse at 90% 10%,rgba(78,122,75,0.25),transparent 50%);
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-font-smoothing:antialiased}
body{font-family:var(--font-body);font-size:15px;color:var(--text);background:var(--bg);background-image:var(--glow);background-attachment:fixed;min-height:100vh;overflow-x:hidden}
img{display:block;width:100%;height:auto}
a{color:inherit;text-decoration:none}
button,input{font:inherit}

/* Layout */
.site-shell{max-width:1280px;margin:0 auto;padding:0 20px 80px}

/* Topbar */
.topbar{display:flex;justify-content:space-between;align-items:center;padding:14px 0;gap:12px}
.announcement{font-size:0.82rem;color:var(--muted)}
.cart-pill{display:inline-flex;align-items:center;gap:8px;padding:9px 18px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text);cursor:pointer;font-size:0.88rem;font-weight:600;box-shadow:var(--shadow);transition:box-shadow 150ms ease,transform 100ms ease}
.cart-pill:hover{box-shadow:var(--shadow-hover);transform:translateY(-1px)}
.cart-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:var(--accent);color:var(--btn-text);font-size:0.75rem;font-weight:700}

/* Nav */
.main-nav{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:16px 24px;margin-bottom:4px;background:rgba(255,255,255,0.48);border:1px solid var(--border);border-radius:calc(var(--radius) + 8px);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);position:sticky;top:10px;z-index:20;box-shadow:var(--shadow)}
[data-layout="tech"] .main-nav{background:rgba(19,26,35,0.88)}
.brand-lockup{font-family:var(--font-head);font-size:clamp(1.8rem,2.5vw,2.8rem);line-height:1;font-weight:700}
.eyebrow{font-size:0.7rem;letter-spacing:0.18em;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
.nav-links{display:flex;gap:20px;font-size:0.9rem;color:var(--muted)}
.nav-links a:hover{color:var(--text)}

/* Hero */
.hero{display:grid;grid-template-columns:1.4fr 0.9fr;gap:20px;padding:40px 0 32px}
.hero-copy,.hero-panel,.featured-section,.catalog-section,.review-section,.cart-drawer{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}
[data-layout="tech"] .hero-copy,[data-layout="tech"] .hero-panel,[data-layout="tech"] .featured-section,[data-layout="tech"] .catalog-section,[data-layout="tech"] .review-section{background:linear-gradient(160deg,rgba(78,194,255,0.04),transparent 40%),var(--surface)}
.hero-copy{padding:clamp(24px,4vw,52px);display:grid;align-content:space-between}
.hero-copy h1{font-family:var(--font-head);font-size:clamp(2.2rem,4.5vw,4.4rem);line-height:1;font-weight:700;margin-bottom:16px}
.hero-body{color:var(--muted);font-size:1rem;line-height:1.7;max-width:54ch}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}
.primary-button{display:inline-flex;align-items:center;gap:8px;padding:13px 24px;border-radius:999px;background:var(--accent);color:var(--btn-text);font-weight:700;font-size:0.92rem;border:none;cursor:pointer;transition:background 150ms ease,transform 100ms ease,box-shadow 150ms ease}
.primary-button:hover{background:var(--accent-hover);transform:translateY(-1px);box-shadow:0 8px 24px rgba(0,0,0,0.15)}
.secondary-link{align-self:center;color:var(--muted);font-size:0.9rem;border-bottom:1px solid var(--border)}
.hero-panel{padding:22px;display:grid;gap:16px;align-content:start}
.hero-card,.hero-note{background:var(--surface-alt);border:1px solid var(--border);border-radius:calc(var(--radius) - 8px);padding:20px}
.hero-card-label{font-weight:600;font-size:0.88rem;margin-bottom:14px;color:var(--muted)}
.metric-list{display:grid;gap:14px}
.metric-list strong{display:block;font-family:var(--font-head);font-size:1.9rem;font-weight:700;line-height:1}
.metric-list span{font-size:0.82rem;color:var(--muted)}
.hero-note p{font-size:0.88rem;color:var(--muted);margin-top:6px}

/* Sections */
.featured-section,.catalog-section,.review-section{padding:24px;margin-top:20px}
.section-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:20px}
.section-heading h2{font-family:var(--font-head);font-size:clamp(1.5rem,2.5vw,2.2rem);font-weight:700;line-height:1.1}
.catalog-head{flex-wrap:wrap}
.search-input{padding:10px 16px;border:1px solid var(--border);border-radius:12px;background:var(--surface-alt);color:var(--text);font-size:0.9rem;min-width:220px;outline:none;transition:border-color 150ms ease}
.search-input:focus{border-color:var(--accent)}

/* Featured 3-col grid */
.featured-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}

/* Product 4-col grid */
.product-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}

/* Cards */
.product-card,.featured-card{background:var(--surface-alt);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;transition:transform 200ms ease,box-shadow 200ms ease;cursor:pointer}
.product-card:hover,.featured-card:hover{transform:translateY(-5px);box-shadow:var(--shadow-hover)}
.product-image{aspect-ratio:1/1;object-fit:cover;width:100%;transition:transform 400ms ease}
.product-card:hover .product-image,.featured-card:hover .product-image{transform:scale(1.05)}
.product-content{padding:16px}
.card-topline{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}
.badge{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;background:var(--accent-soft);color:var(--text);font-size:0.72rem;font-weight:700}
.stars{color:#f59e0b;letter-spacing:0.05em;font-size:0.85rem}
.product-meta{font-size:0.78rem;color:var(--muted)}
.product-card h3,.featured-card h3{font-size:0.95rem;font-weight:600;line-height:1.35;margin:6px 0 8px;min-height:2.7em}
.product-description{font-size:0.84rem;color:var(--muted);line-height:1.55;min-height:54px;margin-bottom:10px}
.price-line{display:flex;align-items:baseline;gap:8px;margin-bottom:12px}
.price-line strong{font-size:1.18rem;font-weight:700}
.price-line s{font-size:0.85rem;color:var(--muted)}
.product-actions{display:flex;gap:8px}
.add-btn{flex:1;padding:10px 14px;border:none;border-radius:999px;background:var(--accent);color:var(--btn-text);font-weight:700;font-size:0.84rem;cursor:pointer;transition:background 150ms ease,transform 100ms ease}
.add-btn:hover{background:var(--accent-hover);transform:scale(1.02)}
.add-btn.added{background:var(--accent-hover)}
.quick-btn{padding:10px 14px;border:1px solid var(--border);border-radius:999px;background:transparent;color:var(--text);font-size:0.82rem;cursor:pointer;transition:background 150ms ease}
.quick-btn:hover{background:var(--surface)}

/* Reviews */
.review-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.review-card{background:var(--surface-alt);border:1px solid var(--border);border-radius:var(--radius);padding:18px}
.review-topline{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.review-card h3{font-size:0.95rem;font-weight:600;margin-bottom:6px}
.review-card p{font-size:0.86rem;color:var(--muted);line-height:1.55}
.review-product{font-size:0.75rem;color:var(--muted);margin-top:10px;font-style:italic}

/* Cart overlay */
.cart-overlay{position:fixed;inset:0;background:rgba(0,0,0,0);backdrop-filter:blur(0px);-webkit-backdrop-filter:blur(0px);visibility:hidden;z-index:29;transition:background 250ms ease,backdrop-filter 250ms ease,visibility 250ms ease}
.cart-overlay.active{background:rgba(0,0,0,0.45);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);visibility:visible}

/* Cart drawer */
.cart-drawer{position:fixed;inset:0 0 0 auto;width:min(420px,100vw);background:var(--surface);border-left:1px solid var(--border);box-shadow:-8px 0 40px rgba(0,0,0,0.15);display:grid;grid-template-rows:auto 1fr auto;transform:translateX(105%);transition:transform 260ms cubic-bezier(0.4,0,0.2,1);z-index:30;border-radius:0}
.cart-drawer.open{transform:translateX(0)}
.cart-header{display:flex;justify-content:space-between;align-items:flex-start;padding:20px 20px 16px;border-bottom:1px solid var(--border)}
.cart-header h2{font-family:var(--font-head);font-size:1.5rem;font-weight:700;margin-bottom:2px}
.cart-sub{font-size:0.82rem;color:var(--muted)}
.cart-close{padding:8px;border:1px solid var(--border);border-radius:8px;background:var(--surface-alt);color:var(--text);cursor:pointer;font-size:1rem;line-height:1;transition:background 150ms ease}
.cart-close:hover{background:var(--accent-soft)}
.cart-body{overflow-y:auto;padding:16px 20px;display:flex;flex-direction:column;gap:12px}
.cart-empty{padding:40px 0;text-align:center;color:var(--muted);font-size:0.95rem}
.cart-item{display:grid;grid-template-columns:68px 1fr;gap:12px;align-items:start;padding:12px;border:1px solid var(--border);border-radius:16px;background:var(--surface-alt)}
.cart-thumb{aspect-ratio:1/1;object-fit:cover;border-radius:10px}
.cart-item-info{display:flex;flex-direction:column;gap:4px}
.cart-item-title{font-size:0.88rem;font-weight:600;line-height:1.3}
.cart-item-price{font-size:0.82rem;color:var(--muted)}
.cart-qty{display:flex;align-items:center;gap:6px;margin-top:8px}
.qty-btn{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--text);cursor:pointer;font-size:1rem;font-weight:700;line-height:1;transition:background 150ms ease}
.qty-btn:hover{background:var(--accent-soft)}
.qty-num{font-size:0.9rem;font-weight:600;min-width:20px;text-align:center}
.cart-item-remove{font-size:0.75rem;color:var(--muted);background:none;border:none;cursor:pointer;padding:0;text-decoration:underline;margin-top:2px}
.cart-footer-wrap{padding:16px 20px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:12px}
.pay-methods{display:grid;gap:8px}
.pay-method{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-alt)}
.pay-icon{font-size:1.3rem}
.pay-method strong{display:block;font-size:0.85rem;font-weight:600}
.pay-method span{font-size:0.78rem;color:var(--muted)}
.cart-total-row{display:flex;justify-content:space-between;align-items:center;font-size:1rem}
.cart-total-row strong{font-family:var(--font-head);font-size:1.4rem}
.checkout-btn{width:100%;padding:14px;border:none;border-radius:999px;background:var(--accent);color:var(--btn-text);font-weight:700;font-size:0.95rem;cursor:pointer;transition:background 150ms ease,transform 100ms ease}
.checkout-btn:hover{background:var(--accent-hover);transform:translateY(-1px)}

/* Layout variants */
[data-layout="editorial"] .hero-copy{min-height:480px}
[data-layout="editorial"] .featured-grid .featured-card:first-child{transform:translateY(22px)}
[data-layout="editorial"] .featured-grid .featured-card:first-child:hover{transform:translateY(22px) translateY(-5px)}
[data-layout="organic"] .hero{grid-template-columns:1.1fr 1fr}
[data-layout="organic"] .hero-copy,[data-layout="organic"] .hero-panel,[data-layout="organic"] .featured-section,[data-layout="organic"] .catalog-section,[data-layout="organic"] .review-section{border-radius:38px}
[data-layout="organic"] .featured-card:nth-child(2){transform:translateY(16px)}
[data-layout="organic"] .featured-card:nth-child(2):hover{transform:translateY(16px) translateY(-5px)}
[data-layout="tech"] .product-card,[data-layout="tech"] .featured-card,[data-layout="tech"] .review-card{background:linear-gradient(160deg,rgba(78,194,255,0.07),transparent 35%),var(--surface-alt)}
[data-layout="tech"] .primary-button,[data-layout="tech"] .checkout-btn,[data-layout="tech"] .add-btn{box-shadow:0 0 0 1px rgba(78,194,255,0.3),0 8px 24px rgba(78,194,255,0.15)}
[data-layout="botanical"] .main-nav{border-radius:999px}
[data-layout="botanical"] .hero-copy{border-radius:36px 36px 18px 36px}
[data-layout="botanical"] .hero-panel{border-radius:18px 36px 36px 36px}
[data-layout="botanical"] .featured-grid .featured-card:nth-child(3){transform:translateY(18px)}
[data-layout="botanical"] .featured-grid .featured-card:nth-child(3):hover{transform:translateY(18px) translateY(-5px)}
[data-layout="botanical"] .review-card{border-radius:24px 10px 24px 10px}

/* Responsive */
@media(max-width:1100px){
  .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:900px){
  .hero,[data-layout="organic"] .hero{grid-template-columns:1fr}
  .featured-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .review-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  .site-shell{padding:0 14px 60px}
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .featured-grid{grid-template-columns:1fr}
  .review-grid{grid-template-columns:1fr}
  .main-nav,.topbar{flex-direction:column;align-items:stretch;gap:10px}
  .nav-links{justify-content:space-between}
  .section-heading{flex-direction:column;align-items:stretch}
  .search-input{min-width:100%}
  [data-layout="editorial"] .featured-grid .featured-card:first-child{transform:none}
  [data-layout="organic"] .featured-card:nth-child(2){transform:none}
  [data-layout="botanical"] .featured-grid .featured-card:nth-child(3){transform:none}
}

/* ── Checkout modal ────────────────────────────── */
.checkout-modal{position:fixed;inset:0;z-index:40;display:none;align-items:center;justify-content:center;padding:16px}
.checkout-modal.open{display:flex}
.checkout-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.55);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.checkout-panel{position:relative;z-index:1;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 32px 80px rgba(0,0,0,0.28);width:100%;max-width:560px;max-height:92vh;display:flex;flex-direction:column;animation:rise 220ms ease both}
.checkout-hdr{display:flex;justify-content:space-between;align-items:flex-start;padding:22px 24px 16px;border-bottom:1px solid var(--border)}
.checkout-hdr h2{font-family:var(--font-head);font-size:1.5rem;font-weight:700}
.checkout-sub{font-size:0.82rem;color:var(--muted);display:block;margin-top:2px}
.checkout-close{padding:8px;border:1px solid var(--border);border-radius:8px;background:var(--surface-alt);color:var(--text);cursor:pointer;font-size:1rem;line-height:1;flex-shrink:0}
.checkout-close:hover{background:var(--accent-soft)}
.checkout-scroll{overflow-y:auto;padding:20px 24px 24px;display:flex;flex-direction:column;gap:18px}
.order-summary{display:flex;flex-direction:column;gap:8px}
.order-summary-item{display:grid;grid-template-columns:52px 1fr auto;gap:10px;align-items:center;padding:10px;border:1px solid var(--border);border-radius:12px;background:var(--surface-alt)}
.order-thumb{aspect-ratio:1/1;object-fit:cover;border-radius:8px}
.order-item-name{font-size:0.85rem;font-weight:600;line-height:1.3}
.order-item-qty{font-size:0.78rem;color:var(--muted)}
.order-item-price{font-size:0.9rem;font-weight:700;white-space:nowrap}
.order-total-row{display:flex;justify-content:space-between;align-items:center;font-size:1rem;padding:12px 0;border-top:1px solid var(--border)}
.order-total-row strong{font-family:var(--font-head);font-size:1.4rem}
.checkout-form{display:flex;flex-direction:column;gap:16px}
.form-section{display:flex;flex-direction:column;gap:10px}
.form-section-title{font-size:0.82rem;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;color:var(--muted)}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.form-input{padding:11px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-alt);color:var(--text);font-size:0.9rem;width:100%;outline:none;transition:border-color 150ms ease,box-shadow 150ms ease}
.form-input::placeholder{color:var(--muted)}
.form-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.form-input.error{border-color:#e53e3e}
.pay-tabs{display:flex;gap:8px}
.pay-tab{flex:1;padding:10px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-alt);color:var(--muted);font-size:0.88rem;font-weight:600;cursor:pointer;transition:all 150ms ease}
.pay-tab.active{background:var(--accent);color:var(--btn-text);border-color:var(--accent)}
.pay-panel{display:flex;flex-direction:column;gap:10px}
.pay-panel.hidden{display:none}
.cod-info{display:flex;align-items:flex-start;gap:12px;padding:14px;background:var(--surface-alt);border-radius:12px;border:1px solid var(--border)}
.cod-icon{font-size:1.5rem;flex-shrink:0}
.cod-info p{font-size:0.88rem;color:var(--muted);line-height:1.55}
.place-order-btn{width:100%;padding:15px;border:none;border-radius:999px;background:var(--accent);color:var(--btn-text);font-weight:700;font-size:1rem;cursor:pointer;transition:background 150ms ease,transform 100ms ease;margin-top:4px}
.place-order-btn:hover{background:var(--accent-hover);transform:translateY(-1px)}
.place-order-btn:disabled{opacity:0.6;cursor:not-allowed;transform:none}
.order-success{display:flex;flex-direction:column;align-items:center;gap:16px;padding:32px 0;text-align:center}
.order-success.hidden{display:none}
.success-icon{width:64px;height:64px;border-radius:50%;background:var(--accent);color:var(--btn-text);display:flex;align-items:center;justify-content:center;font-size:2rem;font-weight:700}
.order-success h3{font-family:var(--font-head);font-size:1.6rem;font-weight:700}
.order-success p{color:var(--muted);font-size:0.95rem}
@keyframes rise{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:560px){.form-row{grid-template-columns:1fr}.checkout-panel{border-radius:16px 16px 0 0;max-height:96vh;margin-top:auto;width:100%;max-width:100%}.checkout-modal{padding:0;align-items:flex-end}}
