﻿/* ===== RESET MODERNO ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

/* ===== VARIABLES CSS ===== */
:root {
    --color-bg: #ffffff;
    --color-text: #111111;
    --color-primary: #B71C1C; /* rojo fuerte y contundente */
    --color-accent: #D32F2F;  /* rojo más claro pero fuerte */
    --color-primary-dark: #8B0000; /* rojo muy oscuro para contraste */
    --color-primary-light: #E57373; /* rojo claro para hover */
    --color-gray-700: #374151;
    --color-gray-500: #6B7280;
    --color-gray-300: #D1D5DB;
    --color-gray-200: #E5E7EB;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0,0,0,.08);
    
    /* Variables adicionales para consistencia */
    --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== MODO OSCURO ===== */
[data-theme="dark"] {
    --color-bg: #1a1a1a;
    --color-text: #e5e5e5;
    --color-primary: #ff5252;
    --color-accent: #ff6b6b;
    --color-primary-dark: #d32f2f;
    --color-primary-light: #ff8a80;
    --color-gray-700: #b0b0b0;
    --color-gray-500: #808080;
    --color-gray-200: #2d2d2d;
    --color-gray-300: #404040;
    --shadow: 0 10px 30px rgba(0,0,0,.3);
    --shadow-sm: 0 2px 8px rgba(0,0,0,.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,.25);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.35);
}

[data-theme="dark"] .header-fixed {
    background: rgba(26, 26, 26, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .nav-menu {
    background: rgba(26, 26, 26, 0.98);
}

@media (max-width: 768px) {
    [data-theme="dark"] .nav-menu {
        background: rgba(26, 26, 26, 0.98);
    }
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

[data-theme="dark"] .product-card {
    background: #2d2d2d;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .product-card:hover {
    box-shadow: 0 8px 24px rgba(255, 82, 82, 0.2);
}

[data-theme="dark"] .specs-table {
    background: #2d2d2d;
}

[data-theme="dark"] .specs-table th {
    background: #333333;
    color: #e5e5e5;
}

[data-theme="dark"] .specs-table tbody tr:nth-child(even) {
    background: rgba(255, 82, 82, 0.05);
}

[data-theme="dark"] .specs-table tbody tr:hover {
    background: rgba(255, 82, 82, 0.1);
}

[data-theme="dark"] .contact-section {
    background: #1f1f1f;
}

[data-theme="dark"] .map-container {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .map-container h3 {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .about-section {
    background: #1a1a1a;
}

[data-theme="dark"] .about-overlay {
    background: rgba(26, 26, 26, 0.85);
}

[data-theme="dark"] .footer {
    background: #111111;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .carousel-container {
    background: #2d2d2d;
}

[data-theme="dark"] .carousel-slide img {
    filter: brightness(0.9);
}

/* ===== ACCESIBILIDAD ===== */
*:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 1rem;
    background: var(--color-text);
    color: var(--color-bg);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    z-index: 1000;
    transition: var(--transition);
}

.skip-link:focus {
    top: 1rem;
}

/* ===== LAYOUT PRINCIPAL ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Pantallas grandes - mejor aprovechamiento del espacio */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
        padding: 0 2rem;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
        padding: 0 3rem;
    }
}

/* ===== HEADER STICKY ===== */
.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    color: var(--color-primary);
    text-decoration: none;
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1.5px solid var(--color-gray-300);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
    transition: var(--transition);
    position: relative;
    color: var(--color-text);
}

.theme-toggle:hover {
    background: var(--color-gray-200);
    border-color: var(--color-primary);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
    color: var(--color-primary);
    background: rgba(198, 40, 40, 0.1);
}

.nav-menu a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--color-gray-200);
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-text);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-image: url('../img/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.hero-background img { display: none; }

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(183, 28, 28, 0.85) 0%, rgba(211, 47, 47, 0.9) 50%, rgba(139, 0, 0, 0.95) 100%);
    z-index: -1;
}

/* Badge de certificación */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(183, 28, 28, 0.2);
    animation: fade-in-up 0.8s ease-out 0.3s both;
}

.hero-badge svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.hero-hours {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    z-index: 2;
}

.hours-status {
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.hours-status:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 1);
}

.status-indicator {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.status-indicator.open {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.status-indicator.closed {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.status-text.open {
    color: #28a745;
}

.status-text.closed {
    color: #dc3545;
}

.hours-text {
    font-size: 0.85rem;
    color: #374151;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 2rem;
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cta-button {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: 700;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(183, 28, 28, 0.4), 0 0 0 0 rgba(183, 28, 28, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    animation: pulse 3s ease-in-out infinite;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(183, 28, 28, 0.6), 0 0 0 8px rgba(183, 28, 28, 0.1);
}

.cta-button:active {
    transform: translateY(-2px);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(183, 28, 28, 0.4), 0 0 0 0 rgba(183, 28, 28, 0.7);
    }
    50% {
        box-shadow: 0 8px 25px rgba(183, 28, 28, 0.4), 0 0 0 10px rgba(183, 28, 28, 0);
    }
}

/* ===== MICROINTERACCIONES EN BOTONES (1.1) ===== */
.cta-button,
.contact-btn,
.carousel-btn,
.product-tab,
.indicator,
.theme-toggle {
    position: relative;
    overflow: hidden;
}

.cta-button::after,
.contact-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

.cta-button:active::after,
.contact-btn:active::after {
    width: 300px;
    height: 300px;
}

/* Loading state para botones */
.cta-button.loading,
.contact-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.cta-button.loading::before,
.contact-btn.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 1;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Efecto ripple */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== SECCIONES ===== */
section {
    padding: clamp(3rem, 8vw, 5rem) 0;
    position: relative;
}

section:nth-child(even) {
    background: var(--color-gray-200);
}

/* Gradientes sutiles en secciones clave */
.services-section {
    background: linear-gradient(180deg, var(--color-bg) 0%, rgba(183, 28, 28, 0.02) 50%, var(--color-bg) 100%);
}

.advantages-section {
    background: linear-gradient(180deg, var(--color-gray-200) 0%, rgba(183, 28, 28, 0.03) 50%, var(--color-gray-200) 100%);
}

.contact-section {
    background: linear-gradient(180deg, var(--color-bg) 0%, rgba(183, 28, 28, 0.02) 50%, var(--color-bg) 100%);
}

[data-theme="dark"] .services-section,
[data-theme="dark"] .contact-section {
    background: linear-gradient(180deg, #1a1a1a 0%, rgba(255, 82, 82, 0.05) 50%, #1a1a1a 100%);
}

[data-theme="dark"] .advantages-section {
    background: linear-gradient(180deg, #1f1f1f 0%, rgba(255, 82, 82, 0.05) 50%, #1f1f1f 100%);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-text);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-transform: none;
}

h3 {
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

p {
    line-height: 1.75;
    letter-spacing: 0.01em;
}

/* Mejorar jerarquía tipográfica */
.hero-content h1 {
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.product-header h3 {
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.advantage-card h3 {
    letter-spacing: -0.015em;
    line-height: 1.3;
}

/* ===== SEPARADORES VISUALES ===== */
section:not(:first-child)::before {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    margin: 0 auto clamp(2rem, 5vw, 3rem);
    border-radius: 2px;
    opacity: 0.6;
}

.hero-section::before {
    display: none;
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-in.revealed {
    opacity: 1;
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Animación en cascada para grids */
.advantage-card,
.gallery-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.advantage-card.revealed,
.gallery-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.advantages-grid .advantage-card:nth-child(1) { transition-delay: 0.1s; }
.advantages-grid .advantage-card:nth-child(2) { transition-delay: 0.2s; }
.advantages-grid .advantage-card:nth-child(3) { transition-delay: 0.3s; }
.advantages-grid .advantage-card:nth-child(4) { transition-delay: 0.4s; }
.advantages-grid .advantage-card:nth-child(5) { transition-delay: 0.5s; }
.advantages-grid .advantage-card:nth-child(6) { transition-delay: 0.6s; }

/* ===== SUBNAV SERVICIOS ===== */
.products-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

/* Navegación mejorada para pantallas grandes */
@media (min-width: 1200px) {
    .products-nav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        margin-bottom: 2rem;
    }
    
    .product-tab {
        min-width: auto;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

.product-tab {
    background: var(--color-bg);
    border: 2px solid var(--color-gray-200);
    padding: 1rem 2rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--color-text);
    font-size: clamp(0.9rem, 2vw, 1rem);
    min-width: 150px;
}

.product-tab:hover {
    border-color: var(--color-primary);
    background: rgba(198, 40, 40, 0.05);
}

.product-tab:focus {
    border-color: var(--color-primary);
    background: rgba(198, 40, 40, 0.1);
}

.product-tab.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(183, 28, 28, 0.4);
    transform: translateY(-2px);
}

/* ===== CONTENIDO PRODUCTOS ===== */
.products-content {
    position: relative;
}

/* Layout mejorado para pantallas grandes */
@media (min-width: 1200px) {
    .products-content {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 3rem;
        align-items: start;
    }
    
    .product-panel {
        grid-column: 1 / -1;
    }
    
    .product-header {
        text-align: left;
        margin-bottom: 2rem;
    }
    
    .carousel-container {
        margin-bottom: 2rem;
    }
}

.product-panel {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.product-panel.active {
    display: block;
}

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

.product-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.product-header h3 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    position: relative;
    display: inline-block;
}

.product-header p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--color-gray-500);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.75;
    letter-spacing: 0.01em;
}

/* Badges para productos */
.product-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 1rem;
    vertical-align: middle;
    box-shadow: 0 2px 10px rgba(183, 28, 28, 0.3);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 10px rgba(183, 28, 28, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 20px rgba(183, 28, 28, 0.4);
    }
}

.product-badge.popular {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

.product-badge.new {
    background: linear-gradient(135deg, #28a745, #20c997);
}

/* Overlay hover en carousel images */
.carousel-slide {
    position: relative;
}

.carousel-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.carousel-wrapper:hover .carousel-slide.active::after {
    opacity: 1;
}

/* ===== CAROUSEL ===== */
.carousel-container {
    margin-bottom: 3rem;
}

.carousel-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}


.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    opacity: 0;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    transform: scale(0.98);
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.carousel-wrapper:hover .carousel-slide.active img {
    transform: scale(1.05);
}

.carousel-container .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

.carousel-container .carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-md);
}

.carousel-container .carousel-btn.prev {
    left: 1rem;
}

.carousel-container .carousel-btn.next {
    right: 1rem;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: var(--color-gray-200);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--color-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.indicator.active {
    background: var(--color-primary);
    transform: scale(1.3);
    box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.2);
}

.indicator.active::before {
    width: 100%;
    height: 100%;
}

.indicator:hover {
    background: var(--color-accent);
    transform: scale(1.15);
}

/* Barra de progreso en indicadores */
.indicator.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
    animation: indicator-progress 5s linear infinite;
}

@keyframes indicator-progress {
    from { width: 0; }
    to { width: 100%; }
}

/* ===== TABLA ESPECIFICACIONES ===== */
.specifications {
    max-width: 900px;
    margin: 0 auto;
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* Especificaciones más anchas para alinearse con el carrusel */
@media (min-width: 1024px) {
    .specifications {
        max-width: 1400px;
    }
}

/* Layout mejorado para pantallas grandes */
@media (min-width: 1200px) {
    .specifications {
        max-width: 1600px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: start;
        margin: 0 auto;
    }
    
    .specifications > div {
        margin-top: 0 !important;
    }
    
    .specifications table {
        width: 100%;
        table-layout: fixed;
    }
    
    .specifications table th:first-child,
    .specifications table td:first-child {
        width: 25%;
    }
    
    .specifications table th:nth-child(2),
    .specifications table td:nth-child(2) {
        width: 60%;
    }
    
    .specifications table th:last-child,
    .specifications table td:last-child {
        width: 15%;
    }
    
    .specifications table tbody tr {
        height: 70px;
    }
    
    .specifications table tbody tr th,
    .specifications table tbody tr td {
        vertical-align: middle;
        padding: 1rem;
        height: 70px;
    }
}

/* Para pantallas muy grandes, usar 3 columnas si hay 3 tablas */
@media (min-width: 1600px) {
    .specifications {
        max-width: 2000px;
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg);
    font-size: clamp(0.9rem, 2vw, 1rem);
    table-layout: fixed;
}

.specs-table caption {
    font-size: clamp(1.1rem, 2.5vw, 1.2rem);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
    text-align: left;
    padding: 1rem 0;
}

.specs-table th,
.specs-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-gray-200);
}

.specs-table th {
    background: var(--color-gray-200);
    font-weight: 600;
    color: var(--color-text);
}

.specs-table tbody tr:nth-child(even) {
    background: rgba(198, 40, 40, 0.02);
}

.specs-table tbody tr:hover {
    background: rgba(198, 40, 40, 0.05);
}

.specs-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== SECCIÓN CONTACTO ===== */
.contact-section {
    background: var(--color-gray-200);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Contacto mejorado para pantallas grandes */
@media (min-width: 1200px) {
    .contact-content {
        grid-template-columns: 1fr 1.5fr;
        gap: 5rem;
    }
}

.contact-methods h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.map-container h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    margin-top: 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-gray-200);
    font-weight: 600;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: none;
    cursor: pointer;
}

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

.contact-btn.whatsapp:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-btn.email {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(183, 28, 28, 0.4);
}

.contact-btn.email:hover {
    background: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(183, 28, 28, 0.5);
}

.contact-btn.phone {
    background: #1e7e34;
    color: white;
    box-shadow: 0 4px 15px rgba(30, 126, 52, 0.4);
}

.contact-btn.phone:hover {
    background: #155724;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 126, 52, 0.5);
}

.contact-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ===== MAPA ===== */
.map-container {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.map-container h3 {
    margin-bottom: 1.5rem;
    margin-top: 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-gray-200);
}

.map-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    overflow: hidden;
}

.map-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== SECCIÓN SOBRE NOSOTROS ===== */
.about-section {
    position: relative;
    background: var(--color-bg);
    overflow: hidden;
}

.about-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/Nosotros1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.about-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: 1;
}

[data-theme="dark"] .about-overlay {
    background: rgba(26, 26, 26, 0.85);
}

.about-section .container {
    position: relative;
    z-index: 2;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.about-text h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: var(--color-primary);
    margin-bottom: 1rem;
    margin-top: 2rem;
    font-weight: 600;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.8;
    color: var(--color-gray-500);
    margin-bottom: 1.5rem;
}

/* ===== SECCIÓN VENTAJAS ===== */
.advantages-section {
    background: var(--color-gray-200);
    padding: clamp(3rem, 8vw, 5rem) 0;
}

.advantages-description {
    text-align: center;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--color-gray-500);
    margin-top: 1rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.advantage-card {
    background: var(--color-bg);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Animación stagger para las cards */
.advantage-card:nth-child(1) { animation-delay: 0.1s; }
.advantage-card:nth-child(2) { animation-delay: 0.2s; }
.advantage-card:nth-child(3) { animation-delay: 0.3s; }
.advantage-card:nth-child(4) { animation-delay: 0.4s; }
.advantage-card:nth-child(5) { animation-delay: 0.5s; }
.advantage-card:nth-child(6) { animation-delay: 0.6s; }

/* Efecto 3D en hover */
.advantage-card:hover {
    transform: translateY(-12px) rotateX(2deg) rotateY(-2deg);
    box-shadow: 0 20px 40px rgba(183, 28, 28, 0.2), 0 0 0 1px rgba(183, 28, 28, 0.1);
    border-color: var(--color-primary);
}

/* Sombra animada que sigue el cursor */
.advantage-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(183, 28, 28, 0.1) 0%, 
        transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.advantage-card:hover::before {
    opacity: 1;
}

.advantage-card > * {
    position: relative;
    z-index: 1;
}

.advantage-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(183, 28, 28, 0.3);
}

.advantage-card:hover .advantage-icon {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 8px 25px rgba(183, 28, 28, 0.4);
}

.advantage-icon svg {
    width: 48px;
    height: 48px;
}

.advantage-card h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.4rem);
    color: var(--color-text);
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.advantage-card p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.7;
    color: var(--color-gray-500);
    margin: 0;
}

[data-theme="dark"] .advantages-section {
    background: #1f1f1f;
}

[data-theme="dark"] section:not(:first-child)::before {
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

[data-theme="dark"] .advantage-card {
    background: #2d2d2d;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .advantage-card:hover {
    border-color: var(--color-primary);
}

@media (max-width: 768px) {
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .advantage-card {
        padding: 2rem 1.5rem;
    }
    
    .advantage-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 1.25rem;
    }
    
    .advantage-icon svg {
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== FOOTER ===== */
footer {
    background: var(--color-gray-700);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--color-accent);
    font-weight: 700;
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.footer-section p {
    margin-bottom: 0.5rem;
    color: #d1d5db;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: var(--transition);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.footer-section a:hover,
.footer-section a:focus {
    color: var(--color-accent);
    text-shadow: 0 0 8px rgba(211, 47, 47, 0.5);
}

.footer-bottom {
    border-top: 1px solid #4b5563;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.privacy-link {
    color: var(--color-accent);
    text-decoration: none;
    transition: var(--transition);
    text-shadow: 0 0 5px rgba(211, 47, 47, 0.3);
}

.privacy-link:hover,
.privacy-link:focus {
    color: var(--color-primary);
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(183, 28, 28, 0.6);
}

/* ===== BOTÓN SCROLL TO TOP ===== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(183, 28, 28, 0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
    transform: translateY(-5px);
    box-shadow: 0 6px 30px rgba(183, 28, 28, 0.6);
}

.scroll-to-top:active {
    transform: translateY(-3px);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
}

[data-theme="dark"] .scroll-to-top {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    box-shadow: 0 4px 20px rgba(255, 82, 82, 0.4);
}

[data-theme="dark"] .scroll-to-top:hover {
    box-shadow: 0 6px 30px rgba(255, 82, 82, 0.6);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
    }
    
    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* ===== RESPONSIVE DESIGN - MOBILE FIRST ===== */

/* 480px */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
        border-radius: 0 0 var(--radius) var(--radius);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .products-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .product-tab {
        width: 100%;
        max-width: 280px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .carousel-slide img {
        height: 350px;
    }
    
    .carousel-container .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-container .carousel-btn.prev {
        left: 0.5rem;
    }

    .carousel-container .carousel-btn.next {
        right: 0.5rem;
    }
    
    .specs-table th,
    .specs-table td {
        padding: 0.75rem 0.5rem;
    }
    
    
    .hero-hours {
        margin: 1rem 0;
    }
    
    .hours-status {
        padding: 0.7rem 1rem;
    }
    
    .status-indicator {
        width: 24px;
        height: 24px;
    }
    
    .status-text {
        font-size: 0.9rem;
        font-weight: 700;
    }
    
    .hours-text {
        font-size: 0.75rem;
        font-weight: 600;
    }
}

/* 768px */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
        border-radius: 0 0 var(--radius) var(--radius);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
        margin-left: 0.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    
    .hero-hours {
        margin: 1.25rem 0;
    }
    
    .hours-status {
        padding: 0.8rem 1.2rem;
    }
    
    .status-indicator {
        width: 26px;
        height: 26px;
    }
    
    .status-text {
        font-size: 0.95rem;
        font-weight: 700;
    }
    
    .hours-text {
        font-size: 0.8rem;
        font-weight: 600;
    }
    
    .carousel-slide img {
        height: 300px;
    }
}

/* 1024px */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .nav-container {
        padding: 1rem 1.5rem;
    }
}

/* ===== ACCESIBILIDAD Y PREFERENCIAS ===== */

/* Reducir movimiento */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Alta contraste */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #0000ff;
        --color-text: #000000;
        --color-gray-200: #ffffff;
        --color-gray-500: #000000;
    }
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #111111;
        --color-text: #ffffff;
        --color-gray-200: #1f2937;
        --color-gray-500: #9ca3af;
        --color-gray-700: #f9fafb;
    }
}

/* ===== CARRUSEL MEJORADO PARA PANTALLAS GRANDES ===== */
/* Carrusel más grande horizontalmente */
@media (min-width: 1024px) {
    .carousel-container {
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        width: 100vw;
        max-width: none;
    }
    
    .carousel-wrapper {
        max-width: 1600px !important;
        margin: 0 auto;
    }
}

@media (min-width: 1200px) {
    .carousel-wrapper {
        max-width: 1800px !important;
    }
}

@media (min-width: 1400px) {
    .carousel-wrapper {
        max-width: 2000px !important;
    }
}

@media (min-width: 1600px) {
    .carousel-wrapper {
        max-width: 2200px !important;
    }
}

/* Carrusel más alto verticalmente */
@media (min-width: 1024px) {
    .carousel-slide img {
        height: 700px !important;
    }
}

@media (min-width: 1200px) {
    .carousel-slide img {
        height: 850px !important;
    }
}

@media (min-width: 1400px) {
    .carousel-slide img {
        height: 1000px !important;
    }
}

@media (min-width: 1600px) {
    .carousel-slide img {
        height: 1150px !important;
    }
}



