/* ============================================================
   BENGALÍ — hoja de estilos
   Identidad oficial del logo: naranja + café + crema
   (ver DESIGN.md)
   ============================================================ */

:root{
  --bg:        #F9F2EA;
  --surface:   #FFF8ED;
  --raised:    rgba(74,44,24,.06);
  --line:      rgba(74,44,24,.14);
  --ink:       #222222;
  --muted:     #765238;
  --chocolate: #4A2C18;
  --naranja:   #F45116;
  --naranja-b: #FF5700;
  --cream:     #FFF8ED;

  --display:  'Lilita One', system-ui, cursive;
  --subtitle: 'Fredoka', system-ui, sans-serif;
  --body:     'Nunito Sans', system-ui, sans-serif;

  --header-h: 68px;
  --maxw: 1180px;
}

*,*::before,*::after{ box-sizing:border-box; }

html{ scroll-behavior:smooth; -webkit-text-size-adjust:100%; }

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--body);
  font-size:17px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}

img{ max-width:100%; display:block; }
a{ color:inherit; }

.wrap{ width:100%; max-width:var(--maxw); margin:0 auto; padding:0 22px; }

/* --- Tipografía --------------------------------------------------- */
.display{
  font-family:var(--display);
  font-weight:400;
  letter-spacing:0;
  line-height:1.08;
  margin:0;
}
.eyebrow{
  font-family:var(--subtitle);
  font-weight:600;
  font-size:.76rem;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--chocolate);
  margin:0 0 14px;
}
.lede{ color:var(--muted); font-size:1.06rem; max-width:56ch; }

/* --- Header ------------------------------------------------------- */
.site-header{
  position:sticky; top:0; z-index:100;
  height:var(--header-h);
  background:rgba(249,242,234,.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  height:100%;
  display:flex; align-items:center; justify-content:space-between;
  gap:20px;
}
.brand{
  font-family:var(--display);
  font-weight:400;
  font-size:1.32rem; letter-spacing:0;
  text-decoration:none; color:var(--ink);
  display:flex; align-items:baseline; gap:9px;
}
.brand .paw{ width:9px; height:9px; border-radius:50%; background:var(--naranja); display:inline-block; }

.nav-toggle{
  display:none;
  background:none; border:1px solid var(--line); border-radius:8px;
  color:var(--ink); padding:9px 11px; cursor:pointer;
}
.nav-toggle span{ display:block; width:19px; height:2px; background:var(--ink); margin:4px 0; transition:.25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform:translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform:translateY(-6px) rotate(-45deg); }

.nav-list{ display:flex; align-items:center; gap:6px; list-style:none; margin:0; padding:0; }
.nav-link{
  display:block; padding:9px 14px; border-radius:8px;
  text-decoration:none; font-size:.94rem; font-weight:600;
  color:var(--ink); background:none; border:0;
  font-family:var(--subtitle); cursor:pointer;
}
.nav-link:hover{ background:var(--surface); color:var(--naranja); }

.has-sub{ position:relative; }
.nav-trigger::after{
  content:''; display:inline-block; width:5px; height:5px; margin-left:8px;
  border-right:1.6px solid currentColor; border-bottom:1.6px solid currentColor;
  transform:translateY(-2px) rotate(45deg);
}
.submenu{
  position:absolute; top:calc(100% + 8px); left:0;
  min-width:238px; list-style:none; margin:0; padding:7px;
  background:var(--surface); border:1px solid var(--line); border-radius:12px;
  box-shadow:0 18px 44px rgba(74,44,24,.16);
  opacity:0; visibility:hidden; transform:translateY(-6px);
  transition:opacity .18s, transform .18s, visibility .18s;
}
.has-sub:hover .submenu,
.has-sub:focus-within .submenu{ opacity:1; visibility:visible; transform:translateY(0); }
.submenu a{
  display:block; padding:10px 13px; border-radius:8px;
  text-decoration:none; font-size:.92rem; font-family:var(--subtitle); font-weight:500;
}
.submenu a:hover{ background:var(--raised); color:var(--naranja); }
.submenu .sub-note{
  display:block; font-family:var(--body); font-size:.75rem;
  color:var(--muted); letter-spacing:0; margin-top:2px; font-weight:400;
}

.header-cta{
  display:inline-flex; align-items:center; gap:8px;
  padding:9px 17px; border-radius:999px;
  background:var(--naranja); color:var(--ink);
  font-family:var(--subtitle); font-weight:600; font-size:.9rem; text-decoration:none;
  white-space:nowrap;
  transition:background .18s, color .18s;
}
.header-cta:hover{ background:var(--naranja-b); }

/* --- Hero --------------------------------------------------------- */
.hero{ padding:76px 0 68px; border-bottom:1px solid var(--line); }
.hero-grid{ display:grid; grid-template-columns:1.05fr .95fr; gap:56px; align-items:center; }
.hero h1{ font-size:clamp(2.5rem,5.2vw,4.05rem); margin-bottom:22px; }
.hero h1 em{ font-style:normal; color:var(--naranja); }
.hero .lede{ margin:0 0 30px; font-size:1.12rem; }

.hero-actions{ display:flex; flex-wrap:wrap; gap:13px; }
.btn{
  display:inline-flex; align-items:center; gap:9px;
  padding:14px 25px; border-radius:999px;
  font-weight:600; font-size:.97rem; text-decoration:none;
  border:1px solid transparent; cursor:pointer;
  font-family:var(--subtitle);
  transition:background .18s, color .18s, border-color .18s;
}
.btn-primary{ background:var(--naranja); color:var(--ink); }
.btn-primary:hover{ background:var(--naranja-b); }
.btn-ghost{ border-color:var(--line); color:var(--ink); background:none; }
.btn-ghost:hover{ border-color:var(--naranja); color:var(--naranja); }

.hero-facts{
  display:flex; flex-wrap:wrap; gap:26px;
  margin-top:36px; padding-top:26px; border-top:1px solid var(--line);
  font-family:var(--subtitle); font-size:.78rem; color:var(--muted);
  letter-spacing:.02em;
}
.hero-facts b{ display:block; color:var(--ink); font-size:1.32rem; font-weight:600; margin-bottom:2px; }

/* Elemento firma: elevación de pared acotada */
.elevation{ width:100%; height:auto; }

/* --- Secciones ---------------------------------------------------- */
.section{ padding:80px 0; scroll-margin-top:var(--header-h); }
.section + .section{ border-top:1px solid var(--line); }
.section-head{ max-width:60ch; margin-bottom:44px; }
.section-head h2{ font-size:clamp(1.95rem,3.6vw,2.75rem); margin-bottom:14px; }

.group{ scroll-margin-top:calc(var(--header-h) + 16px); }
.group + .group{ margin-top:70px; }
.group-head{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:22px; margin-bottom:26px;
  padding-bottom:14px; border-bottom:1px solid var(--line);
}
.group-head h3{
  font-family:var(--display);
  font-weight:400;
  font-size:1.55rem; margin:0; letter-spacing:0;
}
.group-head p{ margin:6px 0 0; color:var(--muted); font-size:.94rem; max-width:48ch; }

/* --- Rejilla / carrusel de productos ------------------------------ */
.track{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:22px;
  list-style:none; margin:0; padding:0;
}

.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  display:flex; flex-direction:column;
  transition:border-color .2s, transform .2s;
}
.card:hover{ border-color:var(--naranja); transform:translateY(-3px); }

.card-media{
  aspect-ratio:1/1; background:var(--raised);
  position:relative; overflow:hidden;
}
.card-media img{ width:100%; height:100%; object-fit:cover; }
.card-tag{
  position:absolute; top:12px; left:12px;
  font-family:var(--subtitle); font-weight:600; font-size:.68rem; letter-spacing:.06em;
  background:rgba(74,44,24,.85); color:var(--cream);
  padding:5px 9px; border-radius:6px; text-transform:uppercase;
}

/* Marcador de espacio mientras no hay foto real del producto */
.media-pending{
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  background:var(--raised);
}
.media-pending span{
  font-family:var(--subtitle); font-weight:600; font-size:.76rem; letter-spacing:.08em;
  text-transform:uppercase; color:var(--muted);
}

.card-body{ padding:20px 20px 22px; display:flex; flex-direction:column; flex:1; }
.card-body h4{
  font-family:var(--display);
  font-weight:400;
  font-size:1.22rem; margin:0 0 8px; line-height:1.25;
}
.card-desc{ color:var(--muted); font-size:.92rem; margin:0 0 16px; }

.spec{
  list-style:none; margin:0 0 18px; padding:14px 0 0;
  border-top:1px dashed var(--line);
  font-family:var(--subtitle); font-size:.78rem; color:var(--muted);
}
.spec li{ display:flex; justify-content:space-between; gap:12px; padding:3px 0; }
.spec b{ color:var(--ink); font-weight:600; text-align:right; }

.card-foot{ margin-top:auto; }
.price{
  font-family:var(--subtitle); font-weight:600; font-size:1.3rem; color:var(--ink);
  display:block; margin-bottom:3px;
}
.price-note{
  display:block; font-family:var(--subtitle); font-size:.68rem; font-weight:500;
  color:var(--muted); letter-spacing:.04em; margin-bottom:15px;
}
/* --- Control de carrito en cada tarjeta ---------------------------- */
.card.in-cart{ border-color:var(--naranja); }

.btn-add{
  display:flex; align-items:center; justify-content:center; gap:9px;
  width:100%; padding:13px 18px; border-radius:11px;
  background:var(--naranja); color:var(--ink); border:1px solid transparent;
  font-family:var(--subtitle); font-weight:600; font-size:.94rem; cursor:pointer;
  transition:background .18s;
}
.btn-add:hover{ background:var(--naranja-b); }
.btn-add svg{ width:17px; height:17px; flex:none; }

.cart-control{ display:flex; flex-direction:column; align-items:center; gap:8px; }

.qty-control{
  display:flex; align-items:center; justify-content:space-between;
  width:100%; padding:6px; border-radius:11px;
  background:var(--raised); border:1px solid var(--line);
}
.qty-btn{
  width:34px; height:34px; flex:none; display:grid; place-items:center;
  border-radius:8px; border:1px solid var(--line); background:var(--surface);
  color:var(--ink); font-size:1.1rem; font-weight:700; line-height:1; cursor:pointer;
  transition:border-color .18s, color .18s;
}
.qty-btn:hover{ border-color:var(--naranja); color:var(--naranja); }
.qty-value{
  font-family:var(--subtitle); font-weight:600; font-size:1rem; color:var(--ink);
  min-width:2ch; text-align:center;
}
.qty-note{
  display:flex; align-items:center; gap:6px;
  font-family:var(--subtitle); font-weight:600; font-size:.76rem;
  letter-spacing:.03em; color:var(--naranja);
}
.qty-note svg{ width:14px; height:14px; flex:none; }

/* Controles del carrusel: ocultos en escritorio */
.carousel-ui{ display:none; }

/* --- Quiénes somos ------------------------------------------------ */
.about-grid{ display:grid; grid-template-columns:1.15fr .85fr; gap:52px; align-items:start; }
.about-grid p{ margin:0 0 18px; }
.about-grid p:last-child{ margin-bottom:0; }

.pillars{ list-style:none; margin:0; padding:0; display:grid; gap:14px; }
.pillars li{
  background:var(--surface); border:1px solid var(--line);
  border-radius:13px; padding:18px 20px;
}
.pillars strong{
  display:block; font-family:var(--subtitle);
  font-weight:600;
  font-size:1rem; margin-bottom:5px;
}
.pillars span{ color:var(--muted); font-size:.89rem; }

/* --- Términos ----------------------------------------------------- */
.terms{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px; }
.term-block{
  background:var(--surface); border:1px solid var(--line);
  border-radius:16px; padding:26px 24px;
}
.term-block h3{
  font-family:var(--display);
  font-weight:400;
  font-size:1.28rem; margin:0 0 6px;
}
.term-block .num{
  font-family:var(--subtitle); font-weight:600; font-size:.72rem; color:var(--chocolate);
  letter-spacing:.12em; display:block; margin-bottom:11px;
}
.term-block ul{ margin:0; padding-left:19px; color:var(--muted); font-size:.9rem; }
.term-block li{ margin-bottom:10px; }
.term-block li:last-child{ margin-bottom:0; }
.term-block li b{ color:var(--ink); font-weight:700; }

.legal-note{
  margin-top:30px; padding:16px 20px;
  border:1px dashed var(--line); border-radius:12px;
  font-size:.83rem; color:var(--muted);
}

/* --- Blog (listado de artículos) ----------------------------------- */
.blog-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:22px;
  list-style:none; margin:0; padding:0;
}

/* --- Footer ------------------------------------------------------- */
.site-footer{ border-top:1px solid var(--line); padding:52px 0 40px; }
.footer-inner{ display:flex; flex-wrap:wrap; gap:28px; justify-content:space-between; align-items:center; }
.footer-inner p{ margin:0; color:var(--muted); font-size:.88rem; }
.footer-meta{ font-family:var(--subtitle); font-size:.75rem; letter-spacing:.04em; }

/* --- Carrito: botón flotante + drawer ------------------------------ */
body.no-scroll{ overflow:hidden; }

.cart-fab{
  position:fixed; right:22px; bottom:22px; z-index:150;
  width:56px; height:56px; border-radius:50%;
  display:grid; place-items:center;
  background:var(--chocolate); color:var(--cream); border:0; cursor:pointer;
  box-shadow:0 14px 30px rgba(74,44,24,.32);
  transition:background .18s, transform .18s;
}
.cart-fab:hover{ background:var(--naranja); transform:translateY(-2px); }
.cart-fab svg{ width:22px; height:22px; }

.cart-badge{
  position:absolute; top:-4px; right:-4px;
  min-width:20px; height:20px; padding:0 5px; border-radius:999px;
  background:var(--naranja); color:var(--ink);
  font-family:var(--subtitle); font-weight:700; font-size:.72rem;
  display:grid; place-items:center;
  border:2px solid var(--bg);
}

.carrito-overlay{
  position:fixed; inset:0; z-index:160;
  background:rgba(34,34,34,.45);
}

.carrito-drawer{
  position:fixed; top:0; right:0; z-index:170;
  width:100%; max-width:400px; height:100dvh;
  background:var(--bg); border-left:1px solid var(--line);
  box-shadow:-18px 0 44px rgba(74,44,24,.18);
  display:flex; flex-direction:column;
  padding:22px 20px;
  transform:translateX(100%);
  transition:transform .28s ease;
}
.carrito-drawer.open{ transform:translateX(0); }

.carrito-head{
  display:flex; align-items:center; justify-content:space-between;
  padding-bottom:16px; margin-bottom:16px; border-bottom:1px solid var(--line);
}
.carrito-head h3{
  font-family:var(--display); font-weight:400; font-size:1.28rem; margin:0;
}
.carrito-cerrar{
  width:34px; height:34px; border-radius:50%; border:1px solid var(--line);
  background:var(--surface); color:var(--ink); cursor:pointer; font-size:.9rem;
}
.carrito-cerrar:hover{ border-color:var(--naranja); color:var(--naranja); }

.carrito-vacio{ color:var(--muted); font-size:.92rem; }

.carrito-lista{
  list-style:none; margin:0; padding:0; overflow-y:auto; flex:1;
  display:flex; flex-direction:column; gap:12px;
}
.carrito-item{
  display:flex; align-items:center; gap:10px;
  padding:12px; border-radius:12px;
  background:var(--surface); border:1px solid var(--line);
}
.carrito-item-info{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.carrito-item-info b{ font-family:var(--subtitle); font-size:.9rem; font-weight:600; }
.carrito-item-info span{ font-size:.78rem; color:var(--muted); }
.carrito-item .qty-control{ width:auto; flex:none; padding:4px; gap:8px; }
.carrito-item .qty-btn{ width:28px; height:28px; font-size:.95rem; }
.carrito-quitar{
  flex:none; width:28px; height:28px; border-radius:50%; border:0;
  background:none; color:var(--muted); cursor:pointer; font-size:.85rem;
}
.carrito-quitar:hover{ color:var(--naranja); }

.carrito-acciones{ margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
.carrito-total-row{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:14px; font-family:var(--subtitle);
}
.carrito-total-row b{ font-size:1.2rem; }
.carrito-enviar{ display:flex; width:100%; justify-content:center; }
.carrito-vaciar{
  display:block; width:100%; margin-top:10px; padding:10px;
  background:none; border:0; color:var(--muted);
  font-family:var(--subtitle); font-size:.84rem; cursor:pointer;
  text-decoration:underline; text-underline-offset:3px;
}
.carrito-vaciar:hover{ color:var(--naranja); }

@media (max-width:480px){
  .carrito-drawer{ max-width:100%; }
}

/* --- Accesibilidad ------------------------------------------------ */
:focus-visible{ outline:2px solid var(--chocolate); outline-offset:3px; border-radius:4px; }
.skip{
  position:absolute; left:-9999px; top:8px;
  background:var(--chocolate); color:var(--cream); padding:10px 16px;
  border-radius:8px; z-index:200; text-decoration:none; font-weight:600;
  font-family:var(--subtitle);
}
.skip:focus{ left:16px; }

@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  *{ transition:none !important; animation:none !important; }
}

/* ============================================================
   TABLET
   ============================================================ */
@media (max-width:1000px){
  .hero-grid{ grid-template-columns:1fr; gap:44px; }
  .about-grid{ grid-template-columns:1fr; gap:36px; }
  .terms{ grid-template-columns:1fr; }
  .track{ grid-template-columns:repeat(2,1fr); }
  .blog-grid{ grid-template-columns:repeat(2,1fr); }
}

/* ============================================================
   MÓVIL — navegación en panel + productos en carrusel
   ============================================================ */
@media (max-width:760px){
  body{ font-size:16px; }
  .section{ padding:58px 0; }
  .hero{ padding:52px 0 46px; }

  .nav-toggle{ display:block; }

  .nav{
    position:fixed; inset:var(--header-h) 0 auto 0;
    background:var(--bg); border-bottom:1px solid var(--line);
    padding:14px 22px 24px;
    max-height:calc(100dvh - var(--header-h)); overflow-y:auto;
    display:none;
  }
  .nav.open{ display:block; }

  .nav-list{ flex-direction:column; align-items:stretch; gap:2px; }
  .nav-link{ padding:13px 4px; font-size:1.02rem; border-radius:0; border-bottom:1px solid var(--line); }
  .nav-trigger{ text-align:left; width:100%; }
  .nav-trigger::after{ display:none; }

  .submenu{
    position:static; opacity:1; visibility:visible; transform:none;
    box-shadow:none; background:none; border:0;
    padding:4px 0 8px 16px; min-width:0;
  }
  .submenu a{ padding:10px 4px; color:var(--muted); }
  .header-cta{ display:none; }

  .group + .group{ margin-top:52px; }
  .group-head{ flex-direction:column; align-items:flex-start; gap:6px; }

  /* Carrusel */
  .track{
    display:flex;
    gap:14px;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    padding:2px 0 4px;
    margin:0 -22px;
    padding-left:22px; padding-right:22px;
  }
  .track::-webkit-scrollbar{ display:none; }

  .card{
    flex:0 0 82%;
    max-width:330px;
    scroll-snap-align:center;
  }
  .card:hover{ transform:none; }

  .blog-grid{ grid-template-columns:1fr; }

  .carousel-ui{
    display:flex; align-items:center; justify-content:space-between;
    gap:16px; margin-top:18px;
  }
  .arrow{
    width:42px; height:42px; flex:none;
    display:grid; place-items:center;
    border-radius:50%; cursor:pointer;
    background:var(--surface); border:1px solid var(--line); color:var(--ink);
  }
  .arrow:disabled{ opacity:.32; cursor:default; }
  .arrow svg{ width:17px; height:17px; }

  .dots{ display:flex; gap:7px; justify-content:center; flex:1; flex-wrap:wrap; }
  .dot{
    width:7px; height:7px; padding:0; border-radius:50%; cursor:pointer;
    background:var(--line); border:0;
    transition:width .2s, background .2s;
  }
  .dot[aria-current="true"]{ width:22px; border-radius:4px; background:var(--naranja); }

  .counter{
    font-family:var(--subtitle); font-size:.78rem; color:var(--muted);
    letter-spacing:.02em; white-space:nowrap;
  }
  .counter b{ color:var(--chocolate); font-weight:600; }

  .hero-facts{ gap:20px; }
}
