/* ============================================
   QUICK VIEW MODAL - Vista Rápida de Producto
   ============================================ */

/* Overlay del modal */
.quick-view-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.quick-view-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Contenedor del modal */
.quick-view-modal {
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.quick-view-overlay.active .quick-view-modal {
    transform: scale(1);
}

/* Botón cerrar */
.quick-view-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #2c3e50;
    z-index: 10;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quick-view-close:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg);
}

/* Contenido del modal */
.quick-view-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

/* Sección de imágenes */
.quick-view-images {
    position: relative;
}

.quick-view-main-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    object-fit: cover;
    max-height: 500px;
}

.quick-view-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #0066FF;
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 5;
}

.quick-view-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
}

.quick-view-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    flex-shrink: 0;
}

.quick-view-thumbnail:hover {
    border-color: #0066FF;
}

.quick-view-thumbnail.active {
    border-color: #0066FF;
    opacity: 1;
}

/* Sección de detalles */
.quick-view-details {
    display: flex;
    flex-direction: column;
}

.quick-view-category {
    color: #7f8c8d;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

.quick-view-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
}

.quick-view-description {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Precio */
.quick-view-price-section {
    margin-bottom: 25px;
}

.quick-view-price {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-right: 15px;
}

.quick-view-old-price {
    font-size: 1.2rem;
    color: #95a5a6;
    text-decoration: line-through;
    margin-right: 10px;
}

.quick-view-discount {
    background: #e74c3c;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Selector de colores */
.quick-view-colors {
    margin-bottom: 25px;
}

.quick-view-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    display: block;
    font-size: 0.95rem;
}

.color-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: #0066FF;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #0066FF;
}

/* Selector de tallas */
.quick-view-sizes {
    margin-bottom: 25px;
}

.size-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-option {
    min-width: 50px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s;
    background: white;
    color: #2c3e50;
}

.size-option:hover {
    border-color: #0066FF;
    background: #f0f7ff;
}

.size-option.active {
    border-color: #0066FF;
    background: #0066FF;
    color: white;
}

.size-option.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Selector de cantidad */
.quick-view-quantity {
    margin-bottom: 25px;
}

.quantity-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.quantity-btn {
    width: 45px;
    height: 45px;
    border: none;
    background: white;
    color: #2c3e50;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.quantity-btn:hover {
    background: #f0f7ff;
    color: #0066FF;
}

.quantity-input {
    width: 60px;
    height: 45px;
    border: none;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    border-left: 2px solid #e0e0e0;
    border-right: 2px solid #e0e0e0;
}

.stock-info {
    color: #27ae60;
    font-size: 0.9rem;
    font-weight: 600;
}

.stock-info.low {
    color: #f39c12;
}

.stock-info.out {
    color: #e74c3c;
}

/* Botones de acción */
.quick-view-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-add-to-cart {
    flex: 1;
    padding: 15px 30px;
    background: #0066FF;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-add-to-cart:hover {
    background: #0052CC;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 102, 255, 0.3);
}

.btn-view-details {
    padding: 15px 30px;
    background: white;
    color: #0066FF;
    border: 2px solid #0066FF;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-view-details:hover {
    background: #0066FF;
    color: white;
}

/* Info adicional */
.quick-view-info {
    border-top: 1px solid #ecf0f1;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.6;
}

.quick-view-info p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-view-info i {
    color: #0066FF;
    width: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .quick-view-content {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 25px;
    }
    
    .quick-view-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
    
    .quick-view-title {
        font-size: 1.4rem;
    }
    
    .quick-view-price {
        font-size: 1.6rem;
    }
    
    .quick-view-actions {
        flex-direction: column;
    }
    
    .btn-view-details {
        width: 100%;
    }
}

/* Animación de carga */
.quick-view-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Botón Vista Rápida en las tarjetas de producto */
.product-card {
    position: relative;
}

.quick-view-trigger {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #2c3e50;
    padding: 10px 20px;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    z-index: 5;
}

.product-card:hover .quick-view-trigger {
    opacity: 1;
    bottom: 20px;
}

.quick-view-trigger:hover {
    background: #0066FF;
    color: white;
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}
