/* Product Variations */
.variations {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.variation-group {
    margin-bottom: 1.5rem;
}

.variation-group:last-child {
    margin-bottom: 0;
}

.variation-group h3 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: #333;
    font-weight: 600;
}

.variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.variation-option {
    padding: 0.5rem 1rem;
    border: 2px solid #dee2e6;
    background: white;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    position: relative;
    min-width: 60px;
    text-align: center;
    font-weight: 500;
}

.variation-option:hover:not(.disabled) {
    border-color: #ee4d2d;
    color: #ee4d2d;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(238, 77, 45, 0.2);
}

.variation-option.selected {
    background: #ee4d2d;
    color: white;
    border-color: #ee4d2d;
    box-shadow: 0 4px 12px rgba(238, 77, 45, 0.3);
}

.variation-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999;
}

/* Color variations */
.variation-option.color-option {
    width: 90px;
    height: 90px;
    padding: 6px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
}

.variation-option.color-option img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 4px;
}

.variation-option.color-option .color-name {
    font-size: 0.7rem;
    text-align: center;
    line-height: 1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.variation-option.color-option.selected {
    border-color: #ee4d2d;
    background: rgba(238, 77, 45, 0.1);
    box-shadow: 0 0 0 2px rgba(238, 77, 45, 0.3);
}

.variation-option.color-option.selected .color-name {
    color: #ee4d2d;
}

.variation-option.color-option:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 77, 45, 0.2);
}

/* Size variations */
.variation-option:not(.color-option) {
    min-width: 120px;
    padding: 0.8rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.2;
}

.variation-option:not(.color-option).selected {
    background: #ee4d2d;
    color: white;
    border-color: #ee4d2d;
}

/* Loading state */
.variation-option.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .variations {
        padding: 1rem;
    }

    .variation-option.color-option {
        width: 80px;
        height: 80px;
    }

    .variation-option.color-option img {
        width: 60px;
        height: 60px;
    }

    .variation-option.color-option .color-name {
        font-size: 0.65rem;
    }

    .variation-option:not(.color-option) {
        min-width: 100px;
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .variation-options {
        gap: 0.3rem;
    }

    .variation-option.color-option {
        width: 70px;
        height: 70px;
    }

    .variation-option.color-option img {
        width: 50px;
        height: 50px;
    }

    .variation-option:not(.color-option) {
        min-width: 90px;
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Focus states for accessibility */
.variation-option:focus {
    outline: 2px solid #ee4d2d;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .variation-option {
        border-width: 3px;
    }

    .variation-option.selected {
        border-color: #000;
        background: #ee4d2d;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .variation-option {
        transition: none;
    }

    .variation-option:hover {
        transform: none;
    }
}