/* ===============================
   Products Page Layout
   =============================== */

.products-page-container {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    padding: 24px;
    gap: 24px;
}

/* ===============================
   Product Grid
   =============================== */

.products-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    box-sizing: border-box;
}

/* ===============================
   Product Card Wrapper
   =============================== */

.product-card-wrapper {
    --card-scale: 1;
    position: relative;
    transform: scale(var(--card-scale));
    transform-origin: top center;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

    .product-card-wrapper:hover {
        transform: scale(calc(var(--card-scale) * 1.04)) translateY(-0.6rem);
    }

/* ===============================
   Product Card (Glass Base)
   =============================== */

.product-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: calc(1.1rem * var(--card-scale));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: linear-gradient( 180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 16%, rgba(0,0,0,0.45) 56%, rgba(0,0,0,0.85) 100% );
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow: 0 18px 36px rgba(0,0,0,0.75), inset 0 1px 0 rgba(255,255,255,0.14);
    transition: box-shadow 0.45s ease, background 0.45s ease;
}

/* ===============================
   Hover: Lift + Controlled Glow
   =============================== */

.product-card-wrapper:hover .product-card {
    box-shadow: 0 32px 64px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,136,0,0.32), 0 0 22px rgba(255,136,0,0.28), 0 0 44px rgba(255,136,0,0.14), inset 0 1px 0 rgba(255,255,255,0.2);
}

/* ===============================
   Glass Edge + Depth
   =============================== */

.product-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), inset 0 -30px 60px rgba(0,0,0,0.45);
}

/* ===============================
   Highlight-Only One-Shot Shimmer
   =============================== */

.product-card::after {
    content: "";
    position: absolute;
    inset: -40%;
    background: linear-gradient( 120deg, transparent 35%, rgba(255,255,255,0.08) 50%, transparent 65% );
    transform: translateX(-120%);
    opacity: 0;
    pointer-events: none;
}

.product-card-wrapper:hover .product-card::after {
    animation: glassShimmerOnce 1.1s ease-out forwards;
    opacity: 1;
}

.product-card-wrapper:not(:hover) .product-card::after {
    animation: none;
    transform: translateX(-120%);
    opacity: 0;
}

@keyframes glassShimmerOnce {
    from {
        transform: translateX(-120%);
    }

    to {
        transform: translateX(120%);
    }
}

/* ===============================
   Product Card Content
   =============================== */

.product-link {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    color: inherit;
    text-decoration: none;
}

.product-image-wrapper {
    display: flex;
    flex: 0 0 70%;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: radial-gradient(circle at top, rgba(255,136,0,0.14), rgba(0,0,0,0.55) 70%);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: translateY(0) scale(1);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}

.product-card-wrapper:hover .product-image {
    transform: translateY(-4%) scale(1.1);
    filter: drop-shadow(0 26px 40px rgba(0,0,0,0.7)) brightness(1.05);
}

.product-details {
    display: grid;
    flex: 1 1 auto;
    grid-template-rows: auto minmax(2.6em, auto);
    align-content: start;
    gap: calc(.45rem * var(--card-scale));
    min-height: 0;
    overflow: hidden;
    padding: calc(.68rem * var(--card-scale)) calc(.95rem * var(--card-scale));
    background: linear-gradient(145deg, #15293a, #0b141d);
}

.product-category {
    overflow: hidden;
    color: #ffad66;
    font-size: calc(.66rem * var(--card-scale));
    font-weight: 800;
    letter-spacing: .1em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.product-title {
    display: -webkit-box;
    margin: 0;
    min-height: 2.6em;
    overflow: hidden;
    color: #fff;
    font-size: calc(.98rem * var(--card-scale));
    font-weight: 800;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-card-footer {
    display: flex;
    flex: 0 0 auto;
    align-items: end;
    justify-content: space-between;
    gap: calc(.7rem * var(--card-scale));
    min-height: calc(3.1rem * var(--card-scale));
    padding: calc(.4rem * var(--card-scale)) calc(.72rem * var(--card-scale)) calc(.75rem * var(--card-scale)) calc(.95rem * var(--card-scale));
    background: linear-gradient(145deg, #15293a, #0b141d);
    color: rgba(255,255,255,.57);
    font-size: calc(.73rem * var(--card-scale));
    font-weight: 700;
}

.product-card-view {
    display: inline-flex;
    gap: .38rem;
    align-items: center;
    min-width: 0;
}

.product-card-actions {
    display: inline-flex;
    flex: 0 0 auto;
    gap: calc(.25rem * var(--card-scale));
    align-items: center;
}

.product-price {
    flex: 0 0 auto;
    color: #00c853;
    font-size: calc(1rem * var(--card-scale));
    font-weight: 700;
    line-height: 1.2;
}

/* The basket has a 44px touch target, with no visual circle around the icon. */
.add-to-basket,
.product-card-configure {
    display: inline-grid;
    position: static;
    width: calc(2.75rem * var(--card-scale));
    height: calc(2.75rem * var(--card-scale));
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--o3d-accent);
    cursor: pointer;
    font-size: calc(1.42rem * var(--card-scale));
    text-decoration: none;
    line-height: 1;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), color 0.35s ease, filter 0.35s ease;
}

.product-card-wrapper:hover .add-to-basket,
.product-card-wrapper:hover .product-card-configure { transform: scale(1.1); }
.add-to-basket:hover,
.product-card-configure:hover { color: var(--o3d-accent-soft); filter: drop-shadow(0 0 10px rgba(255,136,0,0.5)); transform: scale(1.2); }

/* ===============================
   Performance Guard
   =============================== */

.product-card,
.product-image,
.add-to-basket,
.product-card-configure {
    will-change: transform, filter;
}

/* ===============================
   Responsive
   =============================== */

@media (max-width: 992px) {
    .products-page-container {
        flex-direction: column;
    }

}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Products listing polish: retains the existing dark glass / orange accent style. */
.products-page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 0;
}

.products-page-eyebrow { margin: 0 0 .35rem; color: var(--o3d-accent); font-size: .72rem; font-weight: 800; letter-spacing: .16em; }
.products-page-heading h1 { margin: 0; color: #fff; font-size: clamp(1.9rem, 3vw, 2.65rem); font-weight: 750; letter-spacing: -.03em; }
.products-page-summary { margin: .35rem 0 0; color: rgba(255,255,255,.65); }
.products-page-meta { display: flex; align-items: center; gap: 1rem; color: rgba(255,255,255,.55); font-size: .9rem; white-space: nowrap; }

.products-clear-filter {
    display: inline-flex; align-items: center; justify-content: center; min-height: 2.35rem; padding: .45rem .85rem;
    border: 1px solid rgba(255,149,0,.42); border-radius: .55rem; color: #ffb45c; font-weight: 700; text-decoration: none;
}
.products-clear-filter:hover { background: rgba(255,149,0,.12); color: #fff; }

.products-page-container { max-width: 1600px; margin: 0 auto; padding: 1.5rem; gap: 1.5rem; }
.categories-sidebar { align-self: start; width: 240px; padding: .8rem; border: 1px solid rgba(255,255,255,.08); border-radius: .85rem; background: rgba(0,0,0,.18); }
.categories-sidebar-title { margin: .25rem .75rem .55rem; color: rgba(255,255,255,.48); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.category-button { border-radius: .45rem; }

.add-to-basket:focus-visible,
.product-card-configure:focus-visible,
.product-link:focus-visible { outline: 3px solid var(--o3d-accent); outline-offset: 4px; }

.products-empty-state { grid-column: 1 / -1; padding: 4rem 1.5rem; border: 1px dashed rgba(255,149,0,.38); border-radius: 1rem; text-align: center; color: rgba(255,255,255,.68); }
.products-empty-state i { color: var(--o3d-accent); font-size: 2rem; }
.products-empty-state h2 { margin: .8rem 0 .35rem; color: #fff; font-size: 1.35rem; }
.products-empty-state .products-clear-filter { margin-top: .75rem; }

@media (max-width: 992px) {
    .products-page-heading { align-items: start; }
    .categories-sidebar { width: 100%; }
    .categories-sidebar > ul { display: flex; gap: .25rem; overflow-x: auto; padding-bottom: .25rem; }
    .categories-sidebar > ul > li { flex: 0 0 auto; }
    .categories-sidebar > ul > li::after, .sub-list { display: none; }
}

@media (max-width: 576px) {
    .products-page-heading { display: block; padding: 1rem 1rem 0; }
    .products-page-meta { margin-top: .8rem; }
    .products-page-container { padding: 1rem; }
    .products-grid { gap: 1rem; }
}

/* Category filter bar */
.products-category-bar {
    max-width: 1600px;
    margin: 1.35rem auto 0;
    padding: 0 1.5rem;
}

.products-category-bar-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    padding: .75rem 1rem;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: .9rem;
    background: linear-gradient(100deg, rgba(0,0,0,.26), rgba(255,111,0,.045));
}

.products-category-label {
    color: rgba(255,255,255,.5);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.products-category-links,
.products-subcategory-links {
    display: flex;
    align-items: center;
    gap: .45rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.products-category-links { flex: 1 1 auto; }
.products-subcategory-links { width: 100%; padding-top: .6rem; border-top: 1px solid rgba(255,255,255,.07); }

.products-category-pill,
.products-subcategory-pill {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 2.2rem;
    padding: .4rem .85rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: rgba(255,255,255,.72);
    font-size: .88rem;
    font-weight: 650;
    text-decoration: none;
}

.products-category-pill:hover,
.products-subcategory-pill:hover { border-color: rgba(255,149,0,.4); color: #fff; }

.products-category-pill.is-active {
    border-color: rgba(255,111,0,.65);
    background: rgba(255,111,0,.16);
    box-shadow: 0 0 18px rgba(255,111,0,.1) inset;
    color: #ffbd7d;
}

.products-subcategory-pill { min-height: 1.9rem; padding: .3rem .65rem; font-size: .8rem; }
.products-subcategory-pill.is-active { background: rgba(255,255,255,.09); color: #fff; }
.products-catalogue { display: block; }

@media (max-width: 576px) {
    .products-category-bar { margin-top: 1rem; padding: 0 1rem; }
    .products-category-bar-inner { align-items: flex-start; padding: .75rem; }
    .products-category-label { width: 100%; }
}

/* Vertical category selector */
.products-catalogue-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); align-items: start; }
.products-category-panel { position: sticky; top: calc(var(--navbar-height) + 1rem); padding: 1rem; border: 1px solid rgba(255,255,255,.09); border-radius: 1rem; background: linear-gradient(160deg, rgba(28,28,28,.94), rgba(13,13,13,.94)); box-shadow: 0 18px 42px rgba(0,0,0,.18); }
.products-category-panel-header { padding: .2rem .35rem .9rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.products-category-panel-kicker { display: block; color: rgba(255,255,255,.42); font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.products-category-panel h2 { margin: .25rem 0 0; color: #fff; font-size: 1.1rem; font-weight: 750; }
.products-category-list { display: grid; gap: .2rem; padding-top: .75rem; }
.products-category-option { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 2.75rem; padding: .65rem .7rem; border: 1px solid transparent; border-radius: .55rem; color: rgba(255,255,255,.78); font-size: .92rem; font-weight: 650; text-decoration: none; }
.products-category-option i { color: rgba(255,149,0,.8); font-size: .72rem; }
.products-category-option:hover { border-color: rgba(255,149,0,.28); background: rgba(255,149,0,.08); color: #fff; }
.products-category-option.is-active { border-color: rgba(255,111,0,.36); background: linear-gradient(90deg, rgba(255,111,0,.19), rgba(255,111,0,.05)); box-shadow: inset 3px 0 0 #ff6f00; color: #ffbf82; }
.products-subcategory-list { display: grid; gap: .1rem; margin: .15rem 0 .45rem 1rem; padding: .35rem 0 .35rem .8rem; border-left: 1px solid rgba(255,149,0,.28); }
.products-subcategory-option { padding: .35rem 0; color: rgba(255,255,255,.57); font-size: .82rem; font-weight: 600; text-decoration: none; }
.products-subcategory-option:hover, .products-subcategory-option.is-active { color: #ffb36b; }

@media (max-width: 992px) {
    .products-catalogue-layout { display: block; }
    .products-category-panel { position: static; margin-bottom: 1rem; }
    .products-category-list { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .products-subcategory-list { grid-column: 1 / -1; }
}

/* Match the cleaner, wider product presentation used for the home-page feature cards,
   while keeping the storefront's charcoal, orange and green palette. */
.products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.product-card { aspect-ratio: auto; background: #222; }
.product-link { flex: 0 0 auto; }
.product-image-wrapper {
    flex: 0 0 auto;
    aspect-ratio: 4 / 3;
    padding: clamp(.5rem, 1.35vw, .95rem);
    background:
        radial-gradient(circle at 50% 10%, rgba(255, 149, 0, .13), transparent 58%),
        linear-gradient(150deg, #172330, #0c1219);
}

/* Product photography must be shown in full.  `cover` made non-square source
   images look enlarged and cut important parts of the product off.  The common
   4:3 media stage keeps every catalogue card aligned while `contain` preserves
   the original image composition on desktop and mobile. */
.product-image {
    display: block;
    object-fit: contain;
    object-position: center;
    transform: translateZ(0);
    filter: drop-shadow(0 1rem 1.15rem rgba(0, 0, 0, .48));
}

.product-card-wrapper:hover .product-image {
    transform: translateZ(0);
    filter: drop-shadow(0 1.1rem 1.25rem rgba(0, 0, 0, .58)) brightness(1.035);
}
.product-details { flex: 0 0 auto; min-height: 5.65rem; padding: .95rem 1rem .4rem; }
.product-card-footer { min-height: 3.05rem; padding: .4rem .75rem .75rem 1rem; }

@media (max-width: 1199.98px) {
    .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .products-grid { grid-template-columns: 1fr; }
    .product-image-wrapper { aspect-ratio: 4 / 3; }
}

/* The catalogue keeps its own image motion and shimmer, while its lower panel
   follows the content hierarchy used by the home-page featured cards. */
.products-grid .product-title {
    color: #fff;
    font-family: inherit;
    font-size: .98rem;
    font-weight: 800;
    line-height: 1.3;
}

.products-grid .product-price {
    color: #00c853;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
}

/* One card presentation for the catalogue and product recommendations. */
:is(.products-catalogue-content, .pd-related-products-grid) .product-card-wrapper {
    min-width: 0;
    transform: none;
    transition: transform .22s ease;
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-card-wrapper:hover {
    transform: translateY(-.24rem);
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-card {
    height: 100%;
    aspect-ratio: auto;
    isolation: isolate;
    border-color: rgba(207, 225, 240, .14);
    border-radius: .98rem;
    background: linear-gradient(155deg, rgba(25, 37, 49, .99), rgba(12, 19, 26, .99));
    box-shadow: 0 .9rem 1.9rem rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .045);
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-card-wrapper:hover .product-card {
    box-shadow: 0 1.2rem 2.45rem rgba(0, 0, 0, .34), 0 0 0 1px rgba(255, 143, 52, .28), inset 0 1px rgba(255, 255, 255, .06);
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-card::after { display: none; }

:is(.products-catalogue-content, .pd-related-products-grid) .product-image-wrapper {
    flex: 0 0 auto;
    /* Most catalogue photography is square. A square media stage lets it
       carry the card without cropping the product or changing card-to-card
       dimensions when an image happens to be landscape or portrait. */
    aspect-ratio: 1;
    padding: 0;
    border-bottom-color: rgba(255, 255, 255, .08);
    background: radial-gradient(circle at 50% 8%, rgba(255, 149, 0, .11), transparent 58%), linear-gradient(150deg, #142433, #091119);
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transform: none;
    filter: drop-shadow(0 .85rem 1rem rgba(0, 0, 0, .44));
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-card-wrapper:hover .product-image {
    transform: none;
    filter: drop-shadow(0 .95rem 1.1rem rgba(0, 0, 0, .52)) brightness(1.035);
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-details {
    flex: 1 1 auto;
    min-height: 5.5rem;
    padding: .9rem .95rem .5rem;
    background: transparent;
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-category {
    color: var(--catalogue-accent-soft, #ffad66);
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-title {
    font-size: .98rem;
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-card-footer {
    min-height: 3.45rem;
    padding: .52rem .78rem .78rem .95rem;
    border-top: 1px solid rgba(208, 226, 240, .075);
    background: transparent;
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-card-view {
    color: rgba(229, 240, 249, .62);
    font-size: .7rem;
    text-decoration: none;
    transition: color .18s ease;
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-card-view:hover { color: #fff; }

:is(.products-catalogue-content, .pd-related-products-grid) .product-card-view:focus-visible,
:is(.products-catalogue-content, .pd-related-products-grid) .product-card-cta:focus-visible {
    outline: 2px solid rgba(255, 180, 104, .95);
    outline-offset: 3px;
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-card-actions {
    gap: .5rem;
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-price {
    color: #fff;
    font-size: 1.08rem;
    font-weight: 820;
    letter-spacing: -.025em;
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-card-cta {
    display: inline-flex;
    width: auto;
    min-width: 2.45rem;
    height: 2.35rem;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    padding: 0 .68rem;
    border: 1px solid rgba(255, 180, 104, .36);
    border-radius: .58rem;
    background: linear-gradient(135deg, #ff8b28, #f56d00);
    box-shadow: 0 .38rem .85rem rgba(244, 100, 0, .19), inset 0 1px rgba(255, 255, 255, .26);
    color: #17110b;
    font-size: .72rem;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-card-cta > i {
    font-size: .9rem;
}

/* Neutralise the old icon-only hover scale for this clearer labelled CTA. */
:is(.products-catalogue-content, .pd-related-products-grid) .product-card-wrapper:hover .product-card-cta {
    transform: none;
}

:is(.products-catalogue-content, .pd-related-products-grid) .product-card-wrapper:hover .product-card-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 .55rem 1.1rem rgba(244, 100, 0, .28), inset 0 1px rgba(255, 255, 255, .32);
    color: #17110b;
    filter: brightness(1.05);
}


/* Text overlay remains sharp at every size and never modifies the product photo. */
.product-stock-overlay { position:absolute; inset:auto 0 0; z-index:3; display:flex; align-items:center; justify-content:center; min-height:42px; padding:10px 14px; background:rgba(5,14,21,.9); color:#fff; font-size:14px; font-weight:700; line-height:1.3; letter-spacing:.04em; text-transform:uppercase; pointer-events:none; }

.offer-tag{position:relative;display:inline-block;width:110px;height:34px;vertical-align:middle;filter:drop-shadow(0 3px 4px #0005);font-family:system-ui,-apple-system,"Segoe UI",sans-serif}.offer-tag-outline{display:block;width:100%;height:100%}.offer-tag-copy{position:absolute;inset:0 8px 0 25px;display:flex;align-items:center;justify-content:center;gap:4px;color:#fff;font-size:15px;font-weight:800;line-height:1;letter-spacing:-.025em;white-space:nowrap}.offer-tag-off{color:#ff7900}.product-offer-badge{position:absolute;top:10px;left:10px;z-index:2;pointer-events:none}
.product-price-group{display:flex;flex-direction:column;gap:3px;line-height:1.2}.product-original-price{font-size:.8rem;font-weight:400;color:#aebdcb}.product-price-group .product-price{white-space:nowrap}.product-card-actions{flex-wrap:wrap;row-gap:8px}
