/**
 * Variation Image Swatches - Styles
 * 
 * Premium image-based variation selector for LaNoira
 * Brand colors: #2c2222, #4a0e0e, #f6e4e4
 */

/* Container */
.ce-variation-swatches {
    margin: 15px 0 !important;
    width: 100% !important;
}

.ce-swatches-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    margin-bottom: 10px !important;
    align-items: flex-start !important;
}

/* Individual Swatch */
.ce-swatch-item {
    flex: 0 0 auto !important;
    width: 70px !important;
    max-width: 70px !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    border: 3px solid transparent !important;
    border-radius: 8px !important;
    padding: 6px !important;
    background: #fff !important;
    position: relative !important;
    box-sizing: border-box !important;
}

.ce-swatch-item:hover {
    border-color: #f6e4e4 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 16px rgba(74, 14, 14, 0.15) !important;
}

.ce-swatch-item.selected {
    border-color: #4a0e0e !important;
    box-shadow: 0 0 0 1px #4a0e0e, 0 6px 16px rgba(74, 14, 14, 0.2) !important;
    transform: translateY(-3px) !important;
}

.ce-swatch-item.unavailable {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}

.ce-swatch-item.unavailable:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

/* Image Wrapper */
.ce-swatch-image-wrapper {
    width: 100% !important;
    height: 60px !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    background: #f9f9f9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ce-swatch-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

/* Label - Tooltip Style */
.ce-swatch-label {
    position: absolute !important;
    bottom: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-5px) !important;
    margin-bottom: 8px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    color: #fff !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    background: #2c2222 !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.2s ease !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

/* Tooltip Arrow */
.ce-swatch-label:after {
    content: '' !important;
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border: 6px solid transparent !important;
    border-top-color: #2c2222 !important;
}

/* Show Label on Hover */
.ce-swatch-item:hover .ce-swatch-label {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* Show Label When Selected */
.ce-swatch-item.selected .ce-swatch-label {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
    background: #4a0e0e !important;
}

.ce-swatch-item.selected .ce-swatch-label:after {
    border-top-color: #4a0e0e !important;
}

/* Hide Default Select */
.ce-hidden-select {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .ce-swatch-item {
        width: 65px !important;
        max-width: 65px !important;
    }
    
    .ce-swatch-image-wrapper {
        height: 55px !important;
    }
    
    .ce-swatches-wrapper {
        gap: 5px !important;
    }
}

@media (max-width: 480px) {
    .ce-swatch-item {
        width: 60px !important;
        max-width: 60px !important;
    }
    
    .ce-swatch-image-wrapper {
        height: 50px !important;
    }
    
    .ce-swatches-wrapper {
        gap: 5px !important;
    }
    
    .ce-swatch-label {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
}