/* fifty.website/merch (merch.php + scripts/merch.js) */
.merch { padding: 80px 0 40px; }
.merch .wrap { display: grid; gap: 22px; max-width: 1060px; }
.merch section { padding: 0; }   /* the homepage gives every <section> big vertical padding */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar: brand + cart */
.mx-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mx-brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: #fff; }
.mx-brand-name { font-family: var(--gothic); font-weight: 700; font-size: clamp(26px, 5vw, 36px); text-shadow: 2px 2px 0 var(--pink); }
.mx-brand-tag { font-family: var(--pixel); font-size: 20px; padding: 0 8px; background: var(--pink); color: #000; letter-spacing: 2px; }
.mx-cart-btn { font-size: 20px; padding: 6px 14px; }
.mx-cart-btn b { font-weight: 400; min-width: 22px; padding: 0 6px; background: #000; color: var(--pink-soft); text-align: center; }
.mx-cart-btn.has b { background: #fff; color: #000; }

/* hero + grid */
.mx-hero { text-align: center; }
.mx-title {
    margin: 0; font-family: var(--gothic); font-weight: 700; font-size: clamp(64px, 14vw, 140px); line-height: .9; color: #fff;
    text-shadow: 4px 4px 0 var(--pink), 0 0 36px color-mix(in srgb, var(--pink) 50%, transparent);
}
.mx-sub { margin: 10px 0 0; font-family: var(--pixel); font-size: 20px; color: var(--muted); letter-spacing: 1px; }
.mx-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.mx-card a {
    display: grid; height: 100%; text-decoration: none; color: #fff; border: 2px solid var(--line); background: rgba(0, 0, 0, .7);
    transition: transform .12s, border-color .12s, box-shadow .12s;
}
.mx-card a:hover { transform: translate(-2px, -3px); border-color: var(--pink); box-shadow: 6px 6px 0 var(--deep), 0 0 26px color-mix(in srgb, var(--pink) 35%, transparent); }
.mx-card a:focus-visible { outline: 2px dashed #fff; outline-offset: 3px; }
.mx-card-img { position: relative; display: block; aspect-ratio: 1; background: #050205; overflow: hidden; border-bottom: 1px solid var(--line); }
.mx-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.mx-card a:hover .mx-card-img img { transform: scale(1.04); }
.mx-card.is-out .mx-card-img img { filter: grayscale(.7) brightness(.6); }
.mx-card-name { padding: 12px 14px 2px; font-family: var(--gothic); font-weight: 700; font-size: 24px; line-height: 1.1; overflow-wrap: anywhere; }
.mx-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 14px 14px; align-self: end; }
.mx-card-price { font-family: var(--pixel); font-size: 22px; color: var(--pink-soft); }
.mx-dots { display: flex; gap: 4px; }
.mx-dots i { width: 12px; height: 12px; border: 1px solid #fff6; background: var(--sw); }
.mx-noimg { display: grid; place-items: center; width: 100%; height: 100%; aspect-ratio: 1; font-family: var(--pixel); font-size: 20px; color: var(--muted); }
.mx-stamp {
    position: absolute; top: 14px; left: -6px; padding: 2px 14px; background: #ff3b5c; color: #000; transform: rotate(-6deg);
    font-family: var(--pixel); font-size: 22px; letter-spacing: 2px; text-transform: uppercase; box-shadow: 3px 3px 0 #000;
}

/* product page */
.mx-crumbs a { font-family: var(--pixel); font-size: 20px; color: var(--muted); text-decoration: none; }
.mx-crumbs a:hover { color: var(--pink-soft); }
.mx-product-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.mx-main { position: relative; aspect-ratio: 1; background: #050205; border: 2px solid var(--line); overflow: hidden; }
.mx-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mx-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mx-thumb { width: 64px; height: 64px; padding: 0; border: 2px solid var(--line); background: #050205; cursor: pointer; }
.mx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mx-thumb.on, .mx-thumb:hover { border-color: var(--pink); }
.mx-name { margin: 0; font-family: var(--gothic); font-weight: 700; font-size: clamp(34px, 5vw, 50px); line-height: 1; color: #fff; text-shadow: 3px 3px 0 var(--pink); overflow-wrap: anywhere; }
.mx-price { margin: 10px 0 16px; display: flex; align-items: baseline; gap: 10px; font-family: var(--pixel); font-size: 32px; color: var(--pink-soft); }
.mx-price s { font-size: 22px; color: var(--muted); }
.mx-buy { display: grid; gap: 14px; }
.mx-opt { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mx-opt legend { width: 100%; margin-bottom: 6px; font-family: var(--pixel); font-size: 20px; color: var(--muted); }
.mx-opt legend b { font-weight: 400; color: #fff; }
.mx-guide { margin-left: 8px; color: var(--pink-soft); font-size: 18px; }
.mx-swatch, .mx-size { position: relative; cursor: pointer; }
.mx-swatch input, .mx-size input { position: absolute; opacity: 0; pointer-events: none; }
.mx-swatch span { display: block; width: 34px; height: 34px; background: var(--sw); border: 2px solid var(--line); box-shadow: inset 0 0 0 2px #000; }
.mx-swatch input:checked + span { border-color: var(--pink); box-shadow: inset 0 0 0 2px #000, 0 0 12px var(--pink); }
.mx-size span { display: block; min-width: 46px; padding: 6px 12px; text-align: center; font-family: var(--pixel); font-size: 20px; color: #fff; border: 2px solid var(--line); background: #000; }
.mx-size input:checked + span { background: var(--pink); color: #000; border-color: #fff; }
.mx-size.out span { color: var(--muted); text-decoration: line-through; opacity: .6; }
.mx-swatch input:focus-visible + span, .mx-size input:focus-visible + span { outline: 2px dashed #fff; outline-offset: 2px; }
.mx-size input:disabled + span { opacity: .3; cursor: not-allowed; }
.mx-stock { margin: 0; min-height: 22px; font-family: var(--pixel); font-size: 19px; color: #ffb36b; }
.mx-stock.warn { color: var(--pink-soft); }
.mx-qty-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.mx-qty { display: flex; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 20px; color: var(--muted); }
.mx-qty input { width: 64px; font: inherit; color: #fff; padding: 6px 8px; background: #000; border: 2px solid var(--line); }
.mx-add { flex: 1; justify-content: center; font-size: 26px; }
.mx-now { justify-content: center; }
.mx-desc { margin-top: 18px; color: var(--ink); line-height: 1.6; }
.mx-more { margin-top: 10px; border: 1px solid var(--line); background: #000; }
.mx-more summary { padding: 8px 12px; cursor: pointer; font-family: var(--pixel); font-size: 20px; color: var(--pink-soft); }
.mx-more > div { padding: 0 14px 10px; color: var(--ink); font-size: 14px; }
.mx-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
.mx-note i { color: var(--pink); margin-right: 4px; }

/* empty / 404 */
.mx-empty { max-width: 640px; justify-self: center; width: 100%; text-align: center; }
.mx-empty-title { margin: 0 0 10px; font-family: var(--gothic); font-weight: 700; font-size: clamp(36px, 7vw, 56px); color: #fff; text-shadow: 3px 3px 0 var(--pink); }
.mx-follow { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mx-follow a { display: inline-flex; gap: 6px; align-items: center; padding: 4px 12px; border: 1px solid var(--line); color: #fff; text-decoration: none; font-family: var(--pixel); font-size: 19px; }
.mx-follow a:hover { border-color: var(--pink); color: var(--pink-soft); }
.mx-foot { margin: 8px 0 0; text-align: center; font-family: var(--pixel); font-size: 19px; color: var(--muted); }
.mx-foot a { color: var(--ink); }

/* cart drawer */
.mx-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(5, 0, 4, .6); backdrop-filter: blur(2px); }
.mx-cart {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 81; width: min(400px, 100vw); margin: 0; display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform .2s ease-out; overflow: hidden;
}
.mx-cart.open { transform: none; }
.mx-cart .win-bar { display: flex; justify-content: space-between; align-items: center; }
.mx-close { font: inherit; font-size: 22px; line-height: 1; padding: 0 8px; color: #fff; background: #000; border: 1px solid #fff; cursor: pointer; }
.mx-cart .win-body { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.mx-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mx-line { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.mx-line-img { width: 56px; height: 56px; object-fit: cover; background: #050205; border: 1px solid var(--line); display: block; }
.mx-line-info { display: grid; gap: 2px; min-width: 0; }
.mx-line-info a { color: #fff; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.mx-line-info small { color: var(--muted); }
.mx-line-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.mx-line-row button { width: 28px; height: 28px; font: inherit; color: #fff; background: #000; border: 1px solid var(--line); cursor: pointer; }
.mx-line-row button:hover { border-color: var(--pink); }
.mx-line-row b { min-width: 18px; text-align: center; font-family: var(--pixel); font-size: 20px; font-weight: 400; }
.mx-line-price { margin-left: auto; font-family: var(--pixel); font-size: 20px; color: var(--pink-soft); }
.mx-rm { justify-self: start; padding: 0; font: inherit; font-size: 12px; color: var(--muted); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.mx-empty-cart { margin: 20px 0; text-align: center; font-family: var(--pixel); font-size: 22px; color: var(--muted); }
.mx-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; padding-top: 10px; border-top: 2px solid var(--line); font-family: var(--pixel); font-size: 22px; }
.mx-total b { font-weight: 400; color: #fff; font-size: 28px; }
.mx-hint { margin: 0; font-size: 12px; color: var(--muted); }
.mx-checkout { justify-content: center; font-size: 26px; }
.mx-cart [hidden] { display: none !important; }

@media (max-width: 760px) {
    .merch { padding-top: 70px; }
    .mx-product-body { grid-template-columns: 1fr; }
    .mx-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .mx-card-name { font-size: 20px; padding: 10px 10px 2px; }
    .mx-card-foot { padding: 2px 10px 10px; }
    .mx-card-price { font-size: 19px; }
}
