/* ============================================================
   AFTR DARK — store add-ons. Loaded AFTER the original site
   stylesheet (/assets/site/css/style.css) and uses only its
   tokens and fonts: serif headlines, tracked sans labels,
   black / midnight / bone, gold as the accent.
   ============================================================ */
[hidden] { display: none !important; }
main { min-height: 60vh; }
.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.section { padding-top: 64px; padding-bottom: 64px; }
.top { padding-top: 48px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--steel); }
.small { font-size: 0.82rem; }
.h2 { font-family: var(--font-serif); font-weight: 700; letter-spacing: -0.5px; font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15; margin: 0 0 0.5em; }
.h3 { font-family: var(--font-serif); font-weight: 700; font-size: 1.35rem; margin: 0 0 0.5em; }
.btn { justify-content: center; }
.btn-wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row.center-row { justify-content: center; }

/* header: cart next to the menu */
.nav-end { display: flex; align-items: center; gap: 14px; }
.cart-link { position: relative; display: grid; place-items: center; width: 40px; height: 40px; color: #c9c9c9; }
.cart-link:hover { color: var(--gold); }
.cart-count { position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--gold); color: var(--midnight);
  font-family: var(--font-sans); font-size: 0.68rem; font-weight: 700; display: grid; place-items: center; }
@media (min-width: 861px) { .nav { gap: 30px; } .nav nav { margin-left: auto; } }

/* product grid */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.section-head h2, .section-head .h2 { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 26px; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr 1fr; gap: 14px; } }
.p-card { display: block; border: 1px solid #262626; background: var(--true-black); transition: border-color 0.25s ease, transform 0.25s ease; }
.p-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.card-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--midnight); }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease; }
.card-alt { opacity: 0; }
@media (hover: hover) { .p-card:hover .card-alt { opacity: 1; } }
.p-card.is-out .card-media img { filter: grayscale(.7) brightness(.6); }
.card-info { display: grid; gap: 4px; padding: 16px 18px 20px; }
.card-coll { font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.65rem; color: var(--gold); }
.card-title { font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; }
.card-title em { font-style: normal; font-weight: 400; color: var(--steel); }
.card-price { color: #d9d9d9; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.p-badge { position: absolute; top: 12px; left: 12px; border: 1px solid var(--gold); color: var(--gold); background: rgba(0,0,0,.72);
  font-family: var(--font-sans); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 2px; padding: 5px 10px; }
.p-badge-out { background: var(--gold); color: var(--midnight); }
.p-price-row .p-badge { position: static; }

/* info boxes */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 26px; }
.info { border: 1px solid #262626; background: var(--true-black); padding: 30px 26px; }
.info h3 { font-size: 1.15rem; }
.info p { margin: 0 0 10px; }
.size-table-wrap { margin-top: 0; }

/* product page */
.product { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 52px; align-items: start; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; gap: 26px; } }
.gallery { position: sticky; top: calc(var(--nav-height) + 20px); }
@media (max-width: 860px) { .gallery { position: static; } }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 5; border: 1px solid #262626; background: var(--midnight); }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.slide.wide { object-fit: contain; background: #d6d3cd; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.thumb { flex: 0 0 62px; height: 78px; padding: 0; border: 1px solid #262626; background: var(--midnight); cursor: pointer; opacity: .55; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.on { border-color: var(--gold); opacity: 1; }
.buybox .eyebrow { display: block; margin-bottom: 12px; }
.p-title { margin-bottom: 4px; }
.p-colour { font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 2px; font-size: 0.78rem; color: var(--steel); margin: 0 0 16px; }
.p-price-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.p-price { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.p-hook { font-family: var(--font-serif); font-style: italic; font-size: 1.2rem; color: #e9e9e9; margin: 0 0 26px; }
.sizes { border: 0; padding: 0; margin: 0 0 20px; }
.sizes legend, .co-form legend { font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 2px; font-size: 0.72rem; color: var(--steel); font-weight: 600; margin-bottom: 12px; padding: 0; }
.size-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.size input { position: absolute; opacity: 0; pointer-events: none; }
.size span { display: grid; place-items: center; min-width: 58px; height: 46px; padding: 0 14px; border: 1px solid #3a3a3a; border-radius: 2px;
  font-family: var(--font-sans); font-size: 0.85rem; letter-spacing: 1.5px; cursor: pointer; transition: all .2s; }
.size span:hover { border-color: var(--bone); }
.size input:checked + span { background: var(--bone); color: var(--true-black); border-color: var(--bone); }
.size input:focus-visible + span { outline: 1px solid var(--gold); outline-offset: 2px; }
.size.gone span { opacity: .3; text-decoration: line-through; cursor: not-allowed; }
.size-link { font-size: 0.72rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--bone); border-bottom: 1px solid var(--charcoal); margin-left: 6px; }
.size-link:hover { color: var(--gold); border-color: var(--gold); }
.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.qty-row { display: flex; gap: 12px; margin-bottom: 12px; }
.qty { display: flex; align-items: center; border: 1px solid #3a3a3a; border-radius: 2px; height: 50px; }
.qty button { width: 40px; height: 100%; background: none; border: 0; color: var(--bone); font-size: 1.2rem; cursor: pointer; }
.qty button:hover { color: var(--gold); }
.qty input { width: 34px; text-align: center; background: none; border: 0; color: var(--bone); font-family: var(--font-sans); -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-sm { height: 34px; width: max-content; margin-top: 8px; }
.qty-sm button { width: 32px; font-size: 1rem; }
.qty-sm span { min-width: 22px; text-align: center; }
.add-btn { flex: 1; }
.form-msg { color: #ff9b8a; margin: 8px 0; font-size: 0.9rem; }
.form-msg:empty { margin: 0; }
.perks { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 8px; font-size: 0.92rem; color: #d8d8d8; }
.perks li::before { content: "—"; margin-right: 10px; color: var(--gold); }
.p-body { border-top: 1px solid #262626; padding-top: 20px; }
.p-body ul { padding-left: 18px; color: #d8d8d8; }

/* cart + checkout */
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid #262626; }
.line img { width: 72px; height: 90px; object-fit: cover; border: 1px solid #262626; }
.line-info { display: grid; gap: 2px; }
.line-title { font-family: var(--font-serif); font-weight: 700; }
.line-price { text-align: right; display: grid; gap: 6px; justify-items: end; font-variant-numeric: tabular-nums; }
.line-rm { background: none; border: 0; color: var(--steel); font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; padding: 0; }
.line-rm:hover { color: var(--gold); }
.sum-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; font-variant-numeric: tabular-nums; }
.sum-total { border-top: 1px solid #262626; margin-top: 6px; padding-top: 14px; font-family: var(--font-serif); font-weight: 700; font-size: 1.25rem; }
.cart-summary { margin-top: 20px; }
.cart-summary .btn { margin-top: 12px; }
.checkout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: start; padding-bottom: 72px; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } .co-summary { order: -1; } }
.co-summary { background: var(--midnight); border: 1px solid #262626; padding: 26px; position: sticky; top: calc(var(--nav-height) + 20px); }
@media (max-width: 860px) { .co-summary { position: static; } }
.co-form fieldset { border: 0; padding: 0; margin: 0 0 30px; display: grid; gap: 14px; }
.co-form label { display: grid; gap: 6px; font-size: 0.88rem; color: #d8d8d8; }
.co-form input:not([type=radio]), .co-form select, .co-form textarea { width: 100%; min-height: 50px; padding: 13px 16px; background: var(--midnight); border: 1px solid #333;
  border-radius: 2px; color: var(--bone); font-family: var(--font-sans); font-size: 16px; }
.co-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--steel) 50%), linear-gradient(135deg, var(--steel) 50%, transparent 50%);
  background-position: calc(100% - 22px) 22px, calc(100% - 16px) 22px; background-size: 6px 6px; background-repeat: no-repeat; }
.co-form input:focus, .co-form select:focus, .co-form textarea:focus { outline: 1px solid var(--gold); border-color: var(--gold); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.pay-opt { display: flex !important; align-items: flex-start; gap: 14px; padding: 18px; border: 1px solid #333; cursor: pointer; transition: border-color .2s; }
.pay-opt:has(input:checked) { border-color: var(--gold); }
.pay-opt input { margin-top: 4px; accent-color: #ffcc00; width: 18px; height: 18px; }
.pay-opt span { display: grid; gap: 4px; }
.pay-opt strong { color: var(--bone); }
.pay-opt small { color: var(--steel); font-size: 0.85rem; }
.pay-opt.off { opacity: .5; cursor: not-allowed; }
.notice { border-left: 2px solid var(--gold); padding: 10px 16px; background: var(--midnight); font-size: 0.92rem; }

/* thank you */
.ty { padding-bottom: 80px; }
.ty-sigil { margin: 0 auto 18px; }
.ty-done { text-align: left; }
.ty-done .eyebrow, .ty-done h1, .ty-done .lede { display: block; text-align: center; margin-left: auto; margin-right: auto; }
.ty-lines { margin-top: 24px; border-top: 1px solid #262626; padding-top: 8px; }
.ty .btn-row { justify-content: center; margin-top: 26px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); background: var(--midnight); color: var(--bone);
  border: 1px solid var(--gold); padding: 14px 20px; font-size: 0.92rem; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.toast a { color: var(--gold); border-bottom: 1px solid var(--gold); margin-left: 6px; }

/* names the admin page uses */
:root { --ink: #0a0a0a; --line: #262626; --display: var(--font-serif); }
.chip { color: var(--bone); font-family: var(--font-sans); }
.chip.on { color: var(--true-black); }

/* logos: the owner's gold logo files, never the name typed in a font */
.brand .brand-mark { height: 58px; width: auto; }
.footer-brand .footer-lockup { height: auto; width: 170px; margin-bottom: 16px; }
