/* =============================================================
   style.css — Identidad visual 2026
   Naranja de marca + blanco + gris oscuro + gris muy claro
   Detalles en amarillo suave. Diseño limpio y profesional.
   ============================================================= */

:root {
  --brand: #f36f13;         /* naranja principal de la marca */
  --brand-dark: #d95a05;    /* naranja hover / activo */
  --brand-soft: #fff3e9;    /* naranja muy suave para fondos */
  --yellow: #ffd166;        /* amarillo suave, solo detalles */
  --ink: #24282e;           /* gris oscuro para textos */
  --ink-soft: #6b7280;      /* gris medio secundario */
  --line: #e6e8ec;          /* bordes gris claro */
  --bg: #f6f7f9;            /* gris muy claro de fondo */
  --card: #ffffff;
  --wa: #25d366;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(36, 40, 46, 0.06), 0 1px 2px rgba(36, 40, 46, 0.04);
  --shadow-md: 0 8px 24px rgba(36, 40, 46, 0.10);
  --shadow-lg: 0 20px 50px rgba(36, 40, 46, 0.18);
  --header-h: 66px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.container { width: min(1240px, 100% - 28px); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ====================== HEADER FIJO ====================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, background .25s ease;
}
.topbar.is-scrolled { box-shadow: var(--shadow-md); background: #fff; }

.topbar__row {
  height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

/* Logo */
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand__mark {
  width: 36px; height: 36px; border-radius: 12px; flex: 0 0 auto;
  background: var(--brand);
  display: grid; place-items: center;
  color: #fff; box-shadow: var(--shadow-sm);
}
.brand__mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand__name { font-weight: 900; font-size: 16px; letter-spacing: -.3px; white-space: nowrap; color: var(--ink); }
.brand__tag { font-size: 10px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .9px; white-space: nowrap; }

/* Menú centrado */
.nav { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.nav__link {
  padding: 8px 16px; border-radius: 10px; font-weight: 800; font-size: 14.5px;
  color: var(--ink-soft); transition: background .2s, color .2s; white-space: nowrap;
}
.nav__link:hover { background: var(--brand-soft); color: var(--brand); }
.nav__link.is-active { background: var(--brand); color: #fff; }
.nav__link--login { display: none; align-items: center; gap: 10px; }
.nav__link--login svg { width: 20px; height: 20px; }

/* Acciones derecha */
.topbar__actions { display: flex; align-items: center; gap: 10px; }

.search {
  position: relative; display: flex; align-items: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 12px; height: 40px; width: 270px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.search:focus-within { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(243,111,19,.16); }
.search__icon { width: 17px; height: 17px; fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; flex: 0 0 auto; }
.search input { border: 0; background: transparent; outline: none; width: 100%; padding-left: 8px; font-size: 14px; }

.icon-action {
  position: relative; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  display: grid; place-items: center; transition: box-shadow .2s, border-color .2s, background .2s;
}
.icon-action:hover { box-shadow: var(--shadow-sm); border-color: var(--brand); background: var(--brand-soft); }
.icon-action svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cart-btn__badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--brand); color: #fff; border: 2px solid #fff;
  font-size: 11px; font-weight: 900; display: grid; place-items: center;
}

/* Botón hamburguesa (solo celular) */
.burger {
  display: none; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  padding: 0; place-items: center; gap: 4px;
}
.burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .22s, opacity .22s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ====================== FRANJA DEL LOGO ====================== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--brand-soft) 100%);
  border-bottom: 1px solid var(--line);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; opacity: .35; }
.hero::before { width: 220px; height: 220px; background: radial-gradient(circle at 35% 30%, var(--yellow), transparent 70%); top: -70px; right: 6%; }
.hero::after { width: 180px; height: 180px; background: radial-gradient(circle at 35% 30%, rgba(243,111,19,.55), transparent 70%); bottom: -80px; left: 4%; }

.hero__inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 12px; padding: 48px 0 44px;
}
.hero__logo {
  width: 92px; height: 92px; border-radius: 26px; background: var(--brand);
  display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-md);
  animation: float 5s ease-in-out infinite;
}
.hero__logo svg { width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.hero__name {
  margin: 4px 0 0; font-size: clamp(30px, 5vw, 48px); font-weight: 900;
  letter-spacing: -1.2px; color: var(--brand);
}
.hero__slogan { margin: 0; color: var(--ink-soft); font-size: clamp(14px, 2.2vw, 18px); max-width: 640px; }
.hero__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.chip {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 800; color: var(--ink-soft); box-shadow: var(--shadow-sm);
}

/* ====================== BARRA DE FILTROS ====================== */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 22px 0 6px;
}
.toolbar__title { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: -.4px; flex: 1 1 auto; }
.select {
  appearance: none; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 12px center;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 36px 10px 15px;
  font-weight: 800; font-size: 14px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color .2s;
}
.select:hover { border-color: var(--brand); }
.search--mobile { display: none; }
.category-trigger { max-width: min(420px, 100%); min-width: 220px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: var(--shadow-sm); cursor: pointer; color: var(--ink); font-weight: 800; }
.category-trigger:hover, .category-trigger[aria-expanded="true"] { border-color: var(--brand); color: var(--brand); }
.category-trigger svg, .category-search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.category-trigger span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.category-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 18px; background: rgba(36,40,46,.48); backdrop-filter: blur(3px); }
.category-modal__card { width: min(520px, 100%); max-height: min(720px, 88vh); overflow: auto; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 18px; }
.category-modal__head { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; margin-bottom: 14px; }
.category-modal__head div { min-width: 0; display: grid; }
.category-modal__head strong { font-size: 21px; }
.category-modal__head small { color: var(--ink-soft); }
.category-search { height: 44px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; margin-bottom: 12px; }
.category-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(243,111,19,.14); }
.category-search svg { color: var(--ink-soft); flex: 0 0 auto; }
.category-search input { width: 100%; border: 0; outline: 0; background: transparent; }
.category-all, .category-tree__leaf, .category-tree__parent { width: 100%; border: 0; text-align: left; cursor: pointer; color: var(--ink); }
.category-all { padding: 12px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 900; margin-bottom: 8px; }
.category-tree { display: grid; gap: 6px; }
.category-tree__group { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.category-tree__group summary { display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; cursor: pointer; font-weight: 900; list-style: none; }
.category-tree__group summary::-webkit-details-marker { display: none; }
.category-tree__group[open] summary { color: var(--brand); background: var(--brand-soft); }
.category-tree__parent, .category-tree__leaf { padding: 10px 12px; background: transparent; font-weight: 800; }
.category-tree__group > div { display: grid; padding: 0 8px 8px 20px; }
.category-tree__leaf { display: grid; border-bottom: 1px solid var(--line); }
.category-tree__leaf:last-child { border-bottom: 0; }
.category-tree__leaf small { color: var(--ink-soft); font-weight: 600; }
.category-tree button:hover { background: var(--brand-soft); color: var(--brand); }
.category-empty { padding: 22px 0 6px; }
body.modal-open { overflow: hidden; }

/* ====================== SECCIONES ====================== */
.section { padding: 18px 0; }
/* Mucho aire entre Productos destacados y Productos generales */
#seccionDestacados { padding-bottom: 40px; }
#seccionGeneral { margin-top: 96px; padding-top: 48px; border-top: 1px solid var(--line); }

.section-head { text-align: center; margin: 0 auto 34px; max-width: 720px; }
.section-head__icon {
  width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 14px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; border: 1px solid #ffe0c7;
}
.section-head__icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.section-head__title {
  margin: 0; color: var(--brand);
  font-size: clamp(28px, 4.6vw, 44px); font-weight: 900; letter-spacing: -1.4px; line-height: 1.1;
  text-align: center;
}
.section-head__rule {
  width: 120px; height: 5px; margin: 16px auto 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow), var(--brand));
}
.section-head__sub { margin: 12px 0 0; color: var(--ink-soft); font-size: 15px; }

/* ====================== GRILLA / TARJETAS ====================== */
.main { padding-bottom: 70px; }
.main--narrow { max-width: 760px; }

/* 4 columnas en computadora, 3 en tablet, 2 en celular. */
.grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  padding-top: 4px;
}
.grid > .card { height: 100%; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { box-shadow: var(--shadow-md); border-color: #ffcda6; }

.card__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg); }
.card__img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.card__badge {
  position: absolute; top: 8px; left: 8px; background: rgba(255,255,255,.94);
  color: var(--brand); font-size: 10px; font-weight: 900; letter-spacing: .4px;
  padding: 3px 8px; border-radius: 999px; text-transform: uppercase;
}

.card__body { flex: 1 1 auto; padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 7px; }
.card__code {
  display: inline-flex; align-self: flex-start; align-items: center;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid #ffe0c7; border-radius: 8px;
  padding: 3px 9px; font-size: 11.5px; font-weight: 900; letter-spacing: .5px;
  text-transform: uppercase; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.card__name {
  margin: 0; font-size: 15px; font-weight: 800; line-height: 1.3; letter-spacing: -.2px; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 39px;
}
.card__price { margin: 0 0 4px; font-size: 21px; font-weight: 900; color: var(--brand); letter-spacing: -.6px; margin-top: auto; }

/* ====================== BOTONES ====================== */
.btn {
  border: 0; border-radius: 12px; cursor: pointer; font-weight: 800;
  padding: 11px 18px; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(243,111,19,.26); }
.btn--primary:hover { background: var(--brand-dark); transform: translateY(-2px); }
.btn--ghost { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); }
.btn--ghost:hover { background: var(--brand-soft); }
.btn--wa { background: var(--wa); color: #fff; box-shadow: 0 4px 12px rgba(37, 211, 102, .28); }
.btn--wa:hover { transform: translateY(-2px); }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--block { width: 100%; }
.btn--sm { padding: 9px 12px; font-size: 13px; }
.btn--buy { width: 100%; text-decoration: none; }

.icon-btn {
  border: 0; background: transparent; cursor: pointer; font-size: 15px;
  padding: 6px 8px; border-radius: 10px; color: var(--ink-soft); font-weight: 800;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }

/* ====================== STEPPER ====================== */
.stepper {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden;
}
.stepper button {
  border: 0; background: transparent; cursor: pointer; width: 32px; height: 34px;
  font-size: 17px; font-weight: 900; color: var(--brand); transition: background .18s;
}
.stepper button:hover { background: var(--brand-soft); }
.stepper span { min-width: 30px; text-align: center; font-weight: 800; font-size: 14px; }

/* ====================== PÁGINA DE PRODUCTO ====================== */
.crumbs { padding: 18px 0 4px; font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.crumbs a:hover { color: var(--brand); }

.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; padding: 12px 0 40px; }
.gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery__main {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  aspect-ratio: 1 / 1; box-shadow: var(--shadow-sm);
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery__main:hover img { transform: scale(1.05); }
.gallery__thumbs { display: flex; gap: 9px; flex-wrap: wrap; }
.thumb {
  width: 68px; height: 68px; border-radius: 12px; overflow: hidden; padding: 0;
  border: 2px solid var(--line); background: #fff; cursor: pointer; transition: border-color .2s, transform .2s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { transform: translateY(-2px); }
.thumb.is-active { border-color: var(--brand); }

.detail__info { display: flex; flex-direction: column; gap: 12px; }
.detail__title { margin: 0; font-size: clamp(22px, 3.6vw, 32px); font-weight: 900; letter-spacing: -.8px; }
.detail__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; font-size: 12.5px; font-weight: 800; color: var(--ink-soft);
}
.tag--stock { background: #e8f8ee; color: #15803d; border-color: #cdeed9; }
.tag--out { background: #fdecec; color: #b91c1c; border-color: #f8d5d5; }
.detail__desc { margin: 0; color: var(--ink-soft); font-size: 15px; }
.detail__price { font-size: clamp(30px, 5vw, 40px); font-weight: 900; letter-spacing: -1.4px; color: var(--brand); }
.detail__buy {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow-sm);
}
.detail__buy .btn { flex: 1 1 200px; }
.detail__specs { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.spec { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.spec span:first-child { color: var(--ink-soft); font-weight: 700; }
.spec span:last-child { font-weight: 800; }

.section-title { margin: 40px 0 14px; font-size: 22px; font-weight: 900; letter-spacing: -.5px; color: var(--brand); }

/* ====================== CARRITO (drawer) ====================== */
.overlay { position: fixed; inset: 0; background: rgba(24, 27, 32, .45); backdrop-filter: blur(2px); z-index: 80; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  background: #fff; z-index: 90; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: slideIn .28s ease;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 16px;
}
.drawer__body { flex: 1; overflow: auto; padding: 14px 18px; display: grid; gap: 12px; align-content: start; }
.drawer__foot { border-top: 1px solid var(--line); padding: 14px 18px; display: grid; gap: 10px; background: #fff; }
.total { display: flex; justify-content: space-between; align-items: center; font-size: 17px; font-weight: 900; }
.total strong { color: var(--brand); }
.total--plain { font-size: 15px; padding: 6px 0; }
.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }

.line { display: grid; grid-template-columns: 62px 1fr; gap: 11px; align-items: start; }
.line__img { width: 62px; height: 62px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); }
.line__name { margin: 0; font-weight: 800; font-size: 14px; }
.line__meta { margin: 2px 0 6px; font-size: 12px; color: var(--ink-soft); }
.line__bottom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.line__sub { margin-left: auto; font-weight: 900; }

/* ====================== MODAL PEDIDO ====================== */
.modal {
  position: fixed; inset: 0; z-index: 100; background: rgba(24, 27, 32, .5);
  display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(3px);
  overflow: auto;
}
.modal__card {
  background: #fff; border-radius: 20px; width: min(480px, 100%);
  max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg);
}
.form { padding: 16px 18px 20px; display: grid; gap: 13px; }
.form__intro { margin: 0; font-size: 13.5px; color: var(--ink-soft); font-weight: 700; }
.field { display: grid; gap: 5px; font-size: 12.5px; font-weight: 900; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; }
.field--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input, textarea.input {
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; font-size: 15px;
  font-weight: 600; color: var(--ink); outline: none; background: #fff;
  text-transform: none; letter-spacing: normal;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(243,111,19,.16); }
.input.is-error { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.12); }
textarea.input { resize: vertical; min-height: 72px; }
.error {
  margin: 0; color: #b91c1c; font-size: 12.5px; font-weight: 800;
  text-transform: none; letter-spacing: normal;
}
.radios { display: flex; gap: 10px; flex-wrap: wrap; }
.radio {
  display: flex; align-items: center; gap: 7px; border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 14px; cursor: pointer; font-weight: 800; font-size: 14px;
  color: var(--ink); text-transform: none; letter-spacing: normal;
}
.radio:hover { border-color: var(--brand); }
.hint { margin: 0; color: #b91c1c; font-size: 13px; font-weight: 800; }

/* ====================== CONTACTO ====================== */
.title { font-size: clamp(26px, 4vw, 34px); font-weight: 900; letter-spacing: -1px; margin: 24px 0 14px; color: var(--brand); }
.contact { display: grid; gap: 11px; padding-bottom: 40px; }
.contact__item {
  display: grid; gap: 3px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
a.contact__item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.contact__label { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .8px; color: var(--brand); }
.contact__label svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; }
.contact__sub { display: block; padding-left: 4px; }
.contact__value { font-weight: 700; }

/* ====================== PAGINACIÓN ====================== */
.pager {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px; padding: 34px 0 8px;
}
.pager__btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 12px; min-width: 44px; height: 44px; padding: 0 14px;
  font-weight: 800; font-size: 14px; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.pager__btn:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--brand); color: var(--brand); }
.pager__btn.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager__btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ====================== EXTRAS ====================== */
.empty { text-align: center; color: var(--ink-soft); padding: 40px 0; font-weight: 700; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 12px;
  font-weight: 800; font-size: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 120;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Botón flotante de WhatsApp (abajo a la izquierda) */
.wa-float {
  position: fixed; left: 18px; bottom: 18px; z-index: 110;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .45);
  animation: waPulse 2.4s ease-in-out infinite;
  transition: transform .22s ease, box-shadow .22s ease;
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 14px 34px rgba(37, 211, 102, .55); }
.wa-float svg { width: 30px; height: 30px; fill: currentColor; }
@keyframes waPulse {
  0%, 100% { box-shadow: 0 10px 26px rgba(37, 211, 102, .45), 0 0 0 0 rgba(37, 211, 102, .5); }
  70% { box-shadow: 0 10px 26px rgba(37, 211, 102, .45), 0 0 0 16px rgba(37, 211, 102, 0); }
}

.footer {
  border-top: 1px solid var(--line); background: #fff;
  padding: 28px 0 18px; color: var(--ink-soft); font-size: 13px; font-weight: 700;
}
.footer__inner {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px; text-align: left; padding-bottom: 18px;
}
.footer__col { display: grid; gap: 5px; align-content: start; }
.footer__title {
  font-size: 11px; font-weight: 900; text-transform: uppercase;
  letter-spacing: .9px; color: var(--brand); margin-bottom: 2px;
}
.footer__col a { color: var(--ink); font-weight: 800; }
.footer__col a:hover { color: var(--brand); }
.footer__copy { text-align: center; border-top: 1px solid var(--line); padding-top: 14px; font-size: 12px; }

/* ====================== RESPONSIVE ====================== */
/* Tablet: 3 tarjetas por fila */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .search { width: 210px; }
}

@media (max-width: 900px) {
  .search { width: 180px; }
  .detail { grid-template-columns: 1fr; gap: 18px; }
}

/* Celular: menú hamburguesa + 2 tarjetas por fila */
@media (max-width: 780px) {
  .topbar__row { grid-template-columns: auto 1fr auto; gap: 10px; height: 60px; }
  .burger { display: grid; }
  .topbar__row .search { display: none; }
  .search--mobile { display: flex; width: 100%; }

  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); padding: 10px 14px 14px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav__link { padding: 13px 14px; font-size: 16px; border-radius: 12px; text-align: left; }
  /* En celular el botón de login deja la barra superior y pasa al menú */
  #btnLogin { display: none; }
  .nav__link--login { display: flex; }

  .brand { justify-self: start; }
  .brand__tag { display: none; }
  .brand__name { font-size: 15px; }
  .topbar__actions { justify-self: end; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #seccionGeneral { margin-top: 60px; padding-top: 34px; }
  .section-head { margin-bottom: 24px; }
  .section-head__icon { width: 48px; height: 48px; border-radius: 15px; }
  .hero__inner { padding: 32px 0 30px; }
  .hero__logo { width: 74px; height: 74px; border-radius: 22px; }
  .hero__logo svg { width: 38px; height: 38px; }
  .wa-float { width: 52px; height: 52px; left: 14px; bottom: 14px; }
  .wa-float svg { width: 27px; height: 27px; }
  .field--2 { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card__body { padding: 10px; gap: 5px; }
  .card__name { font-size: 13.5px; min-height: 35px; }
  .card__price { font-size: 17px; }
  .card__code { font-size: 10.5px; padding: 2px 7px; }
}


/* ---------- Precio secundario (Bulto / Docena) ---------- */
.card__price-bulto { font-size: 18px; font-weight: 700; color: var(--ink-soft); margin: -4px 0 8px; line-height: 1.2; }
.card__price-bulto > span { font-size: 12px; display: block; }
.card__price-bulto small { display: block; font-size: 12px; margin-top: 3px; }
.card__iva { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); margin: -4px 0 8px; text-transform: uppercase; letter-spacing: .3px; }
.detail__price-bulto { font-size: clamp(27px, calc(5vw - 3px), 37px); font-weight: 800; color: var(--ink-soft); margin: 2px 0 6px; line-height: 1.15; }
.detail__price-bulto > span { display: block; font-size: 14px; }
.detail__price-bulto small { display: block; font-size: 14px; margin-top: 5px; }

/* ---------- Carrusel de imágenes del producto ---------- */
.gallery__main { position: relative; overflow: hidden; }
.carousel__track { display: flex; height: 100%; transition: transform .35s ease; touch-action: pan-y; }
.carousel__img { min-width: 100%; width: 100%; height: 100%; object-fit: cover; }
.carousel__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255,255,255,.92); color: var(--ink); font-size: 26px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.carousel__arrow:hover { background: #fff; border-color: var(--brand); color: var(--brand); }
.carousel__arrow--prev { left: 10px; }
.carousel__arrow--next { right: 10px; }
.carousel__dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; gap: 6px; justify-content: center; }
.carousel__dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.7); border: 1px solid rgba(0,0,0,.15); }
.carousel__dot.is-active { background: var(--brand); }
@media (max-width: 720px) { .carousel__arrow { display: none; } }

/* --- Detalle de cantidades en el carrito --- */
.line__calc { margin: 2px 0 6px; font-size: 12.5px; color: var(--ink-soft); }
.line__calc strong { color: var(--ink); }

/* ====================== LOGO DE MARCA (imagen) ====================== */
.brand__mark { background: transparent; box-shadow: none; overflow: hidden; border-radius: 50%; width: 40px; height: 40px; }
.brand__img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.hero__logo { background: transparent; box-shadow: var(--shadow-md); border-radius: 50%; overflow: hidden; padding: 0; }
.hero__img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ====================== AJUSTES MÓVILES ====================== */
/* El globito del carrito nunca debe verse cuando está oculto */
.cart-btn__badge[hidden] { display: none !important; }

@media (max-width: 780px) {
  .container { width: min(1240px, 100% - 20px); }
  .topbar__row { gap: 8px; }
  .brand__mark { width: 34px; height: 34px; }
  .brand__name { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand__text { min-width: 0; overflow: hidden; }
  .topbar__actions { gap: 6px; }
  .burger, .icon-action { width: 44px; height: 44px; }
  .toolbar { flex-wrap: wrap; gap: 10px; }
  .toolbar__title { flex: 1 1 100%; font-size: 18px; }
  .select { width: 100%; }
  .hero__logo { width: 88px; height: 88px; }
  .hero__chips { flex-wrap: wrap; justify-content: center; }

  /* Carrito y modal a pantalla completa, con scroll interno */
  .drawer { width: 100%; max-width: 100%; }
  .drawer__body { -webkit-overflow-scrolling: touch; }
  .drawer__foot { position: sticky; bottom: 0; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .drawer__foot .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .modal__card { width: 100%; max-width: 100%; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; }
  .line { grid-template-columns: 64px 1fr; gap: 10px; }
  .line__bottom { flex-wrap: wrap; gap: 8px; }
  .stepper button { min-width: 36px; min-height: 36px; }
  .btn { min-height: 44px; }
}

@media (max-width: 480px) {
  .brand__tag { display: none; }
  .hero__slogan { font-size: 14px; }
  .pager { flex-wrap: wrap; justify-content: center; gap: 6px; }
}

/* Nada debe provocar scroll horizontal */
html, body { max-width: 100%; overflow-x: hidden; }

/* El aviso flotante no debe tapar los botones del carrito en celular */
@media (max-width: 780px) {
  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 32px); text-align: center; }
}
.detail__bulto-nota { font-size: 13px; color: var(--ink-soft); margin: 0 0 8px; }

/* Selector de formato de venta dentro del carrito */
.input--mini {
  padding: 6px 8px;
  font-size: .85rem;
  width: auto;
  min-width: 118px;
  border-radius: 10px;
}

/* Botón flotante de WhatsApp (tienda pública) */
.fab {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 60;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
  transition: transform .18s ease;
}
.fab:hover { transform: scale(1.06); }
.fab { border: 0; cursor: pointer; }
.wa-menu { position: fixed; right: 18px; bottom: calc(82px + env(safe-area-inset-bottom)); z-index: 61; width: min(390px, calc(100% - 28px)); padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: var(--shadow-lg); }
.wa-menu header { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; margin-bottom: 8px; }
.wa-menu header div { display: grid; min-width: 0; }
.wa-menu header small, .wa-menu a small { color: var(--ink-soft); }
.wa-menu a { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 8px; border-top: 1px solid var(--line); }
.wa-menu a:hover { background: var(--brand-soft); }
.wa-menu a > span:nth-child(2) { display: grid; min-width: 0; }
.wa-menu__icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--wa); color: #fff; font-size: 11px; font-weight: 900; }
.photo-zoom { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 48px 70px; background: rgba(18,20,24,.92); }
.photo-zoom img { max-width: 100%; max-height: calc(100vh - 96px); object-fit: contain; }
.photo-zoom__close, .photo-zoom__arrow { position: absolute; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.14); }
.photo-zoom__close { top: 18px; right: 18px; width: 42px; height: 42px; border-radius: 50%; }
.photo-zoom__arrow { top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border-radius: 12px; font-size: 34px; }
.photo-zoom__arrow--prev { left: 14px; } .photo-zoom__arrow--next { right: 14px; }
.photo-zoom__count { position: absolute; bottom: 16px; color: #fff; font-weight: 800; }
.gallery__main { cursor: zoom-in; }
@media (max-width: 780px) {
  .fab { width: 50px; height: 50px; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .wa-menu { right: 14px; bottom: calc(134px + env(safe-area-inset-bottom)); }
  .category-trigger { width: 100%; max-width: none; }
  .photo-zoom { padding: 64px 12px; }
  .photo-zoom__arrow { width: 40px; height: 52px; }
}
@media (max-width: 400px) { .card__price-bulto { font-size: 14px; } }

/* ===== Variantes en la ficha del producto ===== */
.variantes { margin: 18px 0 4px; }
.variantes__title { font-size: 15px; font-weight: 900; text-transform: uppercase; letter-spacing: .6px; margin: 0 0 10px; }
.variantes__lista { display: flex; flex-wrap: wrap; gap: 10px; }
.variante { display: grid; gap: 6px; justify-items: center; width: 92px; padding: 8px; border-radius: 14px; border: 2px solid var(--linea, #e5e7eb); background: #fff; cursor: pointer; font: inherit; }
.variante img { width: 70px; height: 70px; object-fit: cover; border-radius: 10px; }
.variante span { font-size: 12px; font-weight: 700; text-align: center; line-height: 1.2; }
.variante.is-active { border-color: var(--brand-1, #f97316); }
.variante[disabled] { cursor: default; opacity: .75; }
