/* Product Categories — homepage grid + products pages */

.product-categories {
    --pc-red: #e10600;
    --pc-red-dark: #c00500;
    --pc-green: #48720c;
    --pc-ink: #111111;
    --pc-muted: #6b7280;
    --pc-tile: #ececec;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, #ffffff 0%, #fafafa 50%, #ffffff 100%);
}

.product-categories__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(600px 280px at 12% 18%, rgba(72, 114, 12, 0.06) 0%, transparent 70%),
        radial-gradient(520px 260px at 88% 22%, rgba(225, 6, 0, 0.04) 0%, transparent 72%),
        linear-gradient(135deg, transparent 48%, rgba(0, 0, 0, 0.015) 49%, transparent 51%);
}

.product-categories__header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 2.5rem;
}

.product-categories__title {
    margin: 0;
    font-size: clamp(1.75rem, 3.2vw, 2.75rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pc-green);
    line-height: 1.15;
}

.product-categories__title-accent {
    color: var(--pc-red);
}

.product-categories__description {
    margin: 0.85rem auto 0;
    max-width: 40rem;
    color: var(--pc-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.product-categories__grid {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.75rem 1.1rem;
}

.product-categories__grid > .product-categories__card {
    flex: 0 0 calc((100% - 5 * 1.1rem) / 6);
    max-width: none;
    width: auto;
}

.product-categories__grid--page > .product-categories__card {
    flex: 0 0 calc((100% - 3 * 1.1rem) / 4);
}

.product-categories__card {
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.35s ease;
}

.product-categories__card:hover,
.product-categories__card:focus-visible,
.product-categories__card.is-active {
    transform: translateY(-6px);
    outline: none;
}

.product-categories__card--button {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.product-categories__card.is-active .product-categories__media {
    box-shadow: 0 12px 28px rgba(225, 6, 0, 0.14);
}

.product-categories__card.is-active .product-categories__label {
    background: var(--pc-red);
    color: #fff;
}

.product-categories__media {
    aspect-ratio: 1;
    width: 100%;
    border-radius: 0.85rem;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    transition: box-shadow 0.35s ease;
}

.product-categories__card:hover .product-categories__media,
.product-categories__card:focus-visible .product-categories__media {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.product-categories__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.product-categories__card:hover .product-categories__media img,
.product-categories__card:focus-visible .product-categories__media img {
    transform: scale(1.05);
}

.product-categories__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: #9ca3af;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.product-categories__label {
    margin-top: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.45rem 0.9rem;
    border: 1.5px solid var(--pc-red);
    border-radius: 0.35rem;
    color: var(--pc-red);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
    background: #fff;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.product-categories__card:nth-child(even) .product-categories__label {
    border-color: var(--pc-green);
    color: var(--pc-green);
}

.product-categories__card:hover .product-categories__label,
.product-categories__card:focus-visible .product-categories__label {
    background: var(--pc-red);
    border-color: var(--pc-red);
    color: #fff;
}

.product-categories__card:nth-child(even):hover .product-categories__label,
.product-categories__card:nth-child(even):focus-visible .product-categories__label,
.product-categories__card:nth-child(even).is-active .product-categories__label {
    background: var(--pc-green);
    border-color: var(--pc-green);
    color: #fff;
}

.product-categories__card:hover .product-categories__media,
.product-categories__card:focus-visible .product-categories__media {
    box-shadow: 0 12px 28px rgba(225, 6, 0, 0.16);
}

.product-categories__card:nth-child(even):hover .product-categories__media,
.product-categories__card:nth-child(even):focus-visible .product-categories__media {
    box-shadow: 0 12px 28px rgba(72, 114, 12, 0.18);
}

.product-categories__specializations {
    position: relative;
    z-index: 1;
    margin-top: 2.75rem;
    text-align: center;
    font-size: 0.98rem;
    line-height: 1.5;
    color: var(--pc-ink);
}

.product-categories__specializations-label {
    color: var(--pc-red);
    font-weight: 700;
}

.product-categories__specializations-text {
    color: var(--pc-green);
    font-weight: 600;
}

.product-categories__header::after {
    content: '';
    display: block;
    width: 96px;
    height: 4px;
    margin: 1.1rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pc-green), var(--pc-red));
}

.product-categories__empty {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--pc-muted);
    padding: 2rem 1rem;
}

.product-categories__expand {
    position: relative;
    z-index: 1;
    margin-top: 2.5rem;
    padding: 1.75rem 1.25rem 1.5rem;
    border: 1px solid rgba(225, 6, 0, 0.18);
    border-radius: 1rem;
    background: linear-gradient(180deg, #fff 0%, #f7f7f7 100%);
    animation: pc-expand-in 0.35s ease;
}

.product-categories__expand-header {
    text-align: center;
    margin-bottom: 1.35rem;
}

.product-categories__expand-title {
    margin: 0;
    color: var(--pc-red);
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.product-categories__expand-description {
    margin: 0.65rem auto 0;
    max-width: 42rem;
    color: var(--pc-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.product-categories__expand-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.product-categories__expand-item {
    margin: 0;
    aspect-ratio: 1;
    border-radius: 0.85rem;
    background: var(--pc-tile);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem;
    overflow: hidden;
}

.product-categories__expand-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-categories__expand-empty {
    margin: 0;
    text-align: center;
    color: var(--pc-muted);
    font-size: 0.95rem;
}

@keyframes pc-expand-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Detail page */
.product-details {
    --pc-red: #e10600;
    --pc-ink: #111111;
    --pc-muted: #6b7280;
    --pc-tile: #ececec;
}

.product-details__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
    align-items: center;
}

.product-details__gallery {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.product-details__media {
    aspect-ratio: 1;
    border-radius: 1rem;
    background: var(--pc-tile);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.product-details__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-details__thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 0.6rem;
}

.product-details__thumb {
    aspect-ratio: 1;
    border: 1.5px solid transparent;
    border-radius: 0.55rem;
    background: var(--pc-tile);
    padding: 0.35rem;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-details__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-details__thumb:hover,
.product-details__thumb:focus-visible {
    border-color: rgba(225, 6, 0, 0.45);
    outline: none;
    transform: translateY(-1px);
}

.product-details__thumb.is-active {
    border-color: var(--pc-red);
}

.product-details__eyebrow {
    display: inline-block;
    margin-bottom: 0.75rem;
    color: var(--pc-red);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-details__title {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--pc-ink);
    line-height: 1.15;
}

.product-details__description {
    margin: 1.25rem 0 0;
    color: var(--pc-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.product-details__cta {
    margin-top: 1.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.4rem;
    background: var(--pc-red);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.35rem;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.product-details__cta:hover,
.product-details__cta:focus-visible {
    background: var(--pc-red-dark, #c00500);
    color: #fff;
    transform: translateY(-2px);
}

.product-details__related {
    margin-top: 4rem;
}

.product-details__related-title {
    margin: 0 0 1.5rem;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 1199.98px) {
    .product-categories__grid > .product-categories__card {
        flex: 0 0 calc((100% - 3 * 1.1rem) / 4);
    }

    .product-categories__grid--page > .product-categories__card {
        flex: 0 0 calc((100% - 2 * 1.1rem) / 3);
    }

    .product-categories__expand-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .product-categories__grid,
    .product-categories__grid--page {
        gap: 1.5rem 1rem;
    }

    .product-categories__grid > .product-categories__card,
    .product-categories__grid--page > .product-categories__card {
        flex: 0 0 calc((100% - 2 * 1rem) / 3);
    }

    .product-details__layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 767.98px) {
    .product-categories__grid > .product-categories__card,
    .product-categories__grid--page > .product-categories__card {
        flex: 0 0 calc((100% - 1rem) / 2);
    }

    .product-categories__expand-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-categories__label {
        font-size: 0.65rem;
        min-height: 2.1rem;
        padding: 0.4rem 0.55rem;
    }
}

@media (max-width: 479.98px) {
    .product-categories__grid,
    .product-categories__grid--page {
        gap: 1.15rem 0.75rem;
    }

    .product-categories__grid > .product-categories__card,
    .product-categories__grid--page > .product-categories__card {
        flex: 0 0 calc((100% - 0.75rem) / 2);
    }

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

/* ==========================================================================
   Products page — catalog browser
   ========================================================================== */

.products-page {
    --pp-red: #e10600;
    --pp-red-dark: #b90400;
    --pp-green: #48720c;
    --pp-ink: #111111;
    --pp-muted: #64748b;
    --pp-tile: #f3f4f6;
    --pp-line: #e8e8e8;
    position: relative;
    overflow: hidden;
    background: #fff;
}

.products-page__decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(700px 280px at 8% 0%, rgba(225, 6, 0, 0.05) 0%, transparent 70%),
        radial-gradient(560px 240px at 96% 28%, rgba(72, 114, 12, 0.04) 0%, transparent 70%);
}

.products-page__header {
    position: relative;
    z-index: 1;
    margin-bottom: 2.5rem;
}

.products-page__lead {
    max-width: 640px;
    color: var(--pp-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.products-page__browser {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.5rem;
}

.products-page__parents {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
}

.products-page__parent {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
    flex: 0 1 220px;
    width: min(100%, 220px);
    margin: 0;
    padding: 0.65rem;
    border: 1px solid var(--pp-line);
    border-radius: 1rem;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease,
        background-color 0.2s ease;
}

.products-page__parent:hover,
.products-page__parent:focus-visible {
    border-color: rgba(225, 6, 0, 0.28);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    outline: none;
    transform: translateY(-2px);
}

.products-page__parent.is-active {
    border-color: var(--pp-red);
    background: linear-gradient(180deg, #fff 0%, #fff5f5 100%);
    box-shadow: 0 14px 32px rgba(225, 6, 0, 0.12);
}

.products-page__parent-media {
    width: 72px;
    height: 72px;
    border-radius: 0.8rem;
    overflow: hidden;
    background: var(--pp-tile);
}

.products-page__parent-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.products-page__parent-fallback {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
}

.products-page__parent-meta {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.products-page__parent-name {
    color: var(--pp-ink);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.25;
}

.products-page__parent-count {
    color: var(--pp-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.products-page__subs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid var(--pp-line);
    border-radius: 999px;
    background: #fafafa;
}

.products-page__sub {
    margin: 0;
    padding: 0.55rem 1rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--pp-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.products-page__sub:hover,
.products-page__sub:focus-visible {
    color: var(--pp-ink);
    background: #fff;
    border-color: var(--pp-line);
    outline: none;
}

.products-page__sub.is-active {
    color: #fff;
    background: var(--pp-red);
    border-color: var(--pp-red);
}

.products-page__stage {
    min-width: 0;
    padding: 1.5rem;
    border: 1px solid var(--pp-line);
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
    animation: products-stage-in 0.35s ease;
}

.products-page__stage-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid #f0f0f0;
}

.products-page__stage-kicker {
    margin: 0 0 0.35rem;
    color: var(--pp-red);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.products-page__stage-title {
    margin: 0;
    color: var(--pp-ink);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.15;
}

.products-page__stage-copy {
    margin: 0.7rem 0 0;
    max-width: 36rem;
    color: var(--pp-muted);
    font-size: 0.98rem;
    line-height: 1.65;
}

.products-page__stage-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.25rem;
    border-radius: 0.45rem;
    background: var(--pp-red);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.products-page__stage-cta:hover,
.products-page__stage-cta:focus-visible {
    background: var(--pp-red-dark);
    color: #fff;
    transform: translateY(-1px);
}

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

.products-page__gallery-item {
    aspect-ratio: 1;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0.9rem;
    background: transparent;
    cursor: zoom-in;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.products-page__gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
}

.products-page__gallery-item:hover,
.products-page__gallery-item:focus-visible {
    outline: none;
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

.products-page__gallery-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 1.25rem;
    border-radius: 0.9rem;
    background: var(--pp-tile);
    color: var(--pp-muted);
    font-size: 0.95rem;
    text-align: center;
}

.products-page__specializations {
    position: relative;
    z-index: 1;
    margin: 2.75rem 0 0;
    text-align: center;
    color: var(--pp-ink);
    font-size: 0.98rem;
}

.products-page__specializations-label {
    color: var(--pp-red);
    font-weight: 700;
}

.products-page__empty {
    position: relative;
    z-index: 1;
    color: var(--pp-muted);
    padding: 2rem 1rem;
}

.products-page__lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(10, 10, 10, 0.82);
    backdrop-filter: blur(4px);
}

.products-page__lightbox-image {
    max-width: min(960px, 100%);
    max-height: 88vh;
    object-fit: contain;
    border-radius: 0.5rem;
    background: #fff;
    padding: 1rem;
}

.products-page__lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

@keyframes products-stage-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    .products-page {
        padding-top: 3rem !important;
        padding-bottom: 4rem !important;
    }

    .products-page__header {
        margin-bottom: 1.75rem;
    }

    .products-page__parents {
        gap: 0.7rem;
    }

    .products-page__parent {
        flex-basis: calc(50% - 0.35rem);
        width: calc(50% - 0.35rem);
        max-width: none;
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 0.65rem;
        padding: 0.5rem;
        border-radius: 0.85rem;
    }

    .products-page__parent-media {
        width: 58px;
        height: 58px;
        border-radius: 0.65rem;
    }

    .products-page__parent-name {
        font-size: 0.78rem;
    }

    .products-page__parent-count {
        font-size: 0.7rem;
    }

    .products-page__subs {
        border-radius: 1rem;
        padding: 0.65rem;
    }

    .products-page__sub {
        font-size: 0.72rem;
        padding: 0.45rem 0.8rem;
    }

    .products-page__stage {
        padding: 1.1rem;
        border-radius: 1rem;
    }

    .products-page__gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .products-page__specializations {
        margin-top: 1.75rem;
        font-size: 0.84rem;
        line-height: 1.5;
    }

    .products-page__lightbox {
        padding: 1rem;
    }

    .products-page__lightbox-image {
        max-height: 80vh;
    }
}

@media (max-width: 575.98px) {
    .products-page__parent {
        flex-basis: 100%;
        width: 100%;
    }

    .products-page__stage-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .products-page__stage-cta {
        width: 100%;
    }
}

/* Category gallery sliders (homepage rows) */
.product-category-gallery {
    --pcg-red: #e10600;
    --pcg-ink: #111111;
    --pcg-muted: #6b7280;
    background: #fff;
}

.product-category-gallery__row {
    margin-bottom: 2.75rem;
}

.product-category-gallery__row:last-child {
    margin-bottom: 0;
}

.product-category-gallery__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.product-category-gallery__name {
    margin: 0;
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--pcg-ink);
}

.product-category-gallery__slider {
    overflow: hidden;
    padding-bottom: 4px;
}

.product-category-gallery__slider .swiper-wrapper {
    transition-timing-function: linear !important;
    align-items: stretch;
}

.product-category-gallery__slider .swiper-slide {
    width: 260px !important;
    height: auto;
    margin-right: 28px !important;
    box-sizing: border-box;
}

.product-category-gallery__card {
    margin: 0;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 220px;
    border-radius: 18px;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.product-category-gallery__card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.55s ease;
}

.product-category-gallery__card:hover img {
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .product-category-gallery__slider .swiper-slide {
        width: 320px !important;
        margin-right: 32px !important;
    }

    .product-category-gallery__card {
        min-height: 280px;
    }
}

@media (min-width: 1200px) {
    .product-category-gallery__slider .swiper-slide {
        width: 380px !important;
        margin-right: 36px !important;
    }

    .product-category-gallery__card {
        min-height: 320px;
    }
}

@media (max-width: 575px) {
    .product-category-gallery__slider .swiper-slide {
        width: 78vw !important;
        max-width: 300px;
        margin-right: 20px !important;
    }

    .product-category-gallery__card {
        min-height: 200px;
    }
}
