/* ============================================================================
   QUICK SELECT MODAL - Popup para seleccionar variantes y tallas
   ============================================================================ */

#quickSelectModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.2s ease;
}

#quickSelectModal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.quick-select-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 16px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    position: relative;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.quick-select-header {
    background: linear-gradient(135deg, #E06003 0%, #FC791A 100%);
    padding: 20px 25px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quick-select-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.quick-select-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
}

.quick-select-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.quick-select-body {
    padding: 25px;
}

.quick-select-section {
    margin-bottom: 25px;
}

.quick-select-section:last-child {
    margin-bottom: 0;
}

.quick-select-label {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.quick-select-required {
    color: #ff6b6b;
    margin-left: 4px;
}

.variants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.variant-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.variant-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(252, 121, 26, 0.3);
    transform: translateY(-2px);
}

.variant-option.selected {
    background: linear-gradient(135deg, rgba(252, 121, 26, 0.2) 0%, rgba(224, 96, 3, 0.2) 100%);
    border-color: #FC791A;
    box-shadow: 0 0 20px rgba(252, 121, 26, 0.3);
}

.variant-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.variant-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 auto 8px;
    display: block;
}

.variant-name {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.3;
    max-width: 100%;
}

.variant-value {
    color: #aaa;
    font-size: 0.85rem;
}

.variant-price {
    color: #FC791A;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 4px;
}

.sizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
}

.size-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.size-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(252, 121, 26, 0.3);
    transform: scale(1.05);
}

.size-option.selected {
    background: linear-gradient(135deg, #FC791A 0%, #E06003 100%);
    border-color: #FC791A;
    box-shadow: 0 0 15px rgba(252, 121, 26, 0.4);
    color: white;
}

.quick-select-footer {
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
}

.btn-quick-select {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-quick-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-cancel:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.btn-add-to-cart {
    background: linear-gradient(135deg, #FC791A 0%, #E06003 100%);
    color: white;
}

.btn-add-to-cart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(252, 121, 26, 0.4);
}

.quick-select-message {
    background: rgba(255, 107, 107, 0.1);
    border-left: 3px solid #ff6b6b;
    padding: 12px;
    border-radius: 6px;
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 15px;
    display: none;
}

.quick-select-message.active {
    display: block;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Responsive */
@media (max-width: 576px) {
    .quick-select-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .quick-select-header h3 {
        font-size: 1.1rem;
    }
    
    .quick-select-body {
        padding: 20px;
    }
    
    .variants-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .sizes-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 8px;
    }
    
    .quick-select-footer {
        flex-direction: column;
    }
    
    .btn-quick-select {
        width: 100%;
    }
}

/* Scrollbar personalizado */
.quick-select-content::-webkit-scrollbar {
    width: 8px;
}

.quick-select-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.quick-select-content::-webkit-scrollbar-thumb {
    background: rgba(252, 121, 26, 0.5);
    border-radius: 4px;
}

.quick-select-content::-webkit-scrollbar-thumb:hover {
    background: rgba(252, 121, 26, 0.7);
}
