/* =========================================================================
   GUÍA DE ESTILOS: ENERGÍA ANCESTRAL
   ========================================================================= */

:root {
    /* Paleta de Color */
    --bg-primary: #F5F0E8;
    --bg-secondary: #EDE8DC;
    --accent-dark: #2C3B2E;
    --accent-warm: #8B6914;
    --text-primary: #1A1A1A;
    --text-muted: #6B6B6B;
    --highlight: #C8A96E;

    /* Tipografía */
    --font-display: "Syne", sans-serif;
    --font-body: "Lora", serif;
    --font-accent: "Syne Mono", monospace;

    /* Bordes y Textura */
    --border-radius: 2px;
    --border-divider: 1px solid rgba(44, 59, 46, 0.3);
    --shadow-warm: 0 4px 12px rgba(44, 59, 46, 0.12);
}

/* -------------------------------------------------------------------------
     RESET & BASE
     --------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Grain overlay obligatoria (4% opacidad, pointer events none) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    /* Basic noise SVG URL */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}

/* Tipografías base */
h1,
h2,
h3,
h4,
.display-title {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

p,
.text-body {
    color: var(--text-muted);
}

.text-strong {
    font-weight: 700;
    color: var(--text-primary);
}

/* Contenedores y Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section-header {
    margin-bottom: 3rem;
    text-align: center;
}

.section-header.text-left {
    text-align: left;
}

/* Labels y Textos Pequeños */
.label-small {
    font-family: var(--font-accent);
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
}

.subtext {
    font-size: 1.1rem;
    margin-top: 1rem;
    color: var(--text-muted);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Botones Generales */
button {
    font-family: var(--font-display);
    cursor: pointer;
    border: none;
    background: none;
}

.btn-primary {
    background-color: var(--highlight);
    color: #1A1A1A;
    font-weight: 700;
    font-family: var(--font-display);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    border-radius: 0;
    /* Rectangular como se solicita */
}

.btn-outline {
    font-family: var(--font-accent);
    color: var(--accent-dark);
    border-bottom: 1px solid var(--accent-dark);
    padding: 0.2rem 0;
    font-size: 0.9rem;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.btn-outline:hover {
    color: var(--highlight);
    border-color: var(--highlight);
}

.link-secondary {
    font-family: var(--font-body);
    color: var(--bg-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-size: 1rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.link-secondary:hover {
    opacity: 1;
    text-decoration: none;
}

.bold-link {
    color: var(--accent-dark);
    font-weight: 700;
    border-bottom: 1px solid var(--accent-dark);
    padding-bottom: 2px;
    text-decoration: none;
}

.bold-link:hover {
    color: var(--highlight);
    border-color: var(--highlight);
}

/* -------------------------------------------------------------------------
     SECCIÓN 1: HERO
     --------------------------------------------------------------------- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-color: var(--accent-dark);
    background-image: url('img/imagen7.jpg');
    /* Imagen 7 de selva */
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* Gradiente radial desde verde profundo a transparente */
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(44, 59, 46, 0.5) 0%, rgba(44, 59, 46, 0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.badge-accent {
    font-family: var(--font-accent);
    color: var(--highlight);
    letter-spacing: 4px;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.hero-title {
    color: var(--bg-primary);
    font-size: 72px;
    margin-bottom: 2rem;
}

/* Fade-in escalonado requerido */
.hero-title .line {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.hero-title .line:nth-child(1) {
    animation-delay: 0.15s;
}

.hero-title .line:nth-child(2) {
    animation-delay: 0.30s;
}

.hero-title .line:nth-child(3) {
    animation-delay: 0.45s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-desc {
    font-family: var(--font-body);
    font-size: 18px;
    color: rgba(245, 240, 232, 0.85);
    /* #F5F0E8 a 85% */
    max-width: 600px;
    margin: 0 auto 3rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Subtle pulse button */
.btn-primary {
    animation: pulseBtn 4s infinite;
}

@keyframes pulseBtn {
    0% {
        transform: scale(1);
    }

    5% {
        transform: scale(1.02);
    }

    10% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

.btn-primary:hover {
    animation: none;
    transform: scale(1.02);
}

/* -------------------------------------------------------------------------
     SECCIÓN 2: TRUST BAR
     --------------------------------------------------------------------- */
.trust-bar {
    background-color: var(--accent-dark);
    color: white;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(245, 240, 232, 0.1);
}

.trust-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 2rem;
}

.trust-item {
    font-family: var(--font-accent);
    font-size: 12px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    cursor: default;
}

.trust-icon {
    font-size: 1.2rem;
    margin-right: 0.8rem;
    display: inline-block;
    transition: transform 300ms ease;
}

/* Rotate on hover - Obligatorio */
.trust-item:hover .trust-icon {
    transform: rotate(15deg);
}

.trust-divider {
    width: 1px;
    height: 24px;
    background-color: rgba(245, 240, 232, 0.2);
}

/* -------------------------------------------------------------------------
     TARJETAS COMUNES
     --------------------------------------------------------------------- */
.product-card {
    background-color: var(--bg-secondary);
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    /* <= 4px */
    overflow: hidden;
    transition: border-color 400ms ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    border: 1px solid var(--highlight);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background-color: #E2DDD3;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms ease-out;
}

/* Zoom in on hover */
.product-card:hover img {
    transform: scale(1.05);
    transition: 600ms ease-out;
}

.ingredients {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(44, 59, 46, 0.9), transparent);
    color: var(--bg-primary);
    font-family: var(--font-accent);
    font-size: 0.8rem;
    text-align: center;
    transform: translateY(10px);
    opacity: 0;
    transition: transform 400ms ease-out, opacity 400ms ease-out;
}

/* Revelar ingredientes en hover */
.product-card:hover .ingredients {
    transform: translateY(0);
    opacity: 1;
}

.card-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.card-info .subtitle {
    font-family: var(--font-accent);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--accent-dark);
    margin-bottom: 1rem;
}

.card-info .short-desc {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: var(--border-divider);
    padding-top: 1rem;
}

.price {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-dark);
}

/* Badges */
.badge-top-right,
.badge-top-left {
    position: absolute;
    top: 1rem;
    padding: 0.3rem 0.8rem;
    font-family: var(--font-accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 2;
}

.badge-top-right {
    right: 1rem;
    background-color: var(--highlight);
    color: #1A1A1A;
}

.badge-top-left {
    left: 1rem;
    background-color: var(--accent-dark);
    color: var(--bg-primary);
}

.efficacy-badge {
    display: inline-block;
    font-family: var(--font-accent);
    font-size: 0.75rem;
    background-color: #E6E1D5;
    color: var(--text-muted);
    padding: 0.2rem 0.6rem;
    margin-bottom: 1rem;
    border-radius: 2px;
}

.tag {
    font-family: var(--font-accent);
    font-size: 0.75rem;
    color: var(--accent-warm);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: inline-block;
}

/* -------------------------------------------------------------------------
     SECCIÓN 3: BENTO BOX
     --------------------------------------------------------------------- */
.bento-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    /* 60% / 40% rule */
    gap: 2rem;
    align-items: stretch;
}

.bento-large .card-img-wrapper {
    aspect-ratio: 16/10;
    height: 50%;
    /* La imagen ocupa la mitad superior */
    background-size: cover;
    background-position: center;
}

/* Glassmorphism para bento large - fondo */
.glass-card {
    background: rgba(44, 59, 46, 0.08);
    /* Fondo glassmorphism */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* -------------------------------------------------------------------------
     SECCIÓN 4: JABONES (GRID 3)
     --------------------------------------------------------------------- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: end;
    /* Asymmetry starts here */
}

/* Central card slightly taller / Asymmetrical */
.grid-3 .product-card:nth-child(2) {
    transform: translateY(-20px);
}

/* Producto premium destacado */
.premium-card {
    border: 1px solid var(--accent-dark) !important;
}

.premium-card:hover {
    border: 1px solid var(--highlight) !important;
}

/* -------------------------------------------------------------------------
     SECCIÓN 5: MODULADORES NEURO-SENSORIALES
     --------------------------------------------------------------------- */
.split-layout {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.split-text {
    flex: 0 0 40%;
}

.split-products {
    flex: 0 0 calc(60% - 4rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.editorial-text {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.stat-highlight {
    margin-bottom: 2rem;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    color: var(--accent-dark);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-family: var(--font-accent);
    font-size: 0.9rem;
    color: var(--accent-warm);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Horizontal cards */
.horizontal-card {
    flex-direction: row;
    align-items: stretch;
}

.horizontal-card .card-img-wrapper {
    flex: 0 0 40%;
    aspect-ratio: auto;
    min-height: 100%;
}

.small-horizontal .card-img-wrapper {
    flex: 0 0 35%;
}

.price-retail {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

/* -------------------------------------------------------------------------
     SECCIÓN 6: STORYTELLING
     --------------------------------------------------------------------- */
.storytelling {
    display: flex;
    background-color: var(--bg-secondary);
    padding: 0;
    min-height: 600px;
}

.story-img-wrapper {
    flex: 0 0 50%;
    position: relative;
    overflow: hidden;
}

/* Fondo desenfocado de naturaleza */
.story-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) sepia(10%);
    transform: scale(1.1);
}

.story-content {
    flex: 0 0 50%;
    padding: 6rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.story-content h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.story-text {
    margin-bottom: 3rem;
}

.pillars {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pillars li {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.pillars .icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

/* -------------------------------------------------------------------------
     SECCIÓN 8: FOOTER
     --------------------------------------------------------------------- */
.footer {
    background-color: var(--accent-dark);
    color: var(--bg-primary);
    padding: 6rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--highlight);
}

.tagline {
    font-family: var(--font-accent);
    letter-spacing: 2px;
    font-size: 0.8rem;
    margin-bottom: 2rem;
    opacity: 0.7;
}

.footer-col h3 {
    font-family: var(--font-accent);
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    color: var(--highlight);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    font-family: var(--font-body);
    color: var(--bg-primary);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.trust-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(245, 240, 232, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--font-accent);
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: rgba(245, 240, 232, 0.6);
}

/* -------------------------------------------------------------------------
     SECCIÓN 7: CARRITO Y UPSELL LOGIC (SLIDE OUT)
     --------------------------------------------------------------------- */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 400ms ease;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.slide-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: var(--bg-primary);
    border-left: 3px solid var(--accent-dark);
    z-index: 1001;
    transform: translateX(100%);
    /* Glide in from right smooth */
    transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.slide-cart.active {
    transform: translateX(0);
}

.cart-header {
    padding: 2rem;
    border-bottom: var(--border-divider);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.5rem;
}

.close-btn {
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

.cart-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed rgba(44, 59, 46, 0.2);
}

.cart-item-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.cart-item-info .cart-tag {
    font-family: var(--font-accent);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.cart-item-price {
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 1.1rem;
}

.upsell-container {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
    border: 1px solid var(--highlight);
}

.upsell-msg {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
    color: var(--accent-dark);
}

.upsell-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.upsell-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.hidden {
    display: none !important;
}

.cart-footer {
    padding: 2rem;
    border-top: var(--border-divider);
    background: var(--bg-secondary);
}

/* Banner verde sutil - requerido */
.free-shipping-banner {
    background-color: var(--accent-dark);
    color: var(--highlight);
    text-align: center;
    padding: 0.5rem;
    font-family: var(--font-accent);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    letter-spacing: 1px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Botón de checkout - Requerido */
.btn-checkout {
    background-color: var(--accent-dark);
    color: white;
    width: 100%;
    padding: 1rem;
    text-align: center;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.btn-checkout:hover {
    background-color: var(--text-primary);
}

/* -------------------------------------------------------------------------
     RESPONSIVE: MOBILE FIRST Y MULTISCREEN
     Respetando los breakpoints pedidos: 390px base, 1280px+ desktop
     --------------------------------------------------------------------- */
@media (max-width: 1279px) {

    /* Breakpoint antes del desktop principal */
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 .product-card:nth-child(2) {
        transform: none;
    }

    .split-layout {
        flex-direction: column;
    }

    .horizontal-card {
        flex-direction: column;
    }

    .horizontal-card .card-img-wrapper {
        aspect-ratio: 16/9;
    }

    .storytelling {
        flex-direction: column;
    }

    .story-img-wrapper {
        height: 300px;
        flex: none;
    }

    .trust-container {
        justify-content: center;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 40px;
    }

    /* Texto en hero requerido a 40px en mobile */
    .hero-desc {
        font-size: 16px;
    }

    .trust-item {
        flex: 0 0 calc(50% - 1rem);
        justify-content: center;
    }

    .trust-divider {
        display: none;
    }

    /* Scroll horizontal en mobile para la grilla 3 (Jabones) */
    .grid-3 {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 2rem;
        scrollbar-width: none;
    }

    .grid-3::-webkit-scrollbar {
        display: none;
    }

    .grid-3 .product-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .trust-badges {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .story-content {
        padding: 4rem 2rem;
    }
}

@media (max-width: 390px) {

    /* Mobile first constraints target */
    .hero-title {
        font-size: 36px;
    }

    .trust-item {
        flex: 0 0 100%;
    }

    .btn-primary {
        width: 100%;
    }

    .slide-cart {
        max-width: 100%;
    }
}

/* Respect reduce-motion */
@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;
    }
}