/* THE OPEN CRATE - COMPACT MOBILE-FIRST PRODUCT CATALOG */

body.store-modal-open {
    overflow: hidden;
}

.store-hero-compact {
    padding: 34px 0 30px;
}

.store-hero-compact .store-hero-inner {
    gap: 26px;
}

.store-hero-compact h1 {
    margin: 7px 0 8px;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1;
}

.store-hero-compact p {
    max-width: 620px;
    font-size: 0.95rem;
    line-height: 1.55;
}

.store-catalog-section {
    padding-top: 28px;
}

.store-product-picker {
    gap: 12px;
    margin-bottom: 20px;
    padding: 0;
    border: 0;
    background: transparent;
}

.store-catalog-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.store-catalog-heading h2 {
    margin: 4px 0 0;
    font-size: clamp(1.65rem, 4vw, 2.3rem);
}

.store-catalog-heading #store-product-picker-note {
    max-width: 360px;
    color: #6f6a62;
    font-size: 0.8rem;
    line-height: 1.4;
    text-align: right;
}

.store-product-select-native {
    display: none !important;
}

.store-product-choices {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 250px));
    gap: 14px;
    justify-content: start;
}

.store-product-choice {
    display: grid;
    grid-template-rows: 1fr auto;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d6d2ca;
    border-radius: 9px;
    background: #fff;
    color: #222;
    box-shadow: 0 2px 8px rgba(24, 24, 24, 0.04);
}

.store-product-choice:hover {
    border-color: #b48600;
    box-shadow: 0 5px 18px rgba(24, 24, 24, 0.08);
}

.store-product-choice.is-selected {
    border-color: #b48600;
}

.store-product-choice.is-unavailable:not(.is-selected) {
    background: #f7f5f0;
}

.store-product-choice-view {
    display: grid;
    grid-template-rows: 178px auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.store-product-choice-view:focus-visible,
.store-product-card-add:focus-visible,
.store-product-modal-close:focus-visible {
    outline: 3px solid rgba(180, 134, 0, 0.5);
    outline-offset: 2px;
}

.store-product-choice-view:disabled {
    cursor: default;
}

.store-product-choice-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 193, 7, 0.08), transparent 58%),
        linear-gradient(145deg, #222 0%, #171717 100%);
}

.store-product-choice-image {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100% - 16px);
    max-height: calc(100% - 16px);
    object-fit: contain;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    background: #151515;
    box-shadow: 0 5px 16px rgba(0,0,0,0.2);
    transition: transform 0.16s ease;
}

.store-product-choice:hover .store-product-choice-image {
    transform: scale(1.015);
}

.store-product-choice-box {
    position: relative;
    width: 96px;
    aspect-ratio: 1 / 0.8;
    padding: 28px 9px 9px;
    border: 1px solid #8f6217;
    background:
        linear-gradient(90deg, transparent 47%, rgba(87,53,8,0.16) 48%, rgba(87,53,8,0.16) 52%, transparent 53%),
        linear-gradient(#c68b34, #ad7327);
    color: #171717;
    text-align: center;
    transform: rotate(-2deg);
}

.store-product-choice-box::before {
    content: "";
    position: absolute;
    inset: 13px 0 auto 0;
    height: 15px;
    background: rgba(255, 219, 123, 0.78);
}

.store-product-choice-box strong,
.store-product-choice-box span {
    position: relative;
    z-index: 1;
    display: block;
}

.store-product-choice-box strong {
    font-size: 0.9rem;
    line-height: 0.92;
}

.store-product-choice-box span {
    margin-top: 7px;
    overflow: hidden;
    font-size: 0.54rem;
    font-weight: 850;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store-product-choice-body {
    display: grid;
    gap: 5px;
    padding: 11px 10px 9px;
}

.store-product-choice-name {
    overflow-wrap: anywhere;
    font-size: 0.88rem;
    line-height: 1.25;
}

.store-product-choice-price {
    font-size: 1rem;
}

.store-product-choice-status {
    color: #5f6d61;
    font-size: 0.7rem;
    line-height: 1.25;
}

.store-product-choice.is-unavailable .store-product-choice-status {
    color: #8a554d;
}

.store-product-card-add {
    min-height: 40px;
    margin: 0 9px 9px;
    padding: 8px 10px;
    border: 1px solid #d39c00;
    border-radius: 6px;
    background: #ffc107;
    color: #171717;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.15;
    cursor: pointer;
}

.store-product-card-add:hover:not(:disabled) {
    background: #f2b900;
}

.store-product-card-add:disabled {
    border-color: #d8d4cc;
    background: #ebe8e1;
    color: #7c776f;
    cursor: default;
}

.store-product-choice-empty {
    grid-column: 1 / -1;
    padding: 14px;
    border: 1px solid #dedbd4;
    border-radius: 8px;
    background: #faf9f6;
    color: #6f6a62;
    font-size: 0.82rem;
}

.store-product-layout {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100dvh;
    margin: 0;
    padding: 24px;
    overflow: hidden;
    background: rgba(17, 17, 17, 0.74);
}

.store-product-layout[hidden] {
    display: none !important;
}

.store-product-main {
    position: relative;
    width: min(960px, 100%);
    max-height: calc(100dvh - 48px);
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 16px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
    -webkit-overflow-scrolling: touch;
}

.store-product-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0 0 2px;
    border: 1px solid #d3cfc7;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #171717;
    font: inherit;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.store-product-modal-close:hover {
    background: #ffc107;
    border-color: #d39c00;
}

.store-product-visual {
    min-height: 440px;
    padding: 26px;
}

.store-product-real-photo {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 520px;
    object-fit: contain;
    border-radius: 9px;
}

.store-box-art {
    width: min(100%, 190px);
    padding: 46px 22px 24px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.26);
}

.store-box-art strong {
    font-size: 2.3rem;
}

.store-box-tape {
    margin-bottom: 14px;
    font-size: 0.56rem;
}

.store-box-source {
    margin-top: 15px;
    font-size: 0.76rem;
}

.store-product-copy {
    padding: 34px 34px 30px;
}

.store-product-copy h2 {
    padding-right: 36px;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.store-product-warning {
    display: grid;
    gap: 5px;
    margin: 16px 0;
    padding: 12px 13px;
    border: 1px solid #d6ad35;
    border-left: 4px solid #d6ad35;
    border-radius: 7px;
    background: #fff9e8;
    color: #332e21;
}

.store-product-warning > strong {
    font-size: 0.84rem;
}

.store-product-warning > span {
    font-size: 0.78rem;
    line-height: 1.42;
}

.store-product-warning > span[hidden] {
    display: none;
}

.store-product-expectations {
    margin: 0 0 22px;
    overflow: hidden;
    border: 1px solid #dedbd4;
    border-radius: 10px;
    background: #faf9f6;
}

.store-product-expectations summary {
    position: relative;
    display: grid;
    gap: 2px;
    padding: 13px 44px 13px 14px;
    cursor: pointer;
    list-style: none;
}

.store-product-expectations summary::-webkit-details-marker {
    display: none;
}

.store-product-expectations summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 14px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: #eeeae2;
    color: #554f46;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-50%);
}

.store-product-expectations[open] summary::after {
    content: "−";
}

.store-product-expectations summary > span {
    color: #302d28;
    font-size: 0.86rem;
    font-weight: 850;
}

.store-product-expectations summary > small {
    color: #777169;
    font-size: 0.72rem;
}

.store-product-expectations .store-facts {
    gap: 8px;
    margin: 0;
    padding: 12px 14px 14px;
    border-top: 1px solid #e5e1da;
}

@media (max-width: 820px) {
    .store-hero-compact {
        padding: 28px 0 24px;
    }

    .store-hero-compact .store-hero-inner {
        gap: 18px;
    }

    .store-product-layout {
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
        background: #fff;
    }

    .store-product-main {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        min-height: 0;
        grid-template-columns: 1fr;
        overflow-x: hidden;
        overflow-y: auto;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .store-product-modal-close {
        position: fixed;
        top: max(12px, env(safe-area-inset-top));
        right: 12px;
    }

    .store-product-visual {
        min-height: 280px;
        max-height: 42vh;
        padding: 18px;
    }

    .store-product-real-photo {
        max-height: 38vh;
    }

    .store-box-art {
        width: 150px;
        padding: 38px 18px 18px;
    }

    .store-box-art strong {
        font-size: 1.9rem;
    }

    .store-box-art::after {
        top: 18px;
        height: 26px;
    }

    .store-product-copy {
        padding: 24px 20px calc(54px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 620px) {
    .store-hero-compact {
        padding: 22px 0 20px;
    }

    .store-hero-compact h1 {
        font-size: 2rem;
    }

    .store-hero-compact p {
        font-size: 0.86rem;
    }

    .store-hero-compact .store-hero-pills {
        margin-top: 2px;
    }

    .store-catalog-section {
        padding-top: 20px;
    }

    .store-catalog-heading {
        align-items: start;
        flex-direction: column;
        gap: 4px;
    }

    .store-catalog-heading #store-product-picker-note {
        max-width: none;
        text-align: left;
    }

    .store-product-choices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .store-product-choice-view {
        grid-template-rows: 118px auto;
    }

    .store-product-choice-image {
        max-width: calc(100% - 10px);
        max-height: calc(100% - 10px);
        border-radius: 5px;
    }

    .store-product-choice-box {
        width: 70px;
        padding-top: 22px;
    }

    .store-product-choice-body {
        gap: 4px;
        padding: 9px 9px 7px;
    }

    .store-product-choice-name {
        font-size: 0.8rem;
    }

    .store-product-choice-price {
        font-size: 0.94rem;
    }

    .store-product-choice-status {
        font-size: 0.66rem;
    }

    .store-product-card-add {
        min-height: 42px;
        margin: 0 8px 8px;
        padding: 8px;
        font-size: 0.75rem;
    }

    .store-product-visual {
        min-height: 220px;
        max-height: 34vh;
        padding: 14px;
    }

    .store-product-real-photo {
        max-height: 31vh;
    }

    .store-box-art {
        width: 118px;
        padding: 31px 14px 14px;
    }

    .store-box-art strong {
        font-size: 1.5rem;
    }

    .store-box-tape {
        margin-bottom: 9px;
        padding: 3px 5px;
        font-size: 0.44rem;
    }

    .store-box-source {
        margin-top: 10px;
        font-size: 0.6rem;
    }

    .store-product-copy {
        padding: 20px 16px calc(54px + env(safe-area-inset-bottom));
    }

    .store-product-copy h2 {
        padding-right: 36px;
        font-size: 1.6rem;
    }

    .store-product-lead {
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .store-product-warning {
        margin: 13px 0;
        padding: 10px 11px;
    }

    .store-product-warning > span {
        font-size: 0.75rem;
    }

    .store-product-expectations {
        margin-bottom: 16px;
    }

    .store-product-expectations summary {
        padding: 12px 42px 12px 13px;
    }

    .store-product-expectations .store-facts {
        padding: 11px 13px 13px;
    }

    .store-price-row {
        margin: 16px 0 14px;
    }

    .store-price-row strong {
        font-size: 1.65rem;
    }
}
