﻿.order-page {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: 100vh;
    padding: clamp(1rem, 3vw, 2.5rem);
    overflow: hidden;
    background: radial-gradient( circle at 7% 8%, color-mix(in srgb, var(--store-main-color) 25%, transparent) 0 10rem, transparent 10.1rem ), radial-gradient( circle at 95% 22%, var(--store-tan-28) 0 15rem, transparent 15.1rem ), linear-gradient( 145deg, var(--store-page-warm) 0%, var(--store-grey) 48%, var(--store-page-cool) 100% );
}

    .order-page::before,
    .order-page::after {
        position: absolute;
        z-index: -1;
        content: "";
        pointer-events: none;
        border-radius: 999px;
        filter: blur(1px);
    }

    .order-page::before {
        top: 20rem;
        left: -8rem;
        width: 20rem;
        aspect-ratio: 1;
        background: color-mix(in srgb, var(--store-main-color) 6%, transparent);
    }

    .order-page::after {
        right: -7rem;
        bottom: 4rem;
        width: 18rem;
        aspect-ratio: 1;
        background: var(--store-tan-18);
    }

.store-page-shell {
    width: min(100%, 100rem);
    margin-inline: auto;
}

.order-page .order-layout {
    align-items: flex-start;
}

.order-page .ordering-message {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    color: var(--store-disclaimer-text);
    background: var(--store-disclaimer-bg);
    border: 1px solid var(--store-disclaimer-border);
    border-left: 0.35rem solid var(--store-disclaimer-border);
    border-radius: var(--store-radius-md);
    box-shadow: var(--store-shadow-sm);
}

.order-page .category-prompt {
    margin: 0 0 0.75rem 0.2rem;
    color: var(--store-text-muted);
    font-weight: 750;
}

.order-page .catalog-state-message {
    margin-top: 0.25rem;
    background: var(--store-white-82);
    border-color: var(--store-main-color-light);
    border-radius: var(--store-radius-md);
    box-shadow: var(--store-shadow-sm);
    backdrop-filter: blur(10px);
}

.catalog-shell {
    padding: clamp(0.8rem, 2vw, 1.35rem);
    padding-left: clamp(0.6rem, 2vw, 0.35rem);
    overflow: hidden;
    background: var(--store-white-72);
    border: 1px solid var(--store-white-90);
    border-radius: var(--store-radius-lg);
    box-shadow: var(--store-shadow-md);
    backdrop-filter: blur(14px);
}

.order-page .product-grid {
    margin: 0;
}

.order-page .product-grid-item {
    display: flex;
}

.order-page .catalog-card {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    background: var(--store-white-90);
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius-md);

}

    .order-page .catalog-card::before {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
        width: 100%;
        height: 0.28rem;
        content: "";
        opacity: 0.85;
    }

.product-image-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 20rem;
    min-width: 0;
    min-height: 0;
    padding: 1.25rem;
    overflow: hidden;
    background: var(--store-white);
    border-bottom: 1px solid var(--store-border);
}

.order-page .product-image {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    overflow: hidden;
    background: var(--store-transparent) !important;
}

.order-page .product-image img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}

.product-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 1.1rem 1.1rem 0.85rem;
}

.product-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.order-page .product-title {
    min-width: 0;
    color: var(--store-text-main);
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.order-page .product-price {
    flex: none;
    padding: 0.3rem 0.62rem;
    color: var(--store-main-color-dark);
    font-weight: 850;
    white-space: nowrap;
}

.order-page .product-price-free {
    color: var(--store-white);
    background: var(--store-main-color);
}

.order-page .product-description {
    margin-top: 0.72rem;
    color: var(--store-text-muted);
    line-height: 1.58;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.product-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin-top: 0.9rem;
    padding: 0.72rem 0.78rem;
    color: var(--store-disclaimer-text);
    background: var(--store-disclaimer-bg);
    border: 1px solid var(--store-disclaimer-border);
    border-left: 0.24rem solid var(--store-disclaimer-border);
    border-radius: 0.65rem;
}

.product-action {
    padding: 0 1.1rem 1.1rem;
}

.digital-download-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 3rem;
    padding: 0.65rem;
    color: var(--store-main-color-dark);
    background: var(--store-main-color-pale);
    border: 1px solid var(--store-main-color-pale);
    border-radius: 0.72rem;
    font-weight: 750;
}

.order-page .cart-panel {
    position: sticky;
    top: 1.25rem;
    overflow: hidden;
    background: var(--store-white);
    border-radius: var(--store-radius-lg);
    backdrop-filter: blur(14px);
}

.cart-header {
    padding: 1.1rem 1.2rem;
    background: linear-gradient( 135deg, color-mix(in srgb, var(--store-main-color) 28%, transparent), var(--store-white) 95% );

}

.cart-title-group {
    display: flex;
    align-items: center;
    gap: 0.78rem;
}

.cart-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    aspect-ratio: 1;
    color: var(--store-background-off-white);
    background: linear-gradient( 145deg, var(--store-main-color), var(--store-main-color-dark) );
    border: 1px solid var(--store-white-25);
    border-radius: 0.8rem;
}

.order-page .cart-title {
    color: var(--store-text-main);
    font-weight: 850;
}

.order-page .cart-count {
    display: block;
    margin-top: 0.1rem;
    color: var(--store-text-muted);
}

.cart-items {
    max-height: min(30rem, calc(100vh - 22rem));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.cart-line {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--store-border);
    transition: background-color 150ms ease;
}

    .cart-line:last-child {
        border-bottom: 0;
    }

.cart-line-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.cart-item-details {
    min-width: 0;
}

.order-page .cart-product-name {
    color: var(--store-text-main);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.order-page .cart-student-name {
    display: block;
    margin-top: 0.2rem;
    color: var(--store-text-muted);
}

.order-page .cart-item-price {
    flex: none;
    color: var(--store-main-color-dark);
    font-weight: 850;
    white-space: nowrap;
}

.cart-customizations {
    display: grid;
    gap: 0.2rem;
    margin-top: 0.72rem;
    padding: 0.72rem 0.78rem;
    color: var(--store-text-secondary);
    background: var(--store-main-color-pale);
    border-left: 0.22rem solid var(--store-main-color);
    border-radius: 0.6rem;
}

.cart-line-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.4rem;
}

.order-page .cart-line-footer .mud-button-root {
    min-width: auto;
    padding-inline: 0.48rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: none;
    border-radius: 0.5rem;
}

.order-page .cart-line-footer .mud-button-root:hover {
    background: var(--store-danger-soft);
    color: var(--store-white-92);
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 14rem;
    padding: 1.5rem;
    text-align: center;
    background: var(--store-white-25);
}

.empty-cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.7rem;
    aspect-ratio: 1;
    margin-bottom: 0.85rem;
    color: var(--store-main-color);
    background: var(--store-white-25);
    border: 1px solid var(--store-main-color);
    border-radius: 50%;
}

.order-page .empty-cart-copy {
    max-width: 15rem;
    margin-top: 0.3rem;
    color: var(--store-text-muted);
    line-height: 1.45;
}

.cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem 0.82rem;
    border-top: 1px solid var(--store-border);
}

.order-page .cart-subtotal-value {
    color: var(--store-main-color-dark);
    font-weight: 900;
}

.checkout-action {
    padding: 0 1.2rem 1.2rem;
}

.order-page .checkout-note {
    display: block;
    margin-top: 0.68rem;
    color: var(--store-text-secondary);
    line-height: 1.4;
}

.order-page .product-info-popover {
    max-width: 24rem;
    padding: 1rem;
    border: 1px solid var(--store-main-color-light);
    border-radius: var(--store-radius-md);
    box-shadow: var(--store-shadow-lg);
}

.product-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.order-page button:focus-visible,
.order-page [role="tab"]:focus-visible {
    outline: 3px solid var(--store-tan-75);
    outline-offset: 3px;
}

@media (max-width: 1199.98px) {
    .order-page .cart-panel {
        position: static;
    }

    .cart-items {
        max-height: none;
    }
}

@media (max-width: 959.98px) {
    .order-page {
        padding: 1rem;
    }

    .store-page-header {
        margin-bottom: 1rem;
    }

    .catalog-shell {
        padding: 0.75rem;
        padding-left: 0px;
    }
}

@media (max-width: 599.98px) {
    .order-page {
        padding: 0.6rem;
        background: linear-gradient( 155deg, var(--store-page-warm), var(--store-page-cool) );
    }

    .store-page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
        padding: 1.25rem;
        border-radius: var(--store-radius-md);
    }

        .store-page-header::after {
            display: none;
        }

    .order-page .store-page-title {
        font-size: clamp(1.75rem, 9vw, 2.45rem);
    }

    .order-page .store-page-subtitle {
        margin-top: 0.55rem;
        font-size: 0.92rem;
        line-height: 1.5;
    }

    .catalog-shell {
        border-radius: var(--store-radius-md);
    }

    .product-image-area {
        height: 11rem;
        padding: 0.9rem;
    }

    .order-page .product-image img {
        max-width: 80% !important;
        max-height: 100% !important;
    }

    .product-card-body {
        padding: 0.95rem 0.95rem 0.72rem;
    }

    .product-action {
        padding: 0 0.95rem 0.95rem;
    }

    .cart-header,
    .cart-line,
    .cart-summary-row {
        padding-inline: 0.95rem;
    }

    .checkout-action {
        padding-inline: 0.95rem;
    }

    .product-image-area {
        height: 9rem;
        padding: 0.65rem;
    }

    .order-page .product-image img {
        max-width: 85% !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .order-page .catalog-card,
    .cart-line {
        transition: none;
    }

        .order-page .catalog-card:hover {
            transform: none;
        }
}
