:root {
    color-scheme: light;

    --shop-ink: #18231c;
    --shop-muted: #5b685f;
    --shop-surface: #ffffff;
    --shop-canvas: #f3f6f1;
    --shop-primary: #176447;
    --shop-primary-hover: #0d5137;
    --shop-border: #d6dfd4;
    --shop-shadow: 0 18px 45px rgba(24, 35, 28, 0.09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 20rem;
    color: var(--shop-ink);
    background:
        radial-gradient(circle at top right, #e3efe3, transparent 32rem),
        var(--shop-canvas);
    font: 16px/1.55 Inter, ui-sans-serif, system-ui, sans-serif;
}

a {
    color: inherit;
}

.shop-shell {
    width: min(72rem, 100%);
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 3.5rem) clamp(1rem, 3vw, 2rem);
}

.shop-header,
.shop-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

.shop-brand,
.shop-nav a {
    color: var(--shop-primary);
    font-weight: 750;
    text-decoration: none;
}

.shop-title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.4rem);
    letter-spacing: -0.04em;
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1.25rem;
    padding: 0;
    list-style: none;
}

.product,
.panel {
    border: 1px solid var(--shop-border);
    border-radius: 1rem;
    background: var(--shop-surface);
    box-shadow: var(--shop-shadow);
}

.product {
    height: 100%;
    padding: 1.5rem;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease;
}

.product-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin: -0.25rem 0 1rem;
    border-radius: 0.7rem;
    background: var(--shop-canvas);
}

.product-image-detail {
    max-height: 36rem;
    aspect-ratio: auto;
    object-fit: contain;
    margin: 0 0 1.5rem;
}

.product:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 54px rgba(24, 35, 28, 0.14);
}

.product--unavailable:hover {
    transform: none;
}

.product-image--unavailable {
    filter: grayscale(1);
    opacity: .62;
}

.product-unavailable {
    margin: .75rem 0 0;
    color: var(--shop-muted);
    font-size: .9rem;
    font-weight: 650;
}

.product h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

.product h2 a {
    text-decoration: none;
}

.price {
    margin: 0;
    color: var(--shop-primary);
    font-size: 1.15rem;
    font-weight: 800;
}

.panel {
    max-width: 48rem;
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.panel h1 {
    margin-top: 0;
    font-size: clamp(1.75rem, 4vw, 2.7rem);
    letter-spacing: -0.03em;
}

.product-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
    align-items: start;
    gap: clamp(1.25rem, 3vw, 2.5rem);
}

.product-content,
.product-purchase {
    max-width: none;
}

.product-purchase {
    position: sticky;
    top: 1.5rem;
}

.product-purchase h2 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
    align-items: start;
    gap: clamp(1.25rem, 3vw, 2.5rem);
}

.shop-checkout,
.checkout-summary {
    max-width: none;
}

.checkout-summary {
    position: sticky;
    top: 1.5rem;
}

.checkout-summary h2 {
    margin: 0;
    font-size: 1.25rem;
}

.shop-empty {
    padding: 2rem;
    border: 1px dashed var(--shop-border);
    border-radius: 1rem;
    color: var(--shop-muted);
    text-align: center;
}

@media (max-width: 38rem) {
    .shop-header,
    .shop-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .products {
        grid-template-columns: 1fr;
    }

    .product-details {
        grid-template-columns: 1fr;
    }

    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .product-purchase,
    .checkout-summary {
        position: static;
    }
}
