/* ── MY PALETTE DRAWER — one stylesheet for every page ──
   Markup lives in each page (#cartDrawer); behaviour in the page's own script
   plus assets/shopify-cart.js. Keep this the only place drawer styles are
   defined. Focus-visible outlines for the drawer controls stay with each
   page's other focus rules.

   Layout: header and footer never scroll away; only .cart-drawer-body
   scrolls. On very short screens the body keeps a 120px minimum, and the
   drawer itself scrolls with the header and footer pinned (sticky), so Close
   and Checkout stay reachable. Spare height with few items is left blank. */

.cart-overlay { position:fixed; inset:0; background:rgba(24,23,20,0.15); z-index:940; opacity:0; pointer-events:none; transition:opacity .35s ease; }
.cart-overlay.open { opacity:1; pointer-events:all; }
.cart-drawer {
  position:fixed; top:0; right:0; z-index:950;
  width:min(460px,100vw); height:100vh; height:100dvh;
  display:flex; flex-direction:column;
  overflow-y:auto; overscroll-behavior:contain;
  background:var(--ivory, #F4F3EF);
  border-left:1px solid rgba(24,23,20,0.08); border-radius:3px 0 0 3px;
  transform:translateX(100%); transition:transform .45s cubic-bezier(.16,1,.3,1);
}
.cart-drawer.open { transform:translateX(0); }

/* Header: one row — heading left, close right. */
.cart-drawer-header {
  position:sticky; top:0; z-index:2; flex-shrink:0;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:14px 34px 14px;
  background:var(--ivory, #F4F3EF);
  border-bottom:1px solid rgba(24,23,20,0.06);
}
.cart-title {
  margin:0;
  font-family:'DM Sans',sans-serif; font-size:18px; font-weight:500;
  letter-spacing:0.08em; text-transform:uppercase; line-height:1.2;
  color:#1C3328;
}
/* The 44×44 box is the real button; the 14px icon is centred in it and its
   right edge is pulled back so the icon, not the box, meets the gutter. */
.cart-close {
  display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
  width:44px; height:44px; margin:0 -15px 0 0; padding:0;
  background:none; border:none; cursor:pointer;
  color:var(--charcoal, #181714); opacity:0.62; transition:opacity .2s;
}
.cart-close:hover { opacity:1; }
.cart-close svg { display:block; }

.cart-drawer-body { flex:1 1 auto; min-height:120px; padding:0 44px; overflow-y:auto; }
.cart-empty { padding:40px 0; font-family:'Cormorant Garamond',Georgia,serif; font-size:17px; font-style:normal; font-weight:400; line-height:1.5; letter-spacing:0.01em; color:rgba(24,23,20,0.32); }

/* Line item: thumbnail | details | (price lives in the bottom row). */
.cart-item { display:grid; grid-template-columns:64px 1fr auto; column-gap:16px; align-items:start; padding:22px 0; border-bottom:1px solid rgba(24,23,20,0.06); }
.cart-item:first-child { padding-top:24px; }
.cart-item-thumb { width:64px; height:64px; flex-shrink:0; display:flex; align-items:center; justify-content:center; padding:0; background:transparent; border:none; border-radius:0; box-shadow:none; }
.cart-item-thumb img { display:block; width:56px; height:56px; max-width:100%; object-fit:contain; background:transparent; filter:drop-shadow(0 2px 4px rgba(24,23,20,0.08)); }
.cart-item-info { display:flex; flex-direction:column; min-width:0; }
.cart-item-title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:3px; }
.cart-item-name { font-family:'Fraunces',Georgia,serif; font-size:18px; font-weight:400; color:#181714; line-height:1; letter-spacing:-0.01em; margin-bottom:5px; }
/* Variant name, with the row's pending status on the same line (no extra height, so
   "Adding +1…" turning into the confirmed quantity never moves the rows below). */
.cart-item-variant { display:flex; align-items:baseline; gap:10px; min-width:0; font-family:'DM Sans',sans-serif; font-size:11.5px; font-weight:500; letter-spacing:.12em; text-transform:uppercase; color:#526158; margin-bottom:10px; }
.coti-row-label { flex:0 0 auto; }
.coti-row-status { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; line-height:1; font-size:10.5px; font-weight:400; letter-spacing:.06em; color:rgba(24,23,20,.56); }
/* A tin Shopify has not confirmed yet: its quantity and price are previews, shown muted. */
.cart-item.is-pending-only .cart-qty-value,
.cart-item.is-pending-only .cart-line-total { opacity:.55; }
.cart-item-bottom-row { display:flex; align-items:center; justify-content:space-between; margin-top:12px; }
.cart-line-total { font-family:'DM Sans',sans-serif; font-size:15px; font-weight:400; color:var(--charcoal, #181714); letter-spacing:.02em; white-space:nowrap; }
.cart-qty-control { display:inline-flex; align-items:center; align-self:flex-start; width:auto; max-width:max-content; height:30px; border:1px solid rgba(24,23,20,0.16); border-radius:3px; }
.cart-qty-btn { width:30px; height:28px; display:flex; align-items:center; justify-content:center; padding:0; border:none; background:transparent; font-family:'DM Sans',sans-serif; font-size:13px; line-height:1; color:var(--charcoal, #181714); cursor:pointer; transition:opacity .15s; }
.cart-qty-btn:hover { opacity:0.6; }
.cart-qty-sep { display:none; }
.cart-qty-value { width:32px; min-width:32px; text-align:center; font-family:'DM Sans',sans-serif; font-size:11.5px; color:var(--charcoal, #181714); letter-spacing:.04em; border-left:1px solid rgba(24,23,20,0.08); border-right:1px solid rgba(24,23,20,0.08); }
.cart-remove { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; width:22px; height:22px; margin:0; padding:0; background:none; border:none; font-size:18px; line-height:1; color:rgba(24,23,20,0.58); cursor:pointer; text-decoration:none; transition:color .18s ease; }
.cart-remove:hover { color:rgba(24,23,20,0.85); }

/* Invisible hit-area extension: the quantity and remove icons keep their
   compact size; only the tappable area grows to a 44×44 minimum. */
.cart-remove,
.cart-qty-btn { position:relative; }
.cart-remove::before,
.cart-qty-btn::before {
  content:""; position:absolute; top:50%; left:50%;
  width:44px; height:44px; transform:translate(-50%, -50%);
}

.cart-drawer-footer {
  position:sticky; bottom:0; flex-shrink:0;
  padding:34px 34px calc(32px + env(safe-area-inset-bottom, 0px));
  background:var(--ivory, #F4F3EF);
  border-top:1px solid rgba(24,23,20,0.06);
}
.cart-subtotal-row { display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-bottom:16px; }
.cart-subtotal-label { font-family:'DM Sans',sans-serif; font-size:13px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:#526158; }
.cart-subtotal-amount { font-family:'DM Sans',sans-serif; font-size:28px; font-weight:400; color:var(--charcoal, #181714); letter-spacing:.02em; }
.cart-shipping-note { margin:0 0 16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-family:'DM Sans',sans-serif; font-size:13px; font-weight:400; line-height:1.5; color:#526158; }
.checkout-btn { width:100%; min-height:54px; padding:18px; margin-bottom:10px; background:#1C3328; color:#F4F3EF; border:none; border-radius:3px; font-family:'DM Sans',sans-serif; font-size:13px; letter-spacing:.14em; text-transform:uppercase; cursor:pointer; transition:background .22s; }
.checkout-btn:hover:not(:disabled) { background:#13261d; }
.checkout-btn:disabled { opacity:.42; cursor:not-allowed; }
.continue-btn { width:100%; min-height:48px; padding:10px; background:transparent; color:#526158; border:1px solid rgba(24,23,20,0.18); border-radius:3px; font-family:'DM Sans',sans-serif; font-size:12.5px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; cursor:pointer; transition:color .2s; }
.continue-btn:hover { color:#1C3328; }

@media (max-width:700px) {
  .cart-drawer { width:100vw; }
  .cart-drawer-header { padding:14px var(--pad, 24px); }
  .cart-close { margin-right:-15px; }
  .cart-drawer-body { padding:0 var(--pad, 24px); }
  .cart-drawer-footer { padding:22px var(--pad, 24px) calc(28px + env(safe-area-inset-bottom, 0px)); }
}
/* Short screens (landscape phones, open keyboards): compact footer. */
@media (max-height:600px) {
  .cart-drawer-header { padding-block:6px; }
  .cart-drawer-footer { padding-block:14px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .cart-subtotal-row { margin-bottom:8px; }
  .cart-subtotal-amount { font-size:22px; }
  .cart-shipping-note { margin-bottom:10px; }
  .checkout-btn { min-height:48px; padding-block:12px; margin-bottom:8px; }
  .continue-btn { min-height:44px; }
}

/* ── SCROLL LOCK — scrollbar-width compensation (see assets/js/scroll-lock.js) ──
   While a modal (cart drawer, ingredient panel) holds the scroll lock, the page's
   classic scrollbar disappears. <html> takes its width as right padding so the page
   keeps its layout width, and the fixed bars that span the viewport follow suit. */
html.coti-scroll-comp { padding-right: var(--coti-sbw, 0px); }
html.coti-scroll-comp nav#nav,
html.coti-scroll-comp .n-mobile-menu { right: var(--coti-sbw, 0px); }
html.coti-scroll-comp .cookie-notice { right: calc(max(16px, env(safe-area-inset-right)) + var(--coti-sbw, 0px)); }
