* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    /* Fondo oscuro y futurista */
    background: radial-gradient(circle at top, #101820, #000);
    color: white;
    min-height: 100vh;
}

/* ========= NAV ISLA (Dynamic Island) ========= */

.nav-isla {
    position: fixed;
    top: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 100;
}

.nav-content {
    /* Efecto "cristal" */
    background: rgba(90, 120, 140, 0.35);
    backdrop-filter: blur(20px);
    padding: 10px 25px;
    border-radius: 40px;
    display: flex;
    gap: 20px;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    /* Transición para el efecto de "expansión" */
    transition: all 0.3s ease-out;
}

.nav-content.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 10px 30px; 
    box-shadow: none;
}

.nav-content span {
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.nav-content span:hover {
    opacity: 1;
}

.menu-btn {
    font-size: 20px;
    cursor: pointer;
}

/* MENU DESPLEGABLE */

.menu-desplegable {
    position: absolute;
    top: 54px; /* Ajuste para que empiece justo debajo del nav-content */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(100, 130, 150, 0.3);
    backdrop-filter: blur(20px);
    border-radius: 0 0 20px 20px;
    padding: 15px 25px;
    /* Animación de entrada y salida */
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
}

.menu-desplegable.show {
    opacity: 1;
    visibility: visible;
    max-height: 200px;
    padding: 15px 25px;
    display: flex; /* Asegura que se vea */
    flex-direction: column;
    gap: 15px;
}

.menu-desplegable a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s ease;
}

.menu-desplegable a:hover {
    opacity: 0.8;
}

/* ========= HERO ========= */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 120px 6%;
    gap: 40px;

    background: 
        linear-gradient(to right, rgba(0,0,0,0.85), rgba(0,0,0,0.6)),
        url("./assets/fondo.png"); /* Asegura que la imagen de fondo esté en assets */

    background-size: cover;
    background-position: center;
}

.hero-img img {
    width: 320px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.8));
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.hero-text h1 {
    font-size: 52px;
    letter-spacing: 2px;
}

.hero-text p {
    margin-top: 15px;
    font-size: 14px;
    letter-spacing: 4px;
    opacity: 0.7;
}

/* ==== RESPONSIVE HERO Y NAV ==== */

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-img img {
        width: 240px;
    }

    .nav-content span:not(.menu-btn) {
        display: none;
    }
}

/* ========= DESTACADOS ========= */

.destacados {
    padding: 80px 6%;
}

.titulo-seccion {
    text-align: center;
    letter-spacing: 6px;
    margin-bottom: 40px;
    opacity: 0.8;
}

.carrusel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 10px;
}

.carrusel::-webkit-scrollbar {
    display: none;
}

.card {
    min-width: 200px;
    height: 260px;
    /* ✅ GRIS OSCURO METÁLICO */
    background: #2d3748; 
    border-radius: 25px;
    padding: 10px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    color: white; 
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.5); 
}

.producto-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 18px;
}

.nombre {
    text-align: center;
    background: black;
    color: white; 
    margin-top: 8px;
    border-radius: 12px;
    padding: 6px;
    font-size: 13px;
}

.logo-marca {
    position: absolute;
    top: 10px;
    right: 12px;
    background: black;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
}

.stock {
    position: absolute;
    top: 10px;
    left: 12px;
    font-size: 11px;
}

.corazon {
    position: absolute;
    bottom: 60px;
    right: 12px;
    font-size: 15px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.card:hover .corazon {
    opacity: 1;
}

.info-extra {
    /* Animación de despliegue */
    margin-top: 0; 
    max-height: 0;
    overflow: hidden;
    font-size: 11px;
    text-align: center;
    opacity: 0.8;
    transition: max-height 0.3s ease-out, margin-top 0.3s ease-out;
}

.info-extra.show-info {
    max-height: 50px;
    margin-top: 6px;
}

/* ✅ RESPONSIVE CARRUSEL */
@media (max-width: 600px) {
    .card {
        min-width: 48%;
    }
}

/* ========= STOCK COMPLETO ========= */

.stock-section { 
    padding: 90px 6%;
}

.filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 35px;
}

.filtros button {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    min-width: 80px;
}

.filtros button:hover {
    background: rgba(255,255,255,0.3);
}

.filtros .activo {
    background: white;
    color: black;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.grid-stock {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

/* Animación al filtrar (ocultar/mostrar) */
.producto {
    transition: 0.3s ease-in-out;
}

.producto.hide {
    opacity: 0;
    transform: scale(0.8);
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    min-width: 0;
    visibility: hidden;
}

.producto.show {
    opacity: 1;
    transform: scale(1);
    height: 260px; 
    padding: 10px; 
    margin: 0;
    min-width: 200px;
    visibility: visible;
}

/* ========= INFO ========= */

.info {
    padding: 90px 6%;
    text-align: center;
}

.info-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(90, 120, 140, 0.15); 
    border-radius: 20px;
    padding: 30px;
}

.info-container h3 {
    color: #a8dadc;
    margin-bottom: 20px;
    font-size: 22px;
}

.info-container p {
    line-height: 1.6;
    margin-bottom: 15px;
    opacity: 0.9;
}

.frase-emotiva {
    font-style: italic;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #f1faee;
    font-size: 14px;
    opacity: 0.7;
}

/* ========= FOOTER ========= */

.footer {
    background: #101820; 
    color: white;
    padding: 40px 6%;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-columna h4 {
    color: #a8dadc;
    margin-bottom: 15px;
    font-size: 16px;
    letter-spacing: 1px;
}

.footer-columna .social-title {
    margin-top: 25px; 
    margin-bottom: 5px;
    color: white;
}

.footer-columna p,
.footer-columna a {
    font-size: 13px;
    color: #bbb;
    margin-bottom: 8px;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

.footer-columna a:hover {
    color: #a8dadc;
}

.social-links {
    margin-top: 5px; 
    display: flex;
    gap: 20px; 
}

.social-links a {
    font-size: 24px;
    color: white;
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
}

/* Efecto hover en íconos */
.social-links a:hover {
    transform: translateY(-3px);
}

/* Estilo para los íconos específicos */
.fa-instagram {
    color: #E1306C; 
}

.fa-whatsapp {
    color: #25D366; 
}

.fa-envelope {
    color: #DB4437; 
}

/* Sobreescribir color hover para un toque más limpio */
.fa-instagram:hover,
.fa-whatsapp:hover,
.fa-envelope:hover {
    color: white; 
    opacity: 0.8;
}

/* Corrección de error en el CSS anterior */
.producto {
    transition: 0.3s;
}

/* ========================================= */
/* 🚀 MODAL PRODUCTO (ESTILO IOS SIMPLE) */
/* ========================================= */

/* Fondo de la modal */
.modal {
    position: fixed;
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); 
    display: none; 
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

/* Contenido de la modal (la tarjeta central) */
.modal-content {
    background: #101820; /* Fondo muy oscuro, casi negro */
    border-radius: 18px; /* Bordes suaves */
    width: 95%;
    max-width: 420px; /* Estrecho, como una tarjeta de teléfono */
    max-height: 95vh;
    overflow-y: auto; 
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

/* Carrusel de Medios (PARTE SUPERIOR) */
.media-carrusel {
    position: relative;
    overflow: hidden;
    height: 380px; /* Altura generosa para la imagen */
    border-radius: 18px 18px 0 0;
    background: #000;
}

.carrusel-inner {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.7, 0.5, 1); /* Curva de transición suave */
}

.carrusel-inner img,
.carrusel-inner video {
    width: 100%;
    height: 100%; 
    object-fit: cover;
    flex-shrink: 0;
}

/* Botones de navegación del carrusel (Minimalistas) */
.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2); /* Fondo semi-transparente blanco */
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 50;
    font-size: 16px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: background 0.2s;
}

.prev-btn:hover, .next-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* Botón de cierre (Arriba a la derecha, flotante) */
.close-btn {
    color: white;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    z-index: 100; 
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    transition: opacity 0.2s;
    opacity: 0.8;
}

.close-btn:hover {
    opacity: 1;
}

/* Logo de marca (Arriba a la izquierda, flotante) */
.logo-marca-modal {
    position: absolute;
    top: 15px; 
    left: 15px;
    background: #a8dadc; 
    color: black;
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 12px;
    z-index: 100;
    opacity: 0.9;
}

/* Detalles del Producto (PARTE INFERIOR) */
.product-details {
    padding: 20px 20px 30px 20px; /* Espaciado interno */
    position: relative;
}

#modalProductName {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #f1faee;
}

.product-price {
    font-size: 20px;
    color: #25D366; 
    font-weight: bold;
    margin-bottom: 15px;
}

.product-info-body {
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.product-info-body h3 {
    color: #a8dadc;
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: normal;
    letter-spacing: 1px;
}

#modalProductFeatures {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
}

#modalProductFeatures li {
    font-size: 14px;
    line-height: 1.5;
    padding: 2px 0;
    /* Estilo minimalista de lista */
    position: relative;
    padding-left: 15px;
}

#modalProductFeatures li::before {
    content: "•";
    color: #a8dadc; 
    font-weight: bold;
    display: inline-block; 
    width: 1em;
    margin-left: -1em;
}


/* Botones de Acción (WhatsApp / Instagram) */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-radius: 12px; /* Más redondeado, estilo iOS */
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    transition: transform 0.2s, opacity 0.2s;
}

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

.instagram-btn {
    background: #1c2533; /* Fondo de la modal ligeramente más claro */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-action:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Media Query para pantallas muy pequeñas */
@media (max-width: 480px) {
    .media-carrusel {
        height: 300px;
    }
    
    #modalProductName {
        font-size: 24px;
    }
    .product-price {
        font-size: 18px;
    }
}

/* Ocultar scrollbar en modal si fuera necesario (mejor UX) */
.modal-content::-webkit-scrollbar {
    display: none;
}
.modal-content {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* ========================= */
/* OPTIMIZACIÓN PARA CELULARES */
/* ========================= */

/* Desactivar animación pesada solo en celulares */
@media (max-width: 900px) {
    .hero-img img {
        animation: none !important;
    }
}

/* El blur de Dynamic Island solo en PC */
@media (max-width: 900px) {
    .nav-content,
    .menu-desplegable {
        backdrop-filter: none !important;
    }
}

/* Evitar hover forzado en pantallas táctiles */
@media (hover: none) {
    .card:hover {
        transform: none !important;
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4) !important;
    }
}

/* Reducir animaciones si el sistema es lento */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}