* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden; /* Evita el rebote elástico del navegador */
    width: 100%;
    position: fixed; /* Bloquea el body para que solo el feed haga scroll */
}

/* Contenedor principal estilo TikTok */
.feed-container {
    height: 100dvh;
    width: 100%;
    overflow-y: scroll;
    
    /* MÁGIA DEL SNAP SCROLL */
    scroll-snap-type: y mandatory; 
    -webkit-overflow-scrolling: touch; /* Suavidad en iOS */
    scroll-behavior: smooth;
    
    /* Evita que el scroll se salga del contenedor */
    overscroll-behavior-y: contain; 
}

/* Ocultar barra de scroll */
.feed-container::-webkit-scrollbar {
    display: none;
}

/* Cada Post individual */
.post {
    height: 100dvh;
    width: 100%;
    
    /* Fuerza a detenerse en cada imagen */
    scroll-snap-align: start;
    scroll-snap-stop: always; 
    
    position: relative;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Para que la foto no se deforme */
    pointer-events: none; /* Evita que el dedo "agarre" la imagen */
}

/* Gradiente inferior para lectura clara */
.overlay-shadow {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 45%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    pointer-events: none;
    z-index: 5;
}

/* Información del producto */
.info-overlay {
    position: absolute;
    bottom: 85px; /* Por encima del Navbar */
    left: 15px;
    z-index: 10;
    max-width: 70%;
}

.empresa-tag {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    display: inline-block;
    margin-bottom: 6px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.product-name {
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Corta el texto si es muy largo */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Navbar Inferior */
.navbar {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 65px;
    background-color: #000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 0.5px solid #222;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom); /* Ajuste para iPhones con notch abajo */
}

.nav-item {
    color: #fff;
    font-size: 24px;
    text-decoration: none;
    opacity: 0.5;
    width: 33.3%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-item.active {
    opacity: 1;
    color:#4ade80;
}

/* Prevenir que se vea feo en Desktop (Opcional) */
@media (min-width: 500px) {
    .feed-container {
        max-width: 450px;
        margin: 0 auto;
        border-left: 1px solid #222;
        border-right: 1px solid #222;
    }
    .navbar {
        max-width: 450px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Contenedor de la derecha */
.action-side {
    position: absolute;
    right: 15px;
    bottom: 100px; /* Alineado con el overlay de la izquierda */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px; /* Espacio entre el precio y el botón */
    z-index: 20;
}

/* Nuevo estilo del precio al lado del botón */
.price-tag-side {
    color: #4ade80; /* Verde neón */
    font-weight: 900;
    font-size: 1.2rem;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid #4ade80;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.459);
}

/* El botón de WhatsApp se mantiene igual pero dentro del flex */
.whatsapp-btn {
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    transition: transform 0.2s active;
}

/* Estilo del Logo Superior */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 1000; /* Siempre por encima de las fotos */
    pointer-events: none; /* Permite tocar lo que hay debajo */
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #fff;
    /* Un toque de verde BRIO si quieres, o blanco puro */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* Botón de ubicación superior derecha */
.top-location-btn {
    position: absolute;
    top: 20px; /* Misma altura que el logo BRIO */
    right: 20px; /* Pegado a la derecha */
    background-color: #4ade80; /* Verde BRIO */
    color: #000;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none;
    z-index: 1001; /* Por encima de la imagen y otros overlays */
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: transform 0.2s ease;
}

.top-location-btn:active {
    transform: scale(0.9);
}