:root{
  --font:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  --max:1480px;
  --transition:.22s ease;
}
html[data-theme="dark"]{
  --bg:#09090A;--bg-soft:#0E0E10;--surface:#141416;--surface2:#1A1A1D;--surface3:#222225;
  --text:#F7F5F1;--text2:#D7D2CC;--muted:#A49E97;--muted2:#76706A;
  --line:rgba(255,255,255,.09);--line2:rgba(255,255,255,.16);
  --accent:#D47B42;--accent2:#F0A06C;--accent-soft:rgba(212,123,66,.13);
  --success:#2BC675;--danger:#FF6464;
  --shadow:0 22px 70px rgba(0,0,0,.28);
}
html[data-theme="light"]{
  --bg:#F8F7F4;--bg-soft:#F0EEEA;--surface:#FFFFFF;--surface2:#F5F3EF;--surface3:#ECE9E4;
  --text:#141210;--text2:#403B36;--muted:#746D66;--muted2:#989089;
  --line:rgba(20,18,16,.08);--line2:rgba(20,18,16,.15);
  --accent:#C7662E;--accent2:#DB8550;--accent-soft:rgba(199,102,46,.10);
  --success:#1FA866;--danger:#D94F4F;
  --shadow:0 20px 60px rgba(44,35,28,.12);
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;background:var(--bg)}
body{font-family:var(--font);background:var(--bg);color:var(--text);overflow-x:hidden;transition:background var(--transition),color var(--transition)}
body.locked{overflow:hidden}
a{text-decoration:none;color:inherit}
img{width:100%;display:block}
button,input,textarea,select{font:inherit}
button{color:inherit}
.container{width:min(var(--max),calc(100% - 48px));margin-inline:auto}
::selection{background:var(--accent);color:#fff}

/* header */
.topbar{min-height:40px;padding:9px 18px;display:flex;align-items:center;justify-content:center;text-align:center;background:var(--bg-soft);border-bottom:1px solid var(--line);color:var(--muted);font-size:13px;font-weight:700}
.header{position:sticky;top:0;z-index:1000;height:84px;background:color-mix(in srgb,var(--bg) 84%,transparent);backdrop-filter:blur(18px);border-bottom:1px solid var(--line)}
.header-inner{height:100%;display:grid;grid-template-columns:1fr auto 1fr;align-items:center}
.nav{display:flex;align-items:center;gap:30px}
.nav a{font-size:15px;font-weight:750;color:var(--text2)} .nav a:hover{color:var(--accent)}
.brand-logo{width:190px;max-height:58px;object-fit:contain}
.actions{display:flex;justify-content:flex-end;align-items:center;gap:10px}
.icon-btn,.theme-btn{height:46px;border-radius:999px;border:1px solid var(--line);background:var(--surface);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.icon-btn{width:46px} .icon-btn svg,.theme-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7}
.theme-btn{padding:0 16px;gap:9px;font-size:14px;font-weight:800;color:var(--text2)}
.menu-btn{display:none}

/* stepper */
.checkout-hero{padding:28px 0 24px}
.breadcrumbs{font-size:14px;color:var(--muted);margin-bottom:20px}
.checkout-head{display:flex;align-items:end;justify-content:space-between;gap:30px}
.checkout-kicker{font-size:14px;color:var(--accent);font-weight:850;margin-bottom:10px}
.checkout-head h1{font-size:clamp(52px,6vw,94px);line-height:.88;letter-spacing:-.075em;font-weight:900}
.checkout-head p{max-width:540px;color:var(--muted);font-size:16px;line-height:1.7}
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:28px}
.step{padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--surface);display:flex;align-items:center;gap:12px}
.step-num{width:38px;height:38px;border-radius:12px;background:var(--surface2);display:grid;place-items:center;font-size:13px;font-weight:900}
.step.active{border-color:var(--accent)} .step.active .step-num{background:var(--accent);color:#fff}
.step.done .step-num{background:var(--success);color:#fff}
.step b{display:block;font-size:14px} .step span{display:block;margin-top:3px;font-size:12px;color:var(--muted)}

/* layout */
.checkout-section{padding:10px 0 110px}
.checkout-layout{display:grid;grid-template-columns:1.12fr .88fr;gap:28px;align-items:start}
.forms{display:flex;flex-direction:column;gap:14px}
.panel{border:1px solid var(--line);border-radius:24px;background:var(--surface);padding:22px}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}
.panel-title{display:flex;align-items:center;gap:12px}
.panel-icon{width:44px;height:44px;border-radius:14px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center}
.panel-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7}
.panel-title h2{font-size:22px;letter-spacing:-.035em} .panel-title span{display:block;margin-top:4px;color:var(--muted);font-size:13px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.field{display:flex;flex-direction:column;gap:7px}
.field.full{grid-column:1/-1}
.field label{font-size:13px;font-weight:850;color:var(--text2)}
.field input,.field textarea,.field select{width:100%;border:1px solid var(--line);border-radius:15px;background:var(--surface2);color:var(--text);outline:0;font-size:14px;padding:0 14px;transition:.2s}
.field input,.field select{height:50px}
.field textarea{min-height:108px;padding-top:13px;resize:vertical}
.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.field.error input,.field.error textarea,.field.error select{border-color:var(--danger)}
.field-error{min-height:16px;font-size:11px;color:var(--danger)}

/* shipping cards */
.shipping-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.option-card{position:relative;border:1px solid var(--line);border-radius:18px;background:var(--surface2);padding:16px;cursor:pointer;transition:.2s}
.option-card input{position:absolute;opacity:0}
.option-card.active{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
.option-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.option-card b{font-size:14px} .option-card p{font-size:12px;color:var(--muted);line-height:1.55;margin-top:7px}
.option-price{font-size:14px;font-weight:900;color:var(--accent)}
.option-dot{width:18px;height:18px;border-radius:50%;border:2px solid var(--muted2);display:grid;place-items:center}
.option-card.active .option-dot{border-color:var(--accent)} .option-card.active .option-dot::after{content:"";width:8px;height:8px;border-radius:50%;background:var(--accent)}

/* payment */
.payment-options{display:flex;flex-direction:column;gap:10px}
.payment-card{border:1px solid var(--line);border-radius:18px;background:var(--surface2);padding:16px;cursor:pointer;transition:.2s}
.payment-card.active{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
.payment-row{display:flex;align-items:center;gap:12px}
.pay-icon{width:40px;height:40px;border-radius:12px;background:var(--surface);display:grid;place-items:center;color:var(--accent)}
.pay-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7}
.payment-card b{font-size:14px} .payment-card span{display:block;margin-top:4px;font-size:12px;color:var(--muted)}
.card-fields{display:none;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.payment-card.active .card-fields.show{display:grid}

/* terms */
.check-row{display:flex;align-items:flex-start;gap:10px;margin-top:14px;color:var(--text2);font-size:13px;line-height:1.6}
.check-row input{margin-top:3px;width:17px;height:17px;accent-color:var(--accent)}
.check-row a{color:var(--accent);font-weight:800}

/* summary */
.summary{position:sticky;top:108px;border:1px solid var(--line);border-radius:24px;background:var(--surface);padding:22px;box-shadow:var(--shadow)}
.summary-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:18px;border-bottom:1px solid var(--line)}
.summary-head h2{font-size:24px;letter-spacing:-.04em}
.summary-head span{font-size:13px;color:var(--muted)}
.summary-products{display:flex;flex-direction:column;gap:12px;padding:18px 0;border-bottom:1px solid var(--line)}
.summary-product{display:grid;grid-template-columns:72px 1fr auto;gap:12px;align-items:center}
.summary-img{width:72px;height:84px;border-radius:14px;overflow:hidden;background:#f1f2f3}
.summary-img img{width:100%;height:100%;object-fit:cover}
.summary-brand{font-size:11px;font-weight:850;color:var(--accent)}
.summary-name{font-size:14px;font-weight:850;margin-top:4px}
.summary-meta{font-size:11px;color:var(--muted);margin-top:4px}
.summary-price{font-size:14px;font-weight:900}
.coupon-info{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;margin-top:16px;border-radius:16px;background:var(--accent-soft);border:1px solid color-mix(in srgb,var(--accent) 25%,var(--line))}
.coupon-info div{display:flex;align-items:center;gap:9px} .coupon-info svg{width:18px;height:18px;fill:none;stroke:var(--accent);stroke-width:1.7}
.coupon-info b{font-size:13px} .coupon-info span{font-size:12px;color:var(--muted)}
.remove-coupon{border:0;background:none;color:var(--accent);font-size:12px;font-weight:850;cursor:pointer}
.summary-lines{padding-top:16px}
.sum-line{display:flex;justify-content:space-between;gap:20px;margin:11px 0;font-size:14px;color:var(--text2)} .sum-line strong{color:var(--text)}
.sum-line.discount{color:var(--success)}
.total{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-top:17px;padding-top:17px;border-top:1px solid var(--line)}
.total span{font-size:13px;color:var(--muted)} .total b{font-size:30px;letter-spacing:-.04em}
.place-order{width:100%;height:58px;margin-top:20px;border:0;border-radius:999px;background:var(--accent);color:#fff;font-size:15px;font-weight:900;cursor:pointer;position:relative;overflow:hidden;transition:.2s}
.place-order:hover{background:var(--accent2);transform:translateY(-2px);box-shadow:0 14px 38px color-mix(in srgb,var(--accent) 24%,transparent)}
.place-order.loading{pointer-events:none;opacity:.8}
.secure{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:13px;color:var(--muted);font-size:12px}
.secure svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6}
.summary-perks{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:18px}
.perk{padding:12px;border-radius:14px;background:var(--surface2);border:1px solid var(--line)} .perk b{display:block;font-size:12px} .perk span{display:block;margin-top:4px;font-size:11px;color:var(--muted)}

/* toast */
.toast-stack{position:fixed;right:22px;top:104px;z-index:3500;width:min(390px,calc(100vw - 28px));display:flex;flex-direction:column;gap:10px;pointer-events:none}
.toast{position:relative;overflow:hidden;display:grid;grid-template-columns:46px 1fr 32px;gap:11px;align-items:center;padding:13px 13px 15px;border-radius:18px;border:1px solid var(--line2);background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(18px);box-shadow:0 18px 54px rgba(0,0,0,.22);transform:translateX(28px);opacity:0;animation:toastIn .32s ease forwards;pointer-events:auto}
.toast-icon{width:46px;height:46px;border-radius:14px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center}
.toast-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8}
.toast-copy b{display:block;font-size:14px} .toast-copy span{display:block;margin-top:4px;color:var(--muted);font-size:12px}
.toast-close{width:30px;height:30px;border-radius:50%;border:1px solid var(--line);background:var(--surface2);cursor:pointer}
.toast-progress{position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--line)} .toast-progress::after{content:"";display:block;width:100%;height:100%;background:linear-gradient(90deg,var(--accent),var(--accent2));transform-origin:left;animation:toastProgress var(--toast-duration,4000ms) linear forwards}
.toast.leaving{animation:toastOut .24s ease forwards}
@keyframes toastIn{to{transform:none;opacity:1}} @keyframes toastOut{to{transform:translateX(28px);opacity:0}} @keyframes toastProgress{to{transform:scaleX(0)}}

/* footer */
.footer{padding:72px 0 28px;background:var(--bg-soft);border-top:1px solid var(--line)}
.footer-grid{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:36px}
.footer-logo{width:200px} .footer-desc{font-size:14px;line-height:1.7;color:var(--muted);max-width:330px;margin-top:14px}
.footer-col small{display:block;font-size:13px;font-weight:850;color:var(--accent);margin-bottom:14px} .footer-col a{display:block;font-size:15px;color:var(--text2);margin:9px 0}
.footer-bottom{display:flex;justify-content:space-between;gap:20px;margin-top:42px;padding-top:20px;border-top:1px solid var(--line);font-size:13px;color:var(--muted2)}

/* mobile */
.mobile-menu{position:fixed;inset:0;z-index:3000;background:var(--bg);padding:24px;transform:translateX(-100%);transition:.35s cubic-bezier(.7,0,.2,1)} .mobile-menu.open{transform:none}
.mobile-menu-head{display:flex;justify-content:space-between;align-items:center} .mobile-menu-logo{width:180px}
.mobile-menu nav{margin-top:58px} .mobile-menu nav a{display:flex;justify-content:space-between;padding:15px 0;border-bottom:1px solid var(--line);font-size:35px;font-weight:900;letter-spacing:-.05em} .mobile-menu nav span{font-size:14px;color:var(--muted)}
.mobile-bottom{display:none} .mobile-order{display:none}
.reveal{opacity:0;transform:translateY(18px);transition:.5s} .reveal.in{opacity:1;transform:none}

@media(max-width:1050px){
 .desktop-nav{display:none} .menu-btn{display:flex}
 .checkout-layout{grid-template-columns:1fr}
 .summary{position:static}
 .footer-grid{grid-template-columns:1fr 1fr} .footer-grid>div:first-child{grid-column:1/3}
}
@media(max-width:760px){
 body{padding-bottom:134px}
 .container{width:min(var(--max),calc(100% - 24px))}
 .topbar{font-size:11px;min-height:36px} .header{height:68px} .brand-logo{width:145px} .actions{gap:6px} .actions .account{display:none} .theme-btn{width:40px;padding:0} .theme-label{display:none} .icon-btn{width:40px;height:40px}
 .breadcrumbs{font-size:12px} .checkout-head{display:block} .checkout-head h1{font-size:52px} .checkout-head p{font-size:14px;margin-top:14px}
 .steps{grid-template-columns:1fr;gap:8px} .step{padding:13px} .step-num{width:34px;height:34px} .step b{font-size:13px} .step span{font-size:11px}
 .checkout-section{padding-bottom:70px}
 .panel{padding:16px;border-radius:20px} .panel-head{margin-bottom:16px} .panel-title h2{font-size:19px} .panel-title span{font-size:12px} .panel-icon{width:40px;height:40px}
 .form-grid{grid-template-columns:1fr} .field.full{grid-column:auto} .field label{font-size:12px} .field input,.field select{height:48px;font-size:13px} .field textarea{font-size:13px}
 .shipping-options{grid-template-columns:1fr} .option-card b{font-size:13px} .option-card p{font-size:11px}
 .payment-card b{font-size:13px} .payment-card span{font-size:11px}
 .summary{padding:17px;border-radius:20px} .summary-head h2{font-size:21px} .summary-product{grid-template-columns:60px 1fr auto;gap:9px} .summary-img{width:60px;height:70px} .summary-name{font-size:13px} .summary-price{font-size:13px} .sum-line{font-size:13px} .total b{font-size:27px} .summary-perks{grid-template-columns:1fr}
 .toast-stack{top:82px;right:14px;left:14px;width:auto}
 .footer{padding-top:58px} .footer-grid{grid-template-columns:1fr 1fr;gap:28px} .footer-grid>div:first-child{grid-column:1/3} .footer-col a{font-size:14px} .footer-bottom{flex-direction:column;font-size:12px}
 .mobile-bottom{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;left:0;right:0;bottom:62px;z-index:2000;height:72px;background:color-mix(in srgb,var(--bg) 94%,transparent);backdrop-filter:blur(14px);border-top:1px solid var(--line)} .mobile-bottom a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:var(--muted);font-size:11px;font-weight:700} .mobile-bottom a.active{color:var(--accent)} .mobile-bottom svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5}
 .mobile-order{display:grid;grid-template-columns:1fr 1.35fr;gap:8px;position:fixed;left:0;right:0;bottom:0;z-index:2100;height:62px;padding:7px 10px calc(7px + env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--line)} .mobile-total{display:flex;flex-direction:column;justify-content:center} .mobile-total small{font-size:10px;color:var(--muted)} .mobile-total b{font-size:17px} .mobile-order button{border:0;border-radius:999px;background:var(--accent);color:#fff;font-size:14px;font-weight:900}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}.reveal{opacity:1;transform:none}}


/* FARMES live compatibility — approved HTML visual system */
[data-cart-count]{position:absolute;right:-4px;top:-4px;min-width:18px;height:18px;padding:0 4px;border-radius:999px;background:var(--accent);color:#fff;font-size:9px;font-weight:900;display:grid;place-items:center}
.actions .icon-btn{position:relative}
.product-card a{color:inherit}
.product-card .product-desc{color:var(--muted);font-size:14px;line-height:1.55;margin-top:7px}
.product-card .product-category{color:var(--muted);font-size:13px;margin-top:5px}
.product-card .product-name{display:block}
.product-card .quick-add,.product-card .add-cart{white-space:nowrap}
.empty-state{padding:70px 24px;border:1px dashed var(--line-2,var(--line2,var(--line)));border-radius:22px;text-align:center;color:var(--muted);background:var(--surface)}
.live-alert{padding:14px 16px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--muted);font-size:14px;line-height:1.65;margin:14px 0}
.live-alert.success{border-color:rgba(64,180,120,.28)}
.live-alert.error{border-color:rgba(230,100,100,.28)}
.footer-contact-live,.footer-social-live{display:flex;gap:12px;flex-wrap:wrap;margin-top:16px}
.footer-contact-live a,.footer-social-live a{font-size:13px;color:var(--muted)}
.footer-contact-live a:hover,.footer-social-live a:hover{color:var(--accent)}
.mobile-menu nav a span{font-variant-numeric:tabular-nums}
body{padding-bottom:0}
@media(max-width:760px){body{padding-bottom:72px}}

/* FARMES v5.1.2 hard visibility fix */
.reveal{opacity:1!important;transform:none!important;visibility:visible!important}
