﻿/* =====================================
   CASE SELECTOR (merged with legacy CSS)
   ===================================== */

.case-selector {
    font: normal 15px "Segoe UI", Arial, sans-serif;
    width: 100%;
    box-sizing: border-box;
    min-height: 625px;
}

    /* ---- Header / Title ---- */
    .case-selector .selector-title {
        padding: 5px;
        font-size: 2rem;
        font-weight: 700;
    }

    .case-selector .selector-label {
        font-size: .9em;
    }

    /* ---- Items Layout ---- */
    .case-selector .selector-items {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
    }


        .case-selector .selector-items .item-wrapper {
            flex: 1 1 calc(25% - 10px); /* 4 per row */
            box-sizing: border-box;
        }

/* Tablet */
@media (max-width: 800px) {
    .case-selector .selector-items .item-wrapper {
        flex: 1 1 calc(50% - 10px); /* 2 per row */
    }
}

/* Mobile */
@media (max-width: 600px) {
    .case-selector .selector-items .item-wrapper {
        flex: 1 1 100%; /* 1 per row */
    }
}

        /* ---- Individual Item Wrapper ---- */
        .case-selector .selector-items .item-wrapper {
            width: 14em;
            height: 21em;
            border: 1px solid #cdcdcd;
            border-radius: 5px;
            overflow: hidden;
            display: flex;
            align-items: stretch;
            justify-content: center;
            background: #fff;
            box-sizing: border-box;
            position: relative;
            transition: border-color .2s, background-color .2s, box-shadow .2s;
        }

            .case-selector .selector-items .item-wrapper:hover {
                cursor: pointer;
                border-color: #00477a;
                background-color: rgba(222,226,230,.5);
                box-shadow: 0 2px 6px rgba(0,0,0,.2);
            }

            .case-selector .selector-items .item-wrapper.selected {
                border-color: #00477a;
                background-color: rgba(5,78,147,.08);
            }

        /* ---- Inner Item ---- */
        .case-selector .selector-items .item {
            padding: 0;
            position: relative;
            height: 100%;
            width: 100%;
            text-align: center;           
            transition: border-color .3s, background-color .3s, box-shadow .3s;
        }

        /* ---- Product Image ---- */
        .case-selector .selector-items .productasset {
            height: 210px;
            width: 100%;
            overflow: hidden;
            position: relative;
            top: 50%;
            transform: translateY(-50%);
            z-index: 0;
        }

            .case-selector .selector-items .productasset img {
                margin-top: 7px;
                max-width: 100%;
                max-height: 100%;
                object-fit: contain;
                display: block;
                margin-left: auto;
                margin-right: auto;
                transition: transform .3s ease;
                width: 12em;
                height: 12em;
            }

        .case-selector .selector-items .item-wrapper:hover .productasset img {
            transform: scale(1.04);
        }

        /* ---- Info Panel (Blue Overlay) ---- */
        .case-selector .selector-items .info {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 70px; /* collapsed height */
            background-color: rgba(5,78,147,.6);
            color: #fff;
            font-size: .85rem;
            text-align: left;
            padding: 4px 6px 6px 6px;
            box-sizing: border-box;
            z-index: 1;
            overflow: hidden;
            transition: border-color .4s, background-color .4s, box-shadow .4s;
         }

        /* Expand the blue overlay on hover so attributes have room */
        .case-selector .selector-items .item-wrapper:hover .info {
            top: 0;
            bottom: auto; /* stop pinning to bottom */
            height: 100%; /* cover the whole tile */
            background-color: rgba(5,78,147,.85);
        }

        /* Info Text Elements */
        .case-selector .selector-items .info .style {
            font-weight: normal;
            font-size: 16px;
            margin: 2px 0 0 0;
            text-align: center;
        }

        .case-selector .selector-items .info .desc {
            margin: 3px 4px 0 2px;
            white-space: normal;
            font-size: 12px;
            line-height: 1.2;
            text-align: center;
        }

        /* ---- Attributes (2-column, side-by-side name | value) ---- */
        .case-selector .selector-items .info .attributes {
            display: flex;
            flex-wrap: wrap;
            visibility: hidden;
            opacity: 0;
            width: 95%;
            margin: auto auto;
            margin-top: 10px;            
            transition: visibility 0.3s linear,opacity 0.3s linear;
        }

            .case-selector .selector-items .info .attributes .name,
            .case-selector .selector-items .info .attributes .value {
                float: none !important;
                display: inline-block;
                vertical-align: top;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                font-size: 11px;
                /*line-height: 1.4;*/
            }

            .case-selector .selector-items .info .attributes .name {
                width: 57% !important;
                text-align: left !important;
                padding-left: 3px;
            }

            .case-selector .selector-items .info .attributes .value {
                /*width: 35% !important;*/
                text-align: right !important;
                padding-right: 3px;
                font-weight: 600;
            }

        .case-selector .selector-items .item-wrapper:hover .info .attributes,
        .case-selector .selector-items .item-wrapper.selected .info .attributes {
            visibility: visible;
            opacity: 1;
            transition: border-color .4s, background-color .4s, box-shadow .4s;
         }

        /* ---- Price (bottom-right corner) ---- */
        .case-selector .selector-items .info .price {
            position: absolute;
            bottom: 0px;
            right: 0px;
            margin: 0px 5px 5px 0px;
            font-weight: 600;
        }

        /* ---- Selected Item (Expanded Overlay) ---- */
        .case-selector .selector-items .item.selected .info {
            top: 0;
            height: 100%;
            cursor: default;
            background-color: rgba(5,78,147,.75);
        }

        /* ---- Scroll Wrapper (OverlayScrollbars compatibility) ---- */
        .case-selector .selector-items div[data-overlayscrollbars-viewport] {
            flex-direction: row !important;
            display: flex !important;
            flex-wrap: wrap !important;
            justify-content: center !important;
            gap: 10px !important;
            align-content: start !important;
        }

    /* ---- Optional Smaller Control Adjustments ---- */
    .case-selector[data-ctrl='FS'] .selector-items .productasset {
        width: 10em;
        height: 7em;
    }
