/* ===== Specials: home-screen cards and the flyer viewer ===== */
:root {
    --sp-night: #14120c;
    --sp-night-2: #221d12;
    --sp-red: #D2382B;
    --sp-cream: #FBF7EE;
}

/* ---- home-screen row ---- */
.specials { margin: 4px 0 22px; }
.sphd { display: flex; flex-direction: column; margin-bottom: 10px; }
.sphd h2 { margin: 0; font-family: var(--font-display, inherit); font-size: 26px; letter-spacing: -.02em; }
.speyebrow { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.sprow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 320px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; }
.spcard { scroll-snap-align: start; position: relative; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
    background: linear-gradient(160deg, var(--sp-night-2), var(--sp-night)); color: #f3ead6;
    box-shadow: 0 10px 30px rgba(20, 18, 12, .28), inset 0 0 0 1px rgba(206, 169, 92, .22); transition: transform .2s ease, box-shadow .2s ease; }
.spcard:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(20, 18, 12, .38), inset 0 0 0 1px rgba(206, 169, 92, .45); }
.spcover { position: relative; height: 200px; overflow: hidden; cursor: pointer; display: flex; justify-content: center; align-items: flex-start;
    background: radial-gradient(120% 90% at 50% 0%, #3a3020 0%, var(--sp-night) 70%); padding: 16px 18px 0; }
.spcover canvas, .spcover img { width: 100%; height: auto; display: block; border-radius: 4px 4px 0 0; box-shadow: 0 12px 30px rgba(0, 0, 0, .55); transform: rotate(-1.2deg); transition: transform .3s ease; }
.spcard:hover .spcover canvas, .spcard:hover .spcover img { transform: rotate(0deg) scale(1.02); }
.spcover::after { content: ''; position: absolute; inset: auto 0 0 0; height: 70px; background: linear-gradient(to top, var(--sp-night-2), transparent); pointer-events: none; }
.spsave { position: absolute; left: 12px; top: 12px; z-index: 2; background: var(--sp-red); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .02em; padding: 5px 10px; border-radius: 999px; box-shadow: 0 4px 12px rgba(210, 56, 43, .45); }
.spends { position: absolute; right: 12px; top: 12px; z-index: 2; background: rgba(20, 18, 12, .72); color: var(--gold); font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(206, 169, 92, .4); backdrop-filter: blur(6px); }
.spbody { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.spbody b { font-family: var(--font-display, inherit); font-size: 18px; color: #fff; letter-spacing: -.01em; }
.spblurb { font-size: 13px; color: #c9bfa6; }
.spmeta { font-size: 13px; color: #b7ab8d; } .spmeta em { font-style: normal; color: var(--gold); font-weight: 800; }
.spbtn { margin-top: 10px; align-self: flex-start; border: 0; cursor: pointer; font-weight: 800; font-size: 14px; color: var(--sp-night); padding: 10px 18px; border-radius: 999px;
    background: linear-gradient(135deg, #E9CC86, var(--gold) 55%, #B48A3C); box-shadow: 0 6px 16px rgba(206, 169, 92, .35); transition: transform .15s; }
.spbtn:hover { transform: translateX(2px); }
.spplain { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 16px; color: #fff; font-family: var(--font-display, inherit); font-size: 22px; font-weight: 800;
    background: linear-gradient(135deg, var(--sp-night), #7A5C14 70%, var(--gold)); border-radius: 10px; }
.spplain.big { min-height: 360px; width: min(560px, 100%); } .spplain small { display: block; font-size: 14px; font-weight: 400; margin-top: 8px; }

/* ---- the viewer ---- */
.overlay:has(.spmodal) { background: rgba(10, 9, 6, .78); backdrop-filter: blur(4px); }
.spmodal { width: min(1240px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
    background: var(--sp-cream); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); animation: sprise .28s ease-out; }
@keyframes sprise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.spmhd { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 22px 64px 20px 28px; color: #fff;
    background: radial-gradient(90% 160% at 0% 0%, rgba(206, 169, 92, .35), transparent 55%), radial-gradient(60% 120% at 100% 100%, rgba(210, 56, 43, .22), transparent 60%), linear-gradient(135deg, var(--sp-night-2), var(--sp-night));
    border-bottom: 1px solid rgba(206, 169, 92, .35); }
.spmhd .speyebrow { color: var(--gold); }
.spmhd h2 { margin: 4px 0 0; font-family: var(--font-display, inherit); font-size: clamp(22px, 3vw, 32px); letter-spacing: -.02em; line-height: 1.1; }
.spmhd p { margin: 6px 0 0; color: #cfc4a8; font-size: 14px; }
.spmstats { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: #cfc4a8; font-size: 13px; white-space: nowrap; }
.spbig { font-size: 14px; color: #fff; } .spbig b { font-family: var(--font-display, inherit); font-size: 26px; color: #FF8A7A; margin-left: 4px; }
.spx { position: absolute; right: 16px; top: 16px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.spx:hover { background: rgba(255, 255, 255, .18); }
.spmbody { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 1fr); min-height: 0; flex: 1; }

/* the flyer: a sheet of paper on a dark, softly lit stage */
.spstage { overflow: auto; padding: 28px 24px; display: flex; justify-content: center;
    background: radial-gradient(70% 55% at 50% 0%, rgba(206, 169, 92, .22), transparent 70%), url('/art/parts-pattern.svg') center / 340px repeat, linear-gradient(180deg, #2a2418, var(--sp-night)); }
.spstage .pages { display: flex; flex-direction: column; gap: 22px; align-items: center; width: 100%; }
.sppaper { max-width: 100%; height: auto; display: block; background: #fff; border-radius: 3px; box-shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 50px rgba(0, 0, 0, .55); }
.sppages, .sploading { color: #cfc4a8; font-size: 13px; text-align: center; } .sppages a { color: var(--gold); }
.sploading { padding: 80px 0; }

/* the parts */
.sppanel { display: flex; flex-direction: column; min-height: 0; background: linear-gradient(180deg, #FFFDF8, var(--sp-cream)); border-left: 1px solid #ebe2cc; }
.sppanelhd { padding: 18px 22px 10px; } .sppanelhd h3 { margin: 0; font-family: var(--font-display, inherit); font-size: 18px; } .sppanelhd span { font-size: 11.5px; color: var(--ink-faint); }
.splist { overflow: auto; padding: 4px 16px 12px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.spi { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: #fff;
    border: 1px solid #eee4cc; box-shadow: 0 2px 8px rgba(60, 45, 10, .06); transition: box-shadow .15s, border-color .15s; }
.spi:hover { border-color: var(--gold); box-shadow: 0 8px 20px rgba(60, 45, 10, .12); }
.spth { width: 64px; height: 64px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: radial-gradient(circle at 30% 25%, #fff, var(--gold-soft) 75%); border: 1px solid #efe4c6; }
.spth img { width: 100%; height: 100%; object-fit: contain; } .spth .nophoto img.ph { width: 70%; max-height: 46px; } .spth .cap { display: none; }
.sptx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sptop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spcode { font-family: var(--font-display, inherit); font-size: 17px; letter-spacing: -.01em; cursor: pointer; } .spcode:hover { color: var(--gold-deep); }
.spchip { background: #FDECEA; color: var(--sp-red); font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.spdesc { font-size: 12.5px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sptx .stock { font-size: 11.5px; font-weight: 700; }
.spprice { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.spnow { font-family: var(--font-display, inherit); font-size: 20px; font-weight: 800; color: var(--sp-red); white-space: nowrap; letter-spacing: -.01em; }
.spnow sup { font-size: 10px; color: var(--gold-deep); margin-left: 2px; font-family: var(--font, inherit); }
.spprice s { font-size: 12px; color: var(--ink-faint); } .spna { font-size: 12.5px; color: var(--ink-faint); font-style: italic; }
.spbuy { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.spbuy .qty { border-radius: 999px; } .spbuy .qty input { width: 34px; padding: 6px 0; } .spbuy .qty button { width: 28px; }
.spadd { border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 800; cursor: pointer; color: var(--sp-night); background: linear-gradient(135deg, #E9CC86, var(--gold)); }
.spadd.done { background: #E4F2E4; color: var(--good); }
.spempty { color: var(--ink-muted); padding: 20px 6px; }
.spfoot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 22px; color: #fff;
    background: linear-gradient(135deg, var(--sp-night-2), var(--sp-night)); border-top: 1px solid rgba(206, 169, 92, .35); }
.spfoot span { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.spfoot b { font-family: var(--font-display, inherit); font-size: 17px; }
.spaddall { border: 0; border-radius: 999px; padding: 13px 22px; font-weight: 800; font-size: 15px; cursor: pointer; color: var(--sp-night); white-space: nowrap;
    background: linear-gradient(135deg, #F1D898, var(--gold) 55%, #B48A3C); box-shadow: 0 8px 22px rgba(206, 169, 92, .35); }
.spaddall:hover { filter: brightness(1.05); }

@media (max-width: 899px) {
    .spmodal { max-height: none; border-radius: 16px; }
    .overlay:has(.spmodal) { align-items: flex-start; }
    .spmbody { grid-template-columns: 1fr; }
    .spstage { max-height: 52vh; padding: 18px 14px; }
    .sppanel { border-left: 0; }
    .splist { overflow: visible; }
    .spfoot { position: sticky; bottom: 0; }
    .spmhd { padding: 18px 56px 16px 18px; flex-direction: column; align-items: flex-start; } .spmstats { align-items: flex-start; }
}
@media (max-width: 520px) {
    .sprow { grid-auto-columns: 84%; }
    .spi { grid-template-columns: 52px minmax(0, 1fr); } .spth { width: 52px; height: 52px; }
    .spprice { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
    .spprice s { order: 2; } .spbuy { margin: 0; margin-left: auto; }
    .spfoot { flex-direction: column; align-items: stretch; text-align: center; } .spaddall { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .spmodal { animation: none; } .spcard, .spcover canvas, .spcover img { transition: none; transform: none; } }
@media (max-width: 520px) {
    .spprice { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "now buy" "was buy"; align-items: center; column-gap: 10px; text-align: left; }
    .spnow, .spna { grid-area: now; } .spprice s { grid-area: was; order: 0; white-space: nowrap; } .spbuy { grid-area: buy; margin: 0; }
}
