/* ─── Product scrolling strip (inside Products) ─────────────────────── */
#products #damage-wrapper {
    position: absolute;
    padding: 10px;
    left: 0;
    width: 100%;
    height: 380px;
    overflow: hidden;
    z-index: 0;
}


.scrolling-cards-container {
    height: 100%;
    overflow: hidden;
    position: absolute;
    width: 100%;
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

/* Override About.css absolute + translateY — inside products it flows normally */
#products .scrolling-cards-container {
    position: relative;
    transform: none;
    height: 100%;
}

#products .scrolling-wrapper {
    position: relative;
    overflow: hidden;
}

#products .scrolling-cards-inner {
    height: 100%;
}

#products .skill-card {
    height: 100%;
    max-width: 300px;
    aspect-ratio: 16 / 9;
}

#products .skill-card .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#products .skill-card .skill-card-header {
    flex: 0 0 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

#products .skill-card .product-preview-container {
    flex: 1;
    aspect-ratio: auto;
    width: 100%;
    height: auto;
}

#products .skill-card .product-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    -webkit-user-drag: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

.product-diagram-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    max-width: 280px;
    padding: 8px;
    overflow-y: auto;
    max-height: 560px;
}

.product-diagram-card {
    cursor: pointer;
    padding: 6px 8px;
    border-width: 8px;
    transition: filter 0.2s ease, transform 0.2s ease;
    min-width: 0;
}

.product-diagram-card:hover,
.product-diagram-card.active {
    filter: brightness(1.25);
    transform: scale(1.04);
}

.product-diagram-label {
    font-size: 0.65rem;
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
    font-weight: 600;
    padding: 2px 0;
}

/* ─── Products existing styles ──────────────────────────────────────── */

#diagram {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    height: auto;
    border-image-slice: 48 fill;
}

#diagram::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.diagram-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    padding: 2px;
    position: relative;
    text-align: center;
    z-index: 2;
    width: 100%;
}

.diagram-card-label {
    font-size: 0.85rem;
    font-weight: 500;
}

.diagram-grid-container {
    align-items: center;
    display: grid;
    grid-auto-rows: min-content;
    grid-template-columns: 1fr;
    justify-items: center;
    max-width: 250px;
    position: relative;
    z-index: 2;
    gap: 0;
}

.diagram-grid-container>* {
    grid-column: 1;
}


.lead {
    margin: 0;
    margin: 0;
}


#productsFeatureTitle {
    text-wrap-mode: nowrap;
    font-size: 1.6rem;
}

#products-content-layer {
    width: 90%;
    display: flex;
    justify-content: space-between;
    flex-grow: 1;
}

#products-right-column {
    max-width: 80%;
    height: fit-content;
    align-self: flex-end;
}

#products-wrapper {
    position: relative;
    width: 100%;
}

.products-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

#products .products-section .products-content-column {
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

#products .products-section .products-content-wrapper {
    flex-grow: 1;
    min-height: 0;
}

.products-subtitle {
    display: block;
    font-size: 0.9rem;
}

.products-text {
    font-size: 1.6rem;
    line-height: 1.1;
}

.products-text .lead b,
.products-text b {
    font-weight: 900;
}

#diagram {
    border-width: 15px;
    padding: 0;
    max-width: fit-content;
}

.product-nav-btn {
    display: none;
    /* Hidden on desktop */
}


@media (max-width: 1300px) {
    #products-content-layer {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 992px) {

    .scrolling-cards-container {
        height: 100%;
        overflow: hidden;
        position: absolute;
        width: 100%;
    }


    #products #damage-wrapper {
        padding-top: 80px;
    }

    #productsFeatureTitle {
        font-size: 1.2rem;
    }

    #products-right-column {
        align-self: center;
    }

    #products-content-layer {
        flex-direction: column;
        align-items: center;
    }

    #diagram {
        max-width: 100%;
        margin-bottom: 260px;
    }

    .product-nav-container {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 80vw;
        margin: 0 auto;
    }

    .product-nav-btn {
        display: flex;
        background: transparent;
        border: none;
        color: inherit;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 5px 10px;
        z-index: 10;
    }

    .product-diagram-grid {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
        max-width: 100%;
    }

    .product-diagram-card {
        width: auto;
        min-width: 0;
        padding: 5px 12px;
        margin-bottom: 0;
    }

    .product-diagram-card:not(.active) {
        display: none !important;
    }
}

@media (max-width: 576px) {


    .diagram-card {
        padding: 0;
    }

    #products-wrapper {
        flex-direction: column;
        align-items: center;
        max-height: none;
    }

    .products-text {
        font-size: 1rem;
    }

    .products-content-wrapper {
        width: 100%;
        min-height: 0;
        padding: 0;
    }

    .products-section {
        justify-content: center;
    }
}