:root {
  --border-color: #d1d1d1;
  --bg-color: #f9f9f9;
  --text-color: #1a1a1a;
}

 * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  }

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'brandon-grotesque', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* UTILIDADES DE BORDE */
.border-bottom { border-bottom: 1px solid var(--border-color); }
.border-right { border-right: 1px solid var(--border-color); }
.border-top { border-top: 1px solid var(--border-color); }


.coffee h2{
font-size: 1.5rem;
font-weight: 600;
  margin: 0;
  padding: 1rem;
  padding-left: 2rem;
}

.bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Esto reemplaza la función del background-size: cover */
  z-index: -1;
}

/* --- HEADER Y NAVEGACIÓN --- */
.site-header {
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1002; /* Asegura que el logo esté por encima del menú móvil */
}

/* --- MENÚ ESCRITORIO --- */
.desktop-nav {
    display: none; /* Oculto por defecto (móvil) */
}

/* --- BOTÓN HAMBURGUESA --- */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002; /* Por encima del menú móvil */
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 2px;
}

/* Animación Hamburguesa a "X" */
.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- MENÚ MÓVIL FULLSCREEN --- */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background-color: #ffffff;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 32px;
    text-align: center;
}

.mobile-nav a {
    text-decoration: none;
    color: #000;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.5px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Animación en cascada para los enlaces móviles */
.mobile-menu.active .mobile-nav a {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active .mobile-nav a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-nav a:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-nav a:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.active .mobile-nav a:nth-child(4) { transition-delay: 0.4s; }

/* --- ADAPTACIÓN A MÓVIL (Por debajo de 900px) --- */
@media (max-width: 899px) {
    .site-header {
        justify-content: center; /* Centra el logo */
    }
    
    .hamburger {
        position: absolute;
        right: 24px; /* Fija la hamburguesa a la derecha */
    }
}

/* --- ADAPTACIÓN A ESCRITORIO (900px y superior) --- */
@media (min-width: 900px) {
    .site-header {
        padding: 24px 48px;
        justify-content: space-between;
    }

    .hamburger {
        display: none; /* Oculta la hamburguesa */
    }

    .mobile-menu {
        display: none; /* Oculta el menú móvil por completo */
    }

    .desktop-nav {
        display: flex;
        gap: 32px;
        align-items: center;
    }

    .desktop-nav a {
        text-decoration: none;
        color: #000;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.5px;
        transition: opacity 0.2s ease;
    }

    .desktop-nav a:hover {
        opacity: 0.5;
    }
}

.logo {
  font-weight: 600;
  letter-spacing: 0.5rem;
  font-size: 1.2rem;
}

/* HERO SLIDER */
.hero {
  position: relative;
  width: 100%;
  height: 100svh; /* Small Viewport Height */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slides {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
}


.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  opacity: 0.5;
  min-width: 80px;
}

.chip-group {
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.4rem 1rem;
  border-radius: 50px; /* Forma de píldora */
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chip:hover {
  border-color: var(--text-color);
}

.chip.active {
  background: var(--text-color);
  color: var(--bg-color);
  border-color: var(--text-color);
}

/* Animación de entrada para los items del grid */
.coffee-item {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 768px) {
  .filters-container {
    padding: 0 4rem 3rem 4rem;
  }
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  opacity: 1;
}


/* SECCIONES EDITORIALES */
.grid-container {
  max-width: 100%;
}

.manifesto {
  padding: 8rem 2rem;
  text-align: center;
}

.manifesto p {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 900px;
  margin: 0 auto;
}

.split {
  display: grid;
  grid-template-columns: 1fr;
}

.image-box img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.split .content {
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* COFFEE GRID */
.coffee-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.coffee-item {
margin: 16px 24px 16px; 
padding-bottom: 45px;
}

.coffee-info {
 font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.price-coffee {
  font-weight: 500;
}

.coffee-nom {
  font-weight: 500;
}

/* CTA */
.cta {
  padding: 10rem 2rem;
  text-align: center;
}
.filters-container {
  padding: 0 2rem 3rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Ajusta los márgenes de los items del grid que están sumando mucho espacio */
.coffee-item {
  margin: 0 24px 24px; /* Eliminamos el margen superior de 16px */
  padding-bottom: 20px; /* Reducimos el padding inferior de 45px a 20px */
}

/* Nueva clase para el encabezado del catálogo sin los paddings agresivos de .main-layout */
.catalog-header {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 40px; /* Espacio superior controlado */
}

.btn-explore {
  text-decoration: none;
  color: var(--text-color);
  border: 1px solid var(--text-color);
  padding: 1.5rem 4rem;
  font-size: 0.8rem;
  letter-spacing: 0.3rem;
  transition: all 0.4s;
}

.btn-explore:hover {
  background: var(--text-color);
  color: white;
}

/* RESPONSIVE DESKTOP */
@media (min-width: 768px) {
  .split { grid-template-columns: 1fr 1fr; }
  .coffee-grid { grid-template-columns: 1fr 1fr; }
  
  .header { padding: 2rem 4rem; }
  .manifesto, .split .content, .coffee-item { padding: 1rem 0.2rem; }
}

        .btn-cart {
            background-color: #000;
            color: #fff;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
        }

        /* --- ESTRUCTURA PRINCIPAL (MÓVIL POR DEFECTO) --- */
        .product-layout {
            display: flex;
            flex-direction: column;
            padding-top: 20px;
            padding-bottom: 80px; /* Espacio para el footer móvil */
        }
        .main-layout{
            display: flex;
            flex-direction: column;
            padding-top: 20px;
            padding-bottom: 80px;
        }

        /* --- GALERÍA E INFORMACIÓN (MÓVIL) --- */
/* 1. Hacemos "invisibles" los contenedores para mezclar los hijos en el layout principal */
.gallery-column,
.info-column {
    display: contents; 
}

/* 2. Asignamos el orden visual para intercalarlos */
.gallery-column .image-container:nth-child(1) { order: 1; }
.info-column .intro-text { order: 2; }
.info-column .specs-table { order: 3; }
.gallery-column .image-container:nth-child(2) { order: 4; }
.info-column .story { order: 5; }
.gallery-column .image-container:nth-child(n+3) { order: 6; } /* El resto de imágenes al final */

/* 3. Ajustamos la imagen (ahora los márgenes reemplazan el padding de la antigua columna) */
.image-container {
    position: relative;
    background-color: #f5f5f5;
    width: auto;
    margin: 0 16px 24px 16px; 
    aspect-ratio: 4 / 5;
    display: block;
    overflow: hidden;
    border-radius: 4px;
}

.image-container img {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; 
    mix-blend-mode: multiply;
}

/* 4. Los textos ahora necesitan el padding que antes tenía su contenedor */
.intro-text,
.specs-table,
.story {
    padding-left: 24px;
    padding-right: 24px;
}

/* 5. Damos aire antes de la segunda imagen */
.specs-table {
    border-top: 1px solid #e5e5e5;
    margin-top: 35px; 
    padding-bottom: 35px;
}

        .spec-row {
            display: flex;
            justify-content: space-between;
            padding: 16px 0;
            border-bottom: 1px solid #e5e5e5;
            font-size: 15px;
        }

        .spec-label {
            font-weight: 600;
            font-size: 1rem;
        }

        .spec-value {
            font-weight: 400;
            font-size: 1rem;
            text-align: right;
            max-width: 70%;
        }


        .story {
            font-size: 1.2rem;
            font-weight: 500;
            line-height: 1.4;
            padding-bottom: 30px;
        }

        .intro-text {
            font-size: 1.2rem;
            font-weight: 500;
            line-height: 1.4;
        }
        .intro-text h1 {
    margin-bottom: 18px; 
    font-size: 1.5rem;
    font-weight: 600;
}
.intro-text h2 {
    margin-bottom: 18px; 
    font-size: 1.5rem;
    font-weight: 600;
}

        /* --- BOTONES DE COMPRA --- */
        /* Botón fijo para móvil */
        .mobile-sticky-footer {
            position: fixed;
            bottom: 16px;
            left: 16px;
            right: 16px;
            background-color: #000;
            color: #fff;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 15px;
            cursor: pointer;
            z-index: 100;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            transition: transform 0.2s ease;
        }

        .mobile-sticky-footer:active {
            transform: scale(0.98);
        }

        /* Botón en línea para escritorio (oculto en móvil) */
        .desktop-btn {
            display: none;
            background-color: #000;
            color: #fff;
            justify-content: space-between;
            align-items: center;
            padding: 16px 24px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 16px;
            cursor: pointer;
            margin-top: 24px;
            transition: background-color 0.2s ease;
        }

        .desktop-btn:hover {
            background-color: #222;
        }

        /* --- MEDIA QUERIES PARA ESCRITORIO --- */
        @media (min-width: 900px) {
            header {
                padding: 24px 48px;
            }

            .product-layout {
                display: grid;
                grid-template-columns: 1fr 1fr; /* Dos columnas simétricas */
                gap: 64px;
                max-width: 1400px;
                margin: 0 auto;
                padding: 24px 48px 80px 48px;
            }
            .main-layout{
                display: grid;
                grid-template-columns: 1fr;
                gap: 64px;
                max-width: 1400px;
                margin: 0 auto;
                padding: 24px 16px 48px 16;  
            }

            /* Restauramos los contenedores para que el sticky y el scroll funcionen independiente */
        .gallery-column {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .info-column {
            display: block;
            margin-top: 0;
            position: sticky;
            top: 100px; 
            height: fit-content;
        }

        /* Reseteamos la imagen a su estado original para web */
        .image-container {
            width: 100%;
            margin: 0;
        }

        /* Quitamos los paddings laterales extra que agregamos en móvil */
        .intro-text,
        .specs-table,
        .story {
            padding-left: 0;
            padding-right: 0;
        }
        
        .specs-table {
            margin-bottom: 0;
        }

            /* Intercambiamos los botones */
            .mobile-sticky-footer {
                display: none;
            }

            .desktop-btn {
                display: flex;
            }
        }




.coffee-img-wrapper {
  width: 100%;
  margin-bottom: 1rem;
  overflow: hidden;
}

.coffee-img-wrapper img {
  width: 100%;
  height: auto;
  object-fit: cover; /* Mantiene la proporción de la imagen sin deformarla */
  display: block;
  border-radius: 4px;
  aspect-ratio: 1 / 1;
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
    padding: 48px 24px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.footer-content {
    display: flex;
    gap: 48px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Lado Izquierdo --- */
.footer-left {
    display: flex;
    gap: 24px;
}

.footer-logo-svg img {
    width: 64px; /* Ajusta el tamaño de tu círculo aquí */
    height: auto;
}

.footer-motto {
    font-size: 1.5rem;
    font-weight: 400;
    max-width: 280px;
    line-height: 1.2;
}

.footer-data p {
    margin-bottom: 4px;
    opacity: 0.5;
    font-size: 0.8rem;
    letter-spacing: 0.05rem;
}

/* --- Lado Derecho (Enlaces) --- */
.footer-right {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.footer-links{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    gap: 1rem;
}
.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.5;
}

/* --- ESCRITORIO (900px o más) --- */
@media (min-width: 900px) {
    .site-footer {
        padding: 80px 48px;
    }

    .footer-content {
        flex-direction: row; /* Lo ponemos uno a cada lado */
        justify-content: space-between;
    }

    .footer-right {
        flex-direction: row; /* Los bloques de enlaces uno al lado del otro */
        gap: 80px;
        text-align: right; /* Alineamos el texto a la derecha */
    }

  .footer-links {
        display: flex;
        justify-content: flex-end; 
        gap: 4rem;
        padding-top: 2rem;
        padding-left: 0;
        padding-right: 0;
    }
}

.publications {
  padding: 4rem 0;
  overflow: hidden;
}

.publications-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 2rem 0;
  padding-left: 24px; 
}

.publications-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 0 24px 24px 24px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  scroll-padding-left: 24px;
}

.publications-carousel::-webkit-scrollbar {
  display: none; /* Oculta la barra en Chrome/Safari/Edge */
}

/* Tarjeta individual */
.pub-card {
  flex: 0 0 calc(85vw - 48px);
  scroll-snap-align: start;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-color);
  transition: transform 0.3s ease;
}

.pub-image-wrapper {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--border-color); /* Línea divisoria interna */
  overflow: hidden;
}

.pub-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.pub-card:hover .pub-image-wrapper img {
  transform: scale(1.03);
}

.pub-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.pub-date {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

.pub-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.pub-desc {
  font-size: 1rem;
  opacity: 0.8;
  line-height: 1.4;
}

/* Adaptación a escritorio */
@media (min-width: 900px) {
  .publications-header h2 {
    padding-left: 48px;
  }
  .publications-carousel {
    padding: 0 48px 48px 48px;
    scroll-padding-left: 48px;
  }
  .pub-card {
    flex: 0 0 320px; /* Ancho fijo de la tarjeta en web */
  }
}
.btn-buy {
    display: block;
    background-color: var(--product-color);
    color: var(--text-color);
    text-align: center;
    padding: 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid #808080;
}

/* --- VISTA MÓVIL (Sticky / Fijo abajo) --- */
@media (max-width: 768px) {
    .product-action-container {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        padding: 1rem;
        border-top: 1px solid #eee;
        z-index: 1000;
        box-sizing: border-box;
    }
    
    /* Espacio extra al final para que el botón no tape el footer */
    body {
        padding-bottom: 80px;
    }
}

/* --- VISTA ESCRITORIO (Flujo natural después del texto) --- */
@media (min-width: 769px) {
    .product-action-container {
        position: relative;
        margin-top: 2.5rem; /* Espacio respecto al párrafo de arriba */
        width: 100%;
        padding: 0;
    }
}
