/* CSS per personalizzazioni prodotti WEAREPRINT */

/* Sezione personalizzazione prodotto */
.product-customization {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px solid rgba(102, 126, 234, 0.1) !important;
    transition: all 0.3s ease;
}

.product-customization:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

/* Radio buttons per vestibilità */
.form-check-input:checked[name="product-fit"] {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-label {
    cursor: pointer;
    transition: color 0.3s ease;
}

.form-check-input:checked + .form-check-label {
    color: #667eea;
    font-weight: 600;
}

/* Select qualità */
#product-quality {
    border-color: rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

#product-quality:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Upload logo */
#product-logo {
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

#product-logo:hover {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.05);
}

/* Preview logo */
#logo-preview-container {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#logo-preview {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
}

#logo-preview:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

/* Costo personalizzazione */
.customization-cost {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    animation: pulse-soft 2s infinite;
}

@keyframes pulse-soft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Personalizzazioni nel carrello */
.product-customizations {
    border-left: 3px solid #667eea;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(255, 255, 255, 0.1) 100%);
    transition: all 0.3s ease;
}

.product-customizations:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15) 0%, rgba(255, 255, 255, 0.15) 100%);
    transform: translateX(3px);
}

.product-customizations small {
    line-height: 1.4;
}

.product-customizations .text-primary {
    color: #667eea !important;
    font-weight: 600;
}

.product-customizations .text-success {
    color: #28a745 !important;
    font-weight: 600;
}

/* Dropdown carrello personalizzazioni */
.cart-list .text-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .product-customization {
        margin-left: -15px;
        margin-right: -15px;
        border-left: none !important;
        border-right: none !important;
        border-radius: 0 !important;
    }
    
    .form-check {
        margin-bottom: 10px;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 10px !important;
    }
}

/* Stati di validazione */
.form-control.is-valid,
.form-select.is-valid {
    border-color: #28a745;
    background-image: none;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 20%, 40%, 60%, 80% { transform: translateX(0); }
    10%, 30%, 50%, 70% { transform: translateX(-5px); }
}

/* Icone personalizzazioni */
.bx-palette,
.bx-male-sign,
.bx-female-sign,
.bx-group,
.bx-image {
    color: #667eea;
    margin-right: 5px;
}

/* Transizioni fluide */
* {
    transition: all 0.3s ease;
}

/* Badge qualità */
.quality-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.quality-superior { background: #ffc107; color: #000; }
.quality-excellence { background: #17a2b8; color: #fff; }
.quality-premium { background: #6f42c1; color: #fff; }

/* Animazioni per feedback utente */
.customization-success {
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Loading states per upload */
.upload-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.upload-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Miglioramenti accessibilità */
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Tooltip personalizzazioni */
.customization-tooltip {
    position: relative;
    cursor: help;
}

.customization-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
}