/* Merch shop. Tokens, fonts, hero, form and button styles come from order.css. */

.shop-hero {
    background: var(--yellow);
}

.shop-confirmation {
    max-width: 1200px;
    margin: 1.5rem auto 0;
    padding: 1rem 1.5rem;
    background: var(--sage);
    border-radius: 4px;
    text-align: center;
}

.shop-confirmation h2 {
    font-family: var(--heading-font);
    color: var(--red);
}

.shop-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    padding: 1.5rem 2rem 4rem;
    align-items: start;
}

.shop-section {
    margin-bottom: 2.5rem;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.shop-card {
    background: var(--white);
    border: 2px solid rgba(0,0,0,0.08);
    border-radius: 6px;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.shop-card.is-sold-out {
    opacity: 0.55;
}

.shop-card-name {
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.3;
}

.shop-card-desc {
    font-size: 0.82rem;
    color: rgba(0,0,0,0.72);
}

.shop-card-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.shop-card-price {
    font-weight: 700;
    color: var(--ink);
    margin-right: auto;
}

.shop-size {
    font-family: var(--body-font);
    font-size: 0.8rem;
    padding: 0.35rem 0.4rem;
    border: 2px solid rgba(0,0,0,0.15);
    border-radius: 3px;
    background: var(--white);
}

.shop-card .menu-item-add:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== BAG ===== */
.shop-bag {
    position: sticky;
    top: calc(var(--header-h, 92px) + 1rem);
    background: var(--white);
    border: 2px solid rgba(0,0,0,0.08);
    border-radius: 6px;
    padding: 1.25rem;
}

.shop-bag-title {
    font-family: var(--heading-font);
    color: var(--red);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.shop-bag-empty {
    font-size: 0.85rem;
    color: rgba(0,0,0,0.6);
    margin-bottom: 1rem;
}

.shop-bag-lines {
    list-style: none;
    margin-bottom: 1rem;
}

.shop-bag-line {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.6rem;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dotted rgba(0,0,0,0.12);
    font-size: 0.82rem;
}

.shop-qty {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.shop-qty button {
    width: 1.75rem;
    height: 1.75rem;
    border: 2px solid rgba(0,0,0,0.15);
    border-radius: 3px;
    background: var(--cream);
    font-weight: 700;
    cursor: pointer;
}

.shop-bag-price {
    font-weight: 700;
    min-width: 4rem;
    text-align: right;
}

.shop-fulfillment {
    border: none;
    margin-bottom: 1rem;
    display: grid;
    gap: 0.5rem;
}

.shop-fulfillment legend {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.shop-choice {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    padding: 0.6rem 0.75rem;
    border: 2px solid rgba(0,0,0,0.12);
    border-radius: 4px;
    font-size: 0.8rem;
    line-height: 1.4;
    cursor: pointer;
}

.shop-choice:has(input:checked) {
    border-color: var(--red);
}

.shop-choice input {
    margin-top: 0.2rem;
    accent-color: var(--red);
}

.shop-ship-note {
    font-size: 0.8rem;
    color: rgba(0,0,0,0.7);
    margin-bottom: 1rem;
}

.shop-totals {
    margin: 0.5rem 0 1rem;
    font-size: 0.85rem;
}

.shop-totals div {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
}

.shop-totals dd {
    font-weight: 700;
}

.shop-totals .shop-total {
    border-top: 1px solid rgba(0,0,0,0.15);
    margin-top: 0.3rem;
    padding-top: 0.5rem;
    font-size: 1rem;
}

@media (max-width: 860px) {
    .shop-layout {
        grid-template-columns: 1fr;
        padding: 1rem 1rem 3rem;
    }

    .shop-bag {
        position: static;
    }
}

/* Backorder: the shirts sold out and sell ahead of the next print run. */
.shop-backorder {
    background: #FFF4D6;
    border-left: 4px solid var(--red);
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

.shop-card-backorder {
    font-size: 0.8rem;
    font-weight: 700;
    color: #A3121F; /* --red is for large text only; this clears 4.5:1 at 0.8rem */
}

.shop-backorder-note {
    font-size: 0.8rem;
    font-weight: 700;
    color: #A3121F;
    margin-bottom: 1rem;
}

/* Product photos. Square, so cards line up whatever the photo. */
.shop-card-media {
    position: relative;
    margin: -0.25rem -0.25rem 0.5rem;
    border-radius: 6px;
    overflow: hidden;
    background: #F5F4F2;
    aspect-ratio: 1 / 1;
}

.shop-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.shop-views {
    position: absolute;
    left: 0.5rem;
    bottom: 0.5rem;
    display: flex;
    gap: 0.3rem;
}

.shop-view {
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.9);
    color: #333;
    cursor: pointer;
}

.shop-view[aria-pressed="true"] {
    background: #222;
    color: #fff;
    border-color: #222;
}
