﻿/* ==========================================
    VARIABLES GLOBALES & AJUSTES DE DISEÑO
   ========================================== */
:root {
    --primary-color: var(--ar-primary, #003e90);
    --primary-hover: var(--ar-primary-hover, #002a63);
    --accent-color: var(--ar-accent, #dc3545);
    --text-dark: var(--ar-text, #111827);
    --text-muted: var(--ar-muted, #6b7280);
    --bg-card: var(--ar-surface, #ffffff);
    --border-radius-lg: var(--ar-radius-lg, 16px);
    --border-radius-sm: var(--ar-radius-md, 8px);
    --shadow-soft: var(--ar-shadow-soft, 0 8px 24px rgba(17, 24, 39, 0.06));
    --shadow-hover: var(--ar-shadow-hover, 0 16px 40px rgba(17, 24, 39, 0.1));
    --transition-smooth: var(--ar-transition, all 0.25s ease);
}

/* ==========================================
    TUS ESTILOS PERSONALIZADOS (PRODUCT-TITLE)
   ========================================== */
.product-title {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.3;
    font-weight: 700;
    color: #111827;
    /* Forzar visibilidad completa del texto */
    display: block !important; 
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    word-break: break-word;
}

.product-title a {
    text-decoration: none;
    color: inherit;
}

.product-title a:hover {
    color: #2563eb;
}

/* ==========================================
    CABECERA DE LA PÁGINA
   ========================================== */
.store-title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-dark);
}

.custom-divider {
    border-color: rgba(0, 0, 0, 0.158);
    opacity: 1;
}

.dropdown-toggle-custom {
    background-color: #f5f5f7;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius-sm);
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.dropdown-toggle-custom:hover {
    background-color: #e8e8ed;
}

.custom-dropdown-menu {
    border: none;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-hover);
    padding: 0.5rem;
}

.custom-dropdown-menu .dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    transition: background-color 0.2s ease;
}

.custom-dropdown-menu .dropdown-item:hover {
    background-color: #550909;
    color: var(--bg-card);
}

/* Animaciones */
.animate.fade-in {
    animation: menuFadeIn 0.25s ease-out both;
    will-change: opacity, margin-top;
}

@keyframes menuFadeIn {
    from { opacity: 0; margin-top: 10px; }
    to { opacity: 1; margin-top: 0; }
}

/* ==========================================
    TARJETAS DE PRODUCTOS (CARDS)
   ========================================== */
.custom-product-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--border-radius-lg);
    background-color: var(--bg-card);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.custom-product-card.product-reveal {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
}

.custom-product-card.product-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
    .custom-product-card.product-reveal,
    .custom-product-card.product-reveal.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.custom-product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 62, 144, 0.15);
}

/* ==========================================
    CONFIGURACIÓN REQUERIDA DE IMÁGENES
   ========================================== */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
    width: 100%;
}

.product-img {
    aspect-ratio: 1 / 1; /* Proporción perfecta obligatoria */
    object-fit: contain;  /* Evita recortes e imperfecciones */
    padding: 0px;
    transition: var(--transition-smooth);
}

.custom-product-card:hover .product-img {
    transform: scale(1.1);
}

/* Precios */
.current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.old-price {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Badges / Etiquetas */
.badge-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 0.72rem; /* Tamaño de fuente más pequeño para las etiquetas */
    font-weight: 700; /* Negrita para resaltar la etiqueta */
    text-transform: uppercase;
    border-radius: 20px;
    z-index: 2;
}

/* Etiquetas / Badges de Recomendación */
.custom-badge-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 7.5pt;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: white;
}

.tag-new { background-color: #ec1750d8; color: #ffffff; }
.tag-discount { background-color: #ffc107; color: #ffffff; }
.tag-soldout { background-color: #8e8e93; color: #ffffff; }
.tag-sold-out { background-color: #8e8e93; }

/* Etiquetas/Insignias */
.tag {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 8px 30px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: bold;
    color: #ffffff;
}

.new {
    background-color: #ec1750c2;
}

.discount {
    background-color: #ffc107c2;
}

.sold-out {
    background-color: #757171c2;
    color: #ffffff;
}



/* ==========================================
    SELECTORES Y ENVOLTURAS
   ========================================== */
.variant-selector-wrapper {
    text-align: left;
    background-color: #f5f5f7;
    padding: 6px 10px;
    border-radius: var(--border-radius-sm);
}

.variant-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.custom-select-sm {
    font-size: 0.85rem;
    border: none;
    background-color: transparent;
    font-weight: 500;
    cursor: pointer;
}

/* ==========================================
    BOTONES E INTERFACES DE ACCIÓN
   ========================================== */
.btn-modern-primary, 
.btn-modern-secondary {
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-smooth);
    border: none;
    white-space: nowrap;
}

.btn-modern-primary {
    background-color: #003e90;
    color: #ffffff;
}

.btn-modern-primary:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
}

.btn-modern-secondary {
    background-color: #ededed;
    color: var(--text-dark);
}

.btn-modern-secondary:hover {
    background-color: #e8e8ed;
    color: var(--primary-color);
}

/* ==========================================
   COMPORTAMIENTO RESPONSIVO (BREAKPOINTS)
   ========================================== */
/* Pantallas medianas y pequeñas (Dispositivos móviles y Tablets < 992px) */
@media (max-width: 991.98px) {
    .btn-action-container {
        flex-direction: column !important; /* Colapsa verticalmente */
    }
    .btn-modern-primary, 
    .btn-modern-secondary {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
}

/* Ajustes finos adicionales para móviles pequeños */
@media (max-width: 576px) {
    .store-title {
        font-size: 1.6rem;
        text-align: center;
    }
    .brand-filter-dropdown, .brand-filter-dropdown button {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================
    PAGINACIÓN
   ========================================== */
.pagination-modern .page-item .page-link {
    border: none;
    color: var(--text-dark);
    background-color: #f5f5f7;
    padding: 14px 10px;
    font-weight: 700;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-smooth);
}

.pagination-modern .page-item.active .page-link {
    background-color: var(--primary-color);
    color: #ffffff;
}