/* Hide the default radio buttons */
.variant-attr-input {
    display: none;
}

/* Base style for variant items */
.color-item label,
.storage-item label,
.size-item label {
    cursor: pointer;
    border: 1px solid #D5D9D9;
    /* Amazon grey border */
    border-radius: 4px;
    padding: 6px 14px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    background: #fff;
    color: #0F1111;
    user-select: none;
    margin-bottom: 0;
    font-size: 14px;
}

/* Checked styling */
.variant-attr-input:checked+label {
    border-color: #e77600;
    /* Amazon orange */
    background: #FEF8F2;
    color: #0F1111;
    box-shadow: 0 0 0 1px #e77600;
}

/* Specific styling for Colors */
.color-item label {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #D5D9D9;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.color-item label:hover {
    border-color: #adb1b8;
}

.color-item .variant-attr-input:checked+label {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e77600;
    border-color: transparent !important;
    transform: scale(0.85);
}

/* Disabled/Out of Stock styling */
.variant-disabled {
    opacity: 0.3;
    position: relative;
    pointer-events: none;
}

.variant-disabled label {
    border-color: #f2f2f2 !important;
    background: #fafafa !important;
    color: #ccc !important;
    cursor: default;
}

/* Strike-through removed as per user request to keep all attributes visible */

.variant-stock-display {
    font-weight: bold;
}

.variant-stock-display.available {
    color: #198754;
}

.variant-stock-display.out-of-stock {
    color: #dc3545;
}

/* Zoom Styles */
.zoom-container {
    position: relative;
    cursor: crosshair;
    overflow: hidden;
}

.zoom-img {
    display: block;
    width: 100%;
}

.zoom-lens {
    position: absolute;
    border: 1px solid #d4d4d4;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.4);
    cursor: crosshair;
    z-index: 10;
}

.zoom-result-window {
    position: absolute;
    top: 0;
    left: 100%;
    /* Align with the start of the next column */
    width: 100%;
    height: 100%;
    border: 1px solid #ddd;
    background-repeat: no-repeat;
    z-index: 999;
    display: none;
    background-color: #fff;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    background-size: 250%;
    /* Adjusted zoom level */
    margin-left: 30px;
    /* Gap between gallery and zoom */
}

/* Ensure parent is relative */
.shop-left-sec {
    position: relative;
}

/* On mobile, might need different positioning, but keeping desktop focus for now as per Amazon style */
@media (max-width: 991px) {
    .zoom-result-window {
        display: none !important;
        /* Disable zoom window on mobile for better UX */
    }

    .zoom-container {
        cursor: default;
    }
}

@keyframes selectionPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 116, 240, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(40, 116, 240, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(40, 116, 240, 0);
    }
}

.selection-pulse {
    animation: selectionPulse 0.8s ease-out;
    border-color: #2874f0 !important;
}