/* ===============================
   Product Layout - Standard Styles
   =============================== */

/* Color Selector Styles */
.color-selector {
    margin-bottom: 1.5rem;
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.color-option {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 3px solid transparent;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.color-option:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border-color: #0066cc;
}

.color-option.active {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.3);
    transform: scale(1.02);
}

.color-image {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
}

.color-option:hover .color-image {
    transform: scale(1.1);
}

.color-name {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    color: #333;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.color-option.active .color-name {
    background: #0066cc;
    color: white;
}

/* Size Selector Styles */
.size-selector {
    margin-bottom: 1.5rem;
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.size-option {
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    min-width: 48px;
    color: #333;
}

.size-option:hover {
    border-color: #0066cc;
    background-color: #f8f9fa;
    transform: translateY(-2px);
}

.size-option.selected {
    border-color: #0066cc;
    background-color: #0066cc;
    color: white;
    box-shadow: 0 4px 8px rgba(0,102,204,0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .color-option {
        width: 70px;
        height: 70px;
    }
    
    .color-image {
        height: 50px;
    }
    
    .color-name {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .size-option {
        padding: 10px 14px;
        min-width: 42px;
    }
}

@media (max-width: 576px) {
    .color-option {
        width: 60px;
        height: 60px;
    }
    
    .color-image {
        height: 40px;
    }
    
    .color-name {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .color-options {
        gap: 8px;
    }
    
    .size-options {
        gap: 6px;
    }
    
    .size-option {
        padding: 8px 12px;
        min-width: 38px;
        font-size: 14px;
    }
}

/* Animation for new elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.color-option {
    animation: fadeInUp 0.5s ease forwards;
}

.color-option:nth-child(2) {
    animation-delay: 0.1s;
}

.color-option:nth-child(3) {
    animation-delay: 0.2s;
}

.color-option:nth-child(4) {
    animation-delay: 0.3s;
}

.color-option:nth-child(5) {
    animation-delay: 0.4s;
}

/* Form Labels */
.color-selector .form-label,
.size-selector .form-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

/* Hover effects for better UX */
.color-selector:hover .color-option:not(:hover):not(.active) {
    opacity: 0.7;
}

.size-selector:hover .size-option:not(:hover):not(.selected) {
    opacity: 0.7;
}

/* Focus styles for accessibility */
.color-option:focus,
.size-option:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Loading state */
.color-option.loading {
    opacity: 0.6;
    pointer-events: none;
}

.color-option.loading .color-image {
    filter: blur(2px);
}

/* Error state */
.color-option.unavailable {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

.size-option.unavailable {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #e9ecef;
}

/* Product showcase improvements */
.product-showcase {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.product-showcase:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
