/* Shared compact basket, enhanced as a native modal drawer. */
.cart-badge { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; min-width: 20px; height: 20px; padding-inline: 4px; border: 2px solid var(--header-bg); border-radius: 50px; background: #b89b5e; color: #242521; font: 800 .65rem/1 Montserrat, sans-serif; }
.cart-badge[hidden], .cart-toast[hidden] { display: none; }
body.cart-is-open { position: fixed; top: var(--cart-scroll-top); left: 0; right: 0; overflow: hidden; }
.cart-dialog { position: fixed; inset: 0 0 0 auto; width: min(600px, 100%); height: 100vh; height: 100dvh; max-width: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: #fefbf6; color: #242521; box-shadow: -12px 0 60px rgb(36 37 33 / 16%); overflow: hidden; }
.cart-dialog:not([open]) { display: none; }
.cart-dialog[open] { animation: cart-enter .22s ease-out; }
.cart-dialog::backdrop { background: rgb(24 29 25 / 38%); }
.cart-dialog > [data-cart-dialog-content], .cart-dialog .cart-view { height: 100%; min-height: 0; }
.cart-dialog .cart-view { display: flex; flex-direction: column; }
.cart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 28px 28px 22px; border-bottom: 1px solid #e6dfd3; }
.cart-heading :is(h1, h2) { margin: 0; font-size: clamp(1.65rem, 3vw, 2.15rem); line-height: 1.2; letter-spacing: -.035em; }
.cart-heading .eyebrow { margin: 0 0 8px; color: #77603b; font-size: .64rem; }
.cart-count { margin: 8px 0 0; color: #696a62; font-size: .85rem; }
.cart-close, .cart-remove { display: grid; flex: 0 0 auto; place-items: center; width: 44px; height: 44px; padding: 10px; border: 1px solid #e6dfd3; border-radius: 50%; color: #242521; background: transparent; cursor: pointer; }
.cart-close:hover, .cart-remove:hover { background: #f2ece5; }
:is(.cart-close, .cart-remove, .cart-line-placeholder, .cart-empty-icon) svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cart-items { min-height: 0; padding: 4px 28px; }
.cart-dialog .cart-items { flex: 1 1 auto; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
.cart-line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px 16px; align-items: start; padding: 24px 0; border-bottom: 1px solid #e6dfd3; }
.cart-line:last-child { border-bottom: 0; }
.cart-line-cover { display: block; width: 72px; height: 88px; object-fit: cover; border-radius: 10px; background: #eee8dd; }
.cart-line-placeholder { display: grid; place-items: center; color: #8d7b59; }
.cart-line-placeholder svg { width: 30px; height: 30px; }
.cart-line-info { min-width: 0; overflow-wrap: anywhere; }
.cart-line-info h3 { margin: 8px 0; font-size: .98rem; line-height: 1.4; letter-spacing: -.015em; }
.cart-universe { display: inline-block; padding: 4px 7px; border-radius: 4px; color: #052d21; background: #eef2ea; font: 800 .59rem/1.1 Montserrat, sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.cart-universe--story { color: #7a3f4a; background: #f8efed; }
.cart-line-offer, .cart-line-reward { margin: 3px 0 0; color: #63645e; font-size: .8rem; line-height: 1.5; }
.cart-line-reward { color: #77603b; }
.cart-line-side { display: flex; align-items: flex-end; flex-direction: column; gap: 10px; }
.cart-line-price { margin: 0; white-space: nowrap; font-size: .95rem; font-weight: 800; line-height: 1.5; }
.cart-line-price small { display: block; text-align: right; font-size: .6rem; font-weight: 500; color: #696a62; }
.cart-remove { border-color: transparent; color: #72736b; }
.cart-remove svg { width: 18px; height: 18px; }
.cart-line-options { grid-column: 2 / -1; font-size: .75rem; }
.cart-line-options summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; color: #5d5f55; }
.cart-line-options summary::after { content: '+'; margin-left: 10px; text-decoration: none; }
.cart-line-options[open] summary::after { content: '−'; }
.cart-line-options form { margin-top: 8px; }
.cart-line-options button { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 12px; border: 1px solid #d9ceba; border-radius: 8px; background: #fffdf9; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.cart-line-options button span { min-width: 0; overflow-wrap: anywhere; }
.cart-line-options button strong { white-space: nowrap; }
.cart-line-options button small { display: block; color: #696a62; }
.cart-line-error { grid-column: 1 / -1; margin: 0; color: #8a352b; font-size: .85rem; line-height: 1.5; }
.cart-summary { flex: 0 0 auto; padding: 22px 28px max(18px, env(safe-area-inset-bottom)); border-top: 1px solid #e6dfd3; background: #f7f2e9; }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 14px; font-size: .95rem; }
.cart-total strong { white-space: nowrap; font-size: 1.7rem; line-height: 1.2; letter-spacing: -.04em; }
.cart-delivery-note { margin: -4px 0 16px; color: #63645e; font-size: .76rem; line-height: 1.5; }
.cart-checkout { display: flex; justify-content: center; align-items: center; gap: 14px; width: 100%; min-height: 50px; padding: 14px 16px; text-align: center; font-size: .86rem; }
.cart-continue { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 8px; color: #5d5f55; text-decoration: underline; text-underline-offset: 4px; font-size: .8rem; }
.cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 100%; padding: 50px 12px; text-align: center; }
.cart-empty-icon { display: grid; place-items: center; width: 80px; height: 80px; border: 1px solid #d9ceba; border-radius: 50%; background: #f7f2e9; color: #8d7b59; }
.cart-empty-icon svg { width: 32px; height: 32px; }
.cart-empty h3 { max-width: 300px; margin: 8px 0 0; font-size: 1.4rem; line-height: 1.3; }
.cart-empty p { max-width: 300px; margin: 0; color: #63645e; font-size: .9rem; }
.cart-empty .button { margin-top: 8px; }
.cart-loading, .cart-replacement { padding: 24px; }
.cart-replacement { margin-block: 20px; border: 1px solid #d9ceba; border-radius: 12px; background: #f7f2e9; font-size: .85rem; overflow-wrap: anywhere; }
.cart-replacement h3 { font-size: 1rem; }
.cart-replacement a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: underline; }
.cart-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); width: min(480px, calc(100% - 32px)); z-index: 100; padding: 16px 20px; border-radius: 12px; background: #242521; color: #fff; box-shadow: 0 8px 30px #0002; }
.cart-page, .cart-validation { max-width: 1160px; margin: 40px auto 72px; }
.cart-page .cart-view { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 32px; }
.cart-page .cart-heading { grid-column: 1 / -1; padding: 0 0 26px; margin-bottom: 12px; }
.cart-page .cart-items { padding: 0; }
.cart-page .cart-summary { position: sticky; top: 110px; align-self: start; margin-top: 12px; border: 1px solid #e6dfd3; border-radius: 16px; padding: 24px; }
.cart-page .cart-view:has(.cart-empty) .cart-items { grid-column: 1 / -1; }
.cart-page .cart-empty { min-height: 400px; }
.cart-validation > .cart-heading { padding-inline: 0; }
.cart-validation-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr); gap: 40px; margin-top: 24px; }
.cart-validation-payment { align-self: start; padding: 28px; border: 1px solid #e6dfd3; border-radius: 16px; background: #f7f2e9; }
.cart-validation-payment .checkout-agreement { margin-top: 24px; }
.cart-validation-payment label { font-size: .86rem; line-height: 1.6; }
.cart-validation-payment input[type=checkbox] { min-width: 20px; min-height: 20px; }
.cart-conditions { margin-top: 28px; padding: 24px; border: 1px solid #e6dfd3; border-radius: 12px; font-size: .85rem; line-height: 1.65; }
.cart-conditions h2 { margin-top: 0; font-size: 1.1rem; }
.cart-conditions p:last-child { margin-bottom: 0; }
.cart-contract-scope, .cart-payment-note { font-size: .75rem; line-height: 1.6; color: #63645e; }
.cart-payment-note { text-align: center; margin-bottom: 0; }
.cart-offer-details { padding: 16px 0; border-bottom: 1px solid #e6dfd3; font-size: .85rem; }
.cart-offer-details summary { min-height: 44px; cursor: pointer; }
.cart-offer-details p { overflow-wrap: anywhere; }
@keyframes cart-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
@media (max-width: 760px) {
    .cart-page, .cart-validation { margin-block: 24px 40px; }
    .cart-page .cart-view, .cart-validation-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .cart-page .cart-summary { position: static; margin: 0; }
    .cart-validation-payment { padding: 22px; }
}
@media (max-width: 480px) {
    .cart-dialog { width: 100%; }
    .cart-heading { padding: max(20px, env(safe-area-inset-top)) 20px 18px; }
    .cart-items { padding-inline: 20px; }
    .cart-line { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; padding-block: 20px; }
    .cart-line-cover { width: 52px; height: 70px; border-radius: 8px; }
    .cart-line-info h3 { font-size: .86rem; }
    .cart-line-price { font-size: .85rem; }
    .cart-line-offer, .cart-line-reward { font-size: .73rem; }
    .cart-summary { padding: 18px 20px max(12px, env(safe-area-inset-bottom)); }
    .cart-total strong { font-size: 1.5rem; }
    .cart-checkout { font-size: .8rem; padding-inline: 10px; }
    .cart-validation-payment, .cart-conditions { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { .cart-dialog[open] { animation: none; } }
/* Override the historical order summary spacing without changing order pages. */
.cart-view .cart-total, .cart-validation .cart-total { margin: 0 0 14px; padding: 0; border: 0; }
.cart-view .cart-heading { flex-shrink: 0; }
@media (max-height: 500px) {
    .cart-dialog .cart-heading { padding-block: 12px; }
    .cart-dialog .cart-heading .eyebrow { display: none; }
    .cart-dialog .cart-count { margin-top: 4px; }
    .cart-dialog .cart-summary { padding-block: 12px max(8px, env(safe-area-inset-bottom)); }
    .cart-dialog .cart-total { margin-bottom: 8px; }
    .cart-dialog .cart-delivery-note { margin-bottom: 8px; }
    .cart-dialog .cart-continue { margin-top: 0; }
}

/* Checkout address: native autofill, readable touch targets, no horizontal overflow. */
.delivery-address-page { max-width: 48rem; padding-block: 2rem; }
.delivery-address-form { display: grid; gap: 1rem; margin-block: 1.5rem; }
.delivery-address-form input, .delivery-address-form select, .delivery-address-form textarea { box-sizing: border-box; width: 100%; min-height: 48px; font-size: 16px; }
.delivery-address-form label { display: block; margin-bottom: .35rem; }
.delivery-address-form ul { color: #8b2525; }
.delivery-review-notice { padding: 1rem; margin-block: 1rem; border: 1px solid #c0cca9; border-radius: .75rem; }
.purchased-delivery-address address { font-style: normal; overflow-wrap: anywhere; line-height: 1.6; }
.delivery-address-page .button, .delivery-review-notice .button { min-height: 48px; white-space: normal; }
@media (max-width: 600px) { .delivery-address-page { padding-inline: 1rem; } .delivery-address-form .button { width: 100%; } }
.delivery-address-form input, .delivery-address-form select { border: 1px solid #a9afa0; border-radius: .5rem; padding: .75rem; background: #fffdf9; color: #242820; }
.delivery-address-form input:focus-visible, .delivery-address-form select:focus-visible { outline: 2px solid #45643e; outline-offset: 2px; }
@media (max-width: 600px) {
    .cart-line { grid-template-columns: 52px minmax(0, 1fr); }
    .cart-line-cover { grid-column: 1; grid-row: 1; }
    .cart-line-side { grid-column: 2; grid-row: 1; }
    .cart-line-info { grid-column: 1 / -1; grid-row: 2; }
    .cart-line-options { grid-column: 1 / -1; }
}

/* Compact product summaries and one-page checkout. */
.cart-line { grid-template-columns: 64px minmax(0, 1fr) auto; padding-block: 16px; gap: 12px; }
.cart-line-cover { width: 64px; height: 76px; }
.cart-line-info h3 { margin: 5px 0 3px; line-height: 1.3; }
.cart-price-components { display: grid; gap: 2px; margin-top: 6px; color: #63645e; font-size: .76rem; line-height: 1.4; }
.cart-line-shipping { margin: 4px 0 0; font-size: .76rem; color: #63645e; }
.cart-line-error a { display: block; padding-block: 8px; text-decoration: underline; }
@media (max-width: 600px) {
    .cart-line { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; }
    .cart-line-cover { width: 48px; height: 64px; grid-column: 1; grid-row: 1; }
    .cart-line-info { grid-column: 2; grid-row: 1; }
    .cart-line-side { grid-column: 3; grid-row: 1; }
    .cart-line-info h3 { font-size: .82rem; }
    .cart-line-price { font-size: .8rem; }
    .cart-price-components, .cart-line-shipping { font-size: .7rem; }
}
