/* Store-specific controls. Shared site dimensions live in site-shell.css. */
:root { --muted: #b4bdcc; }
button, input, select { font: inherit; }
button, select { cursor: url("assets/clickable_cursor.png") 7 1, pointer; }
button { color: white; background: var(--blue); border: 1px solid #7293c4; border-radius: 9px; padding: 10px 20px; }
button:hover { background: var(--blue-light); }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid white; outline-offset: 3px; }
.skip { position: absolute; left: 140px; top: -100px; z-index: 20; background: black; padding: 12px; }
.skip:focus { top: 10px; }
.logo-link { display: contents; }
.logo-tag {
    position: absolute;
    z-index: 2;
    margin: 0;
    padding: 0;
    color: white;
    font: 400 clamp(1.45rem, 2.45vw, 2rem)/1.2 "Pixel Smooth", monospace;
    letter-spacing: .4em;
    text-transform: uppercase;
    white-space: nowrap;
    transform: translateX(-50%);
    visibility: hidden;
}
.store-navigation {
    position: absolute;
    z-index: 3;
    bottom: 0;
    left: 50%;
    display: grid;
    width: min(60vw, 900px);
    max-width: calc(100vw - var(--rail-width) - 70px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 30px);
    transform: translate(-50%, 55%);
}
.store-navigation a, .store-navigation button {
    position: relative;
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-decoration: none;
    transition: filter 150ms ease, transform 150ms ease;
}
.store-navigation img { width: 100%; height: auto; }
.store-navigation a:hover, .store-navigation button:hover,
.store-navigation a:focus-visible, .store-navigation button:focus-visible {
    filter: brightness(1.1);
    transform: translateY(-3px) scale(1.025);
}
.store-navigation a:focus-visible, .store-navigation button:focus-visible {
    outline: 3px solid white;
    outline-offset: 3px;
}
.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 24px;
    padding: 4px 7px;
    border: 2px solid #050505;
    border-radius: 999px;
    color: #050505;
    background: #f6c744;
    font: 700 12px/1 Arial, sans-serif;
    text-align: center;
}
.product-body h3, .empty-state h2 {
    min-height: 1.4em;
    margin: 0 0 18px;
    font: 400 clamp(1.15rem, 2vw, 1.85rem)/1.2 "Super Mellow", Impact, sans-serif;
    letter-spacing: .01em;
    text-wrap: balance;
}
input, select { display: block; max-width: 100%; background: #131923; color: white; border: 1px solid #53627a; border-radius: 6px; padding: 10px; }
input { margin-top: 5px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--game-grid-gap); row-gap: 32px; }
.product-card { min-width: 0; }
.product-gallery { min-width: 0; align-self: start; }
.product-art {
    display: block;
    overflow: hidden;
    border: 8px solid transparent;
    border-radius: 22px;
    background: #efe8dc;
    box-shadow: 0 16px 34px rgb(0 0 0 / .5);
}
.product-image { width: 100%; aspect-ratio: 920 / 430; object-fit: contain; }
.thumbnails { display: flex; justify-content: flex-end; gap: 12px; margin-top: 16px; padding: 0 0 8px; overflow-x: auto; }
.thumbnail { flex: 0 0 70px; width: 70px; height: 66px; padding: 0; border: 2px solid transparent; border-radius: 7px; background: #efe8dc; overflow: hidden; }
.thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.thumbnail[aria-pressed="true"] { border-color: #7293c4; }
.product-body { min-width: 0; font: 16px/1.6 Arial, sans-serif; }
.product-body h3 { margin-top: 18px; }
.eyebrow { color: #a9c8f2; letter-spacing: .2em; font-size: 12px; font-weight: 700; }
.product-description { color: #ccd2dc; font-family: "Pixel Smooth", monospace; font-size: 18px; margin-bottom: 22px; }
.product-copy { line-height: 1.6; }
.product-copy p { margin: 0 0 .85em; }
.product-copy ul, .product-copy ol { margin: 0 0 1em; padding-left: 1.35em; }
.product-copy li { padding-left: .15em; margin: .3em 0; }
.product-copy li > p { margin: 0; }
.product-description p:has(+ ul), .product-description p:has(+ ol) { margin-bottom: .3em; }
.product-description li { margin: .15em 0; line-height: 1.35; }
.product-copy > :last-child { margin-bottom: 0; }
.product-body label { font-size: 13px; color: var(--muted); }
.product-body select { width: 100%; margin: 7px 0 15px; min-height: 48px; }
.price { color: #ffe18a; text-align: right; font: 400 1.5rem/1.2 "Pixel Smooth", monospace; }
.primary { width: 100%; padding: 15px; margin-bottom: 22px; }
.add-to-cart { display: block; width: min(55%, 260px); margin-inline: auto; padding: 0; border: 0; border-radius: 0; background: transparent; transition: filter 150ms ease, transform 150ms ease; }
.add-to-cart img { width: 100%; height: auto; }
.add-to-cart:hover { background: transparent; }
.add-to-cart:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-3px); }
.add-status { display: block; margin-top: 8px; font: 400 1rem/1.4 "Pixel Smooth", monospace; }
.product-details { border-top: 1px solid #38445a; padding: 18px 0; }
.product-details summary { cursor: pointer; font-weight: 700; }
.product-details .product-copy { margin-top: 12px; font-size: 14px; color: #bcc6d5; }
.purchase-note { font-size: 11px; letter-spacing: .04em; color: #a8b4c7; margin: 8px 0 0; text-align: center; }
.product-purchase > .add-to-cart { margin-bottom: 0; }
.single-product { display: block; }
.single-product .product-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--game-grid-gap); }
.single-product .eyebrow { margin-top: 0; }
.single-product .product-body h3 { margin-top: 0; }
.product-purchase, .product-extra { min-width: 0; }
@media (min-width: 901px) {
    /* The image and purchase panel share a row ending at Add to cart. */
    .single-product .product-gallery, .single-product .product-body { display: contents; }
    .single-product .product-art { grid-column: 1; grid-row: 1; position: relative; align-self: stretch; min-height: 0; }
    .single-product .product-image { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
    .single-product .product-purchase { grid-column: 2; grid-row: 1; }
    .single-product .product-purchase > .primary { display: block; margin-bottom: 0; }
    .single-product .thumbnails { grid-column: 1; grid-row: 2; align-self: start; min-width: 0; justify-content: flex-start; }
    .single-product .product-extra { grid-column: 2; grid-row: 2; margin-top: 22px; }
}
.empty-state { text-align: center; padding: 40px 20px 50px; }
.empty-state img { width: 95px; height: 95px; object-fit: contain; margin: 0 auto 18px; }
.empty-state p, .muted { color: var(--muted); font-family: Arial, sans-serif; }
#notice { color: #c5dcff; font: 14px/1.5 Arial, sans-serif; }
dialog {
    width: min(550px, calc(100% - 56px));
    max-height: 85vh;
    overflow: visible;
    background: transparent;
    color: white;
    border: 0;
    border-radius: 0;
    padding: 0;
    font: 400 1.25rem/1.4 "Pixel Smooth", monospace;
    filter: drop-shadow(0 18px 32px rgb(0 0 0 / .5));
}
dialog::backdrop { background: #000b; }
.cart-panel { max-height: 85vh; overflow-y: auto; padding: 30px; background: url("assets/cart_backing.png") center / 100% 100% no-repeat; }
#cart-title:focus { outline: none; }
#cart-title { text-transform: uppercase; letter-spacing: .2em; }
.dialog-heading { position: relative; display: flex; justify-content: center; align-items: center; min-height: 58px; padding-inline: 64px; }
.dialog-heading h2 { margin: 0; text-align: center; font: 400 clamp(1.8rem, 4vw, 2.4rem)/1.2 "Pixel Smooth", monospace; }
.dialog-heading { margin-bottom: 20px; }
#close-cart { position: absolute; z-index: 2; top: -18px; right: -18px; width: 58px; padding: 0; border: 0; border-radius: 0; background: transparent; transition: transform 150ms ease, filter 150ms ease; }
#close-cart img { width: 100%; height: auto; image-rendering: pixelated; }
#close-cart:hover { filter: brightness(1.12); transform: scale(1.06); }
#cart-dialog .muted { margin: 2px 0 0; color: white; font-family: inherit; font-size: 1rem; line-height: 1.2; text-align: right; }
#cart-dialog button { font-family: "Pixel Smooth", monospace; font-weight: 400; }
#cart-items { display: grid; gap: 12px; }
.cart-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 16px 12px; padding: 16px; border-radius: 10px; background: rgb(15 43 88 / .24); }
.cart-row h3 { margin: 0; font-size: 1.65rem; font-weight: 400; }
.cart-row > p { margin: 0; }
.cart-variants { justify-self: start; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px; margin-top: -8px; }
.cart-variant { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #634599; color: white; font-size: 1rem; }
.cart-price { color: #ffe18a; }
.cart-controls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cart-controls button { padding: 5px 12px; }
.cart-controls .cart-remove { position: absolute; top: -12px; right: -14px; z-index: 1; flex: 0 0 44px; width: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; transition: transform 150ms ease, filter 150ms ease; }
.cart-remove img { width: 100%; height: auto; image-rendering: pixelated; }
.cart-remove:hover { filter: brightness(1.12); transform: scale(1.06); }
#checkout-error { color: #fff1bf; }
#checkout-error:empty { display: none; }
#subtotal { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid rgb(255 255 255 / .35); font-weight: 400; font-size: 1.5rem; line-height: 1.2; text-align: right; }
#checkout { display: block; width: min(55%, 260px); margin: 22px 0 8px auto; padding: 0; border: 0; border-radius: 0; background: transparent; transition: filter 150ms ease, transform 150ms ease; }
#checkout img { width: 100%; height: auto; }
#checkout:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-3px); }
@media (max-width: 900px) {
    .store-navigation { width: min(82vw, 660px); max-width: none; gap: clamp(6px, 1.5vw, 14px); transform: translate(-50%, 80%); }
    .product-grid, .single-product .product-card { grid-template-columns: 1fr; gap: 54px; }
    .single-product .product-image { aspect-ratio: 4 / 5; }
}
@media (max-width: 520px) {
    .skip { left: 10px; }
    .product-body h3, .empty-state h2 { margin-bottom: 12px; padding-inline: 8px; font-size: 1.1rem; }
    .product-art { border-width: 5px; border-radius: 14px; }
    .thumbnails { justify-content: flex-start; margin-top: 12px; }
    .thumbnail { flex-basis: 62px; width: 62px; height: 58px; }
}

.product-body h3 {
    color: #ffe18a;
    font-family: "Pixel Smooth", monospace;
    font-size: clamp(1.6rem, 2.8vw, 2.6rem);
    font-weight: 400;
    line-height: 1.2;
}
.cart-flyer {
    position: fixed;
    z-index: 100;
    width: 84px;
    height: 84px;
    object-fit: contain;
    border: 2px solid #ffe18a;
    border-radius: 12px;
    background: #efe8dc;
    box-shadow: 0 8px 24px #0006;
    pointer-events: none;
}
.store-navigation #open-cart.cart-added { filter: brightness(1.35) drop-shadow(0 0 12px #ffe18a); }
.add-to-cart { position: relative; }
.added-label {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    color: #ffe18a;
    font: 400 1.4rem/1.2 "Pixel Smooth", monospace;
    white-space: nowrap;
    text-shadow: 0 2px 4px #000;
    pointer-events: none;
}
