/* ============================================
   MONTELEONE TONSOR — PRODUCT SHOP
   ============================================ */

.products-page {
    padding: 104px var(--margin) var(--space-12);
}

.products-hero {
    max-width: var(--container-max);
    margin: 0 auto var(--space-10);
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    align-items: center;
    gap: var(--space-8);
}

.products-hero-copy {
    max-width: 620px;
}

.products-hero h1 {
    font-family: 'Outfit', var(--font-family);
    font-size: clamp(44px, 7vw, 92px);
    font-weight: 250;
    line-height: 0.98;
    letter-spacing: 0;
    margin: var(--space-2) 0 var(--space-3);
    color: rgba(244, 244, 240, 0.96);
    text-shadow:
        0 -4px 24px rgba(248, 250, 255, 0.22),
        0 22px 48px rgba(0, 0, 0, 0.45);
}

.products-hero p {
    color: rgba(197, 199, 204, 0.86);
    font-size: var(--body-lg-size);
    line-height: 1.8;
    max-width: 520px;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2);
    margin-top: var(--space-5);
}

.hero-metrics div {
    border-top: 1px solid rgba(248, 250, 255, 0.28);
    padding-top: var(--space-2);
}

.hero-metrics strong {
    display: block;
    color: var(--cool-led);
    font-family: 'Outfit', var(--font-family);
    font-size: 30px;
    font-weight: 300;
}

.hero-metrics span {
    color: var(--outline);
    font-size: var(--body-sm-size);
}

.products-stage {
    position: relative;
    min-height: 520px;
    isolation: isolate;
}

.products-stage::before {
    content: '';
    position: absolute;
    left: 6%;
    right: 0;
    bottom: 10%;
    height: 52%;
    background:
        radial-gradient(ellipse at 50% 58%, rgba(248, 250, 255, 0.26), transparent 62%),
        linear-gradient(180deg, transparent, rgba(248, 250, 255, 0.08));
    filter: blur(2px);
    z-index: -1;
}

.stage-product {
    position: absolute;
    object-fit: contain;
    filter:
        drop-shadow(0 38px 48px rgba(0, 0, 0, 0.62))
        drop-shadow(0 0 18px rgba(248, 250, 255, 0.16));
}

.stage-product-primary {
    width: min(430px, 46vw);
    right: 18%;
    bottom: -4%;
}

.stage-product-secondary {
    width: min(320px, 32vw);
    left: 0;
    bottom: 5%;
    opacity: 0.9;
}

.stage-product-tertiary {
    width: min(330px, 34vw);
    right: 0;
    top: 0;
    opacity: 0.86;
}

.shop-layout {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: var(--space-4);
    align-items: start;
}

.shop-main {
    min-width: 0;
}

.shop-toolbar {
    position: sticky;
    top: 88px;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto 220px;
    gap: var(--space-2);
    align-items: end;
    padding: var(--space-2);
    margin-bottom: var(--space-4);
    background: rgba(18, 20, 18, 0.82);
    border: 1px solid rgba(107, 111, 114, 0.52);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
}

.product-search {
    margin-bottom: 0;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sort-control {
    display: grid;
    gap: 8px;
}

.sort-control span {
    color: var(--on-surface-variant);
    font-size: var(--label-size);
    font-weight: var(--label-weight);
    letter-spacing: var(--label-tracking);
    text-transform: uppercase;
}

.catalog-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.catalog-header h2,
.cart-heading h2 {
    font-family: 'Outfit', var(--font-family);
    font-weight: 300;
    font-size: var(--headline-md-size);
    letter-spacing: 0;
    margin: 6px 0 0;
}

.cart-open-button {
    display: none;
}

#cart-count-pill {
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: rgba(248, 250, 255, 0.16);
    color: var(--cool-led);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3);
}

.product-card {
    min-height: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
    background: rgba(18, 20, 18, 0.7);
    border: 1px solid rgba(248, 250, 255, 0.18);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(18px);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(248, 250, 255, 0.74);
    box-shadow: 0 0 22px rgba(248, 250, 255, 0.18), 0 22px 70px rgba(0, 0, 0, 0.34);
}

.product-media {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 32%, rgba(248, 250, 255, 0.16), transparent 45%),
        linear-gradient(180deg, rgba(56, 58, 55, 0.42), rgba(13, 15, 13, 0.16));
}

.product-media img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    transition: transform var(--transition);
}

.product-card:hover .product-media img {
    transform: scale(1.035);
}

.product-badge {
    position: absolute;
    top: var(--space-2);
    left: var(--space-2);
    padding: 7px 10px;
    border: 1px solid rgba(248, 250, 255, 0.46);
    border-radius: var(--radius);
    background: rgba(13, 15, 13, 0.74);
    color: var(--cool-led);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.product-info {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-3);
}

.product-kicker {
    color: var(--outline);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.product-title-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: var(--space-2);
}

.product-title-row h3 {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0;
    margin: 0;
}

.product-price {
    color: var(--cool-led);
    font-weight: 600;
    white-space: nowrap;
}

.product-desc {
    color: var(--on-surface-variant);
    font-size: var(--body-sm-size);
    line-height: 1.6;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-meta span {
    padding: 6px 9px;
    border: 1px solid rgba(107, 111, 114, 0.6);
    border-radius: var(--radius);
    color: var(--outline);
    font-size: 12px;
}

.product-meta .stock-low {
    color: rgba(255, 232, 175, 0.98);
    border-color: rgba(255, 197, 77, 0.72);
    box-shadow:
        0 0 0 1px rgba(255, 197, 77, 0.18) inset,
        0 0 12px rgba(255, 197, 77, 0.28),
        0 0 26px rgba(255, 197, 77, 0.12);
    text-shadow: 0 0 8px rgba(255, 197, 77, 0.42);
}

.product-meta .stock-empty {
    color: rgba(255, 218, 218, 0.96);
    border-color: rgba(255, 92, 92, 0.76);
    box-shadow:
        0 0 0 1px rgba(255, 92, 92, 0.2) inset,
        0 0 12px rgba(255, 58, 58, 0.3),
        0 0 26px rgba(255, 58, 58, 0.13);
    text-shadow: 0 0 8px rgba(255, 92, 92, 0.45);
}

.product-actions {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: var(--space-1);
    margin-top: auto;
}

.product-actions .btn {
    padding-inline: 12px;
}

.cart-panel {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 112px);
    display: flex;
    flex-direction: column;
    background: rgba(18, 20, 18, 0.86);
    border: 1px solid rgba(248, 250, 255, 0.24);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(22px);
}

.confirm-reservation-list {
    display: grid;
    gap: var(--space-2);
    margin: var(--space-3) 0;
}

.confirm-reservation-row,
.confirm-reservation-total {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    padding-bottom: var(--space-1);
    border-bottom: 1px solid var(--outline-variant);
}

.confirm-reservation-row span,
.confirm-reservation-total span {
    color: var(--on-surface-variant);
}

.confirm-reservation-row strong,
.confirm-reservation-total strong {
    color: var(--soft-white);
    font-weight: 500;
    text-align: right;
}

.appointment-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
}

.cart-heading {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    align-items: start;
    margin-bottom: var(--space-3);
}

.cart-close {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius);
    background: transparent;
    color: var(--soft-white);
    font-size: 24px;
    cursor: pointer;
}

.cart-items {
    display: grid;
    gap: var(--space-2);
    overflow: auto;
    padding-right: 4px;
}

.cart-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: var(--space-2);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid rgba(107, 111, 114, 0.42);
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: var(--radius);
    background: rgba(248, 250, 255, 0.06);
}

.cart-item h3 {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 2px;
}

.cart-item p {
    color: var(--outline);
    font-size: 12px;
    margin: 0 0 10px;
}

.quantity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-1);
}

.quantity-controls {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius);
    overflow: hidden;
}

.quantity-controls button {
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: var(--soft-white);
    cursor: pointer;
}

.quantity-controls span {
    min-width: 30px;
    text-align: center;
    color: var(--soft-white);
    font-size: 13px;
}

.remove-item {
    border: 0;
    background: transparent;
    color: var(--outline);
    cursor: pointer;
    font-size: 12px;
}

.cart-empty {
    display: none;
    place-items: center;
    text-align: center;
    min-height: 180px;
    color: var(--outline);
}

.cart-empty span {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-2);
    border: 1px solid rgba(248, 250, 255, 0.22);
    border-radius: var(--radius-lg);
    color: var(--cool-led);
}

.cart-empty.visible {
    display: grid;
}

.cart-summary {
    display: grid;
    gap: 10px;
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid rgba(248, 250, 255, 0.22);
}

.cart-summary div {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    color: var(--on-surface-variant);
    font-size: var(--body-sm-size);
}

.cart-summary strong {
    color: var(--soft-white);
}

.cart-summary .cart-total {
    color: var(--soft-white);
    font-size: var(--body-md-size);
}

.checkout-form {
    display: grid;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.checkout-form .input-group {
    margin-bottom: 0;
}

.product-modal,
.cart-overlay {
    position: fixed;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.cart-overlay {
    z-index: 180;
    background: rgba(0, 0, 0, 0.48);
}

.cart-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.product-modal {
    z-index: 320;
    display: grid;
    place-items: center;
    padding: var(--margin);
    background: rgba(0, 0, 0, 0.62);
}

.product-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.product-modal-card {
    position: relative;
    width: min(940px, 100%);
    max-height: min(760px, 90vh);
    overflow: auto;
    background: rgba(18, 20, 18, 0.96);
    border: 1px solid rgba(248, 250, 255, 0.28);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 110px rgba(0, 0, 0, 0.55);
}

.modal-close {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    width: 42px;
    height: 42px;
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius);
    background: rgba(18, 20, 18, 0.82);
    color: var(--soft-white);
    font-size: 26px;
    cursor: pointer;
    z-index: 1;
}

.modal-product {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: var(--space-4);
    padding: var(--space-5);
}

.modal-product-image {
    display: grid;
    place-items: center;
    min-height: 420px;
    background:
        radial-gradient(circle at 50% 35%, rgba(248, 250, 255, 0.18), transparent 48%),
        rgba(248, 250, 255, 0.04);
    border-radius: var(--radius-lg);
}

.modal-product-image img {
    width: min(420px, 100%);
    object-fit: contain;
}

.modal-product-copy h2 {
    font-family: 'Outfit', var(--font-family);
    font-size: var(--headline-lg-size);
    font-weight: 300;
    letter-spacing: 0;
    margin-bottom: var(--space-2);
}

.modal-product-copy p {
    color: var(--on-surface-variant);
    line-height: 1.7;
}

.benefits-list {
    display: grid;
    gap: 10px;
    margin: var(--space-3) 0;
}

.benefits-list li {
    list-style: none;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(107, 111, 114, 0.42);
    color: var(--on-surface-variant);
}

.modal-product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.empty-results {
    grid-column: 1 / -1;
    min-height: 300px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px solid rgba(107, 111, 114, 0.42);
    border-radius: var(--radius-lg);
    color: var(--outline);
}

@media (max-width: 1180px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .products-page {
        padding-top: 92px;
    }

    .products-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: var(--space-4);
    }

    .products-stage {
        min-height: 400px;
    }

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

    .shop-toolbar {
        position: static;
    }

    .cart-open-button {
        display: inline-flex;
    }

    .cart-panel {
        position: fixed;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 220;
        max-height: 88vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        transform: translateY(104%);
        transition: transform var(--transition);
    }

    .cart-panel.open {
        transform: translateY(0);
    }

    .cart-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .modal-product {
        grid-template-columns: 1fr;
        padding: var(--space-3);
    }

    .modal-product-image {
        min-height: 300px;
    }
}

@media (max-width: 640px) {
    .products-page {
        padding: 82px var(--margin) var(--space-8);
    }

    .products-hero h1 {
        font-size: clamp(38px, 14vw, 58px);
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .products-stage {
        min-height: 310px;
    }

    .stage-product-primary {
        width: 72vw;
        right: 4%;
    }

    .stage-product-secondary {
        width: 48vw;
        left: -12%;
    }

    .stage-product-tertiary {
        width: 50vw;
        right: -15%;
    }

    .catalog-header {
        align-items: start;
        flex-direction: column;
    }

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

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

    .filter-chips {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-chips .chip {
        width: 100%;
        padding-inline: 8px;
    }

    .cart-panel {
        max-height: 92vh;
        padding: var(--space-2);
    }

    .product-modal {
        padding: var(--space-2);
    }

    .product-modal-card {
        max-height: 92vh;
    }

    .modal-product-footer {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .products-page {
        padding-inline: max(16px, var(--margin));
    }

    .products-hero h1 {
        font-size: clamp(34px, 13vw, 48px);
    }

    .shop-toolbar {
        padding: var(--space-2);
    }

    .filter-chips {
        grid-template-columns: 1fr;
    }

    .products-stage {
        min-height: 260px;
    }

    .cart-panel {
        border-radius: 18px 18px 0 0;
        max-height: 94vh;
    }

    .modal-product-image {
        min-height: 230px;
    }
}
