@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --bg-legumbres-cereales: #354e1a;
    --bg-sal-marina: #003399;
    --bg-harinas: #C66300;
    --bg-roca-rosa: #EA3783;
    --bg-otros: #2c3e19;
    --bg-contacto: #15200b;
    /* Verde bosque más sofisticado */
    --accent-color: #ffc107;
    --accent-green-light: #C3E10D;
    --detail-harinas: #FFF100;
    --detail-roca-rosa: #F6ADCC;
    --bg-pimientas: #354e1a;
    --detail-pimientas: #C3E10D;
    --bg-quinoa: #354e1a;
    --detail-quinoa: #C3E10D;
    --card-bg: rgba(255, 255, 255, 0.1);
    --curve-height: 80px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    background-color: #354e1a;
}

/* Navbar Transition */
.navbar {
    background-color: transparent !important;
    backdrop-filter: none !important;
    transition: all 0.5s ease !important;
    border: none !important;
}

.navbar.scrolled {
    background-color: var(--bg-harinas) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.navbar.scrolled .navbar-toggler {
    background-color: var(--detail-harinas) !important;
}

.navbar.bg-legumbres-cereales {
    background-color: var(--bg-legumbres-cereales) !important;
}

.navbar.bg-sal-marina {
    background-color: var(--bg-sal-marina) !important;
}

.navbar.bg-harinas {
    background-color: var(--bg-harinas) !important;
}

.navbar.bg-roca-rosa {
    background-color: var(--bg-roca-rosa) !important;
}

.navbar.bg-contacto {
    background-color: var(--bg-legumbres-cereales) !important;
}

.navbar.bg-pimientas {
    background-color: var(--bg-pimientas) !important;
}

.navbar.bg-quinoa {
    background-color: var(--bg-quinoa) !important;
}

.transition-logo {
    transition: all 0.5s ease-in-out !important;
}

.navbar-toggler {
    border: none !important;
    padding: 8px !important;
    border-radius: 8px !important;
    transition: background-color 0.5s ease !important;
    background-color: var(--detail-harinas) !important;
    border: 1px solid rgba(198, 99, 0, 0.3) !important; /* Border orange sutil para visibilidad */
    background-image: none !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.navbar-toggler-icon {
    filter: none !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% !important;
}

/* Colores Dinámicos del Botón Hamburguesa */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23C66300' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar.bg-legumbres-cereales .navbar-toggler {
    background-color: var(--accent-green-light) !important;
}

.navbar.bg-legumbres-cereales .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23354e1a' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar.bg-sal-marina .navbar-toggler {
    background-color: #00bcd4 !important;
}

.navbar.bg-sal-marina .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23003399' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar.bg-harinas .navbar-toggler {
    background-color: var(--detail-harinas) !important;
}

.navbar.bg-harinas .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23C66300' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar.bg-roca-rosa .navbar-toggler {
    background-color: var(--detail-roca-rosa) !important;
}

.navbar.bg-roca-rosa .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23EA3783' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar.bg-pimientas .navbar-toggler {
    background-color: var(--detail-pimientas) !important;
}

.navbar.bg-pimientas .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23354e1a' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar.bg-quinoa .navbar-toggler {
    background-color: var(--detail-quinoa) !important;
}

.navbar.bg-quinoa .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23354e1a' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar.bg-contacto .navbar-toggler {
    background-color: var(--accent-green-light) !important;
}

.navbar.bg-contacto .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23354e1a' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Fin Colores Dinámicos Hamburguesa */

.nav-link {
    font-weight: 500;
    margin: 0 10px;
    opacity: 1;
    color: var(--bg-legumbres-cereales) !important;
    transition: all 0.3s ease;
}

.nav-link.scrolled-links {
    color: white !important;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    color: white !important;
    transform: translateY(-2px);
}

/* Colores Dinámicos para Secciones Activas */
.nav-link[href="#legumbres-cereales"].active {
    color: #C3E10D !important;
}

.nav-link[href="#sal-marina"].active {
    color: #00CCFF !important;
}

.nav-link[href="#harinas"].active {
    color: var(--detail-harinas) !important;
}

.nav-link[href="#roca-rosa"].active {
    color: var(--detail-roca-rosa) !important;
}

.nav-link[href="#inicio"].active {
    color: var(--bg-harinas) !important;
}



/* Estructura de Secciones Curvas */
section {
    position: relative;
    scroll-margin-top: 70px;
}

/* Curve at the TOP of the section */
section::before,
section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px;
}

/* Curve Fill */
section::before {
    background: inherit;
    clip-path: url('#topCurve');
    transform: translateY(-99%);
    /* Pull it UP to overlap previous section */
    z-index: 10;
}

/* Curve White Border Line */
section::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,100 Q50,0 100,100' fill='none' stroke='white' stroke-width='5' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    transform: translateY(-100%);
    z-index: 11;
    pointer-events: none;
    opacity: 1;
    /* Máxima visibilidad */
}

.hero {
    position: relative;
    margin-top: 0;
    background-color: var(--detail-harinas);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-harinas);
    overflow: visible;
    z-index: 10;
    min-height: 60vh;
}

.hero::before,
.hero::after {
    display: none;
    /* No curve at the top of the page */
}

.hero .text-accent-green {
    color: white;
}

#demo-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero .container {
    position: relative;
    z-index: 2;
    padding: 0px 0 0;
    margin-top: -70px;
}

#inicio {
    padding: 0;
    z-index: 10;
}

.sec-legumbres-cereales,
.sec-sal-marina,
.sec-harinas,
.sec-roca-rosa,
.sec-pimientas,
.sec-quinoa {
    padding: 0px 0 150px;
}



.sec-legumbres-cereales .container,
.sec-sal-marina .container,
.sec-harinas .container,
.sec-roca-rosa .container,
#pimientas .container,
#quinoa .container {
    z-index: 100;
    position: relative;
}



/* Colores de Secciones */
.sec-legumbres-cereales {
    background-color: var(--bg-legumbres-cereales);
    z-index: 12;
    color: white;
}

.sec-sal-marina {
    background-color: var(--bg-sal-marina);
    z-index: 13;
    color: white;
}

.sec-sal-marina .card-title {
    color: #00CCFF;
}

.sec-quinoa {
    background-color: var(--bg-quinoa);
    color: white;
    z-index: 15;
    position: relative;
}

.sec-harinas {
    background-color: var(--bg-harinas);
    z-index: 11;
    color: white;
}

.sec-harinas .card-title {
    color: var(--detail-harinas);
}

.sec-roca-rosa {
    background-color: var(--bg-roca-rosa);
    z-index: 14;
    color: white;
}

.sec-roca-rosa .card-title {
    color: var(--detail-roca-rosa);
}

.sec-roca-rosa .product-img img {
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.6));
}

.presentation-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
}

.p-item {
    display: block;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.85rem;
    color: #eee;
    text-align: left;
    border-left: 3px solid var(--detail-roca-rosa);
}

.p-item strong {
    color: white;
}

.p-item .bi {
    color: var(--detail-roca-rosa);
    margin-right: 10px !important;
    font-size: 1rem;
}

.sec-otros {
    background-color: var(--bg-otros);
    z-index: 16;
}

.sec-pimientas {
    background-color: var(--bg-pimientas);
    color: white;
    z-index: 16;
    position: relative;
}

.sec-contacto {
    background-color: var(--accent-green-light);
    z-index: 17;
    color: var(--bg-legumbres-cereales);
    position: relative;
    overflow: visible;
}

#contact-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.contact-info-block {
    padding: 20px 0;
}

.contact-info-block h5 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 5px;
}

.contact-info-block p {
    font-weight: 600;
}

.box-badge {
    display: inline-block;
    background-color: var(--accent-green-light);
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 8px;
}

/* Overrides por sección */
#legumbres-cereales .box-badge {
    background-color: var(--accent-green-light);
    color: var(--bg-legumbres-cereales);
}

#sal-marina .box-badge {
    background-color: #00bcd4;
    color: #fff;
}

#harinas .box-badge {
    background-color: var(--detail-harinas);
    color: var(--bg-harinas);
}

#roca-rosa .box-badge {
    background-color: var(--detail-roca-rosa);
    color: var(--bg-roca-rosa);
}

#pimientas .box-badge {
    background-color: var(--detail-pimientas);
    color: var(--bg-pimientas);
}

#quinoa .box-badge {
    background-color: var(--detail-quinoa);
    color: var(--bg-quinoa);
}




/* Card de Producto - Glassmorphism style */
.product-card {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

.product-img {
    height: 380px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img img {
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
    transition: transform 0.5s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05) rotate(2deg);
}

.card-body {
    flex: 1 1 auto;
    padding: 0 1rem 1rem;
    color: var(--bs-card-color);
}

.card-title {
    font-weight: 800;
    color: var(--accent-green-light);
    font-size: 1.25rem; /* Mantener tamaño original de H5 */
    margin-bottom: 0.75rem;
}

.card-text {
    color: #fff !important;
}

.text-accent-green {
    color: var(--accent-green-light);
}

.footer-custom {
    display: none;
}

/* --- Dot Navigation --- */
.dot-nav {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1020;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    /* Para posicionar el label */
}

.dot span {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    color: white;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dot:hover span {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.dot.active {
    background-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    transform: scale(1.3);
}

/* Colores dinámicos al pasar el ratón o estar activos */
.dot[href="#legumbres-cereales"]:hover,
.dot[href="#legumbres-cereales"].active {
    background-color: #C3E10D !important;
    border-color: #C3E10D !important;
}

.dot[href="#sal-marina"]:hover,
.dot[href="#sal-marina"].active {
    background-color: #00CCFF !important;
    border-color: #00CCFF !important;
}

.dot[href="#harinas"]:hover,
.dot[href="#harinas"].active {
    background-color: var(--detail-harinas) !important;
    border-color: var(--detail-harinas) !important;
}

.dot[href="#roca-rosa"]:hover,
.dot[href="#roca-rosa"].active {
    background-color: var(--detail-roca-rosa) !important;
    border-color: var(--detail-roca-rosa) !important;
}

.dot[href="#pimientas"]:hover,
.dot[href="#pimientas"].active,
.dot[href="#quinoa"]:hover,
.dot[href="#quinoa"].active {
    background-color: #C3E10D !important;
    border-color: #C3E10D !important;
}

.dot[href="#inicio"]:hover,
.dot[href="#inicio"].active {
    background-color: var(--bg-harinas) !important;
    border-color: var(--bg-harinas) !important;
}

.dot:hover {
    transform: scale(1.4);
    background-color: white;
}

/* Mejora del Offcanvas (Menú Hamburguesa) */
.offcanvas {
    z-index: 1060 !important;
}

.bg-blur {
    backdrop-filter: blur(15px);
    background-color: rgba(0, 0, 0, 0.85) !important;
}

.offcanvas .nav-link {
    font-size: 1.5rem;
    margin: 15px 0;
    color: white !important;
}

.offcanvas .nav-link:hover {
    color: var(--accent-green-light) !important;
    transform: translateX(10px);
}

.navbar-toggler {
    border: none !important;
    padding: 10px !important;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: none !important;
}

.navbar-toggler:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* --- Preloader & Entrada --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #15200b;
    /* Color de fondo profundo */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Removidas animaciones de logo por petición */

/* Títulos Híbridos (Móvil) */
.section-title-mobile {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 2rem;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -1px;
}

@media (max-width: 767.98px) {
    .text-center.mb-5 p {
        margin-top: 0 !important;
        max-width: 90% !important;
        font-size: 0.95rem;
    }

    .hero-logo {
        padding: 0 40px; /* Margen a los costados para el logo en móvil */
    }
    
    section::before,
    section::after {
        height: 80px; /* Curva menos pronunciada en móvil */
    }
    
    .sec-legumbres-cereales,
    .sec-sal-marina,
    .sec-harinas,
    .sec-roca-rosa,
    .sec-pimientas,
    .sec-quinoa {
        padding: 50px 0 80px !important; /* Padding ajustado */
    }
}