/* PelletBay side cart v2 (cart-drawer.js). Uses store.css tokens:
   --brand orange, --ink, --muted, --line, --green, --radius. */
.drawer { width: min(440px, 100%); background: #fff; }
.drawer-head { padding: 16px 20px; }
.drawer-head h3 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.cd-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 800; }
.drawer-items { padding: 0 14px 16px 20px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; scrollbar-color: #d5dbe2 transparent; }
.cd-kg { margin-left: auto; margin-right: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.drawer-head h3 { flex: 1; }
#drawer-close { width: 38px; height: 38px; font-size: 18px; color: var(--ink); border-radius: 10px; }
#drawer-close:hover { background: var(--bg); }
/* cart open: cookie notice + language/call buttons must not cover totals */
body.cd-open #cookie-notice, body.cd-open .cookiebar, body.cd-open #lang-switch, body.cd-open .call-fab { display: none !important; }

/* free-delivery progress */
.cd-free { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); border: 1px solid #fde2bd; }
.cd-free-text { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink); line-height: 1.35; }
.cd-free-text svg { flex: none; color: var(--brand-dark); }
.cd-bar { margin-top: 9px; height: 8px; border-radius: 999px; background: #fff; overflow: hidden; box-shadow: inset 0 0 0 1px #fbd9ac; }
.cd-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.cd-free.is-done { background: #e9f8ef; border-color: #bfe8cf; }
.cd-free.is-done .cd-free-text svg { color: var(--green); }
.cd-free.is-done .cd-bar { box-shadow: inset 0 0 0 1px #bfe8cf; }
.cd-free.is-done .cd-bar i { background: var(--green); }

/* lines */
.cd-lines { list-style: none; margin: 0; padding: 0; }
.cd-line { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); transition: opacity .16s, transform .16s; }
.cd-line:last-child { border-bottom: 0; }
.cd-line.is-out { opacity: 0; transform: translateX(16px); }
.cd-thumb img { width: 68px; height: 68px; border-radius: 12px; object-fit: contain; background: #f3f5f8; border: 1px solid var(--line); display: block; }
.cd-name { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--ink); text-decoration: none; }
.cd-name:hover { color: var(--brand-dark); }
.cd-meta { margin-top: 3px; font-size: 13px; color: var(--ink-2); }
.cd-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.cd-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.cd-qty button { width: 32px; height: 32px; border: 0; background: none; font-size: 17px; font-weight: 700; color: var(--ink); cursor: pointer; border-radius: 9px; }
.cd-qty button:hover:not(:disabled) { background: var(--bg); }
.cd-qty button:disabled { color: #c3c9d1; cursor: not-allowed; }
.cd-qty span { min-width: 26px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd-rm { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; }
.cd-rm:hover { background: #fdecec; color: var(--red); }
.cd-price { font-size: 15px; line-height: 1.3; font-weight: 800; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* upsell */
.cd-up { border-radius: 14px; border: 1px dashed #f3c27e; background: #fffaf2; padding: 12px; }
.cd-up--also, .cd-up--empty { border-style: solid; border-color: var(--line); background: #fafbfc; }
.cd-up-title { font-size: 14px; font-weight: 800; color: var(--brand-dark); margin-bottom: 4px; }
.cd-up--also .cd-up-title, .cd-up--empty .cd-up-title { color: var(--ink-2); }
.cd-up-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; }
.cd-up-item + .cd-up-item { border-top: 1px solid rgba(227,232,238,.8); }
.cd-up-item img { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.cd-up-info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cd-up-info a { font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-up-price { font-size: 12.5px; color: var(--muted); }
.cd-up-hint { font-size: 12px; color: var(--green); font-weight: 600; }
.cd-up-hint b { font-weight: 800; }
.cd-up-add { height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .15s, transform .15s; }
.cd-up-add:hover { background: var(--brand); }
.cd-up-add.is-added { background: var(--green); transform: scale(.96); }

/* empty state */
.cd-empty { text-align: center; padding: 26px 10px 6px; }
.cd-empty-ico { font-size: 40px; line-height: 1; opacity: .85; }
.cd-empty-t { margin-top: 10px; font-size: 16px; font-weight: 800; color: var(--ink); }
.cd-browse { margin-top: 2px; }

/* trust row */
.cd-trust { list-style: none; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-2); }

/* footer totals */
.drawer-foot { padding: 12px 20px 16px; gap: 8px; box-shadow: 0 -10px 24px -18px rgba(28,43,58,.35); background: #fff; }
.drawer-foot[hidden] { display: none !important; }
.cd-sums { margin: 0; display: grid; gap: 4px; }
.cd-sums div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink-2); }
.cd-sums dt, .cd-sums dd { margin: 0; }
.cd-sums dd { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.cd-sums .cd-freeval { color: var(--green); }
.cd-sums .cd-weight dd { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.cd-sums .cd-grand { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 18px; }
.cd-sums .cd-grand dt { font-weight: 800; color: var(--ink); }
.cd-sums .cd-grand dd { font-weight: 900; }
.cd-go { height: 50px; font-size: 16px; }
.cd-view { text-align: center; font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.cd-view:hover { color: var(--brand-dark); }

@media (max-width: 480px) {
  .drawer-items { padding: 0 14px 14px; }
  .drawer-foot { padding: 12px 14px 16px; }
  .cd-line { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .cd-thumb img { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) { .cd-bar i, .cd-line, .cd-up-add { transition: none; } }

/* free-delivery offer inside the progress box */
.cd-offer { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-top: 11px; padding-top: 10px; border-top: 1px dashed #f3c27e; }
.cd-offer img { width: 40px; height: 40px; border-radius: 9px; object-fit: contain; background: #fff; border: 1px solid #fbd9ac; }
.cd-offer-info { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cd-offer-info b { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-offer-info span { font-size: 12px; color: var(--green); font-weight: 600; }
.cd-offer .cd-up-add { background: var(--brand); }
.cd-offer .cd-up-add:hover { background: var(--brand-dark); }
/* scroll hint: soft fade where the list runs under the totals */
.drawer-items::after { content: ''; position: sticky; bottom: -16px; flex: none; height: 26px; margin: -26px -14px 0 -20px; background: linear-gradient(rgba(255,255,255,0), #fff); pointer-events: none; }
.drawer-foot { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
.cd-rm { color: #8a94a1; }

.drawer-items::-webkit-scrollbar { width: 6px; }
.drawer-items::-webkit-scrollbar-button { display: none; height: 0; }
.drawer-items::-webkit-scrollbar-thumb { background: #d5dbe2; border-radius: 6px; }
.drawer-items::-webkit-scrollbar-track { background: transparent; }

.cd-offer .cd-up-add { padding: 0 11px; }
.cd-rm { color: #6b7684; }

/* ===== brand logo in the site header (operator's logo, wide lockup) ===== */
.header .logo img, header .logo img, .logo img { height: 52px; width: auto; }
.logo { margin-right: 10px; flex: none; }
@media (max-width: 760px) { .logo img { height: 40px; } }
