/**
 * ESTILOS PRINCIPALES DE LA TIENDA
 * ================================
 * Diseño moderno, limpio y profesional
 */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark-color);
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   NAVEGACIÓN
   ============================================ */
.top-bar {
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(37, 99, 235, 0.05);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: rgba(37, 99, 235, 0.05);
    color: var(--primary-color);
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-whatsapp {
    background-color: #25d366;
    border-color: #25d366;
    color: white;
}

.btn-whatsapp:hover {
    background-color: #128c7e;
    border-color: #128c7e;
    color: white;
}

/* ============================================
   HERO / BANNER
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* ============================================
   CARDS DE PRODUCTO
   ============================================ */
.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image-wrapper {
    position: relative;
    padding-top: 75%; /* Aspect ratio 4:3 */
    overflow: hidden;
    background-color: var(--light-color);
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
}

.badge-destacado {
    background-color: var(--warning-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-oferta {
    background-color: var(--danger-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-info {
    padding: 1.25rem;
}

.product-category {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: var(--dark-color);
}

.product-title a:hover {
    color: var(--primary-color);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-price-old {
    font-size: 0.875rem;
    color: var(--secondary-color);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.product-sku {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

/* ============================================
   PÁGINA DE PRODUCTO INDIVIDUAL
   ============================================ */
.product-detail {
    padding: 3rem 0;
}

.product-gallery {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--light-color);
}

.product-gallery-main {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius);
}

.product-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.gallery-thumb:hover, .gallery-thumb.active {
    border-color: var(--primary-color);
}

.product-meta {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.meta-item:last-child {
    border-bottom: none;
}

.meta-label {
    font-weight: 600;
    color: var(--secondary-color);
}

.meta-value {
    font-weight: 500;
}

.status-disponible {
    color: var(--success-color);
    font-weight: 600;
}

.status-agotado {
    color: var(--danger-color);
    font-weight: 600;
}

/* ============================================
   SECCIONES
   ============================================ */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.section-padding {
    padding: 4rem 0;
}

/* ============================================
   CATEGORÍAS
   ============================================ */
.category-card {
    display: block;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    padding: 2rem 1.5rem;
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.category-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.category-count {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    background: var(--light-color);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--secondary-color);
    font-weight: 500;
}

/* ============================================
   PAGINACIÓN
   ============================================ */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border: none;
    color: var(--dark-color);
    font-weight: 600;
    padding: 0.625rem 1rem;
    border-radius: var(--radius) !important;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    margin-top: auto;
}

.hover-primary {
    transition: var(--transition);
}

.hover-primary:hover {
    color: var(--primary-color) !important;
}

/* ============================================
   WHATSAPP FLOAT
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: white;
    transform: scale(1.1);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ============================================
   CONTACTO
   ============================================ */
.contact-info-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    height: 100%;
    transition: var(--transition);
}

.contact-info-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ============================================
   CTA MAPA
   ============================================ */
.cta-map-section {
    min-height: 650px;
    display: grid;
    align-items: center;
    isolation: isolate;
}

.cta-map-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: var(--dark-color);
}

.cta-leaflet-map {
    width: 100%;
    height: 100%;
    filter: saturate(0.9) contrast(1.05);
}

.cta-map-bg .leaflet-container {
    width: 100%;
    height: 100%;
    background: var(--dark-color);
    pointer-events: none;
}

.cta-map-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.48)),
        radial-gradient(circle at center, rgba(37, 99, 235, 0.08), transparent 52%);
    z-index: 1;
}

.cta-map-section .container {
    z-index: 2;
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

.pulse-marker {
    width: 30px;
    height: 30px;
    background: #e51d25;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 0 rgba(229, 29, 37, 0.75);
    animation: pulse 1.6s infinite;
    position: relative;
}

.pulse-marker::after {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background: #fff;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(229, 29, 37, 0.8); }
    70% { box-shadow: 0 0 0 30px rgba(229, 29, 37, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 29, 37, 0); }
}

/* ============================================
   UTILIDADES
   ============================================ */
.bg-light-soft {
    background-color: #f1f5f9;
}

.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .navbar-collapse {
        padding: 1rem 0;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 1rem;
        right: 1rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .section-padding {
        padding: 2rem 0;
    }

    .cta-map-section {
        min-height: 480px;
    }
    
    .product-gallery-thumbs {
        justify-content: center;
    }
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
