/* Amazon Variations Styles */
.amazon-variations-wrapper {
    margin: -15px 0 20px 0;
    clear: both;
}

/* Hide default variation dropdowns */
.variations_form .variations {
    display: none !important;
}

/* Hide duplicate prices */
.woocommerce-variation-price,
.woocommerce-variation-price .price {
    display: none !important;
}

/* Attribute Header */
.av-attribute-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.av-attribute-label {
    font-weight: 700;
    font-size: 15px;
}

.av-selected-value {
    color: #0073e6;
    font-weight: 600;
    font-size: 14px;
}

/* =========================================================== */
/* SCENARIO 1 & 3 - SIZE BOX IMPROVEMENTS - LARGER SIZE */
/* =========================================================== */

.av-size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px; /* ✅ INCREASED: Gap between boxes */
    margin-bottom: 5px;
}

.av-size-option {
    width: 115px; /* ✅ INCREASED: Width */
    height: 85px; /* ✅ INCREASED: Height */
    border: 1px solid #d8e0ef;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

.av-size-option:hover {
    border-color: #0073e6;
}

.av-size-option.active {
    border: 2px solid #0073e6;
    box-shadow: 0 4px 12px rgba(0, 115, 230, 0.2);
}

.av-size-top {
    background: #f2f8ff;
    height: 28px; /* ✅ INCREASED: Blue area height */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-weight: 700;
    font-size: 14px; /* ✅ INCREASED: Font size */
    color: #000;
    text-align: left;
    padding: 4px 10px; /* ✅ INCREASED: Padding */
    line-height: 1.1;
}

.av-divider {
    height: 1px;
    background: #d8e0ef;
    width: 100%;
}

.av-size-prices {
    padding: 6px 10px; /* ✅ INCREASED: Padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 45px; /* ✅ INCREASED: Height */
    gap: 0px;
}

.av-sale-price {
    font-weight: 700;
    color: #000;
    font-size: 14px; /* ✅ INCREASED: Font size */
    line-height: 1.1;
}

.av-regular-price del {
    color: #7b7b7b;
    text-decoration: line-through;
    font-weight: 500;
    font-size: 12px; /* ✅ INCREASED: Font size */
    line-height: 1.1;
}

/* =========================================================== */
/* SCENARIO 1 - COLOR ATTRIBUTES - LARGER SIZE */
/* =========================================================== */

.av-color-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 12px; /* ✅ INCREASED: Gap between color boxes */
}

.av-color-option {
    width: 70px; /* ✅ INCREASED: Width */
    height: 80px; /* ✅ INCREASED: Height */
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px; /* ✅ INCREASED: Padding */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: all 0.2s ease;
}

.av-color-option:hover {
    border-color: #0073e6;
}

.av-color-option.active {
    border: 2px solid #0073e6;
    box-shadow: 0 4px 12px rgba(0, 115, 230, 0.2);
}

.av-color-option img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 4px;
}

/* =========================================================== */
/* SCENARIO 2 - COLOR ONLY GRID - FULL WIDTH 25% */
/* =========================================================== */

.av-color-only-grid {
    display: grid;
    grid-template-columns: repeat(4, 25%); /* ✅ CHANGED: 25% width for full section */
    width: 100%; /* ✅ CHANGED: Full width */
    gap: 10px; /* ✅ INCREASED: Gap */
    justify-items: center;
}

.av-color-only-option {
    width: 100%; /* ✅ CHANGED: Full width of grid cell */
    height: 140px; /* ✅ INCREASED: Height */
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    transition: all 0.2s ease;
    margin: 0;
    padding: 0;
}

.av-color-only-option:hover {
    border-color: #0073e6;
}

.av-color-only-option.active {
    border: 2px solid #0073e6;
    box-shadow: 0 4px 12px rgba(0, 115, 230, 0.2);
}

.av-color-thumb {
    width: 100%;
    height: 90px; /* ✅ INCREASED: Image height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 6px; /* ✅ INCREASED: Margin */
    padding: 0 6px; /* ✅ INCREASED: Padding */
}

.av-color-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.av-color-prices {
    margin-top: 6px; /* ✅ INCREASED: Margin */
    text-align: center;
    width: 100%;
    padding: 6px 4px; /* ✅ INCREASED: Padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    line-height: 1.1;
}

/* Fallback Styles */
.av-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #555;
    background: #f5f5f5;
    text-align: center;
    padding: 4px;
}

/* =========================================================== */
/* RESPONSIVE DESIGN */
/* =========================================================== */

@media (max-width: 768px) {
    .av-size-grid {
        gap: 10px;
        margin-bottom: 5px;
    }
    
    .av-size-option {
        width: 105px; /* ✅ MOBILE: Larger width */
        height: 80px; /* ✅ MOBILE: Larger height */
    }
    
    .av-size-top {
        height: 26px; /* ✅ MOBILE: Larger blue area */
        font-size: 13px; /* ✅ MOBILE: Larger font */
        padding: 4px 8px; /* ✅ MOBILE: Larger padding */
        line-height: 1.1;
    }
    
    .av-size-prices {
        height: 42px; /* ✅ MOBILE: Larger height */
        padding: 5px 8px; /* ✅ MOBILE: Larger padding */
        align-items: flex-start;
    }
    
    .av-color-inline {
        gap: 10px;
    }
    
    .av-color-option {
        width: 65px; /* ✅ MOBILE: Larger width */
        height: 75px; /* ✅ MOBILE: Larger height */
    }
    
    .av-color-only-grid {
        width: 100%;
        grid-template-columns: repeat(4, 25%); /* ✅ MOBILE: 25% width */
        gap: 8px;
    }
    
    .av-color-only-option {
        width: 100%;
        height: 130px; /* ✅ MOBILE: Larger height */
    }
    
    .av-color-thumb {
        height: 85px; /* ✅ MOBILE: Larger image height */
    }
    
    .av-color-prices {
        line-height: 1.1;
    }
}

@media (max-width: 480px) {
    .av-color-only-grid {
        width: 100%;
        grid-template-columns: repeat(4, 25%); /* ✅ MOBILE: 25% width */
        gap: 6px;
        justify-content: space-between;
    }
    
    .av-color-only-option {
        width: 100%;
        height: 125px; /* ✅ MOBILE: Larger height */
    }
    
    .av-color-thumb {
        height: 80px; /* ✅ MOBILE: Larger image height */
        margin-top: 5px;
    }
    
    .av-color-prices {
        margin-top: 5px;
        padding: 5px 3px; /* ✅ MOBILE: Larger padding */
        line-height: 1.1;
    }
    
    .av-size-option {
        width: 100px; /* ✅ MOBILE: Larger width */
        height: 75px; /* ✅ MOBILE: Larger height */
    }
    
    .av-size-top {
        font-size: 13px;
        height: 24px; /* ✅ MOBILE: Larger blue area */
        padding: 4px 6px; /* ✅ MOBILE: Larger padding */
        line-height: 1.1;
    }
    
    .av-size-prices {
        height: 40px;
        padding: 5px 6px; /* ✅ MOBILE: Larger padding */
        align-items: flex-start;
    }
}