/* Reseteo Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Variables de Color */
    --primary-color: #0047AB; /* Azul oscuro y tecnológico */
    --secondary-color: #002D62; /* Tono más oscuro del primario */
    --light-bg: #F0F2F5; /* Fondo general de la página */
    --dark-text: #222222; /* Texto casi negro */
    --medium-text: #555555;
    --white: #FFFFFF;
    --grey-light: #D3D3D3; /* Gris claro para texto hero */
    --grey-medium: #A9A9A9; /* Gris medio para texto hero */
    --black: #000000;
    --mercado-libre-yellow: #FFE600;

    /* Variables para Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);

    /* Variables de Sombras */
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-strong: rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
    overflow-x: hidden; /* Previene el desbordamiento horizontal */
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 30px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- Títulos --- */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--dark-text);
    text-align: center;
}

/* --- Botones Generales (para secciones de contenido) --- */
.cta-button, .secondary-button {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap; /* CORRECCIÓN PARA EVITAR QUE EL TEXTO SE PARTA */
}

.cta-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px var(--shadow-strong);
}

.secondary-button {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.secondary-button:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

/* --- Header con efecto Blur Fuerte y Consistente y Navegación --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(17, 17, 17, 0.5); /* Ligeramente más oscuro para mejor contraste */
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: 0 4px 20px var(--shadow-light);
    z-index: 1000;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    margin-right: auto;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    margin: 0 20px;
}

.main-nav ul {
    display: flex;
    gap: 40px;
}

.main-nav a {
    font-weight: 500;
    color: var(--white); /* Texto blanco para el menú */
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--mercado-libre-yellow); /* Subrayado amarillo */
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.main-nav a:hover {
    color: var(--mercado-libre-yellow);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle .dot {
    width: 6px;
    height: 6px;
    background-color: var(--white); /* Puntos blancos */
    border-radius: 50%;
    transition: all 0.3s ease;
}

.menu-toggle:hover .dot {
    background-color: var(--mercado-libre-yellow);
}

.menu-toggle.active .dot:nth-child(1) {
    transform: translateY(12px) rotate(45deg);
    background-color: var(--mercado-libre-yellow);
}
.menu-toggle.active .dot:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .dot:nth-child(3) {
    transform: translateY(-12px) rotate(-45deg);
    background-color: var(--mercado-libre-yellow);
}


/* --- Sección Hero (Pantalla de Bienvenida) --- */
.hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh;
    overflow: hidden;
    background-color: var(--black);
}

.background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: brightness(0.4) contrast(1.2);
}

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

/* --- Estilos y Blur para elementos del Hero --- */
.brand-name, .slogan-text, .hero-cta-button {
    position: relative;
    z-index: 2;
    padding: 8px 20px;
    border-radius: 12px;
    margin: 5px 0;
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.brand-name {
    font-size: 5.5em;
    margin-bottom: 5px;
    font-weight: 900;
    color: var(--white);
}

.slogan-text {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-weight: 400;
    color: var(--grey-light);
}

.hero-cta-button {
    padding: 15px 35px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--white);
    background-color: rgba(128, 128, 128, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-cta-button:hover {
    background-color: rgba(128, 128, 128, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Keyframes para animaciones de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- SECCIONES PRINCIPALES (ÍNDEX) --- */
.content-section {
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.content-section h2 {
    font-size: 3.2em;
    margin-bottom: 30px;
    color: var(--white); /* Títulos blancos en secciones oscuras */
}

/* Estilo para los apartados de la página principal */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 4 columnas */
    gap: 30px;
    margin-top: 40px;
}

.section-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    color: var(--white);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 45px 0 rgba(0, 0, 0, 0.5);
}

.section-card h3 {
    color: var(--white);
    font-size: 1.8em;
    margin-bottom: 15px;
}

.section-card h3 a:hover {
    color: var(--mercado-libre-yellow);
}

.section-card p {
    color: var(--grey-light);
    font-size: 1.1em;
    margin-bottom: 25px;
    flex-grow: 1;
}

.section-card .secondary-button {
    border-color: var(--white);
    color: var(--white);
}

.section-card .secondary-button:hover {
    background-color: var(--white);
    color: var(--black);
}

/* --- SECCIÓN CARRUSEL DE SUGERENCIAS --- */
.suggested-products {
    padding: 50px 0;
    text-align: center;
}

.suggested-products h2 {
    margin-bottom: 40px;
}

.suggested-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 20px;
    cursor: grab;
}
.suggested-carousel.active {
    cursor: grabbing;
}
.suggested-carousel::-webkit-scrollbar {
    display: none;
}

/* Estilos para el carrusel en tema oscuro */
.dark-theme .suggested-products h2 {
    color: var(--white);
}

.dark-theme .suggested-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .suggested-details h3 {
    color: var(--white);
}

.dark-theme .suggested-price {
    color: var(--mercado-libre-yellow);
}

.suggested-item {
    flex: 0 0 auto;
    width: 250px;
    margin: 0 15px;
    scroll-snap-align: center;
    border-radius: 15px;
    text-align: left;
    background-color: var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.suggested-item:hover {
    transform: translateY(-5px);
}

.suggested-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.suggested-details {
    padding: 20px;
}

.suggested-details h3 {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--dark-text);
    text-align: left;
}
.suggested-price {
    font-size: 1.1em;
    color: var(--primary-color);
    font-weight: 500;
}

/* --- Estilos para la página de producto detallada (General) --- */
.product-info-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    text-align: left;
    align-items: flex-start;
}
.product-media-container {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.product-main-image-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#main-product-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.product-thumbnail-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.product-thumbnail {
    width: 60px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    object-fit: cover;
}
.product-thumbnail.active {
    border-color: var(--primary-color);
}
.product-details-page {
    padding-top: 20px;
}
.product-details-page h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    text-align: left;
}

.product-pricing {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.product-price-old-enclosed {
    font-size: 1em;
    color: var(--white);
    background-color: var(--medium-text);
    text-decoration: none;
    border-radius: 8px;
    padding: 8px 12px;
}
.product-price-new {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--dark-text);
}
.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.product-rating .stars {
    color: #f1c40f;
}
.product-rating .reviews-count {
    font-size: 0.9em;
    color: var(--medium-text);
}

/* Estilos de la página de T&C */
.terms-page-section {
    padding-top: 150px;
}
.terms-card {
    text-align: left;
    max-width: 900px;
    margin: 0 auto;
}

.terms-card h2,
.terms-card h3 {
    text-align: left;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--white);
}

.terms-card p,
.terms-card .faq-item p,
.terms-card li {
    color: var(--grey-light);
}

.terms-card ul {
    list-style: disc;
    padding-left: 20px;
}

.terms-card hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 40px 0;
}

.faq-item {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-item h3 {
    text-align: left;
    font-size: 1.3em;
    margin-bottom: 10px;
    color: var(--mercado-libre-yellow);
}

.terms-card a {
    color: var(--mercado-libre-yellow);
    text-decoration: underline;
}

/* Estilos para la página de todos los productos (tec.html) */
.product-grid-page {
    padding-top: 150px;
    padding-bottom: 80px;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.product-card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.product-card:hover {
    transform: translateY(-5px);
}
.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    margin-bottom: 15px;
}
.product-card h3 {
    font-size: 1.5em;
    margin-bottom: 5px;
    padding: 0 10px;
    color: var(--dark-text); /* Texto oscuro para tarjetas claras */
}
.product-card .price-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}
.product-card .price-old {
    font-size: 1em;
    color: var(--medium-text);
    text-decoration: line-through;
}
.product-card .price-new {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--dark-text);
}

/* Estilos para el footer */
.main-footer {
    background-color: var(--black);
    color: var(--white);
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}


/* Botones de producto y Mercado Libre */
.product-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.mercado-libre-button {
    background-color: var(--mercado-libre-yellow);
    color: var(--black);
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mercado-libre-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.tyc-button {
    text-align: center;
    display: block;
}


/* Reglas generales para evitar zoom */
img, video {
    max-width: 100%;
    height: auto;
}

/* --- Adaptabilidad (Responsive Design) --- */

@media (max-width: 992px) {
    .main-header { padding: 15px 0; }
    .main-header .container { padding: 0 20px; }
    .logo img { height: 35px; }

    /* CORRECCIÓN MENÚ MÓVIL */
    .main-nav {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background-color: rgba(17, 17, 17, 0.7); /* Menos opaco para ver el blur */
        backdrop-filter: blur(25px) saturate(180%);
        -webkit-backdrop-filter: blur(25px) saturate(180%);
        display: flex; justify-content: center; align-items: center;
        flex-direction: column;
        opacity: 0; visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 999;
    }
    .main-nav.nav-open { opacity: 1; visibility: visible; }
    .main-nav ul { flex-direction: column; text-align: center; gap: 25px; }
    .main-nav a { font-size: 1.8em; color: var(--white); }
    .menu-toggle { display: flex; }
    .brand-name { font-size: 3em; }
    .slogan-text { font-size: 1.5em; }
    .hero-cta-button { font-size: 0.9em; padding: 10px 20px; }
    .content-section { padding: 70px 0; }
    .content-section h2 { font-size: 2.2em; }
    .product-info-container { grid-template-columns: 1fr; gap: 20px; }
    .product-media-container { position: static; }
    .product-details-page h1 { font-size: 2.5em; }
    .product-price-new { font-size: 2em; }
}

@media (max-width: 480px) {
    .container { padding: 0 15px; }
    .logo img { height: 30px; }
    .main-header { padding: 10px 0; }
    .brand-name { font-size: 2.5em; }
    .slogan-text { font-size: 1.2em; }
    .hero-cta-button { font-size: 0.8em; padding: 8px 15px; }
    .main-nav a { font-size: 1.5em; }
}

/* --- Estilos para páginas de producto con diseño de cristal --- */
.product-page-content {
    position: relative;
    z-index: 2;
    padding-top: 120px;
}

.glass-card-product {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    color: var(--white);
}

.product-info-section-glass {
    padding-bottom: 50px;
}

.product-details-page.glass-card-product h1,
.product-details-page.glass-card-product .product-price-new,
.product-details-page.glass-card-product .product-description,
.product-details-page.glass-card-product .reviews-count {
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.product-details-page.glass-card-product .secondary-button {
    border-color: var(--white);
    color: var(--white);
}

.product-details-page.glass-card-product .secondary-button:hover {
    background-color: var(--white);
    color: var(--black);
}

.color-options { margin: 20px 0; }
.color-options .color-swatch {
    display: inline-block; width: 24px; height: 24px; border-radius: 50%;
    cursor: pointer; border: 2px solid transparent; transition: all 0.3s ease; margin-right: 10px;
}
.color-options .color-swatch.active { border-color: var(--mercado-libre-yellow); transform: scale(1.1); }

.product-details-section-glass { padding: 50px 0; }
.details-wrapper { margin-bottom: 40px; }
.details-wrapper h2 { color: var(--white); font-size: 2.5em; margin-bottom: 30px; text-align: center; }
.specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }

.spec-item {
    background: rgba(255, 255, 255, 0.1); padding: 20px; border-radius: 10px;
    text-align: center; display: flex; flex-direction: column; justify-content: center;
}
.spec-title { font-size: 0.9em; font-weight: 500; color: var(--grey-medium); margin-bottom: 5px; }
.spec-value { font-size: 1.1em; font-weight: 700; color: var(--white); }

.reviews-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px) { .reviews-grid { grid-template-columns: 1fr 1fr; } }

.review-card-item { background: rgba(255, 255, 255, 0.1); padding: 25px; border-radius: 10px; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.review-author { font-weight: 700; color: var(--white); }
.review-rating { color: var(--mercado-libre-yellow); font-size: 1.2em; }
.review-card-item h4 { font-size: 1.3em; font-weight: 700; color: var(--white); margin-bottom: 10px; text-align: left; }
.review-card-item p { color: var(--grey-light); font-size: 1em; line-height: 1.6; text-align: left; }

/* --- CORRECCIÓN PARA FONDO OSCURO LOCAL --- */
.product-background-video {
    display: none;
}

body.product-page-dark-background,
body.dark-theme { /* Nueva clase para el index y términos */
    background-color: #111;
    background-image: linear-gradient(145deg, #111111 0%, #2d3436 74%);
}

/* --- NUEVO: Estilo para texto multicolor de IA --- */
.rainbow-text {
    font-weight: 900;
    background: linear-gradient(90deg, #ffd700, #ff8c00, #ff0080, #e040fb, #448aff, #00e5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    animation: rainbow-animation 10s ease-in-out infinite;
    background-size: 400% 400%;
}

@keyframes rainbow-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}