/*
 * Shopping Cart - the storefront, the basket drawer and checkout.
 *
 * Built on the site's theme tokens (--dm-*), with a fallback for each, so the
 * shop wears whatever theme the site wears - light, dark or custom. Loaded on
 * every public page (the drawer and the [shop-*] shortcodes can be anywhere),
 * so it is kept to the storefront's own classes: nothing here styles a bare
 * element outside .shop-*.
 *
 * The tokens are resolved on body, not :root: a theme sets its --dm-* on the
 * body's dm-theme-* class, and a custom property defined on :root would
 * freeze the root's (light) values for every descendant.
 */

body {
    --shop-accent: var(--dm-primary, #4f46e5);
    --shop-accent-ink: #fff;
    --shop-bg: var(--dm-surface, #fff);
    --shop-page: var(--dm-background, var(--shop-bg));
    --shop-text: var(--dm-text, #16181d);
    --shop-muted: var(--dm-text-muted, #6b7280);
    --shop-line: var(--dm-border, rgba(127, 127, 127, .22));
    --shop-soft: color-mix(in srgb, var(--shop-text) 5%, transparent);
    --shop-softer: color-mix(in srgb, var(--shop-text) 3%, transparent);
    --shop-sale: var(--dm-danger, #e11d48);
    --shop-good: var(--dm-success, #16a34a);
    --shop-warn: var(--dm-warning, #d97706);
    --shop-radius: var(--dm-radius-lg, 14px);
    --shop-radius-sm: var(--dm-radius-md, 10px);
    --shop-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px -12px rgba(0, 0, 0, .25);
    --shop-shadow-lift: 0 2px 4px rgba(0, 0, 0, .06), 0 18px 40px -16px rgba(0, 0, 0, .35);
    --shop-ease: cubic-bezier(.2, .8, .2, 1);
}

.shop-page { padding-top: 1.5rem; padding-bottom: 4rem; color: var(--shop-text); }
.shop-page h1, .shop-page h2, .shop-page h3 { color: var(--shop-text); }
.shop-muted { color: var(--shop-muted); }
.shop-page [hidden], .shop-drawer [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Storefront header and toolbar ------------------------------------------- */

.shop-hero { margin: .5rem 0 1.75rem; }
.shop-hero h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.02em; line-height: 1.05; margin: 0 0 .5rem; }
.shop-intro { max-width: 60ch; font-size: 1.1rem; color: var(--shop-muted); margin: 0; }

.shop-toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--shop-line); }
.shop-tools { display: flex; gap: .5rem; align-items: center; margin-left: auto; }
.shop-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.shop-chip { border: 1px solid var(--shop-line); background: transparent; color: var(--shop-text); border-radius: 999px;
    padding: .38rem .9rem; font: inherit; font-size: .9rem; cursor: pointer; transition: all .2s var(--shop-ease); }
.shop-chip:hover { border-color: var(--shop-accent); color: var(--shop-accent); }
.shop-chip.is-on { background: var(--shop-text); border-color: var(--shop-text); color: var(--shop-bg); }
.shop-search { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--shop-line); border-radius: 999px;
    padding: 0 .8rem; color: var(--shop-muted); background: var(--shop-bg); }
.shop-search:focus-within { border-color: var(--shop-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--shop-accent) 20%, transparent); }
.shop-search input { border: 0; outline: 0; background: transparent; color: var(--shop-text); font: inherit; padding: .45rem 0; width: 12rem; max-width: 40vw; }
.shop-sort { background-repeat: no-repeat; border: 1px solid var(--shop-line); border-radius: 999px; padding: .45rem 2rem .45rem .9rem; background-color: var(--shop-bg);
    color: var(--shop-text); font: inherit; font-size: .9rem; cursor: pointer; }
.shop-empty, .shop-none { text-align: center; padding: 4rem 1rem; color: var(--shop-muted); }
.shop-linkbtn { background: none; border: 0; padding: 0; color: var(--shop-accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Product cards ------------------------------------------------------------- */

.shop-grid { display: grid; grid-template-columns: repeat(var(--shop-cols, 3), minmax(0, 1fr)); gap: 1.75rem 1.25rem; }
@media (max-width: 960px) { .shop-grid { grid-template-columns: repeat(min(var(--shop-cols, 3), 3), minmax(0, 1fr)); } }
@media (max-width: 720px) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem .85rem; } }
.shop-embed { margin: 1.5rem 0; }
.shop-embed.is-single { max-width: 340px; }

.shop-card { position: relative; display: flex; flex-direction: column; min-width: 0; animation: shop-rise .5s var(--shop-ease) both; }
.shop-card:nth-child(2) { animation-delay: .04s; } .shop-card:nth-child(3) { animation-delay: .08s; }
.shop-card:nth-child(4) { animation-delay: .12s; } .shop-card:nth-child(5) { animation-delay: .16s; }
.shop-card:nth-child(n+6) { animation-delay: .2s; }
@keyframes shop-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.shop-card-media { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--shop-radius); overflow: hidden;
    background: var(--shop-soft); isolation: isolate; }
.shop-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    transition: transform .7s var(--shop-ease), opacity .45s ease; }
.shop-card-media .shop-card-alt { opacity: 0; }
.shop-card:hover .shop-card-media img { transform: scale(1.045); }
.shop-card:hover .shop-card-media .shop-card-alt { opacity: 1; }
.shop-card-noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--shop-muted); opacity: .5; }
.shop-card-noimg svg { width: 42px; height: 42px; }
.shop-card.is-soldout .shop-card-media img { filter: grayscale(.7); opacity: .65; }

.shop-flags { position: absolute; top: .7rem; left: .7rem; display: flex; flex-direction: column; gap: .3rem; z-index: 1; align-items: flex-start; }
.shop-flag { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .28rem .55rem;
    border-radius: 999px; background: var(--shop-bg); color: var(--shop-text); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.shop-flag.is-sale { background: var(--shop-sale); color: #fff; }
.shop-flag.is-soldout { background: var(--shop-text); color: var(--shop-bg); }
.shop-flag.is-low { background: color-mix(in srgb, var(--shop-warn) 18%, var(--shop-bg)); color: var(--shop-text); }
.shop-flag.is-featured { background: var(--shop-accent); color: var(--shop-accent-ink); }

.shop-card-body { padding: .85rem .15rem 0; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.shop-card-cat { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--shop-muted); }
.shop-card-title { font-size: 1.02rem; font-weight: 600; margin: 0; line-height: 1.3; }
.shop-card-title a { color: inherit; text-decoration: none; }
.shop-card-title a::after { content: ''; position: absolute; inset: 0; }   /* the whole card is the link */
.shop-card-summary { margin: .1rem 0 0; font-size: .88rem; color: var(--shop-muted); display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; }
.shop-card-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .55rem; }
.shop-price { font-weight: 700; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.shop-from { font-weight: 500; font-size: .82rem; color: var(--shop-muted); }
.shop-was { color: var(--shop-muted); font-weight: 500; font-size: .88em; margin-left: .25rem; }
.shop-card .shop-was + *, .shop-card:has(.shop-was) .shop-now { color: var(--shop-sale); }

.shop-quick { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--shop-line);
    background: var(--shop-bg); color: var(--shop-text); border-radius: 999px; padding: .38rem .8rem .38rem .6rem; font: inherit;
    font-size: .85rem; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .2s, color .2s, border-color .2s, transform .15s; }
.shop-quick.is-link { padding: .38rem .85rem; }
.shop-quick:hover, .shop-quick:focus-visible { background: var(--shop-accent); border-color: var(--shop-accent); color: var(--shop-accent-ink); }
.shop-quick:active { transform: scale(.95); }
.shop-quick.is-added { background: var(--shop-good); border-color: var(--shop-good); color: #fff; }
@media (max-width: 480px) { .shop-quick span { display: none; } .shop-quick { padding: .45rem; } .shop-quick.is-link { padding: .38rem .7rem; } }

.shop-buy-button { display: inline-flex; align-items: center; gap: .4rem; border: 0; border-radius: 999px; padding: .75rem 1.4rem;
    background: var(--shop-accent); color: var(--shop-accent-ink) !important; font: inherit; font-weight: 600; cursor: pointer;
    text-decoration: none !important; box-shadow: var(--shop-shadow); transition: transform .15s, box-shadow .2s; }
.shop-buy-button:hover { transform: translateY(-1px); box-shadow: var(--shop-shadow-lift); }

/* ---- A product's page ------------------------------------------------------------- */

.shop-crumbs { display: flex; align-items: center; gap: .4rem; font-size: .9rem; margin-bottom: 1.25rem; color: var(--shop-muted); }
.shop-crumbs a { display: inline-flex; align-items: center; gap: .2rem; color: var(--shop-muted); text-decoration: none; }
.shop-crumbs a:hover { color: var(--shop-accent); }

.shop-product { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 820px) { .shop-product { grid-template-columns: 1fr; } }
.shop-gallery { position: sticky; top: 5rem; }
@media (max-width: 820px) { .shop-gallery { position: static; } }
.shop-gallery-main { position: relative; aspect-ratio: 1; border-radius: var(--shop-radius); overflow: hidden; background: var(--shop-soft); }
.shop-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .25s; }
.shop-gallery-main.is-empty { display: grid; place-items: center; color: var(--shop-muted); }
.shop-gallery-main.is-empty svg { width: 64px; height: 64px; opacity: .4; }
.shop-thumbs { display: flex; gap: .5rem; margin-top: .75rem; overflow-x: auto; padding-bottom: .25rem; }
.shop-thumb { flex: 0 0 4.5rem; aspect-ratio: 1; border-radius: var(--shop-radius-sm); overflow: hidden; padding: 0; cursor: pointer;
    border: 2px solid transparent; background: var(--shop-soft); opacity: .7; transition: opacity .2s, border-color .2s; }
.shop-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-thumb.is-on, .shop-thumb:hover { opacity: 1; border-color: var(--shop-accent); }

.shop-buy { display: flex; flex-direction: column; gap: .6rem; }
.shop-product-title { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.shop-product-price { font-size: 1.5rem; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }
.shop-product-price:has(.shop-was) .shop-now { color: var(--shop-sale); }
.shop-product-summary { font-size: 1.05rem; color: var(--shop-muted); margin: 0; }
.shop-buy-form { display: flex; flex-direction: column; gap: 1rem; margin: .75rem 0 .25rem; }
.shop-options { border: 0; padding: 0; margin: 0; }
.shop-options legend { font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }
.shop-option-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.shop-option { position: relative; cursor: pointer; }
.shop-option input { position: absolute; opacity: 0; pointer-events: none; }
.shop-option span { display: inline-block; border: 1.5px solid var(--shop-line); border-radius: var(--shop-radius-sm);
    padding: .55rem 1rem; font-weight: 500; transition: all .15s; background: var(--shop-bg); }
.shop-option span small { color: var(--shop-muted); font-weight: 500; }
.shop-option:hover span { border-color: var(--shop-text); }
.shop-option input:checked + span { border-color: var(--shop-accent); background: color-mix(in srgb, var(--shop-accent) 10%, var(--shop-bg));
    box-shadow: 0 0 0 1px var(--shop-accent); }
.shop-option input:focus-visible + span { outline: 2px solid var(--shop-accent); outline-offset: 2px; }
.shop-option.is-out span { opacity: .45; text-decoration: line-through; cursor: not-allowed; }

.shop-buy-row { display: flex; gap: .6rem; }
.shop-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--shop-line); border-radius: 999px; overflow: hidden; flex: none; }
.shop-qty button { width: 2.4rem; height: 2.9rem; border: 0; background: transparent; color: var(--shop-text); font-size: 1.15rem; cursor: pointer; }
.shop-qty button:hover { background: var(--shop-soft); }
.shop-qty input { width: 2.6rem; text-align: center; border: 0; background: transparent; color: var(--shop-text); font: inherit;
    font-weight: 600; -moz-appearance: textfield; }
.shop-qty input::-webkit-outer-spin-button, .shop-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.shop-qty.is-small button { width: 1.9rem; height: 2rem; font-size: 1rem; }
.shop-qty.is-small input { width: 2rem; font-size: .9rem; }
.shop-add-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 0; border-radius: 999px;
    background: var(--shop-accent); color: var(--shop-accent-ink); font: inherit; font-weight: 650; font-size: 1.02rem;
    min-height: 2.9rem; padding: 0 1.4rem; cursor: pointer; box-shadow: var(--shop-shadow); transition: transform .15s, box-shadow .2s, background .2s; }
.shop-add-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shop-shadow-lift); }
.shop-add-btn:active:not(:disabled) { transform: scale(.98); }
.shop-add-btn:disabled { background: var(--shop-soft); color: var(--shop-muted); box-shadow: none; cursor: not-allowed; }
.shop-add-btn.is-added { background: var(--shop-good); }
.shop-stock { margin: 0; min-height: 1.2em; font-size: .9rem; font-weight: 600; color: var(--shop-warn); }
.shop-assure { list-style: none; padding: 1rem 0 0; margin: .25rem 0 0; border-top: 1px solid var(--shop-line); display: grid; gap: .5rem;
    font-size: .92rem; color: var(--shop-muted); }
.shop-assure li { display: flex; gap: .55rem; align-items: center; }
.shop-description { margin-top: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--shop-line); line-height: 1.7; }
.shop-description img { max-width: 100%; border-radius: var(--shop-radius-sm); }
.shop-related { margin-top: 4.5rem; }
.shop-related h2 { font-size: 1.4rem; margin-bottom: 1.25rem; }

/* ---- Basket and checkout ------------------------------------------------------------ */

.shop-checkout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 880px) { .shop-checkout { grid-template-columns: 1fr; } .shop-co-summary { order: -1; } }
.shop-co-main h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -.02em; margin: 0 0 1.25rem; }
.shop-co-lines { display: flex; flex-direction: column; margin-bottom: 2rem; }
.shop-line { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: center;
    padding: 1rem 0; border-bottom: 1px solid var(--shop-line); animation: shop-rise .35s var(--shop-ease) both; }
.shop-line:first-child { border-top: 1px solid var(--shop-line); }
.shop-line-img { width: 4.5rem; aspect-ratio: 1; border-radius: var(--shop-radius-sm); overflow: hidden; background: var(--shop-soft);
    display: grid; place-items: center; color: var(--shop-muted); }
.shop-line-img img { width: 100%; height: 100%; object-fit: cover; }
.shop-line-name { font-weight: 600; color: var(--shop-text); text-decoration: none; }
.shop-line-name:hover { color: var(--shop-accent); }
.shop-line-meta { font-size: .85rem; color: var(--shop-muted); }
.shop-line-controls { display: flex; align-items: center; gap: .6rem; margin-top: .45rem; }
.shop-line-amt { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.shop-remove { border: 0; background: none; color: var(--shop-muted); font: inherit; font-size: .83rem; cursor: pointer; padding: .2rem; }
.shop-remove:hover { color: var(--shop-sale); }
.shop-line.is-leaving { opacity: 0; transform: translateX(12px); transition: all .25s ease; }

.shop-co-empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--shop-line); border-radius: var(--shop-radius); }
.shop-co-empty .shop-bigicon { display: inline-grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%;
    background: var(--shop-soft); color: var(--shop-muted); margin-bottom: .75rem; }
.shop-co-empty .shop-bigicon svg { width: 28px; height: 28px; }

.shop-co-form { display: flex; flex-direction: column; gap: 2rem; }
.shop-co-step h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; margin: 0 0 1rem; }
.shop-step { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--shop-text);
    color: var(--shop-bg); font-size: .85rem; font-weight: 700; }
.shop-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 560px) { .shop-fields { grid-template-columns: 1fr; } }
.shop-field { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; font-weight: 600; }
.shop-field.is-wide { grid-column: 1 / -1; }
.shop-field em { font-style: normal; font-weight: 400; color: var(--shop-muted); }
.shop-field input, .shop-field select, .shop-field textarea, .shop-code input {
    border: 1.5px solid var(--shop-line); border-radius: var(--shop-radius-sm); padding: .7rem .85rem; font: inherit; font-weight: 400;
    background-color: var(--shop-bg); background-repeat: no-repeat; color: var(--shop-text); transition: border-color .15s, box-shadow .15s; width: 100%; box-sizing: border-box; }
.shop-field input:focus, .shop-field select:focus, .shop-field textarea:focus, .shop-code input:focus {
    outline: 0; border-color: var(--shop-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--shop-accent) 18%, transparent); }
.shop-field.is-bad input, .shop-field.is-bad select { border-color: var(--shop-sale); }
.shop-field-err { color: var(--shop-sale); font-weight: 500; font-size: .8rem; }

.shop-choice-row, .shop-methods { display: grid; gap: .6rem; margin-bottom: 1rem; }
.shop-choice-row { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .shop-choice-row { grid-template-columns: 1fr; } }
.shop-choice { position: relative; cursor: pointer; }
.shop-choice input { position: absolute; opacity: 0; }
.shop-choice > span { display: flex; align-items: center; gap: .65rem; border: 1.5px solid var(--shop-line); border-radius: var(--shop-radius-sm);
    padding: .9rem 1rem; font-weight: 600; transition: all .15s; background: var(--shop-bg); }
.shop-choice > span small { display: block; font-weight: 400; color: var(--shop-muted); }
.shop-choice > span .shop-choice-end { margin-left: auto; color: var(--shop-muted); display: flex; gap: .3rem; }
.shop-choice:hover > span { border-color: var(--shop-text); }
.shop-choice input:checked + span { border-color: var(--shop-accent); box-shadow: 0 0 0 1px var(--shop-accent);
    background: color-mix(in srgb, var(--shop-accent) 7%, var(--shop-bg)); }
.shop-choice input:focus-visible + span { outline: 2px solid var(--shop-accent); outline-offset: 2px; }
.shop-radio { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid var(--shop-line); flex: none; transition: all .15s; }
.shop-choice input:checked + span .shop-radio { border: 5px solid var(--shop-accent); }
.shop-paymark { font-size: .7rem; font-weight: 800; letter-spacing: .02em; border: 1px solid var(--shop-line); border-radius: 4px; padding: .1rem .3rem; color: var(--shop-muted); }

.shop-terms { display: flex; gap: .5rem; align-items: flex-start; font-size: .9rem; margin: .5rem 0 0; }
.shop-co-error { background: color-mix(in srgb, var(--shop-sale) 10%, var(--shop-bg)); color: var(--shop-text);
    border: 1px solid color-mix(in srgb, var(--shop-sale) 40%, transparent); border-radius: var(--shop-radius-sm); padding: .75rem 1rem; font-size: .92rem; margin: 1rem 0 0; }
.shop-pay-btn { width: 100%; margin-top: 1rem; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; border: 0;
    border-radius: 999px; background: var(--shop-accent); color: var(--shop-accent-ink); font: inherit; font-weight: 700; font-size: 1.08rem;
    min-height: 3.3rem; cursor: pointer; box-shadow: var(--shop-shadow); transition: transform .15s, box-shadow .2s, opacity .2s; }
.shop-pay-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shop-shadow-lift); }
.shop-pay-btn:disabled { opacity: .6; cursor: progress; }
.shop-secure { display: flex; align-items: center; justify-content: center; gap: .35rem; font-size: .8rem; color: var(--shop-muted); margin: .75rem 0 0; text-align: center; }

.shop-co-summary { position: sticky; top: 5rem; border-radius: var(--shop-radius); background: var(--shop-softer);
    border: 1px solid var(--shop-line); padding: 1.35rem 1.35rem 1.1rem; }
@media (max-width: 880px) { .shop-co-summary { position: static; } }
.shop-co-summary h2 { font-size: 1.1rem; margin: 0 0 1rem; }
.shop-totals { margin: 0; display: flex; flex-direction: column; gap: .55rem; font-variant-numeric: tabular-nums; }
.shop-totals > div { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; }
.shop-totals dt { color: var(--shop-muted); } .shop-totals dd { margin: 0; font-weight: 600; }
.shop-totals .is-discount dd { color: var(--shop-good); }
.shop-totals .is-included { font-size: .82rem; } .shop-totals .is-included dd { font-weight: 400; color: var(--shop-muted); }
.shop-totals .is-total { border-top: 1px solid var(--shop-line); margin-top: .35rem; padding-top: .8rem; font-size: 1.2rem; }
.shop-totals .is-total dt { color: var(--shop-text); font-weight: 700; } .shop-totals .is-total dd { font-weight: 800; }
.shop-code { display: flex; gap: .4rem; margin-top: 1rem; }
.shop-code button { border: 1.5px solid var(--shop-text); border-radius: var(--shop-radius-sm); background: transparent; color: var(--shop-text);
    font: inherit; font-weight: 600; padding: 0 1rem; cursor: pointer; }
.shop-code button:hover { background: var(--shop-text); color: var(--shop-bg); }
.shop-notes { list-style: none; padding: 0 !important; margin: .9rem 0 0; font-size: .85rem; display: grid; gap: .35rem; }
.shop-notes li { padding: .5rem .7rem; border-radius: var(--shop-radius-sm); background: color-mix(in srgb, var(--shop-warn) 12%, transparent); }
.shop-notes li.is-good { background: color-mix(in srgb, var(--shop-good) 12%, transparent); }

/* The road to free delivery. */
.shop-freebar { margin: 0 0 1rem; font-size: .88rem; }
.shop-freebar p { margin: 0 0 .45rem; }
.shop-freebar-track { height: 6px; border-radius: 999px; background: var(--shop-soft); overflow: hidden; }
.shop-freebar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--shop-accent), var(--shop-good));
    transition: width .6s var(--shop-ease); }

/* ---- Receipt ------------------------------------------------------------------------ */

.shop-receipt { max-width: 900px; margin: 0 auto; }
.shop-r-head { display: flex; gap: 1.25rem; align-items: flex-start; margin: 1rem 0 1.5rem; }
.shop-r-head h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -.02em; margin: .1rem 0 .35rem; }
.shop-r-head p { margin: 0; }
.shop-r-badge { flex: none; width: 3.6rem; height: 3.6rem; border-radius: 50%; display: grid; place-items: center; color: #fff;
    background: var(--shop-good); box-shadow: 0 0 0 8px color-mix(in srgb, var(--shop-good) 15%, transparent); animation: shop-pop .6s var(--shop-ease) both; }
.shop-r-badge svg { width: 1.7rem; height: 1.7rem; stroke-dasharray: 30; stroke-dashoffset: 30; animation: shop-draw .5s .3s ease forwards; }
.shop-r-badge.is-waiting { background: var(--shop-soft); box-shadow: none; }
.shop-receipt.is-closed .shop-r-badge { background: var(--shop-muted); box-shadow: none; }
@keyframes shop-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shop-draw { to { stroke-dashoffset: 0; } }
.shop-spinner { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 3px solid var(--shop-line); border-top-color: var(--shop-accent); animation: shop-spin .8s linear infinite; }
@keyframes shop-spin { to { transform: rotate(360deg); } }
.shop-r-note { border-radius: var(--shop-radius-sm); padding: 1rem 1.2rem; background: var(--shop-softer); border: 1px solid var(--shop-line); margin: 0 0 1.25rem; }
.shop-r-note p { margin: .35rem 0 0; }
.shop-r-steps { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(3, 1fr); counter-reset: s; }
.shop-r-steps li { position: relative; padding-top: 1.6rem; font-size: .88rem; color: var(--shop-muted); text-align: center; }
.shop-r-steps li span { position: absolute; top: .3rem; left: 50%; width: .9rem; height: .9rem; margin-left: -.45rem; border-radius: 50%;
    background: var(--shop-bg); border: 2px solid var(--shop-line); z-index: 1; }
.shop-r-steps li::before { content: ''; position: absolute; top: .7rem; left: -50%; right: 50%; height: 2px; background: var(--shop-line); }
.shop-r-steps li:first-child::before { display: none; }
.shop-r-steps li.is-done { color: var(--shop-text); font-weight: 600; }
.shop-r-steps li.is-done span { background: var(--shop-good); border-color: var(--shop-good); }
.shop-r-steps li.is-done::before { background: var(--shop-good); }
.shop-r-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2rem; }
@media (max-width: 720px) { .shop-r-grid { grid-template-columns: 1fr; } }
.shop-r-grid h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--shop-muted); margin: 0 0 .75rem; }
.shop-r-side h2:not(:first-child) { margin-top: 1.25rem; }
.shop-r-side address { font-style: normal; line-height: 1.6; }
.shop-r-lines { list-style: none; padding: 0; margin: 0 0 1rem; }
.shop-r-line { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto auto; gap: .9rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--shop-line); }
.shop-r-line img, .shop-r-noimg { width: 3rem; height: 3rem; border-radius: 8px; object-fit: cover; background: var(--shop-soft); display: grid; place-items: center; color: var(--shop-muted); }
.shop-r-name small { display: block; color: var(--shop-muted); font-size: .82rem; }
.shop-r-qty { color: var(--shop-muted); font-size: .9rem; } .shop-r-amt { font-weight: 600; font-variant-numeric: tabular-nums; }
@media print {
    .shop-crumbs, .shop-r-side p:last-child, .shop-fab, .shop-drawer { display: none !important; }
    .shop-r-badge { box-shadow: none; animation: none; } .shop-r-badge svg { stroke-dashoffset: 0; animation: none; }
}

/* ---- The basket button and drawer (every page) ------------------------------------------ */

.shop-fab { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 1040; display: inline-flex; align-items: center; gap: .55rem;
    border: 0; border-radius: 999px; padding: .85rem 1.15rem .85rem 1rem; background: var(--shop-text); color: var(--shop-bg);
    font: inherit; font-weight: 650; cursor: pointer; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .45);
    transform: translateY(0); transition: transform .35s var(--shop-ease), opacity .3s; }
.shop-fab.is-left { right: auto; left: 1.25rem; }
.shop-fab.is-hidden { transform: translateY(160%); opacity: 0; pointer-events: none; }
.shop-fab:hover { transform: translateY(-2px); }
.shop-fab-count { min-width: 1.45rem; height: 1.45rem; border-radius: 999px; background: var(--shop-accent); color: var(--shop-accent-ink);
    display: inline-grid; place-items: center; font-size: .78rem; font-weight: 800; padding: 0 .35rem; }
.shop-fab.is-bump .shop-fab-count { animation: shop-bump .5s var(--shop-ease); }
@keyframes shop-bump { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }
@media (max-width: 560px) { .shop-fab-label { display: none; } .shop-fab { padding: .9rem; } }

.shop-drawer { position: fixed; inset: 0; z-index: 1050; visibility: hidden; }
.shop-drawer.is-open { visibility: visible; }
.shop-drawer-backdrop { position: absolute; inset: 0; background: rgba(10, 12, 16, .45); opacity: 0; transition: opacity .3s;
    backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.shop-drawer.is-open .shop-drawer-backdrop { opacity: 1; }
.shop-drawer-panel { position: absolute; top: 0; bottom: 0; right: 0; width: min(430px, 100vw); background: var(--shop-bg); color: var(--shop-text);
    display: flex; flex-direction: column; transform: translateX(100%); transition: transform .38s var(--shop-ease);
    box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .4); }
.shop-drawer.is-left .shop-drawer-panel { right: auto; left: 0; transform: translateX(-100%); }
.shop-drawer.is-open .shop-drawer-panel { transform: none; }
.shop-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.15rem 1.25rem; border-bottom: 1px solid var(--shop-line); }
.shop-drawer-head h2 { font-size: 1.15rem; margin: 0; display: flex; align-items: center; gap: .5rem; color: var(--shop-text); }
.shop-drawer-head h2 small { color: var(--shop-muted); font-weight: 500; font-size: .9rem; }
.shop-x { border: 0; background: var(--shop-soft); color: var(--shop-text); width: 2.2rem; height: 2.2rem; border-radius: 50%;
    cursor: pointer; font-size: 1.3rem; line-height: 1; display: grid; place-items: center; }
.shop-x:hover { background: var(--shop-line); }
.shop-drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; overscroll-behavior: contain; }
.shop-drawer-body .shop-line { grid-template-columns: 4rem minmax(0, 1fr) auto; padding: .85rem 0; }
.shop-drawer-body .shop-line-img { width: 4rem; }
.shop-drawer-body .shop-line:first-child { border-top: 0; }
.shop-drawer-foot { border-top: 1px solid var(--shop-line); padding: 1rem 1.25rem 1.25rem; background: var(--shop-softer); }
.shop-drawer-sub { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; margin-bottom: .2rem; font-variant-numeric: tabular-nums; }
.shop-drawer-hint { font-size: .8rem; color: var(--shop-muted); margin: 0 0 .9rem; }
.shop-drawer-go { display: flex; width: 100%; align-items: center; justify-content: center; gap: .5rem; border: 0; border-radius: 999px;
    background: var(--shop-accent); color: var(--shop-accent-ink) !important; font: inherit; font-weight: 700; min-height: 3rem;
    text-decoration: none !important; cursor: pointer; box-shadow: var(--shop-shadow); }
.shop-drawer-go:hover { filter: brightness(1.05); }
.shop-drawer-more { display: block; width: 100%; margin-top: .5rem; text-align: center; background: none; border: 0; color: var(--shop-muted);
    font: inherit; font-size: .9rem; cursor: pointer; padding: .4rem; }
.shop-drawer-more:hover { color: var(--shop-text); }
.shop-drawer-empty { text-align: center; padding: 3rem 1rem; color: var(--shop-muted); }
.shop-drawer-empty .shop-bigicon { display: inline-grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--shop-soft); margin-bottom: .75rem; }
.shop-drawer-empty .shop-bigicon svg { width: 28px; height: 28px; }
html.shop-locked { overflow: hidden; }

/* "Added" - a small card that rises and goes. */
.shop-toast { position: fixed; z-index: 1060; bottom: 5.5rem; right: 1.25rem; display: flex; align-items: center; gap: .75rem;
    background: var(--shop-bg); color: var(--shop-text); border: 1px solid var(--shop-line); border-radius: var(--shop-radius);
    padding: .65rem .8rem .65rem .65rem; box-shadow: var(--shop-shadow-lift); max-width: min(360px, calc(100vw - 2.5rem));
    animation: shop-toast-in .4s var(--shop-ease) both; }
.shop-toast.is-left { right: auto; left: 1.25rem; }
.shop-toast.is-out { animation: shop-toast-out .3s ease forwards; }
.shop-toast img, .shop-toast .shop-toast-img { width: 3rem; height: 3rem; border-radius: 8px; object-fit: cover; flex: none; background: var(--shop-soft);
    display: grid; place-items: center; color: var(--shop-muted); }
.shop-toast strong { display: block; font-size: .92rem; }
.shop-toast small { color: var(--shop-muted); font-size: .8rem; }
.shop-toast .shop-toast-check { color: var(--shop-good); display: inline-flex; vertical-align: -3px; margin-right: .2rem; }
.shop-toast a { margin-left: auto; font-weight: 700; font-size: .85rem; color: var(--shop-accent); white-space: nowrap; text-decoration: none; }
@keyframes shop-toast-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes shop-toast-out { to { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
    .shop-card, .shop-line, .shop-r-badge, .shop-toast { animation: none !important; }
    .shop-card-media img, .shop-drawer-panel, .shop-fab, .shop-freebar-fill { transition: none !important; }
    .shop-r-badge svg { animation: none; stroke-dashoffset: 0; }
}

/* The site's own form and link styles reach in here; these inputs sit inside a drawn control. */
.shop-page .shop-qty input, .shop-drawer .shop-qty input, .shop-search input {
    background: transparent !important; border: 0 !important; box-shadow: none !important; outline: 0; padding-left: 0; padding-right: 0; margin: 0; min-height: 0; }
.shop-card-title a, .shop-card-title a:hover, .shop-line-name, .shop-crumbs a, .shop-quick { text-decoration: none !important; }
.shop-card-title a:hover { color: var(--shop-accent); }

@media (max-width: 640px) {
    .shop-toolbar { flex-direction: column; align-items: stretch; }
    .shop-tools { margin-left: 0; width: 100%; }
    .shop-search { flex: 1; min-width: 0; }
    .shop-search input { width: 100%; max-width: none; }
    .shop-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -1rem; padding: 0 1rem .15rem; }
    .shop-chips::-webkit-scrollbar { display: none; }
    .shop-chip { flex: none; }
    .shop-line-controls { flex-wrap: wrap; }
}
.shop-co-title { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -.02em; margin: 0 0 1.25rem; }
