/* =============================================
   BUCO — styles.css
   Tokens → Reset → Layout → Componentes → Responsive
   ============================================= */

/* ── TOKENS ── */
:root {
  --orange:        #F5801F;
  --orange-dark:   #D96A10;
  --orange-light:  #FFF3E8;
  --white:         #FFFFFF;
  --text:          #1E1E1E;
  --text-mid:      #555555;
  --border:        #E8E8E8;
  --bg-soft:       #FAFAFA;
  --shadow-sm:     0 2px 8px rgba(0,0,0,.07);
  --shadow-md:     0 6px 20px rgba(0,0,0,.10);
  --shadow-orange: 0 6px 18px rgba(245,128,31,.35);
  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     40px;
  --header-h:      120px;   /* altura header desktop */
  --header-h-mob:  58px;    /* altura header mobile */
  --drawer-w:      280px;
  --transition:    .22s ease;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito', sans-serif; color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
img  { display: block; max-width: 100%; }
a    { text-decoration: none; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;            /* mínimo táctil 44-48px */
  padding: 12px 28px;
  border-radius: var(--radius-lg);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
}
.btn:hover         { transform: translateY(-2px); }
.btn:active        { transform: translateY(0); }
.btn-orange        { background: var(--orange); color: var(--white); }
.btn-orange:hover  { background: var(--orange-dark); box-shadow: var(--shadow-orange); }
.btn-white         { background: var(--white);  color: var(--orange); }
.btn-white:hover   { background: var(--orange-light); box-shadow: var(--shadow-md); }

/* ── ICON CIRCLES ── */
.icon-circle {
  width: 36px; height: 36px;
  background: var(--orange);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
}
.icon-circle:hover        { background: var(--orange-dark); transform: scale(1.08); }
.icon-circle svg          { width: 16px; height: 16px; fill: white; }
.icon-circle.icon-lg      { width: 48px; height: 48px; background: #ddd; }
.icon-circle.icon-lg svg  { fill: #777; width: 20px; height: 20px; }
.icon-circle.icon-lg:hover{ background: var(--orange); }
.icon-circle.icon-lg:hover svg { fill: white; }


/* ══════════════════════════════════════════
   HEADER — sticky, desktop & mobile
   ══════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--white);
  box-shadow: none;
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 2px 12px rgba(0,0,0,.10); }

/* Top bar con redes — solo desktop */
.topbar {
  display: flex;
  justify-content: flex-end;
  padding: 8px 40px;
  border-bottom: 1px solid var(--border);
}
.topbar-socials { display: flex; align-items: center; gap: 8px; }
.topbar-label   { font-size: 13px; font-weight: 700; color: var(--text); }

/* Barra nav principal */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 40px;
  position: relative;
  min-height: 64px;
}

/* Logo grande centrado — desktop */
.logo-desktop-wrap { display: flex; justify-content: center; }
.logo-desktop      { height: 72px; width: auto; }

/* Logo pequeño en nav-bar — oculto en desktop */
.nav-logo  { display: none; }
.logo-small{ height: 40px; width: auto; }

/* Links de navegación desktop */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  justify-content: center;
  padding: 0 40px 10px;
}
.nav-link {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  padding: 6px 18px;
  border-right: 2px solid #ccc;
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-link:last-child { border-right: none; }
.nav-link.active, .nav-link:hover { color: var(--orange); }

/* Botón hamburguesa — oculto en desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 44px; min-height: 44px;
  align-items: center;
  justify-content: center;
}
.bar {
  display: block;
  width: 24px; height: 2.5px;
  background: var(--orange);
  border-radius: 4px;
  transition: transform .3s ease, opacity .3s ease;
  transform-origin: center;
}
.nav-toggle.open .bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open .bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Espaciador para compensar header fixed */
.header-spacer { height: var(--header-h); }


/* ══════════════════════════════════════════
   DRAWER MÓVIL
   ══════════════════════════════════════════ */
.drawer {
  position: fixed;
  top: 0; right: 0;
  width: var(--drawer-w);
  height: 100dvh;
  background: var(--white);
  z-index: 300;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
  padding-top: calc(var(--header-h-mob) + 12px);
}
.drawer.open { transform: translateX(0); }

.drawer-links {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
  min-height: 56px;
}
.drawer-link:hover,
.drawer-link.active { color: var(--orange); background: var(--orange-light); }

.drawer-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-top: 1px solid var(--border);
}

/* Overlay oscuro */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 250;
  backdrop-filter: blur(2px);
  transition: opacity .3s;
}
.overlay.visible { display: block; }


/* ══════════════════════════════════════════
   HERO
   ══════════════════════════════════════════ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 440px;
}
.hero-img {
  overflow: hidden;
  background: #e8d5c0;
}
.hero-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.hero-img:hover img { transform: scale(1.03); }
.hero-copy {
  background: var(--orange);
  padding: 48px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
}
.hero-copy h2 {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}
.hero-copy p {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255,255,255,.92);
  margin-bottom: 10px;
}
.hero-copy .btn { margin-top: 20px; align-self: flex-start; }


/* ══════════════════════════════════════════
   QUÉ HACEMOS
   ══════════════════════════════════════════ */
.que-hacemos {
  padding: 64px 80px;
  text-align: center;
  background: var(--white);
}
.section-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 44px;
}
.hacemos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 44px;
}
.hacemos-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.hacemos-card img {
  width: 180px; height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.hacemos-card:hover img {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.hacemos-card p {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  max-width: 200px;
  line-height: 1.5;
}


/* ══════════════════════════════════════════
   BANNER
   ══════════════════════════════════════════ */
.banner {
  position: relative;
  min-height: 180px;
  background: #2a4a52;
  overflow: hidden;
}
.banner-bg {
  position: absolute; inset: 0;
  background: url('https://picsum.photos/seed/handcraft/1400/300') center/cover no-repeat;
  opacity: .35;
}
.banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 80px;
  min-height: 180px;
  gap: 32px;
}
.banner-inner h3 {
  color: white;
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 800;
  line-height: 1.3;
}
.banner-inner .btn { flex-shrink: 0; }


/* ══════════════════════════════════════════
   PRODUCTOS
   ══════════════════════════════════════════ */
.products {
  padding: 64px 80px;
  text-align: center;
  background: var(--bg-soft);
}
.products-sub {
  font-size: 14px;
  color: var(--text-mid);
  margin-top: -30px;
  margin-bottom: 40px;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}
.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border-radius: 18px;
  padding: 14px 14px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
}
.product-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.product-card .btn { font-size: 13px; padding: 10px 20px; min-height: 42px; }

.cargar-mas {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  transition: color var(--transition);
  cursor: pointer;
  background: none;
  border: none;
  min-height: 44px;
  padding: 0 8px;
}
.cargar-mas:hover { color: var(--orange); }


/* ══════════════════════════════════════════
   CÓMO LLEGA
   ══════════════════════════════════════════ */
.como-llega {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  padding: 64px 80px;
  align-items: start;
  background: var(--white);
}
.como-llega h2 {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 800;
  color: var(--orange);
  line-height: 1.25;
}
.como-copy p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-mid);
  margin-bottom: 14px;
}
.como-copy p strong { color: var(--text); }


/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
footer {
  padding: 56px 80px 48px;
  text-align: center;
  border-top: 1px solid var(--border);
}
footer h2 {
  font-size: 34px;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 20px;
}
.footer-socials {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}
footer > p {
  font-size: 14px;
  color: var(--text-mid);
  font-weight: 600;
}


/* ══════════════════════════════════════════
   RESPONSIVE — TABLET  ≤ 1024px
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .que-hacemos, .products, .como-llega, footer { padding-left: 40px; padding-right: 40px; }
  .banner-inner { padding-left: 40px; padding-right: 40px; }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}


/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE  ≤ 768px
   ══════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Header mobile: topbar oculto, nav-bar compacta */
  .topbar         { display: none; }
  :root           { --header-h: var(--header-h-mob); }

  .nav-bar {
    padding: 0 16px;
    min-height: var(--header-h-mob);
    justify-content: flex-start;
  }
  .logo-desktop-wrap { display: none; }
  .nav-logo          { display: flex; align-items: center; }
  .nav-links         { display: none; }          /* oculto, se usa drawer */
  .nav-toggle        { display: inline-flex; }
  .header-spacer     { height: var(--header-h-mob); }

  /* Hero apilado */
  .hero { grid-template-columns: 1fr; }
  .hero-img { height: 260px; }
  .hero-copy {
    padding: 32px 20px;
    align-items: center;
    text-align: center;
  }
  .hero-copy .btn { align-self: center; width: 100%; max-width: 320px; }

  /* Qué hacemos: 1 col */
  .que-hacemos { padding: 48px 20px; }
  .hacemos-grid { grid-template-columns: 1fr; gap: 28px; }
  .hacemos-card img { width: 140px; height: 140px; }

  /* Banner apilado */
  .banner-inner {
    flex-direction: column;
    text-align: center;
    padding: 32px 20px;
    gap: 20px;
  }
  .banner-inner .btn { width: 100%; max-width: 280px; }

  /* Productos: 2 col */
  .products { padding: 48px 16px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .product-card { padding: 10px 10px 14px; }
  .product-card .btn { font-size: 12px; padding: 8px 12px; }

  /* Cómo llega: apilado */
  .como-llega {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 48px 20px;
  }

  /* Footer */
  footer { padding: 48px 20px 40px; }
}


/* ══════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE  ≤ 400px
   ══════════════════════════════════════════ */
@media (max-width: 400px) {
  .products-grid { grid-template-columns: 1fr; }
  .hero-copy h2  { font-size: 20px; }
}


/* ══════════════════════════════════════════
   ANIMACIÓN ENTRADA (fade-up)
   ══════════════════════════════════════════ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
