/* Keep the cart and navigation within reach while editions are being chosen. */
html { scroll-padding-top: 108px; scrollbar-gutter: stable; }
.site-header.discovery-header { position: sticky; top: 0; z-index: 40; }
.header-actions { display: flex; align-items: center; gap: 24px; flex-shrink: 0; }
.cart-trigger {
    position: relative; display: grid; place-items: center; flex: 0 0 44px;
    width: 44px; height: 44px; padding: 0; border: 1px solid #c5a46d66;
    border-radius: 50%; background: #171914; color: #eee9df; cursor: pointer;
    transition: border-color .2s, background .2s;
}
.cart-trigger:hover { border-color: #c5a46d; background: #272a22; }
.cart-trigger:focus-visible { outline: 2px solid #c5a46d; outline-offset: 4px; }
.cart-trigger > svg { display: block; width: 24px; height: 24px; }
.cart-count {
    position: absolute; top: -5px; right: -6px; display: grid; place-items: center;
    min-width: 20px; height: 20px; padding: 0 5px; border-radius: 20px;
    background: #c5a46d; color: #171914; border: 2px solid #171914;
    font: 700 10px/1 'Manrope', sans-serif; font-variant-numeric: tabular-nums;
}
.cart-announcement { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.material-cart-feedback { margin: 12px 0 0; color: var(--gold); font-size: 12px; line-height: 1.6; }
.cart-dialog {
    position: fixed; inset: 100px 5vw auto auto; margin: 0; padding: 26px;
    width: min(420px, 90vw); max-width: none; max-height: min(80dvh, calc(100dvh - 120px));
    overflow-y: auto; overscroll-behavior: contain; border: 1px solid #d0c7b7;
    border-radius: 10px; background: #f8f5ee; color: #26291f;
    box-shadow: 0 20px 70px #17191440; font-family: 'DM Sans', sans-serif;
}
.cart-dialog::backdrop { background: #17191455; }
.cart-heading { position: relative; padding-right: 40px; margin-bottom: 22px; }
.cart-heading h2 { font: 400 30px/1.15 Georgia, serif; letter-spacing: -.035em; margin: 0 0 8px; }
.cart-heading p { margin: 0; color: #717467; font-size: 12px; line-height: 1.6; }
.cart-close {
    position: absolute; top: 18px; right: 18px; display: grid; place-items: center;
    width: 36px; height: 36px; padding: 0; border: 1px solid #d4d3c7;
    border-radius: 50%; background: transparent; color: #555e46; cursor: pointer;
    font: 400 24px/1 'DM Sans', sans-serif;
}
.cart-heading .cart-close { top: -6px; right: -8px; }
.cart-close svg { width: 18px; height: 18px; }
.cart-close:hover { background: #e7e8dc; }
.cart-empty { padding: 12px 0 10px; }
.cart-empty p { color: #717467; font-size: 13px; line-height: 1.8; margin: 0 0 18px; }
.cart-empty a { color: #414b32; font-size: 12px; text-underline-offset: 4px; }
.cart-items { list-style: none; padding: 0; margin: 0; }
.cart-item { display: flex; align-items: flex-start; gap: 15px; padding: 18px 0; border-top: 1px solid #dcdacf; }
.cart-item-image { width: 60px; height: 72px; flex: 0 0 60px; border-radius: 3px; background: #e7e3d8; object-fit: contain; }
.cart-item-image img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.cart-item-copy { min-width: 0; flex: 1; }
.cart-item-copy h3 { margin: 0 0 6px; font: 400 17px/1.3 Georgia, serif; letter-spacing: -.02em; overflow-wrap: anywhere; }
.cart-item-copy p { color: #717467; font-size: 11px; line-height: 1.6; margin: 0 0 8px; }
.cart-item-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.cart-review { display: inline-flex; align-items: center; min-height: 34px; padding: 0; border: 0; background: transparent; color: #414b32; font: 500 11px/1.5 'DM Sans', sans-serif; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.cart-remove { min-height: 34px; padding: 0; border: 0; background: transparent; color: #77776c; font: inherit; font-size: 11px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.cart-remove:hover { color: #873c2d; }
.cart-footer { border-top: 1px solid #dcdacf; padding-top: 17px; margin-top: 4px; color: #717467; font-size: 11px; line-height: 1.7; }
.cart-footer p { margin: 0; }
.cart-flyer { position: fixed; z-index: 80; width: 48px; height: 48px; object-fit: contain; padding: 4px; background: #f8f5ee; border: 1px solid #c5a46d; border-radius: 5px; box-shadow: 0 5px 16px #17191440; pointer-events: none; transform-origin: center; }

@media (max-width: 1100px) {
    .header-actions { gap: 18px; }
    .site-header.discovery-header nav { gap: 20px; }
}
@media (max-width: 760px) {
    html { scroll-padding-top: 150px; }
    .site-header.discovery-header { height: auto; min-height: 90px; padding: 20px 5vw; flex-wrap: wrap; gap: 20px; }
    .site-header.discovery-header nav { display: flex; order: 3; width: 100%; justify-content: space-between; }
    .cart-dialog { top: 140px; max-height: min(80dvh, calc(100dvh - 160px)); }
}
@media (max-width: 480px) {
    .header-actions { gap: 12px; }
    .site-header.discovery-header { column-gap: 12px; }
    .site-header.discovery-header .brand { gap: 8px; font-size: 12px; letter-spacing: .08em; }
    .cart-dialog { right: 4vw; width: 92vw; padding: 22px; }
}
@media (max-width: 360px) {
    .header-actions { gap: 9px; }
    .site-header.discovery-header .brand { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .cart-trigger { transition: none; }
    .cart-flyer { display: none; }
}
