/* ─── ATELIER · MOBILE ─── */
/* Mobile-first. Se aplica solo en pantallas ≤ 768px */

@media (max-width: 768px) {

  /* ── RESET MÓVIL ── */
  body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }

  /* ── OCULTAR NAV FLOTANTE DE ESCRITORIO ── */
  nav { display: none !important; }

  /* ── TOP BAR MÓVIL ── */
  .mobile-topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255,253,248,0.88);
    backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--line);
  }
  .mobile-topbar .logo {
    font-family: 'Bebas Neue', sans-serif; font-size: 24px;
    letter-spacing: 3px; color: var(--ink); text-decoration: none;
  }
  .mobile-topbar .logo span { color: var(--accent); }
  .mobile-topbar-right { display: flex; align-items: center; gap: 12px; }
  .mobile-cart-icon {
    position: relative; background: var(--accent);
    height: 42px; border-radius: 12px; padding: 0 14px;
    display: flex; align-items: center; gap: 8px;
    border: none; cursor: pointer;
    transition: transform 0.2s var(--ease-snap);
  }
  .mobile-cart-icon:active { transform: scale(0.93); }
  .mobile-cart-icon svg { color: white; flex-shrink: 0; }
  .mobile-cart-info { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
  .mobile-cart-count { font-size: 10px; color: rgba(255,255,255,0.8); font-weight: 600; }
  .mobile-cart-total { font-size: 14px; color: white; font-weight: 800; }

  /* ── BOTTOM NAV ── */
  .mobile-bottomnav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,253,248,0.96);
    backdrop-filter: blur(24px);
    border-top: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-around;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  }
  .bnav-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    text-decoration: none; color: var(--text-muted);
    font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 6px 16px; border-radius: 10px;
    transition: color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
  }
  .bnav-item.active, .bnav-item:active { color: var(--accent); }
  .bnav-item svg { width: 22px; height: 22px; }

  /* ── MARQUEE ── */
  .marquee-wrap { margin-top: 74px; }

  /* ── HERO MÓVIL ── */
  .hero {
    min-height: 100svh;
    padding: 80px 20px 100px;
    align-items: flex-end;
  }
  /* En móvil el texto va abajo: overlay vertical de abajo hacia arriba */
  .hero::before {
    background:
      linear-gradient(to top, rgba(250,245,236,0.97) 0%, rgba(250,245,236,0.94) 45%, rgba(250,245,236,0.78) 68%, rgba(250,245,236,0.30) 88%, rgba(250,245,236,0.10) 100%);
  }
  .hero h1 {
    font-size: clamp(64px, 19vw, 100px);
    letter-spacing: -1px;
  }
  .hero p { font-size: 15px; max-width: 100%; }
  .hero-ctas {
    flex-direction: column; gap: 12px;
  }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-secondary {
    text-align: center; padding: 16px; font-size: 15px;
    border-radius: 14px;
  }
  .hero-stats {
    gap: 0;
    display: grid; grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--line); border-radius: 16px;
    overflow: hidden; margin-top: 32px; padding: 0;
    background: rgba(255,255,255,0.6);
  }
  .hero-stats > div {
    padding: 16px 12px; text-align: center;
    border-right: 1px solid var(--line);
  }
  .hero-stats > div:last-child { border-right: none; }
  .stat-num { font-size: 28px; }
  .stat-label { font-size: 10px; }

  /* ── SECCIONES ── */
  .section-full { padding: 48px 20px; }
  .section-header { margin-bottom: 28px; }
  .section-title { font-size: clamp(36px, 10vw, 52px); }

  /* ── CATEGORÍAS — SCROLL HORIZONTAL ── */
  .categories-grid {
    display: flex !important;
    grid-template-columns: unset !important;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
    scrollbar-width: none;
  }
  .categories-grid::-webkit-scrollbar { display: none; }
  .cat-card {
    flex-shrink: 0;
    width: 200px;
    aspect-ratio: 3/4;
    scroll-snap-align: start;
    border-radius: 20px;
  }
  .cat-card:hover { transform: none; }
  .cat-card:active { transform: scale(0.97); }
  .cat-content { padding: 16px; }
  .cat-icon { font-size: 28px; }
  .cat-content h3 { font-size: 24px; }
  .cat-content p { font-size: 12px; }

  /* ── DESTACADOS ── */
  .promos-grid { grid-template-columns: 1fr; gap: 12px; }
  .promo-big { padding: 32px 24px; }
  .promo-big h3 { font-size: 36px; }
  .promo-right { flex-direction: row; gap: 12px; }
  .promo-small { flex: 1; padding: 20px; }
  .promo-small h3 { font-size: 24px; }

  /* ── NOSOTROS PREVIEW ── */
  .nosotros-inner {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }
  .nosotros-card {
    flex-direction: row; flex-wrap: wrap; gap: 0;
    padding: 0; background: none; border: none; box-shadow: none;
    display: grid; grid-template-columns: 1fr 1fr;
  }
  .nosotros-stat {
    padding: 20px 16px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.6);
  }
  .nosotros-stat span { font-size: 36px; }

  /* ── PRODUCT GRID ── */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card { border-radius: 14px; }
  .product-overlay { opacity: 1; background: transparent; align-items: flex-end; justify-content: flex-end; padding: 10px; }
  .btn-add {
    transform: translateY(0) !important;
    background: var(--accent); color: white;
    padding: 9px 14px; font-size: 13px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(226,88,47,0.35);
  }
  .btn-add:hover { background: var(--accent); }
  .product-info { padding: 12px; }
  .product-name { font-size: 13px; }
  .product-price { font-size: 22px; }

  /* ── TOOLBAR CATÁLOGO ── */
  .catalog-toolbar { gap: 10px; }
  .search-box { min-width: 100%; }
  .sort-select { flex: 1; min-width: 0; }
  .plist-item { padding: 8px 12px 8px 8px; gap: 12px; }
  .plist-img { width: 56px; height: 56px; }
  .plist-name { font-size: 13px; }
  .plist-meta { font-size: 11px; }
  .plist-price { font-size: 20px; }
  .pc-row { padding: 11px 12px; gap: 8px; }
  .pc-name { font-size: 13px; }

  /* ── CATALOG HERO ── */
  .catalog-hero { padding: 100px 20px 40px; }
  .catalog-hero h1 { font-size: clamp(52px, 14vw, 80px); }
  .filters {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 -20px 32px; padding: 0 20px 8px;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter-btn { flex-shrink: 0; }

  /* ── PRODUCTO PAGE ── */
  .producto-wrap { padding: 100px 20px 48px; }
  .producto-acciones { flex-direction: column; }
  .relacionados { padding: 0 20px 64px; }

  /* ── PAGE HERO ── */
  .page-hero { padding: 100px 20px 48px; }

  /* ── NOSOTROS STORY ── */
  .nosotros-story { padding: 0 20px 80px; }
  .story-grid { grid-template-columns: 1fr !important; gap: 32px; }
  .values-grid { grid-template-columns: 1fr !important; gap: 12px; }
  .value-card { padding: 24px; border-radius: 16px; }

  /* ── CARRITO ── */
  .cart-panel { width: 100vw; border-radius: 24px 24px 0 0; top: auto; height: 90svh; }
  .cart-panel.open { transform: translateY(0); }
  .cart-panel { transform: translateY(100%); }

  /* ── FOOTER ── */
  footer { padding: 40px 20px 100px; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-wa { width: 100%; justify-content: center; }

}

/* ─── BOTTOM SHEET ─── */
.bs-overlay {
  position: fixed; inset: 0; background: rgba(43,38,32,0); z-index: 300;
  pointer-events: none; transition: background 0.3s;
}
.bs-overlay.open { background: rgba(43,38,32,0.5); pointer-events: all; }

.bottom-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 301;
  background: var(--paper);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--line);
  padding: 0 20px max(24px, env(safe-area-inset-bottom));
  transform: translateY(110%);
  transition: transform 0.45s cubic-bezier(.19,1,.22,1);
  max-height: 92svh; overflow-y: auto;
}
.bottom-sheet.open { transform: translateY(0); }

/* handle */
.bs-handle-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 8px;
}
.bs-handle {
  width: 40px; height: 4px; background: rgba(43,38,32,0.25);
  border-radius: 2px; cursor: grab; flex-shrink: 0;
  margin: 0 auto;
}
.bs-close {
  position: absolute; right: 20px; top: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(43,38,32,0.07); border: none; color: var(--text-muted);
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.bs-close:active { background: rgba(43,38,32,0.15); color: var(--ink); }

/* producto header */
.bs-header {
  display: flex; gap: 16px; align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.bs-img {
  width: 72px; height: 72px; background: #fff;
  border-radius: 14px; display: flex; align-items: center;
  justify-content: center; font-size: 36px; flex-shrink: 0; overflow: hidden;
}
.bs-img img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.bs-title { font-family: 'Bebas Neue', sans-serif; font-size: 28px; line-height: 1; }
.bs-cat { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.bs-precio { font-family: 'Bebas Neue', sans-serif; font-size: 26px; color: var(--accent); margin-top: 4px; }
.bs-precio small { font-family: Inter, sans-serif; font-size: 13px; font-weight: 700; }

/* selectores dentro del sheet */
.bs-section { margin-bottom: 20px; }
.bs-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-muted);
  display: flex; justify-content: space-between; margin-bottom: 10px;
}
.bs-label span { color: var(--ink); }

.bs-variantes { display: flex; gap: 8px; flex-wrap: wrap; }
.bs-variante {
  padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--paper-card); color: var(--text-muted);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.bs-variante.active { background: var(--accent); border-color: var(--accent); color: white; }

/* botón agregar */
.bs-agregar {
  width: 100%; background: var(--accent); color: white; border: none;
  padding: 18px; border-radius: 14px; font-weight: 800; font-size: 16px;
  cursor: pointer; margin-top: 8px; margin-bottom: 8px;
  transition: transform 0.2s var(--ease-snap), background 0.2s, opacity 0.2s;
  box-shadow: 0 10px 32px rgba(226,88,47,0.3);
}
.bs-agregar:not(:disabled):active { transform: scale(0.97); }
.bs-agregar:disabled { opacity: 0.45; cursor: not-allowed; }
.bs-ver-mas {
  width: 100%; background: transparent; color: var(--text-muted);
  border: 1px solid var(--line-strong); padding: 14px;
  border-radius: 14px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; margin-bottom: 4px;
}
.bs-ver-mas:active { background: rgba(43,38,32,0.05); }

/* bottom sheet en escritorio: centrado y más angosto */
@media (min-width: 769px) {
  .bottom-sheet {
    max-width: 620px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-bottom: none;
    box-shadow: 0 -20px 60px rgba(43,38,32,0.18);
  }
  .bs-close:hover { background: rgba(43,38,32,0.15); color: var(--ink); }
  .bs-variante:hover { border-color: var(--accent); color: var(--ink); }
  .bs-agregar:not(:disabled):hover { transform: translateY(-2px); }
  .bs-ver-mas:hover { background: rgba(43,38,32,0.05); color: var(--ink); }
}

/* ─── MOSTRAR/OCULTAR ELEMENTOS POR PANTALLA ─── */
.mobile-topbar, .mobile-bottomnav { display: none; }

@media (max-width: 768px) {
  .mobile-topbar { display: flex; }
  .mobile-bottomnav { display: flex; }
}
