/* --- Fuentes de Google --- */
body {
    font-family: 'Open Sans', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #333;
    scroll-behavior: smooth;
}

.main-content {
    flex-grow: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
}

/* --- Paleta de Colores --- */
:root {
    --tp-blue-primary: #2085c8;
    --tp-blue-secondary: #2596D7;
    --tp-pink-accent: #e52b88;
    --tp-orange-accent: #f7941e;
    --tp-green-accent: #8dc63f;
    --hero-gradient: linear-gradient(90deg, var(--tp-blue-primary) 0%, var(--tp-pink-accent) 50%, var(--tp-orange-accent) 100%);
    --tp-text-dark: #1a202c;
    --tp-text-light: #f7fafc;
    --tp-bg-light: #ffffff;
    --tp-bg-dark: #1a202c;
    --whatsapp-green: #25D366;
}

/* --- Estilos Generales --- */
.header-bg { background-color: var(--tp-bg-light); }

/* --- Pie de Página --- */
/* ✅ OPTIMIZACIÓN 2: Se elimina la animación del fondo para mejorar el rendimiento.
   El fondo degradado estático se mantiene, ya que es visualmente atractivo y ligero. */
.footer-bg {
    background-color: #0d1117;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(37, 150, 211, 0.25), transparent 25%),
        radial-gradient(circle at 80% 30%, rgba(229, 43, 136, 0.2), transparent 25%),
        radial-gradient(circle at 30% 90%, rgba(141, 198, 63, 0.2), transparent 25%);
    background-size: 200% 200%;
    color: var(--tp-text-light);
}

/* --- MEJORA DE ACCESIBILIDAD: Estilo de Foco Visible --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--tp-blue-secondary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* --- Barra de Navegación (Escritorio) --- */
.nav-link, .dropdown-toggle {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    padding-bottom: 1rem; 
    color: var(--tp-text-dark);
}

.nav-link:hover, .dropdown-toggle:hover {
    background-color: transparent; 
    color: var(--tp-blue-primary);
}

/* ✅ OPTIMIZACIÓN 1: Se aumenta la especificidad para eliminar !important */
.nav-link.nav-link-active {
    background-color: transparent;
    color: var(--tp-blue-primary);
}
.nav-link.nav-link-active svg { 
    fill: var(--tp-blue-primary); 
}

.nav-link:not(.nav-link-active)::after,
.dropdown-toggle:not(.nav-link-active)::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 0;
    height: 3px;
    background: var(--hero-gradient);
    transition: all 0.3s ease-in-out;
    transform: translateX(-50%);
}
.nav-link:not(.nav-link-active):hover::after,
.dropdown-toggle:not(.nav-link-active):hover::after {
    width: 100%;
}

.nav-link.nav-link-active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 8px;
    width: 100%;
    height: 3px;
    background: var(--hero-gradient);
}

/* --- Menú Desplegable (Escritorio) --- */
.dropdown { 
    position: relative; 
}
.dropdown-toggle { 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
}
.dropdown-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--tp-bg-light);
    min-width: 240px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 50;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out, visibility 0.2s;
}
.dropdown-menu a {
    color: var(--tp-text-dark);
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    display: block;
    font-size: 0.875rem;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
}
.dropdown-menu a:hover { 
    background-color: #f3f4f6;
    color: var(--tp-blue-primary);
}
.dropdown:hover > .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}
.dropdown-toggle svg {
    margin-left: 0.35rem;
    width: 0.75rem;
    height: 0.75rem;
    transition: transform 0.2s ease-in-out;
    fill: currentColor;
}
.dropdown:hover .dropdown-toggle svg { 
    transform: rotate(180deg); 
}

/* El resto del código se mantiene igual ya que sigue las mejores prácticas */
/* --- Menú Lateral Deslizante (Móvil) --- */
.mobile-nav-item {
    border-bottom: 1px solid #e5e7eb; 
    cursor: pointer;
}
.mobile-dropdown-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem; 
    color: var(--tp-text-dark); 
    font-weight: 600;
    text-align: left;
    background-color: transparent;
}
.mobile-dropdown-toggle:hover {
    background-color: #f3f4f6;
}
.mobile-submenu {
    background-color: #f9fafb;
    overflow: hidden;
    padding-left: 1rem;
}
.mobile-submenu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    font-size: 0.875rem;
    border-top: 1px solid #e5e7eb;
}
.mobile-submenu a:hover {
    background-color: #f3f4f6;
    color: var(--tp-blue-primary);
}

/* --- Botón Flotante de WhatsApp --- */
.whatsapp-float-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #FFFFFF;
    color: #000000;
    border: 2px solid var(--whatsapp-green);
    border-radius: 9999px;
    padding: 10px 18px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    text-decoration: none;
}
.whatsapp-float-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.whatsapp-float-button svg { width: 28px; height: 28px; }

/* --- Carrusel de Reseñas (Swiper) --- */
.mySwiper {
    width: 100%;
    padding-top: 10px;
    padding-bottom: 40px;
}
.review-card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    text-align: left;
    box-sizing: border-box;
    height: auto;
    max-width: 380px; 
    margin: 0 auto;
}
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}
.review-author-name {
    font-weight: 600;
    color: var(--tp-text-dark);
}
.review-date {
    font-size: 0.75rem;
    color: #6b7280;
}
.google-icon svg {
    width: 24px;
    height: 24px;
}
.review-stars {
    color: #FFD700;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}
.review-text {
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* --- Estilos para la página de Productos --- */
.sidebar-link {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: color 0.2s, background-color 0.2s;
    color: var(--tp-text-dark);
    font-weight: 600;
}
.sidebar-link:hover {
    background-color: #f3f4f6;
    color: var(--tp-blue-primary);
}
.sidebar-link.active {
    background-color: var(--tp-blue-primary);
    color: var(--tp-text-light);
}
.sidebar-link.active:hover { background-color: var(--tp-blue-secondary); }

.category-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 2rem;
    border-bottom-width: 2px;
    padding-bottom: 0.5rem;
    border-color: var(--tp-blue-primary);
}

.product-card {
    background-color: white;
    border-radius: 0.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out;
    border: 2px solid transparent;
}
.product-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    transform: translateY(-5px);
    border-color: var(--tp-blue-primary);
}
.product-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--tp-text-dark);
}
.product-card-description {
    color: #4b5563;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* --- Botones --- */
.btn {
    display: inline-block;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    font-size: 0.875rem;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.btn-primary {
    color: var(--tp-text-light);
    background-image: var(--hero-gradient);
    background-size: 200% auto;
    transition: background-position 0.4s ease-out, transform 0.2s ease-in-out, box-shadow 0.3s ease-in-out;
}
.btn-primary:hover {
    background-position: right center;
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(32, 133, 200, 0.4), 0 4px 6px -2px rgba(32, 133, 200, 0.2);
}
.btn-category {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: #eef2ff;
    color: var(--tp-blue-secondary);
    transition: all 0.2s ease-in-out;
}
.btn-category:hover {
    background-color: var(--tp-blue-secondary);
    color: white;
    transform: scale(1.05);
}

/* --- Estilos para Pie de Página Avanzado --- */
.footer-logo {
    height: 3rem;
    width: auto;
    opacity: 0.9;
}
.footer-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--tp-blue-secondary);
    display: inline-block;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.footer-link {
    color: #d1d5db;
    transition: color 0.2s ease-in-out, padding-left 0.2s ease-in-out;
    display: inline-block;
}
.footer-link:hover {
    color: #ffffff;
    padding-left: 5px;
}
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.footer-icon {
    flex-shrink: 0;
    margin-right: 0.75rem;
    margin-top: 3px;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--tp-blue-secondary);
}
.social-link {
    color: #9ca3af;
    transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
}
.social-link:hover {
    color: #ffffff;
    transform: scale(1.15) translateY(-3px);
}

/* --- Estilos para Acordeón de Preguntas Frecuentes (FAQ) --- */
summary {
    list-style: none;
    cursor: pointer;
}
summary::-webkit-details-marker {
    display: none;
}

/* --- Estilo para el Botón CTA Final --- */
.btn-cta {
    display: inline-block;
    background-color: white;
    color: var(--tp-blue-primary);
    font-weight: 700;
    font-size: 1.125rem;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
}
.btn-cta:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    background-color: #f3f4f6;
    color: var(--tp-blue-secondary);
}

/* --- Estilos para Tabla Comparativa Interactiva --- */
.comparison-table {
    font-size: 1rem;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.comparison-table th,
.comparison-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}
.comparison-table thead th {
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: bottom;
    text-align: center;
}
.comparison-table thead th:first-child {
    border-top-left-radius: 0.5rem;
}
.comparison-table thead th:last-child {
    border-top-right-radius: 0.5rem;
}
.comparison-table thead th:nth-child(2) { background-color: var(--tp-blue-primary); }
.comparison-table thead th:nth-child(3) { background-color: var(--tp-green-accent); }
.comparison-table thead th:nth-child(4) { background-color: var(--tp-pink-accent); }
.comparison-table thead th:nth-child(5) { background-color: var(--tp-orange-accent); }
.comparison-table tbody tr {
    transition: all 0.2s ease-in-out;
}
.comparison-table tbody tr:hover {
    background-color: #f9fafb;
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.comparison-table th:first-child {
    font-weight: 700;
    color: var(--tp-text-dark);
    text-align: left;
}