/* ==========================================================================
   C&E URBAN WEAR — Componentes avanzados
   Modal de vista rapida, panel de usuario, comparador, resenas
   ========================================================================== */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(20px); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.65; } }

/* ==========================================================================
   MODAL DE VISTA RAPIDA
   ========================================================================== */
.quick-view-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    padding: 20px;
}

.quick-view-modal.active {
    display: flex;
    animation: fadeIn 0.25s ease;
}

.modal-content {
    background: var(--negro-card);
    border: 1px solid var(--gris-linea);
    border-radius: 14px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: scaleIn 0.25s ease;
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--negro-suave);
    border: 1px solid var(--gris-linea);
    color: var(--blanco);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.modal-images {
    padding: 32px;
    background: var(--negro-suave);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

.modal-images .prenda-placeholder {
    width: 240px;
    height: 280px;
}

.modal-info {
    padding: 32px;
}

.modal-info h2 {
    font-family: var(--fuente-display);
    font-size: 22px;
    margin-bottom: 10px;
}

.modal-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--gris);
}

.modal-price-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--acento);
    font-family: var(--fuente-display);
}

.badge-discount {
    background: var(--rojo);
    color: var(--blanco);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.modal-description {
    color: var(--gris);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.modal-stock {
    margin-bottom: 20px;
}

#modal-stock-status {
    color: #2ecc71;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--negro-suave);
    border: 1px solid var(--gris-linea);
    color: var(--blanco);
    font-size: 16px;
}

#modal-quantity {
    width: 56px;
    text-align: center;
    background: var(--negro-suave);
    border: 1px solid var(--gris-linea);
    border-radius: 6px;
    padding: 8px;
    color: var(--blanco);
}

.modal-add-cart-btn {
    background: var(--rojo);
    color: var(--blanco);
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-add-cart-btn:hover {
    background: var(--rojo-claro);
}

.modal-wishlist-btn {
    background: transparent;
    border: 1px solid var(--gris-linea);
    color: var(--blanco);
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
}

.modal-benefits {
    border-top: 1px solid var(--gris-linea);
    padding-top: 16px;
}

.modal-benefits p {
    font-size: 12px;
    color: var(--gris);
    margin-bottom: 6px;
}

@media (max-width: 700px) {
    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-images {
        min-height: 220px;
        padding: 24px;
    }

    .modal-images .prenda-placeholder {
        width: 180px;
        height: 200px;
    }
}

/* ==========================================================================
   PANEL DE USUARIO (lealtad, favoritos, historial)
   ========================================================================== */
.user-dashboard-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 380px;
    max-width: 92vw;
    height: 100vh;
    background: var(--negro-card);
    border-left: 1px solid var(--gris-linea);
    z-index: 350;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.user-dashboard-panel.active {
    right: 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 24px;
    border-bottom: 1px solid var(--gris-linea);
}

.dashboard-header h2 {
    font-family: var(--fuente-display);
    font-size: 17px;
}

.dashboard-close {
    background: none;
    border: none;
    color: var(--gris);
    font-size: 18px;
    cursor: pointer;
}

.dashboard-tabs {
    display: flex;
    border-bottom: 1px solid var(--gris-linea);
}

.dashboard-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--gris);
    padding: 14px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.dashboard-tab.active {
    color: var(--acento);
    border-bottom-color: var(--acento);
}

.dashboard-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.empty-message {
    color: var(--gris);
    text-align: center;
    padding: 30px 10px;
    font-size: 13px;
}

.loyalty-card {
    background: var(--negro-suave);
    border: 1px solid var(--gris-linea);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.progress-bar-loyalty {
    height: 8px;
    background: var(--negro-suave);
    border-radius: 4px;
    overflow: hidden;
    margin: 12px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--rojo), var(--acento));
    border-radius: 4px;
    transition: width 0.4s ease;
}

.favorite-item, .history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gris-linea);
}

.favorite-info, .history-info {
    flex: 1;
}

.favorite-info h4, .history-info h4 {
    font-size: 13px;
    margin-bottom: 4px;
}

.favorite-price {
    font-size: 13px;
    color: var(--acento);
    font-weight: 700;
}

.remove-favorite {
    background: none;
    border: none;
    color: var(--gris);
    font-size: 14px;
}

.remove-favorite:hover {
    color: var(--rojo-claro);
}

/* ==========================================================================
   COMPARADOR DE PRODUCTOS
   ========================================================================== */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.comparison-table th, .comparison-table td {
    border: 1px solid var(--gris-linea);
    padding: 10px 14px;
    text-align: center;
}

.comparison-table th {
    background: var(--negro-suave);
    color: var(--acento);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.comparison-table button {
    background: var(--azul);
    color: var(--blanco);
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
}

/* ==========================================================================
   RESENAS / REVIEWS
   ========================================================================== */
.review-item {
    border-bottom: 1px solid var(--gris-linea);
    padding: 16px 0;
}

.review-item .review-stars {
    color: var(--acento);
    font-size: 13px;
    margin-bottom: 6px;
}

.review-item .review-author {
    font-size: 12px;
    color: var(--gris);
}

.review-item .review-comment {
    font-size: 13px;
    margin-top: 6px;
    color: var(--blanco);
}
