/* ═══════════════════════════════════════════════════════════════════════ */
/* CATÁLOGO IN-PACK — Estilos                                              */
/* Mobile-first · Paleta inpack.com.py · Performance optimizada            */
/* ═══════════════════════════════════════════════════════════════════════ */

:root {
  --primary: #0A2540;
  --primary-light: #1a3a5c;
  --primary-dark: #061a30;
  --accent: #F5923A;
  --accent-dark: #e07e28;
  --accent-pale: #fff4ec;
  --green: #10B981;
  --green-dark: #047857;
  --red: #EF4444;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --border: #e8edf2;
  --border-mid: #d1d9e0;
  --text-900: #0A2540;
  --text-700: #334155;
  --text-500: #64748b;
  --text-400: #94a3b8;
  --shadow-sm: 0 2px 6px rgba(10,37,64,.06);
  --shadow: 0 4px 14px rgba(10,37,64,.08);
  --shadow-lg: 0 12px 28px rgba(10,37,64,.10);
  --r: 12px;
  --r-sm: 8px;
  --r-lg: 16px;
  --t: .25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-900);
  background: var(--bg);
  line-height: 1.55;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.01em;
  color: var(--text-900);
}

a { color: inherit; text-decoration: none; }

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

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ═══ HEADER ═══ */
.header {
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 12px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(245,146,58,.4);
}
.logo-title {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
}
.logo-sub {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-carrito {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: all var(--t);
  position: relative;
}
.btn-carrito:hover { background: rgba(255,255,255,.15); }
.badge-num {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 30px;
  min-width: 20px;
  display: inline-block;
  text-align: center;
}
.btn-wa-header {
  background: #25D366;
  color: #fff !important;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--t);
}
.btn-wa-header:hover { background: #1faa50; transform: translateY(-1px); }
.wa-icon { font-size: 16px; }

/* ═══ HERO ═══ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 50px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245,146,58,.15), transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 800px; }
.hero-badge {
  display: inline-block;
  background: rgba(245,146,58,.15);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  border: 1px solid rgba(245,146,58,.25);
}
.hero-title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  color: #fff;
}
.hero-title span { color: var(--accent); }
.hero-sub {
  font-size: clamp(15px, 2.5vw, 18px);
  color: rgba(255,255,255,.85);
  margin-bottom: 30px;
  max-width: 640px;
}

.hero-search {
  background: #fff;
  border-radius: var(--r);
  padding: 4px;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  margin-bottom: 24px;
  max-width: 580px;
}
.hero-search input {
  width: 100%;
  border: none;
  padding: 14px 18px;
  font-size: 15px;
  border-radius: var(--r);
  font-family: inherit;
  background: transparent;
  outline: none;
  color: var(--text-900);
}

.hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}
.stat {
  display: flex;
  flex-direction: column;
}
.stat strong {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat span {
  font-size: 12px;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ═══ CATEGORÍAS CHIPS ═══ */
.categorias-section {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 50;
}
.categorias-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0;
  scrollbar-width: none;
}
.categorias-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text-700);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  transition: all var(--t);
}
.cat-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.cat-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ═══ PRODUCTOS ═══ */
.productos-section { padding: 32px 0 60px; }
.productos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.productos-header h2 {
  font-size: 22px;
  font-weight: 700;
}
.ordenar select {
  background: #fff;
  border: 1.5px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

.grid-productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.producto-card {
  background: #fff;
  border-radius: var(--r);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--t);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.producto-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}
.producto-imagen {
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  position: relative;
}
.producto-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.producto-imagen-emoji { color: var(--text-400); }
.producto-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.producto-badge.no-stock {
  background: var(--red);
}
.producto-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.producto-categoria {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-500);
  font-weight: 700;
  margin-bottom: 4px;
}
.producto-medida {
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-900);
  margin-bottom: 8px;
  line-height: 1.2;
}
.producto-info {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--text-500);
  margin-bottom: 10px;
}
.producto-info span { display: flex; align-items: center; gap: 3px; }
.producto-precio {
  font-family: 'Sora', sans-serif;
  font-size: 19px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
  margin-top: auto;
}
.producto-precio .moneda {
  font-size: 12px;
  color: var(--text-500);
  font-weight: 600;
}
.producto-precio-disclaimer {
  font-size: 10px;
  color: var(--text-400);
  margin-bottom: 12px;
}
.producto-actions {
  display: flex;
  gap: 6px;
}
.btn-agregar {
  flex: 1;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn-agregar:hover { background: var(--accent-dark); }
.btn-agregar:disabled { background: var(--text-400); cursor: not-allowed; }
.btn-ver {
  background: var(--bg);
  color: var(--text-700);
  border: 1px solid var(--border);
  padding: 9px 10px;
  border-radius: var(--r-sm);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t);
}
.btn-ver:hover { background: var(--border); color: var(--text-900); }

/* ═══ LOADING & EMPTY ═══ */
.loading {
  grid-column: 1 / -1;
  padding: 80px 20px;
  text-align: center;
  color: var(--text-500);
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  padding: 80px 20px;
  text-align: center;
}
.empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--text-500); margin-bottom: 20px; }

/* ═══ BANNER IMPRESIÓN ═══ */
.banner-impresion {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: 50px 0;
}
.banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.banner-text { flex: 1; min-width: 280px; }
.banner-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.banner-text h2 {
  color: #fff;
  font-size: 28px;
  margin-bottom: 8px;
}
.banner-text p {
  font-size: 15px;
  color: rgba(255,255,255,.9);
  max-width: 500px;
}
.banner-cta { flex-shrink: 0; }
.btn-cta {
  background: #fff;
  color: var(--accent-dark);
  padding: 14px 28px;
  border-radius: var(--r);
  font-size: 15px;
  font-weight: 700;
  display: inline-block;
  transition: all var(--t);
  white-space: nowrap;
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
}

/* ═══ INFO COMPRA ═══ */
.info-compra { padding: 60px 0; background: #fff; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.info-item { text-align: center; padding: 20px; }
.info-icon {
  font-size: 38px;
  margin-bottom: 12px;
  display: inline-block;
  width: 64px;
  height: 64px;
  background: var(--accent-pale);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.info-item h3 {
  font-size: 17px;
  margin-bottom: 6px;
}
.info-item p {
  color: var(--text-500);
  font-size: 14px;
  line-height: 1.6;
}

/* ═══ FOOTER ═══ */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,.7);
  padding: 50px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}
.footer-logo {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}
.footer-col h4 {
  color: var(--accent);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}
.footer-col p, .footer-col a {
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
  color: rgba(255,255,255,.7);
  transition: color var(--t);
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.5);
}

/* ═══ MODAL PRODUCTO ═══ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,37,64,.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.show {
  display: flex;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-producto {
  background: #fff;
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0,0,0,.06);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
}
.modal-close:hover { background: rgba(0,0,0,.12); }

.modal-prod-imagen {
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 100px;
  color: var(--text-400);
}
.modal-prod-body { padding: 24px; }
.modal-prod-categoria {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}
.modal-prod-titulo {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 16px;
  font-family: 'Sora', sans-serif;
}
.modal-prod-precio {
  font-family: 'Sora', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}
.modal-prod-stock {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 20px;
}
.modal-prod-stock.disponible { background: #d1fae5; color: var(--green-dark); }
.modal-prod-stock.agotado { background: #fee2e2; color: #991b1b; }

.modal-prod-detalle {
  background: var(--bg);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.modal-prod-detalle-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}
.modal-prod-detalle-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.modal-prod-detalle-row .lbl { color: var(--text-500); }
.modal-prod-detalle-row .val { font-weight: 600; }

.modal-prod-cantidad {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.cantidad-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.cantidad-control button {
  background: var(--bg);
  border: none;
  width: 38px;
  height: 38px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-700);
}
.cantidad-control button:hover { background: var(--border); }
.cantidad-control input {
  width: 60px;
  border: none;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  outline: none;
  font-family: inherit;
  -moz-appearance: textfield;
}
.cantidad-control input::-webkit-outer-spin-button,
.cantidad-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.modal-prod-actions {
  display: flex;
  gap: 10px;
}

.modal-prod-relacionados {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.modal-prod-relacionados h4 {
  font-size: 14px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-500);
}
.relacionados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.relacionado-card {
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
  border: 1px solid var(--border);
}
.relacionado-card:hover {
  background: var(--accent-pale);
  border-color: var(--accent);
}
.relacionado-icon { font-size: 32px; margin-bottom: 6px; }
.relacionado-medida {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-900);
}
.relacionado-precio {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  margin-top: 2px;
}

/* ═══ CARRITO PANEL ═══ */
.carrito-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,37,64,.5);
  backdrop-filter: blur(2px);
  z-index: 150;
}
.carrito-overlay.show {
  display: block;
  animation: fadeIn .2s ease;
}
.carrito-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: #fff;
  z-index: 160;
  display: flex;
  flex-direction: column;
  transition: right .3s ease;
  box-shadow: -10px 0 30px rgba(0,0,0,.2);
}
.carrito-panel.show { right: 0; }
.carrito-header {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
}
.carrito-header h3 {
  font-size: 18px;
  font-weight: 700;
}
.carrito-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
}
.carrito-vacio {
  text-align: center;
  padding: 60px 20px;
}
.vacio-icon { font-size: 56px; margin-bottom: 14px; opacity: 0.4; }
.carrito-vacio h4 { margin-bottom: 6px; }
.carrito-vacio p { color: var(--text-500); margin-bottom: 20px; font-size: 13px; }

.carrito-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.carrito-item-icon {
  width: 56px;
  height: 56px;
  background: var(--bg);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.carrito-item-info { flex: 1; min-width: 0; }
.carrito-item-titulo {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}
.carrito-item-cat {
  font-size: 11px;
  color: var(--text-500);
  margin-bottom: 6px;
}
.carrito-item-controles {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.carrito-item-cantidad {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.carrito-item-cantidad button {
  background: var(--bg);
  border: none;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-weight: 700;
}
.carrito-item-cantidad input {
  width: 36px;
  border: none;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  outline: none;
}
.carrito-item-precio {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}
.carrito-item-eliminar {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}
.carrito-footer {
  padding: 20px 22px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.carrito-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 14px;
}
.carrito-total strong {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  color: var(--primary);
  font-weight: 800;
}

/* ═══ MODAL COTIZAR ═══ */
.modal-cotizar {
  background: #fff;
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 30px;
  box-shadow: var(--shadow-lg);
  animation: slideUp .3s ease;
}
.form-cotizar-header { margin-bottom: 24px; }
.form-cotizar-header h3 {
  font-size: 22px;
  margin-bottom: 4px;
}
.form-cotizar-header p {
  color: var(--text-500);
  font-size: 14px;
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-700);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  color: var(--text-900);
  background: #fff;
  transition: all var(--t);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10,37,64,.08);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-resumen {
  background: var(--bg);
  padding: 14px;
  border-radius: var(--r-sm);
  margin-bottom: 18px;
  font-size: 13px;
}
.form-resumen strong { display: block; margin-bottom: 8px; }
.form-resumen ul {
  list-style: none;
  padding-left: 0;
  font-size: 12px;
  color: var(--text-700);
}
.form-resumen li {
  padding: 3px 0;
  border-bottom: 1px dashed var(--border);
}
.form-resumen li:last-child { border-bottom: none; }
.form-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--text-400);
  margin-top: 10px;
}

/* ═══ BOTONES GENERALES ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--t);
  font-family: inherit;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg);
  color: var(--text-900);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--border); }
.btn-ghost {
  background: transparent;
  color: var(--text-500);
}
.btn-ghost:hover { color: var(--red); }
.btn-block {
  width: 100%;
  margin-top: 8px;
}
.btn-grande {
  padding: 14px 18px;
  font-size: 15px;
}

/* ═══ TOAST ═══ */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: all .3s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

/* ═══ FAB WhatsApp ═══ */
.fab-wa {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 20px rgba(37,211,102,.5);
  z-index: 90;
  transition: all var(--t);
}
.fab-wa:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37,211,102,.7);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 640px) {
  .header-row { height: 56px; }
  .wa-text { display: none; }
  .btn-carrito { padding: 8px 10px; }
  .btn-wa-header { padding: 8px 10px; }
  .hero { padding: 30px 0 40px; }
  .hero-stats { gap: 16px; }
  .stat strong { font-size: 22px; }
  .categorias-section { top: 56px; }
  .grid-productos {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .producto-card { font-size: 12px; }
  .producto-medida { font-size: 14px; }
  .producto-precio { font-size: 16px; }
  .producto-imagen { font-size: 42px; }
  .btn-agregar { font-size: 11px; padding: 7px 8px; }
  .productos-header h2 { font-size: 18px; }
  .banner-text h2 { font-size: 22px; }
  .modal-cotizar { padding: 22px; }
  .form-row { grid-template-columns: 1fr; }
  .fab-wa {
    width: 52px;
    height: 52px;
    font-size: 24px;
    bottom: 16px;
    right: 16px;
  }
  .toast { bottom: 80px; font-size: 13px; padding: 12px 18px; }
}

@media (min-width: 1024px) {
  .grid-productos {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════════ */
/* SECCIONES POR CATEGORÍA — Layout agrupado (V2 más robusto)              */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Reset cuando es vista agrupada */
.grid-productos.agrupado {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}

/* Sección de categoría */
.categoria-seccion {
  margin-bottom: 40px;
  scroll-margin-top: 130px;
  border-radius: var(--r-lg);
  padding: 4px;
  display: block;
}

.categoria-seccion.highlight {
  background: linear-gradient(to right, rgba(245,146,58,0.06), transparent);
  animation: highlightFade 1.5s ease;
}

@keyframes highlightFade {
  0% { background: rgba(245,146,58,0.15); }
  100% { background: transparent; }
}

/* Header de cada categoría */
.categoria-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  flex-wrap: wrap;
  gap: 8px;
}

.categoria-titulo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.categoria-icono {
  font-size: 28px;
  line-height: 1;
}

.categoria-titulo h3 {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.categoria-count {
  background: var(--accent-pale);
  color: var(--accent-dark);
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* GRID DE LA CATEGORÍA — Forzar columnas explícitas */
.categoria-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  gap: 12px !important;
  width: 100%;
}

/* Cards dentro de categoria-grid */
.categoria-grid .producto-card {
  font-size: 12px;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.categoria-grid .producto-imagen {
  aspect-ratio: 1 !important;
  font-size: 42px;
}

.categoria-grid .producto-medida {
  font-size: 15px;
  margin-bottom: 8px;
}

.categoria-grid .producto-precio {
  font-size: 16px;
  margin-bottom: 8px;
}

.categoria-grid .producto-body {
  padding: 12px;
}

.categoria-grid .producto-actions {
  gap: 4px;
}

.categoria-grid .btn-agregar {
  padding: 7px 10px;
  font-size: 12px;
}

.categoria-grid .btn-ver {
  padding: 7px 8px;
}

.categoria-grid .producto-badge {
  font-size: 9px;
  padding: 2px 6px;
  top: 8px;
  left: 8px;
}

.categoria-grid .producto-precio-disclaimer {
  display: none;
}

/* Categoría dentro del card en vista agrupada */
.categoria-grid .producto-categoria {
  font-size: 9px !important;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-pale);
  padding: 3px 8px;
  border-radius: 30px;
  display: inline-block;
  margin-bottom: 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

/* RESPONSIVE — fuerza columnas por pantalla */
@media (max-width: 480px) {
  .categoria-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .categoria-titulo h3 { font-size: 16px; }
  .categoria-icono { font-size: 20px; }
  .categoria-count { font-size: 10px; padding: 2px 8px; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .categoria-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  .categoria-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

@media (min-width: 1024px) {
  .categoria-grid {
    grid-template-columns: repeat(5, 1fr) !important;
  }
}

@media (min-width: 1400px) {
  .categoria-grid {
    grid-template-columns: repeat(6, 1fr) !important;
  }
}
