/* FF Product Customizer Styles */

.ffpc-customize-section {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
}

.ffpc-customize-btn {
    font-size: 1.1rem;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 186, 0.3);
}

.ffpc-customize-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 186, 0.4);
}

.ffpc-customize-description {
    font-size: 0.9rem;
}

/* Customizer Interface */
.ffpc-customizer-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.ffpc-customizer-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ffpc-preview-section,
.ffpc-options-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ffpc-preview-section {
    text-align: center;
}

.ffpc-preview-image {
    position: relative;
    display: inline-block;
    background: #fff;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.ffpc-preview-image::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2, #667eea);
    border-radius: 14px;
    z-index: -1;
}

.ffpc-preview-image img {
    display: block;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.ffpc-preview-image:hover img {
    transform: scale(1.02);
}

/* Option Fields */
.ffpc-option-field {
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ffpc-option-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    display: block;
    font-size: 1.1rem;
}

/* Text Inputs */
.ffpc-text-input {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.ffpc-text-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: rgba(255, 255, 255, 1);
}

/* Select Inputs */
.ffpc-select-input {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.ffpc-select-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: rgba(255, 255, 255, 1);
}

/* Color Picker */
.ffpc-color-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 0.75rem;
    max-width: 400px;
}

.ffpc-color-option {
    position: relative;
}

.ffpc-color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ffpc-color-label {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.ffpc-color-label::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.ffpc-color-option input[type="radio"]:checked + .ffpc-color-label {
    transform: scale(1.15);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.4), 0 6px 20px rgba(0, 0, 0, 0.25);
}

.ffpc-color-option input[type="radio"]:checked + .ffpc-color-label::before {
    transform: translate(-50%, -50%) scale(1);
}

/* Image Select */
.ffpc-image-select {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.ffpc-image-option {
    position: relative;
}

.ffpc-image-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ffpc-image-label {
    display: block;
    text-align: center;
    padding: 1rem;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.ffpc-image-label img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.ffpc-image-label-text {
    display: block;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.ffpc-image-option input[type="radio"]:checked + .ffpc-image-label {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.ffpc-image-option input[type="radio"]:checked + .ffpc-image-label img {
    transform: scale(1.05);
}

.ffpc-image-option input[type="radio"]:checked + .ffpc-image-label .ffpc-image-label-text {
    color: #667eea;
    font-weight: 600;
}

/* Actions */
.ffpc-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
}

#ffpc-add-to-cart {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#ffpc-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

#ffpc-save-design {
    border: 2px solid #6c757d;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

#ffpc-save-design:hover {
    background: #6c757d;
    color: #fff;
    transform: translateY(-1px);
}

/* Loading States */
.ffpc-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.ffpc-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Cart Item Customization Display */
.ffpc-cart-customization,
.ffpc-order-customization {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
    border-left: 3px solid #667eea;
}

.ffpc-cart-customization small,
.ffpc-order-customization small {
    display: block;
    color: #495057;
    margin-bottom: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ffpc-customizer-header {
        position: relative;
    }
    
    .ffpc-preview-section {
        position: relative;
        top: auto;
        margin-bottom: 2rem;
    }
    
    .ffpc-color-picker {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .ffpc-image-select {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .ffpc-customize-btn {
        font-size: 1rem;
        padding: 0.6rem 1.5rem;
    }
    
    .ffpc-color-picker {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .ffpc-image-select {
        grid-template-columns: 1fr;
    }
}
