/* --- Cart page --- */
.cart-page{max-width:1180px;margin:30px auto 56px;--cart-radius:14px;--cart-border:#d8e4df}
.cart-page svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.cart-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}


/* Layout */
.cart-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:24px;align-items:start}
.cart-items{display:grid;gap:12px;min-width:0;container-type:inline-size}

/* Item cards */
.cart-item{position:relative;display:grid;grid-template-columns:96px minmax(0,1fr) auto 120px 36px;align-items:center;gap:18px;padding:16px;border:1px solid var(--line);border-radius:var(--cart-radius);background:#fff;box-shadow:0 1px 2px rgba(17,73,57,.04);transition:border-color .2s,box-shadow .2s,opacity .25s}
.cart-item:hover{border-color:#c9ddd5;box-shadow:0 8px 24px rgba(17,73,57,.07)}
.cart-item-image{display:block;width:96px;height:96px;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--mint)}
.cart-item-image img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.cart-item:hover .cart-item-image img{transform:scale(1.04)}
.cart-item-info{display:grid;gap:5px;min-width:0}
.cart-item-info small{color:var(--muted);font-size:11px;font-weight:750;letter-spacing:.06em;text-transform:uppercase}
.cart-item-info h2{margin:0;font-size:15.5px;line-height:1.35;letter-spacing:-.005em}
.cart-item-info h2 a{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;transition:color .2s}
.cart-item-info h2 a:hover{color:var(--green)}
.cart-page .cart-unit-price{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;min-height:0;justify-content:flex-start;color:var(--muted);font-size:13px;font-weight:600}
.cart-page .cart-unit-price.price-has-offer{color:#c45112}
.cart-rx-status{display:inline-flex;align-items:center;justify-self:start;gap:5px;padding:4px 9px;border-radius:20px;background:#f3ecf7;color:#66327c;font-size:11.5px;font-weight:750}
.cart-rx-status svg{width:13px;height:13px;stroke-width:2.6}

/* Quantity stepper */
.cart-item-quantity{display:grid;justify-items:center;gap:5px}
.cart-stepper{display:inline-flex;align-items:center;height:42px;padding:3px;border:1px solid var(--cart-border);border-radius:12px;background:#f8fbfa}
.cart-stepper button{display:grid;width:34px;height:34px;place-items:center;padding:0;border:0;border-radius:9px;background:transparent;color:var(--ink);font-size:18px;font-weight:600;line-height:1;cursor:pointer;transition:background .15s,color .15s}
.cart-stepper button:hover{background:#fff;color:var(--green);box-shadow:0 1px 3px rgba(6,19,15,.12)}
.cart-stepper input{width:42px;height:34px;padding:0;border:0;background:transparent;color:var(--ink);font:inherit;font-size:15px;font-weight:800;text-align:center;-moz-appearance:textfield}
.cart-stepper input::-webkit-inner-spin-button,.cart-stepper input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}
.cart-stepper:focus-within{border-color:var(--green);box-shadow:0 0 0 4px rgba(20,122,89,.12)}
.cart-stepper input:focus{outline:0}
.cart-stock{color:#b7791f;font-size:11px;font-weight:700}
.cart-item-total{display:grid;justify-items:end;gap:2px;text-align:right}
.cart-item-total small{color:var(--muted);font-size:11px;font-weight:650}
.cart-item-total strong{font-size:16px;white-space:nowrap}
.cart-remove{display:grid;width:36px;height:36px;place-items:center;padding:0;border:0;border-radius:10px;background:transparent;color:#9aa8a2;cursor:pointer;transition:background .15s,color .15s}
.cart-remove svg{width:19px;height:19px}
.cart-remove:hover{background:#fdecea;color:#c0392b}
.cart-remove:disabled{opacity:.4;cursor:progress}

/* Summary */
.cart-summary{position:sticky;top:98px;padding:22px;border:1px solid var(--line);border-radius:var(--cart-radius);background:#fff;box-shadow:0 14px 40px rgba(17,73,57,.09)}
.cart-summary h2{margin:0 0 8px;padding-bottom:14px;border-bottom:1px solid var(--line);font-size:18px}
.cart-summary>div{display:flex;justify-content:space-between;gap:15px;padding:8px 0;color:var(--muted);font-size:13.5px}
.cart-summary>div strong{color:var(--ink);font-weight:700}
.cart-summary-note{color:var(--muted);font-size:12.5px}
.cart-summary .cart-summary-total{align-items:baseline;margin-top:8px;padding-top:16px;border-top:1px dashed var(--cart-border);color:var(--ink);font-size:16px;font-weight:800}
.cart-summary .cart-summary-total strong{color:var(--green);font-size:22px;font-weight:850;letter-spacing:-.01em}
.cart-checkout{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;margin-top:14px;border-radius:12px;font-size:15px;box-shadow:0 10px 22px rgba(20,122,89,.22);transition:transform .15s,box-shadow .2s}
.cart-checkout:hover{transform:translateY(-1px);box-shadow:0 14px 28px rgba(20,122,89,.28)}
.cart-checkout span{transition:transform .2s}
.cart-checkout:hover span{transform:translateX(3px)}
.cart-trust{display:grid;gap:9px;margin:18px 0 0;padding:16px 0 0;border-top:1px solid var(--line);list-style:none}
.cart-trust li{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:12px;line-height:1.4}
.cart-trust svg{width:18px;height:18px;flex:none;color:var(--green)}
.cart-mobile-bar{display:none}

/* Empty state */
.cart-empty{display:grid;justify-items:center;max-width:520px;margin:20px auto;padding:48px 28px;border:1px dashed var(--cart-border);border-radius:20px;background:#fff;text-align:center}
.cart-empty-icon{display:grid;width:84px;height:84px;place-items:center;margin-bottom:8px;border-radius:50%;background:var(--mint);color:var(--green)}
.cart-empty-icon svg{width:38px;height:38px}
.cart-empty h2{margin:10px 0 6px;font-size:22px}
.cart-empty p{max-width:380px;margin:0 0 20px;color:var(--muted);font-size:14px;line-height:1.55}
.cart-empty .btn{min-height:48px;padding:13px 26px;border-radius:12px}

/* Tablet */
@media(max-width:900px){
 .cart-layout{grid-template-columns:1fr}
 .cart-summary{position:static}
}
/* Item cards follow the width of the items column rather than the screen. */
@container (max-width:680px){
 .cart-item{grid-template-columns:84px minmax(0,1fr) auto 36px;grid-template-areas:'image info info remove' 'image qty total total';gap:12px 16px}
 .cart-item-image{grid-area:image;width:84px;height:84px;align-self:start}
 .cart-item-info{grid-area:info}
 .cart-item-quantity{grid-area:qty;justify-items:start}
 .cart-item-total{grid-area:total}
 .cart-remove{grid-area:remove;align-self:start}
}

/* Phone */
@media(max-width:600px){
 .cart-page{margin:16px auto 24px;padding:0 16px}
 .cart-page:has(.cart-mobile-bar){padding-bottom:84px}
 .cart-summary{padding:18px 16px;box-shadow:none}
 .cart-summary .cart-checkout{display:none}
 body:has(.cart-mobile-bar) .whatsapp-float{bottom:96px}
 .cart-mobile-bar{position:fixed;right:0;bottom:0;left:0;z-index:70;display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0;padding:12px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:rgba(255,255,255,.96);backdrop-filter:blur(8px);box-shadow:0 -8px 24px rgba(17,73,57,.08)}
 .cart-mobile-bar div{display:grid}
 .cart-mobile-bar small{color:var(--muted);font-size:11.5px}
 .cart-mobile-bar strong{font-size:18px}
 .cart-mobile-bar .btn{display:flex;align-items:center;gap:6px;min-height:48px;padding:0 22px;border-radius:12px;font-size:15px}
 .cart-empty{padding:36px 20px}
}
@container (max-width:460px){
 .cart-item{grid-template-columns:72px minmax(0,1fr) auto;grid-template-areas:'image info remove' 'qty qty total';padding:14px;gap:12px}
 .cart-item-image{width:72px;height:72px;border-radius:10px}
 .cart-item-info h2{font-size:14.5px}
 .cart-item-quantity{grid-auto-flow:column;align-items:center;gap:10px;padding-top:12px;border-top:1px solid #edf2ef}
 .cart-item-total{align-self:end;padding-top:12px;border-top:1px solid #edf2ef}
 .cart-remove{justify-self:end;width:32px;height:32px;margin:-6px -6px 0 0}
 .cart-stepper{height:44px}
 .cart-stepper button{width:38px;height:38px}
 .cart-stepper input{font-size:16px}
}
@media(prefers-reduced-motion:reduce){.cart-page *{transition:none!important}}
