/* Hide default dropdown */
.adv-var-cards-active .variations{
    display:none!important;
}

/* ================================
   GRID WRAPPER
================================ */
.adv-var-wrapper{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:18px;
    align-items:stretch;
}

/* ================================
   CARD
================================ */
.adv-var-card{
    border:2px solid #636385;
    border-radius:14px;
    overflow:hidden;
    cursor:pointer;
    transition:.25s ease;
    display:flex;
    flex-direction:column;
    height:100%;
    background:#fff; /* keep card clean */
}

/* ================================
   CONTENT SECTION
================================ */
.adv-var-content{
    display:flex;
    justify-content:space-between;
    padding:14px;
    gap:10px;
    flex:1;
}

/* LEFT SIDE */
.adv-var-left{
    flex:1;
    display:flex;
    flex-direction:column;
}

/* ROW 1 */
.adv-var-name{
    font-weight:600;
    line-height:1.3;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

/* ROW 2 */
.adv-var-meta{
    font-size:10px;
    line-height:1.3;
    margin-top:4px;
    color:#ff0000;
}

/* ================================
   IMAGE (FULL TRANSPARENT SAFE)
================================ */
.adv-var-image{
    width:18%;
    display:flex;
    align-items:center;
    justify-content:center;
    padding-top:10px;
    background:none !important;
}

.adv-var-image img{
    display:block;
    width:100%;
    height:auto;
    object-fit:contain;

    background:none !important;
    background-color:transparent !important;
    box-shadow:none !important;
    border:none !important;
}

/* WooCommerce / Theme override safety */
.adv-var-card img{
    background:none !important;
}

/* ================================
   PRICE STRIP
================================ */
.adv-var-price{
    padding:10px 14px;
    border-top:1px solid #e5e5e5;
    background:#f3f3f3;
    display:flex;
    align-items:center;
    gap:8px;
    margin-top:auto;
}

.adv-var-price ins{
    order:1;
    text-decoration:none;
    font-weight:700;
}
.adv-var-price del{
    order:2;
    opacity:.6;
}

/* ACTIVE */
.adv-var-card.active{
    border-color:#2f6df6;
    box-shadow:0 4px 14px rgba(47,109,246,.35);
    position:relative;
}

.adv-var-card.active .adv-var-price{
    background:#2f6df6;
}
.adv-var-card.active .woocommerce-Price-amount{
    color:#fff!important;
}

/* SELECTED CHECK MARK */
.adv-var-card.active::after{
    content:"✔";
    position:absolute;
    top:2px;
    right:2px;
    width:20px;
    height:20px;
    background:#2f6df6;
    color:#ffffff;
    font-size:12px;
    font-weight:700;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 4px 10px rgba(0,0,0,.25);
    z-index:10;
}

/* OUT OF STOCK */
.adv-var-card.out-of-stock{
    opacity:.2;
    pointer-events:none;
}

/* ================================
   DESKTOP
================================ */
@media(min-width:1025px){

    .adv-var-name{ 
        font-size:18px; 
    }

    .adv-var-price{ 
        font-size:16px; 
    }

    .adv-var-image{
        width:22%;
    }

    .adv-var-image img{
        width:70px;
        height:70px;
    }
}

/* ================================
   TABLET
================================ */
@media(max-width:1024px){
    .adv-var-wrapper{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .adv-var-name{ 
        font-size:16px; 
    }
}

/* ================================
   MOBILE
================================ */
@media(max-width:600px){

    .adv-var-wrapper{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:10px;
    }

    .adv-var-name{
        font-size:15px;
    }

    .adv-var-price{
        font-size:15px;
        padding:8px 10px;
    }

    .adv-var-image img{
        width:40px;
        height:40px;
    }

    .adv-var-card.active::after{
        width:20px;
        height:20px;
        font-size:10px;
        top:2px;
        right:2px;
    }
}

/* =========================================
   VARIATION ATTRIBUTE TITLE BOX
========================================= */

.adv-var-attribute-title{
    display:flex;
    align-items:center;
    background:#eeeeee;
    padding:14px 18px;
    border-radius:10px;
    margin-bottom:18px;
    font-weight:600;
    position:relative;
    font-size:18px;
    color:#000;
}

.adv-var-attribute-title::before{
    content:"1";
    width:28px;
    height:28px;
    background:#4c4cff;
    color:#ffffff;
    font-size:14px;
    font-weight:600;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-right:12px;
    flex-shrink:0;
}

@media(max-width:600px){
    .adv-var-attribute-title{
        font-size:16px;
        padding:12px 14px;
    }

    .adv-var-attribute-title::before{
        width:24px;
        height:24px;
        font-size:12px;
    }
}
