/* =========================================================
   PRONTO MAYORISTA — Tienda v2
   Misma paleta y sistema que la Landing v2
   ========================================================= */

:root {
  --red:        #e10600;
  --red-dark:   #b00500;
  --red-soft:   #fff1f0;
  --green:      #128a52;
  --green-soft: #e9f9f1;
  --orange:     #b96b00;
  --orange-soft:#fff4e5;
  --ink:        #0f0f10;
  --ink-2:      #1a1a1c;
  --gray-900:   #1a1a1c;
  --gray-800:   #2a2a2e;
  --gray-700:   #44444a;
  --gray-600:   #6b6b73;
  --gray-500:   #8a8a93;
  --gray-300:   #d8d8de;
  --gray-200:   #e9e9ee;
  --gray-100:   #f4f4f7;
  --gray-50:    #fafafb;
  --white:      #ffffff;

  --shadow-sm:  0 2px 8px rgba(15,15,16,.06);
  --shadow:     0 8px 28px rgba(15,15,16,.08);
  --shadow-lg:  0 24px 60px -12px rgba(225,6,0,.28);
  --shadow-xl:  0 40px 80px -20px rgba(15,15,16,.25);

  --radius-sm:  10px;
  --radius:     14px;
  --radius-lg:  20px;

  --font: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::selection { background: var(--red); color: var(--white); }

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100vw; }
body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--gray-50);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Sticky footer: si el contenido no llena la pantalla, el footer queda abajo */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
/* main crece para empujar el footer al fondo; el footer nunca se achica */
body > main { flex: 1 0 auto; }
body > .footer { flex-shrink: 0; }

/* Grid items deben poder achicarse — fix de scroll horizontal por nombres largos */
.product-card, .product-info, .product-name { min-width: 0; }
.product-name { overflow-wrap: anywhere; word-break: break-word; }

img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.15;
}

i[data-lucide] { width: 1.05em; height: 1.05em; stroke-width: 2; flex-shrink: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.hidden { display: none !important; }
.contador { color: var(--gray-600); font-size: .9rem; font-family: var(--mono); font-weight: 500; }

/* ========================================================= */
/* Eyebrow                                                    */
/* ========================================================= */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(225,6,0,.15);
}

/* ========================================================= */
/* Buttons                                                    */
/* ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .92rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s, color .18s, border-color .18s;
  white-space: nowrap;
  font-family: var(--font);
  line-height: 1.2;
}
.btn-lg { padding: .95rem 1.5rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }

.btn-primary { background: var(--red); color: var(--white); box-shadow: 0 8px 22px -6px rgba(225,6,0,.55); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(225,6,0,.65); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--gray-300); }
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--white); }

.btn-ghost-light { background: transparent; color: rgba(255,255,255,.92); border-color: rgba(255,255,255,.4); }
.btn-ghost-light:hover { background: rgba(255,255,255,.15); border-color: var(--white); color: var(--white); }

.btn-light { background: var(--white); color: var(--red); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(0,0,0,.25); }

.btn-success { background: var(--green); color: var(--white); }
.btn-success:hover { background: #0c6a3e; transform: translateY(-2px); }

.btn-danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: var(--white); }

/* ========================================================= */
/* Navbar                                                     */
/* ========================================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(225,6,0,.97);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem 1.5rem;
  gap: 1.2rem;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 52px; width: auto; }

.search-box {
  flex: 1;
  max-width: 520px;
  position: relative;
  display: flex;
  align-items: center;
}
.search-box i[data-lucide] {
  position: absolute;
  left: 1rem;
  width: 18px; height: 18px;
  color: var(--gray-500);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: .8rem 1rem .8rem 2.7rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: .95rem;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: box-shadow .15s, border-color .15s;
}
.search-box input:focus { box-shadow: 0 0 0 4px rgba(255,255,255,.35); }
.search-box input::placeholder { color: var(--gray-500); }

.navbar-right {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.user-menu { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.user-email {
  color: rgba(255,255,255,.85);
  font-size: .85rem;
  padding: 0 .3rem;
  font-weight: 500;
}
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-family: var(--mono);
}
.user-badge.pending { background: var(--orange-soft); color: var(--orange); }
.user-badge.ok      { background: var(--green-soft); color: var(--green); }
.user-badge.admin   { background: var(--ink); color: var(--white); }

/* Cart button: blanco con dot rojo */
.btn-cart {
  background: var(--white);
  color: var(--ink);
  padding: .65rem 1rem .65rem .95rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-family: var(--font);
  font-size: .92rem;
  transition: transform .18s, box-shadow .18s;
}
.btn-cart:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(0,0,0,.3); }
.btn-cart i { color: var(--red); width: 18px; height: 18px; }
.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: var(--white);
  border-radius: 999px;
  padding: 0 .5rem;
  height: 22px;
  min-width: 22px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: .78rem;
}

/* Botones en navbar mientras no-logueado */
.user-menu .btn-ghost-light { padding: .55rem .9rem; font-size: .85rem; }
.user-menu .btn-light { padding: .55rem .9rem; font-size: .85rem; }

/* ========================================================= */
/* Layout                                                     */
/* ========================================================= */
.main-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  width: 100%;            /* body es flex: sin esto, con la grilla vacía se encoge al contenido y se centra */
  gap: 2rem;
  padding-top: 2.2rem;
  padding-bottom: 4rem;
}

/* ========================================================= */
/* Sidebar                                                    */
/* ========================================================= */
.sidebar {
  position: sticky;
  top: 88px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.sidebar-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
}
.sidebar-section h3 {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray-500);
  font-weight: 700;
  margin-bottom: .8rem;
  font-family: var(--mono);
}
.cat-list { display: flex; flex-direction: column; gap: .2rem; }
.cat-list li {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem .8rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: .92rem;
  color: var(--gray-800);
  transition: background .15s, color .15s;
}
.cat-list li i {
  width: 18px; height: 18px;
  color: var(--gray-500);
  transition: color .15s;
}
.cat-list li:hover { background: var(--gray-100); color: var(--ink); }
.cat-list li:hover i { color: var(--red); }
.cat-list li.active {
  background: var(--ink);
  color: var(--white);
}
.cat-list li.active i { color: var(--white); }
.cat-list li.cat-item .cat-caret {
  margin-left: auto;
  width: 15px; height: 15px;
  opacity: .55;
  transition: transform .15s;
}
.cat-list li.cat-item.active .cat-caret { transform: rotate(-180deg); opacity: .9; }

/* Subcategorías: indentadas bajo la categoría activa (árbol) */
.cat-list li.subcat-item {
  padding: .42rem .8rem .42rem 2.3rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--gray-600);
  gap: .5rem;
}
.cat-list li.subcat-item i { width: 15px; height: 15px; color: var(--gray-500); }
.cat-list li.subcat-item .subcat-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gray-500);
  flex-shrink: 0;
}
.cat-list li.subcat-item:hover { background: var(--gray-100); color: var(--ink); }
.cat-list li.subcat-item:hover i,
.cat-list li.subcat-item:hover .subcat-dot { color: var(--red); background: var(--red); }
.cat-list li.subcat-item:hover i { background: none; }
.cat-list li.subcat-item.active {
  background: var(--red-soft);
  color: var(--red);
  font-weight: 700;
}
.cat-list li.subcat-item.active i { color: var(--red); }
.cat-list li.subcat-item.active .subcat-dot { background: var(--red); }

/* Desktop: las subcats van indentadas dentro del árbol (#categorias); el contenedor
   aparte #subcategorias es solo para la fila debajo en mobile, así que acá se oculta. */
#subcategorias { display: none; }

.sidebar-cta:empty { display: none; }
.cta-box {
  background: var(--ink);
  color: var(--white);
  padding: 1.4rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(225,6,0,.4), transparent 60%);
  pointer-events: none;
}
.cta-box > * { position: relative; }
.cta-box h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: .4rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.cta-box h4 i { color: var(--red); width: 18px; height: 18px; }
.cta-box p {
  font-size: .85rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 1rem;
  line-height: 1.4;
}
.cta-box .btn { width: 100%; justify-content: center; }
.cta-box.pending { background: var(--orange-soft); color: var(--gray-800); }
.cta-box.pending::before { background: none; }
.cta-box.pending h4 { color: var(--orange); }
.cta-box.pending h4 i { color: var(--orange); }
.cta-box.pending p { color: var(--gray-700); }
.cta-box.ok { background: var(--green-soft); color: var(--gray-800); }
.cta-box.ok::before { background: none; }
.cta-box.ok h4 { color: var(--green); }
.cta-box.ok h4 i { color: var(--green); }
.cta-box.ok p { color: var(--gray-700); }

/* ========================================================= */
/* Products header                                            */
/* ========================================================= */
.products-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.8rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--gray-200);
}
.products-header h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: .25rem;
}

/* ========================================================= */
/* Hero carrusel (inicio)                                     */
/* ========================================================= */
.hero-carrusel { position: relative; margin-bottom: 1.8rem; }
.hero-carrusel[hidden] { display: none; }
.hero-viewport { overflow: hidden; border-radius: var(--radius-lg); }
.hero-track { display: flex; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.hero-slide {
  position: relative; flex: 0 0 100%; height: 260px;
  border: 0; padding: 0; margin: 0; cursor: pointer; display: block;
  text-align: left; overflow: hidden; background: var(--gray-100); font-family: inherit;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hero-slide:hover .hero-media img { transform: scale(1.05); }
.hero-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--red), #9c0500); }
.hero-ph i { width: 88px; height: 88px; color: rgba(255,255,255,.85); }
.hero-info {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  gap: .55rem; padding: 1.5rem 1.7rem; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.35) 45%, transparent 78%);
}
.hero-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: .35rem;
  font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  background: rgba(255,255,255,.22); backdrop-filter: blur(4px); padding: .3rem .65rem; border-radius: 999px; }
.hero-badge i { width: 13px; height: 13px; }
.hero-name { font-size: clamp(1.25rem, 2.6vw, 1.8rem); font-weight: 800; line-height: 1.1; max-width: 72%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-bottom { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hero-price { font-size: 1.45rem; font-weight: 800; }
.hero-cta { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .9rem;
  background: var(--white); color: var(--red); padding: .5rem .95rem; border-radius: 999px; }
.hero-cta i { width: 16px; height: 16px; }
/* Banner del hero: texto a la izquierda, gradiente lateral para legibilidad */
.hero-info--banner {
  justify-content: center;
  align-items: flex-start;
  max-width: 62%;
  gap: .7rem;
  color: #fff;
  background: linear-gradient(to right, rgba(12,12,14,.82) 0%, rgba(12,12,14,.48) 46%, rgba(12,12,14,0) 78%);
  text-shadow: 0 2px 14px rgba(0,0,0,.55);
}
.hero-info--banner .hero-name { color: #fff; }
.hero-info--banner .hero-sub { color: rgba(255,255,255,.92); }

/* Header por categoría (banner + título + descripción) */
.cat-header { position: relative; height: 200px; margin-bottom: 1.6rem; border-radius: var(--radius-lg); overflow: hidden; }
.cat-header[hidden] { display: none; }
.cat-header-media { position: absolute; inset: 0; }
.cat-header-media img { width: 100%; height: 100%; object-fit: cover; }
.cat-header-info {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: .6rem;
  padding: 1.6rem 1.9rem; max-width: 64%; color: var(--ink); text-shadow: 0 1px 2px rgba(255,255,255,.55);
  background: linear-gradient(to right, rgba(255,255,255,.94) 0%, rgba(255,255,255,.6) 46%, rgba(255,255,255,0) 76%);
}
.cat-header-title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.cat-header-desc { font-size: 1rem; color: var(--gray-700); max-width: 44ch; line-height: 1.4; }
@media (max-width: 700px) {
  .cat-header { height: 150px; }
  .cat-header-info { max-width: 90%; padding: 1rem 1.1rem; gap: .4rem; background: linear-gradient(to right, rgba(255,255,255,.95) 0%, rgba(255,255,255,.72) 62%, rgba(255,255,255,.15) 96%); }
  .cat-header-desc { font-size: .85rem; }
}
.hero-sub { font-size: 1rem; color: rgba(255,255,255,.92); max-width: 30ch; line-height: 1.35; }
@media (max-width: 700px) {
  .hero-info--banner { max-width: 80%; background: linear-gradient(to right, rgba(12,12,14,.85) 0%, rgba(12,12,14,.55) 58%, rgba(12,12,14,.05) 92%); }
  .hero-sub { font-size: .85rem; }
}
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); color: var(--ink); cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .2s, background .15s; }
.hero-carrusel:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: #fff; }
.hero-arrow i { width: 20px; height: 20px; }
.hero-prev { left: .8rem; }
.hero-next { right: .8rem; }
.hero-dots { position: absolute; bottom: .8rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: .4rem; z-index: 2; }
.hero-dot { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.55); transition: width .25s, background .25s; }
.hero-dot.active { width: 24px; background: #fff; }
@media (max-width: 700px) {
  .hero-slide { height: 190px; }
  .hero-info { padding: 1rem 1.1rem; gap: .45rem; }
  .hero-name { max-width: 100%; }
  .hero-price { font-size: 1.2rem; }
  .hero-arrow { display: none; }   /* mobile: swipe */
}

/* ========================================================= */
/* Product cards                                              */
/* ========================================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--gray-300);
  box-shadow: var(--shadow);
}

/* Skeleton de carga: se muestra mientras carga el JS/datos, así la grilla nunca
   queda en blanco. Lo reemplaza renderProductos cuando llegan los productos. */
.prod-skel {
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  background: var(--white);
}
.prod-skel::before { content: ""; display: block; aspect-ratio: 1 / 1; }
.prod-skel::after  { content: ""; display: block; height: 16px; margin: 14px 14px 18px; border-radius: 6px; }
.prod-skel::before, .prod-skel::after {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 37%, var(--gray-100) 63%);
  background-size: 400% 100%;
  animation: skelShimmer 1.25s ease infinite;
}
@keyframes skelShimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .prod-skel::before, .prod-skel::after { animation: none; } }

.product-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-img .placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.6), transparent 60%),
    linear-gradient(135deg, var(--gray-100), var(--gray-200));
  color: var(--gray-500);
}
.product-img .placeholder i {
  width: 48px;
  height: 48px;
  stroke-width: 1.5;
}

/* Colores por categoría para los placeholders (sin foto real) */
.product-img .placeholder[data-cat="almacen"]   { background: linear-gradient(135deg, #fff4e1, #ffd9a5); }
.product-img .placeholder[data-cat="almacen"] i { color: #b96b00; }
.product-img .placeholder[data-cat="bebidas"]   { background: linear-gradient(135deg, #e0f0ff, #a5cdff); }
.product-img .placeholder[data-cat="bebidas"] i { color: #1565c0; }
.product-img .placeholder[data-cat="golosinas"] { background: linear-gradient(135deg, #ffe1ec, #ffb3cc); }
.product-img .placeholder[data-cat="golosinas"] i { color: #c2185b; }
.product-img .placeholder[data-cat="limpieza"]  { background: linear-gradient(135deg, #e1faec, #a8e9c4); }
.product-img .placeholder[data-cat="limpieza"] i { color: #128a52; }
.product-img .placeholder[data-cat="lacteos"]    { background: linear-gradient(135deg, #eef4ff, #cfe0ff); }
.product-img .placeholder[data-cat="lacteos"] i  { color: #2b6cb0; }
.product-img .placeholder[data-cat="vinos"]      { background: linear-gradient(135deg, #f4e1ee, #d6a3c4); }
.product-img .placeholder[data-cat="vinos"] i    { color: #7b1f4b; }
.product-img .placeholder[data-cat="congelados"] { background: linear-gradient(135deg, #e4f6fb, #bfe6f2); }
.product-img .placeholder[data-cat="congelados"] i { color: #0e7490; }
.product-img .placeholder[data-cat="perfumeria"] { background: linear-gradient(135deg, #f1e8ff, #d9c2ff); }
.product-img .placeholder[data-cat="perfumeria"] i { color: #6d28d9; }
.product-img .placeholder[data-cat="fiambres"]   { background: linear-gradient(135deg, #ffe6e0, #ffc0b3); }
.product-img .placeholder[data-cat="fiambres"] i { color: #b23b2e; }
.product-img .placeholder[data-cat="promos"]     { background: linear-gradient(135deg, #ffe1e1, #ffb0b0); }
.product-img .placeholder[data-cat="promos"] i   { color: #c01818; }
.product-img .product-cat-badge {
  position: absolute;
  top: .7rem;
  left: .7rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(255,255,255,.92);
  color: var(--gray-700);
  padding: .25rem .55rem;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}
.product-img .product-cat-badge i { width: 12px; height: 12px; color: var(--red); }

.product-info {
  padding: 1rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .4rem;
}
.price-tag {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 700;
  padding: .22rem .55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.price-tag.minorista { background: var(--gray-100); color: var(--gray-700); }
.price-tag.mayorista { background: var(--green-soft); color: var(--green); }
.price-tag i { width: 11px; height: 11px; }

.product-name {
  font-weight: 700;
  font-size: .96rem;
  color: var(--ink);
  line-height: 1.3;
  margin-top: .15rem;
}
.product-unit {
  font-size: .78rem;
  color: var(--gray-600);
  font-family: var(--mono);
  font-weight: 500;
}
/* Pack cerrado (mayorista): mínimo de compra por bulto */
.product-pack {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .4rem;
  padding: .22rem .5rem;
  background: var(--red-soft);
  color: var(--red);
  border-radius: 7px;
  font-size: .74rem;
  font-weight: 700;
  font-family: var(--mono);
  width: fit-content;
}
.product-pack i { width: 13px; height: 13px; }
.product-pack.vol { background: #e9f9f1; color: #0b8a4d; }
.product-pack.vol b { font-weight: 800; }
.tier-may { background: #0b8a4d; color: #fff; padding: .05rem .42rem; border-radius: 6px; font-size: .66rem; font-weight: 800; font-family: var(--mono); margin-left: .3rem; vertical-align: middle; }
.tier-hint { color: #0b8a4d; font-weight: 700; }
.product-price-wrap {
  margin-top: auto;
  padding-top: .6rem;
  display: flex;
  align-items: baseline;
  gap: .5rem;
  flex-wrap: wrap;
}
.precio-tachado {
  text-decoration: line-through;
  text-decoration-color: var(--gray-500);
  color: var(--gray-500);
  font-size: .85rem;
  font-family: var(--mono);
}
.product-price {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
}
.add-btn {
  margin-top: .8rem;
  background: var(--ink);
  color: var(--white);
  border: 0;
  border-radius: 999px;
  padding: .65rem 1rem;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  transition: background .18s, transform .18s;
}
.add-btn .add-btn-plus {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1;
}
.add-btn:hover { background: var(--red); transform: translateY(-1px); }

/* Empty state */
.products-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--white);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  color: var(--gray-600);
}
.products-empty i {
  width: 40px; height: 40px;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

/* ========================================================= */
/* Cart drawer                                                */
/* ========================================================= */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,15,16,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  z-index: 200;
  backdrop-filter: blur(4px);
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 440px;
  max-width: 100vw;
  height: 100vh;
  background: var(--white);
  box-shadow: -12px 0 40px rgba(0,0,0,.15);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.16,1,.3,1);
  display: flex;
  flex-direction: column;
  z-index: 201;
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 1.5rem;
  background: var(--ink);
  color: var(--white);
}
.cart-header small {
  display: block;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: .2rem;
}
.cart-header h3 { color: var(--white); font-size: 1.4rem; font-weight: 800; }
.cart-close {
  background: rgba(255,255,255,.1);
  border: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--white);
  transition: background .15s;
}
.cart-close:hover { background: var(--red); }
.cart-close i { width: 18px; height: 18px; }

.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.cart-empty {
  text-align: center;
  color: var(--gray-600);
  padding: 4rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
}
.cart-empty i { width: 40px; height: 40px; color: var(--gray-300); }
.cart-empty span { font-size: .95rem; }

.cart-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: .9rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-200);
  align-items: center;
}
.cart-item:last-child { border-bottom: 0; }
.cart-item-img {
  background: var(--gray-100);
  border-radius: 10px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-img i { width: 22px; height: 22px; color: var(--gray-500); }
.cart-item-info { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.cart-item-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-item-var { font-size: .74rem; color: var(--red); font-weight: 600; margin: .1rem 0; }
/* Selector de variante de combo */
.modal-variante { width: min(440px, 94vw); }
.var-grupo { margin: .7rem 0; }
.var-grupo-lbl { font-weight: 700; font-size: .92rem; margin-bottom: .45rem; color: var(--ink); }
.var-opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.var-opt { padding: .6rem .95rem; border: 1.5px solid var(--gray-200); border-radius: 12px; background: var(--white); cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink); transition: border-color .12s, background .12s; }
.var-opt:hover { border-color: var(--gray-300); }
.var-opt.sel { border-color: var(--red); background: var(--red); color: var(--white); }
.cart-item-price {
  font-size: .88rem;
  color: var(--red);
  font-weight: 700;
  font-family: var(--mono);
}
.cart-item-unit {
  font-size: .72rem;
  color: var(--gray-500);
  font-family: var(--mono);
  margin-top: .1rem;
}
.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 2px;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  font-size: 1rem;
  transition: background .15s, color .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: var(--red); color: var(--white); }
.qty-value {
  min-width: 26px;
  text-align: center;
  font-weight: 700;
  font-size: .88rem;
  font-family: var(--mono);
}

.cart-footer {
  padding: 1.4rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  gap: .7rem;
  background: var(--gray-50);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .4rem;
}
.cart-total span {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  color: var(--gray-600);
  font-family: var(--mono);
}
.cart-total strong {
  font-family: var(--mono);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* ========================================================= */
/* Modals                                                     */
/* ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,15,16,.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  z-index: 300;
  backdrop-filter: blur(6px);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -44%);
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.4rem;
  width: min(460px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  z-index: 301;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s cubic-bezier(.16,1,.3,1);
  box-shadow: var(--shadow-xl);
}
.modal.open {
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: auto;
}
.modal-wide { width: min(640px, 94vw); }
.modal h2 { font-size: 1.75rem; margin-bottom: .35rem; font-weight: 800; }
.modal-sub { color: var(--gray-600); margin-bottom: 1.6rem; }
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gray-100);
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-700);
  transition: background .15s, color .15s;
}
.modal-close i { width: 16px; height: 16px; }
.modal-close:hover { background: var(--red); color: var(--white); }

.tabs {
  display: flex;
  gap: .3rem;
  margin-bottom: 1.2rem;
  background: var(--gray-100);
  border-radius: 999px;
  padding: 4px;
}
.tab-registro {
  flex: 1;
  padding: .65rem .9rem;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font);
  font-size: .9rem;
  color: var(--gray-600);
  transition: background .15s, color .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}
.tab-registro i { width: 16px; height: 16px; }
.tab-registro:hover { color: var(--ink); }
.tab-registro.active {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(15,15,16,.25);
}
.tab-info {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  padding: .8rem 1rem;
  border-radius: 10px;
  font-size: .88rem;
  color: var(--gray-700);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.tab-info i { color: var(--red); width: 16px; height: 16px; }
.aviso-mayorista {
  background: var(--orange-soft);
  border-left: 3px solid var(--orange);
  padding: .9rem 1rem;
  border-radius: 10px;
  font-size: .88rem;
  color: var(--gray-800);
  margin-bottom: 1.2rem;
  line-height: 1.45;
  display: flex;
  gap: .7rem;
  align-items: flex-start;
}
.aviso-mayorista i { color: var(--orange); width: 18px; height: 18px; margin-top: 1px; }

.auth-form { display: flex; flex-direction: column; gap: .9rem; }
.auth-form label {
  display: block;
  font-weight: 600;
  font-size: .82rem;
  color: var(--ink);
}
.auth-form input,
.auth-form select {
  width: 100%;
  padding: .8rem .95rem;
  margin-top: .35rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-family: var(--font);
  font-size: .95rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: var(--white);
  font-weight: 500;
  color: var(--ink);
}
.auth-form input:focus, .auth-form select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(225,6,0,.12);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.form-error {
  color: var(--red);
  font-size: .85rem;
  min-height: 1.2em;
  font-weight: 600;
}
.form-switch {
  text-align: center;
  font-size: .9rem;
  color: var(--gray-600);
  margin-top: .4rem;
}
.form-switch a { font-weight: 700; }

/* ========================================================= */
/* Admin                                                      */
/* ========================================================= */
.admin-main { padding: 3rem 1.5rem 5rem; }
.admin-guard {
  text-align: center;
  padding: 5rem 2rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  max-width: 540px;
  margin: 3rem auto;
  box-shadow: var(--shadow-sm);
}
.admin-guard i {
  width: 48px; height: 48px;
  color: var(--red);
  margin-bottom: 1rem;
}
.admin-guard h2 { color: var(--ink); margin-bottom: .5rem; font-size: 1.6rem; }
.admin-guard p { color: var(--gray-600); margin-bottom: 1.5rem; }

.admin-page-head {
  margin-bottom: 3rem;
}
.admin-page-head h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: .5rem;
}
.lead-admin {
  color: var(--gray-600);
  font-size: 1.05rem;
  max-width: 600px;
}

.admin-section { margin-bottom: 3rem; }
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.2rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--gray-200);
}
.admin-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .2rem;
}
.admin-header h2 i { color: var(--red); width: 22px; height: 22px; }

.admin-list { display: flex; flex-direction: column; gap: 1rem; }
.admin-list:empty::after {
  content: "No hay registros.";
  display: block;
  color: var(--gray-500);
  text-align: center;
  padding: 2rem;
  background: var(--white);
  border: 1px dashed var(--gray-200);
  border-radius: var(--radius);
  font-style: italic;
}
.admin-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.admin-card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.admin-card h3 { font-size: 1.1rem; margin-bottom: .9rem; font-weight: 800; }
.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .8rem 1.5rem;
  font-size: .9rem;
  color: var(--ink);
}
.admin-card-grid > div { display: flex; flex-direction: column; gap: .1rem; }
.admin-card-grid strong {
  font-size: .68rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  font-family: var(--mono);
}
.admin-card-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-width: 160px;
}
.admin-card-actions .btn { justify-content: center; }

/* ========================================================= */
/* Footer                                                     */
/* ========================================================= */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,.65);
  padding: 1.5rem 0;
  text-align: center;
  font-size: .88rem;
}
.footer a { color: var(--white); font-weight: 600; }
.footer a:hover { color: var(--red); }

/* ========================================================= */
/* Toast                                                      */
/* ========================================================= */
.toast {
  position: fixed;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: var(--white);
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  z-index: 400;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

/* ========================================================= */
/* Sticky mobile cart bar                                     */
/* ========================================================= */
.mobile-cart-bar {
  display: none;
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  background: var(--red);
  color: var(--white);
  padding: .85rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  box-shadow: 0 18px 40px -8px rgba(225,6,0,.55);
  border: 0;
  font-family: var(--font);
  font-size: .95rem;
  cursor: pointer;
  transform: translateY(140%);
  transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.mobile-cart-bar.show { transform: translateY(0); }
.mobile-cart-bar .mcb-left {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.mobile-cart-bar .mcb-left i { width: 18px; height: 18px; }
.mobile-cart-bar .mcb-count {
  background: rgba(0,0,0,.25);
  padding: .1rem .55rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .78rem;
}
.mobile-cart-bar .mcb-total {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
}

/* ========================================================= */
/* Responsive                                                 */
/* ========================================================= */
@media (max-width: 900px) {
  .nav-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "logo right"
      "search search";
    padding: .6rem 1rem .7rem;
    gap: .7rem .8rem;
    align-items: center;
  }
  .logo { grid-area: logo; }
  .logo img { height: 46px; }
  .navbar-right { grid-area: right; justify-self: end; flex-wrap: nowrap; gap: .35rem; }
  .search-box { grid-area: search; max-width: none; }
  .search-box input {
    padding: .75rem 1rem .75rem 2.6rem;
    font-size: .92rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
  }
  .search-box i[data-lucide] { left: .9rem; width: 16px; height: 16px; }

  /* User menu compacto: badges chicas + botones icon-only circulares */
  .user-menu { flex-wrap: nowrap; gap: .3rem; align-items: center; }
  .user-email { display: none; }
  .user-badge {
    font-size: .55rem;
    padding: .25rem .45rem;
    letter-spacing: .04em;
  }
  .user-badge i { width: 11px; height: 11px; }

  /* Botones icon-only (Panel, Salir cuando hay sesión): círculo */
  .user-menu .btn-ghost-light,
  .user-menu .btn-light {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    flex-shrink: 0;
  }
  .user-menu .btn-ghost-light span:not(.cart-count),
  .user-menu .btn-light span:not(.cart-count) { display: none; }
  /* Auth (sin sesión): pills de texto legibles, NO círculos */
  #btnAbrirLogin,
  #btnAbrirRegistro {
    width: auto;
    height: 38px;
    padding: 0 .95rem;
    border-radius: 999px;
    justify-content: center;
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
  }
  /* Cart pill: icono + número, sin "Carrito" texto */
  .btn-cart {
    padding: 0 .8rem 0 .55rem;
    gap: .4rem;
    height: 38px;
    border-radius: 999px;
  }
  .btn-cart span:not(.cart-count) { display: none; }
  .btn-cart i { width: 18px; height: 18px; }

  /* Main grid: integramos categorías directo al contenido */
  .main-grid {
    grid-template-columns: minmax(0, 1fr); /* minmax(0,..) evita el grid-blowout que infla la columna al ancho del scroller de categorías */
    /* min-content evita que la fila del sidebar (pills) se infle a ~220px por el
       cálculo de max-content del scroller horizontal; los productos arrancan pegados a las pills */
    grid-template-rows: min-content 1fr;
    padding-top: 0;
    gap: 0;
  }
  .sidebar {
    position: sticky;
    top: 105px;
    z-index: 50;
    min-width: 0; /* permite que el cat-list scrollee en vez de ensanchar la columna */
    background: var(--gray-50);
    padding: .8rem 0 .6rem;
    margin: 0 -1.5rem;
    border-bottom: 1px solid var(--gray-200);
  }
  .products { min-width: 0; }
  /* Sin card "CATEGORIAS" — pills directas */
  .sidebar-section {
    background: transparent;
    border: 0;
    padding: 0 1.5rem;
    box-shadow: none;
  }
  .sidebar-section h3 { display: none; }
  .cat-list {
    flex-direction: row;
    gap: .4rem;
    overflow-x: auto;
    min-width: 0;
    max-width: 100%;
    padding: .1rem 0 .3rem;
    margin: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cat-list::-webkit-scrollbar { display: none; }
  .cat-list li {
    white-space: nowrap;
    flex-shrink: 0;
    padding: .55rem .95rem;
    font-size: .85rem;
    border: 1px solid var(--gray-200);
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
  }
  .cat-list li.active {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--white);
  }
  .cat-list li.active i { color: var(--white); }
  /* En mobile el sidebar es horizontal: las subcategorías de la categoría activa
     se muestran como pills más chicas, en línea después de su categoría. */
  .cat-list li.subcat-item {
    padding: .45rem .8rem;
    border-style: dashed;
    border-color: var(--gray-300);
    background: var(--white);
    color: var(--gray-700);
  }
  .cat-list li.cat-item .cat-caret { display: none; }
  .cat-list li.subcat-item.active {
    border-style: solid;
    border-color: var(--red);
    background: var(--red-soft);
    color: var(--red);
  }
  .cat-list li.subcat-item.active i,
  .cat-list li.subcat-item.active .subcat-dot { color: var(--red); background: var(--red); }
  .cat-list li.subcat-item.active i { background: none; }

  /* En mobile, las subcategorías NO van en la misma fila que las categorías:
     se ocultan las inline y se muestra el contenedor aparte como fila debajo. */
  #categorias .subcat-item { display: none; }
  #subcategorias { display: flex; margin-top: .4rem; }
  #subcategorias:empty { display: none; }

  /* CTA box mayorista: pasa a flotante en otro lugar, no pisando el grid */
  .sidebar-cta { display: none; }

  /* Products section */
  .products { padding-top: 1.4rem; }
  .products-header { margin-bottom: 1rem; padding-bottom: .8rem; }

  .cart-drawer { width: 100vw; }
  .cart-header { padding: 1.1rem 1.2rem; }
  .form-row { grid-template-columns: 1fr; }
  .admin-card { grid-template-columns: 1fr; padding: 1.2rem; }
  .admin-card-actions { flex-direction: row; min-width: 0; }
  .admin-card-actions .btn { flex: 1; }
  .admin-main { padding: 1.5rem 1rem 5rem; }
  .admin-page-head { margin-bottom: 2rem; }
}

/* Sticky cart bar a partir de 600px y abajo.
   Nota: la barra se ancla sobre el footer vía JS (reposicionar), por eso ya
   NO reservamos padding-bottom — eso reintroducía un hueco debajo del footer. */
@media (max-width: 600px) {
  .mobile-cart-bar { display: flex; }
}

@media (max-width: 700px) {
  /* ===== ESTILO PEDIDOS YA: cards horizontales una por fila ===== */
  .nav-inner { padding: .5rem .8rem; gap: .5rem; }
  .logo img { height: 36px; }

  /* Search box sticky justo bajo navbar */
  .navbar { box-shadow: 0 4px 12px -4px rgba(0,0,0,.08); }
  .search-box { background: var(--red); padding: 0; }

  /* Products header compacto */
  .products-header { margin-bottom: 1rem; padding-bottom: .8rem; }
  .products-header h2 { font-size: 1.3rem; }

  /* GRID → LISTA VERTICAL */
  .product-grid {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    min-width: 0;
    width: 100%;
  }
  .product-card {
    flex-direction: row;
    align-items: stretch;
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    min-width: 0;       /* el contenido largo no ensancha la card */
    max-width: 100%;    /* nunca más ancha que el contenedor */
    box-sizing: border-box;
  }
  .product-card:hover { transform: none; }
  /* Imagen a la izquierda, cuadrada */
  .product-img {
    flex-shrink: 0;
    width: 108px;
    aspect-ratio: 1 / 1;
    border-radius: 0;
  }
  .product-img img { width: 100%; height: 100%; }
  .product-img .placeholder i { width: 36px; height: 36px; }
  .product-img .product-cat-badge { display: none; } /* No hace falta en este layout */

  /* Info derecha con padding cómodo */
  .product-info {
    flex: 1;
    min-width: 0;       /* permite que el texto se trunque/ajuste en vez de ensanchar */
    padding: .7rem .8rem .7rem 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "tag tag"
      "name name"
      "unit unit"
      "price button";
    gap: .15rem .6rem;
    align-items: end;
  }
  .price-tag {
    grid-area: tag;
    align-self: start;
    font-size: .58rem;
    padding: .15rem .4rem;
    margin-bottom: .15rem;
  }
  .product-name {
    grid-area: name;
    font-size: .95rem;
    line-height: 1.3;
    margin-top: 0;
    color: var(--ink);
    font-weight: 700;
  }
  .product-unit {
    grid-area: unit;
    font-size: .75rem;
    color: var(--gray-600);
    margin-bottom: .3rem;
  }
  .product-price-wrap {
    grid-area: price;
    margin-top: 0;
    padding-top: 0;
    align-items: baseline;
    flex-wrap: nowrap;
  }
  .product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--red);
  }
  .precio-tachado { font-size: .78rem; }

  /* Botón "+" estilo app: position absolute, siempre visible, touch-friendly */
  .product-card { position: relative; cursor: pointer; }
  .add-btn {
    position: absolute;
    bottom: .65rem;
    right: .65rem;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    border: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px -4px rgba(225,6,0,.55);
    z-index: 2;
    cursor: pointer;
    margin: 0;
    grid-area: unset;
  }
  .add-btn .add-btn-text { display: none; }
  .add-btn .add-btn-plus {
    font-size: 1.7rem;
    font-weight: 400;
    line-height: 1;
    color: var(--white);
    font-family: var(--font);
  }
  .add-btn i, .add-btn svg { display: none; }
  .add-btn:hover { background: var(--red-dark); transform: none; }
  .add-btn:active { transform: scale(.92); box-shadow: 0 4px 10px -2px rgba(225,6,0,.5); }

  /* Espacio reservado en la card para que el botón no tape el precio */
  .product-info { padding-right: 4rem; padding-bottom: 1rem; }

  /* Modales más cómodos en mobile */
  .modal { padding: 1.4rem 1.1rem; border-radius: 18px 18px 0 0; }
  .modal h2 { font-size: 1.35rem; }
  .modal-sub { font-size: .9rem; margin-bottom: 1.2rem; }
  .tabs { padding: 3px; }
  .tab-registro { padding: .55rem .7rem; font-size: .82rem; }
  .auth-form input, .auth-form select { padding: .8rem .9rem; font-size: 1rem; }
  .cart-header h3 { font-size: 1.2rem; }
  .cart-footer { padding: 1.1rem 1.2rem; }
  .cart-total strong { font-size: 1.4rem; }

  /* Cart drawer slides up desde abajo en mobile (estilo app) */
  .cart-drawer {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: 90vh;
    border-radius: 22px 22px 0 0;
    transform: translateY(100%);
  }
  .cart-drawer.open { transform: translateY(0); }
  .cart-header { border-radius: 22px 22px 0 0; }
}

@media (max-width: 380px) {
  .product-img { width: 96px; }
  .product-name { font-size: .9rem; }
  .product-price { font-size: 1.15rem; }
}

/* ========================================================= */
/* ADMIN · Tabs                                               */
/* ========================================================= */
.admin-tabs {
  display: flex;
  gap: .3rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: .3rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .75rem 1.2rem;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 700;
  font-size: .92rem;
  color: var(--gray-600);
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  margin-bottom: -1px;
}
.admin-tab i { width: 16px; height: 16px; }
.admin-tab:hover { color: var(--ink); }
.admin-tab.active { color: var(--red); border-bottom-color: var(--red); }
.admin-panel { animation: adminFadeIn .25s ease-out; }
@keyframes adminFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ========================================================= */
/* ADMIN · Acciones y filtros                                 */
/* ========================================================= */
.admin-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}
.admin-search, .admin-input, .admin-select {
  padding: .55rem .85rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-family: var(--font);
  font-size: .9rem;
  background: var(--white);
  color: var(--ink);
  outline: none;
  min-width: 180px;
}
.admin-input { min-width: 140px; }
.admin-search:focus, .admin-input:focus, .admin-select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(225,6,0,.1);
}
.admin-check {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .88rem;
  color: var(--gray-700);
  font-weight: 600;
  cursor: pointer;
}

/* ========================================================= */
/* ADMIN · Tablas                                             */
/* ========================================================= */
.admin-table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.admin-table th, .admin-table td {
  padding: .85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}
.admin-table th {
  background: var(--gray-50);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gray-600);
  font-weight: 700;
  white-space: nowrap;
}
.admin-table tbody tr { transition: background .12s; }
.admin-table tbody tr:hover { background: var(--gray-50); }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table td.mono { font-family: var(--mono); font-weight: 600; }
.admin-table td.mono.neg { color: var(--red); }
.admin-table td.mono.pos { color: var(--green); }
.admin-table td.total-cell { text-align: right; }
.admin-table td.stock-bajo { color: var(--orange); font-weight: 700; }
.admin-table.compact th, .admin-table.compact td { padding: .55rem .8rem; font-size: .85rem; }
.cell-name strong { display: block; color: var(--ink); }
.cell-name small { display: block; color: var(--gray-600); font-size: .78rem; font-family: var(--mono); }
.btn.btn-sm { padding: .4rem .8rem; font-size: .82rem; }
.badge-active, .badge-inactive, .badge-ok, .badge-warn {
  display: inline-block;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .25rem .55rem;
  border-radius: 999px;
}
.badge-active, .badge-ok { background: var(--green-soft); color: var(--green); }
.badge-inactive { background: var(--gray-200); color: var(--gray-700); }
.badge-warn { background: var(--orange-soft); color: var(--orange); }
.origen-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 5px;
}
.origen-chip.origen-pos { background: var(--ink); color: var(--white); }
.origen-chip.origen-web { background: #e8edff; color: #1d4cd6; }
.pagos-row { display: flex; gap: .25rem; }
.pago-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--gray-100);
  border-radius: 6px;
  color: var(--gray-700);
}
.pago-chip i { width: 12px; height: 12px; }
.mov-tipo { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; }
.mov-tipo i { width: 14px; height: 14px; }

/* ========================================================= */
/* ADMIN · Resumen ventas                                     */
/* ========================================================= */
.admin-resumen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.aresumen {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.aresumen span {
  display: block;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: .3rem;
}
.aresumen strong {
  display: block;
  font-family: var(--mono);
  font-size: 1.6rem;
  color: var(--ink);
  font-weight: 800;
}

/* ========================================================= */
/* ADMIN · Seed banner                                        */
/* ========================================================= */
.seed-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem;
  background: var(--red-soft);
  border: 1px solid #ffd0cc;
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
}
.seed-banner strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: .25rem; }
.seed-banner p { color: var(--gray-700); font-size: .88rem; }

/* Nota de solo-lectura (admin de la tienda: productos/stock se gestionan en el POS) */
.ro-note {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--red);
  border-radius: 10px;
  color: var(--gray-700);
  font-size: .86rem;
}
.ro-note i { width: 17px; height: 17px; color: var(--red); flex-shrink: 0; }
.ro-note strong { color: var(--ink); font-weight: 700; }

/* ========================================================= */
/* ADMIN · Modal Producto extras                              */
/* ========================================================= */
.precios-fieldset, .stock-fieldset {
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin: .8rem 0;
}
.precios-fieldset legend, .stock-fieldset legend {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: 0 .5rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
}
.precios-fieldset legend i, .stock-fieldset legend i { width: 14px; height: 14px; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.check-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .9rem;
  color: var(--gray-700);
  margin: .8rem 0;
  cursor: pointer;
}
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}
.form-actions-right { display: flex; gap: .5rem; }

/* ========================================================= */
/* ADMIN · Modal detalle ticket                               */
/* ========================================================= */
.ticket-det-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}
.modal-section-title {
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gray-600);
  font-family: var(--mono);
  font-weight: 700;
  margin-bottom: .6rem;
}
.ticket-totales {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: 10px;
}
.ticket-totales .trow {
  display: flex;
  justify-content: space-between;
  padding: .25rem 0;
  font-size: .9rem;
  color: var(--gray-700);
}
.ticket-totales .trow-total {
  margin-top: .5rem;
  padding-top: .6rem;
  border-top: 1px solid var(--gray-200);
  font-weight: 700;
  color: var(--ink);
}
.ticket-totales .trow-total strong { font-size: 1.4rem; color: var(--ink); }

@media (max-width: 700px) {
  .admin-resumen { grid-template-columns: 1fr; gap: .6rem; }
  .ticket-det-grid { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }

  /* Header de sección: apilar título arriba, controles abajo full-width */
  .admin-header {
    flex-direction: column;
    align-items: stretch;
    gap: .9rem;
  }
  .admin-header > div:first-child { width: 100%; }
  .admin-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: .5rem;
  }
  .admin-actions .admin-search,
  .admin-actions .admin-input,
  .admin-actions .admin-select {
    flex: 1 1 100%;
    min-width: 0;
  }
  .admin-actions .btn { flex: 1 1 100%; justify-content: center; }
  .admin-check { flex: 1 1 100%; }

  /* Tabs: scroll horizontal cómodo */
  .admin-tabs { gap: .2rem; }
  .admin-tab { padding: .65rem .85rem; font-size: .85rem; }

  /* Tablas: scroll horizontal con hint visual */
  .admin-table-wrap {
    -webkit-overflow-scrolling: touch;
    position: relative;
  }
  .admin-table { min-width: 560px; }

  /* Modal detalle ticket: tablas internas scrollean */
  .ticket-det-grid .admin-table { min-width: 0; }

  /* Navbar admin: badge más compacto */
  .navbar .user-badge.admin { font-size: .62rem; padding: .3rem .5rem; }
  .navbar .btn-ghost-light span,
  .navbar .btn-ghost-light { font-size: .8rem; }
}

/* ========================================================= */
/* CHECKOUT · método de pago + confirmación                   */
/* ========================================================= */
.pago-opciones { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.2rem; }
.pago-opcion {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pago-opcion:hover { border-color: var(--gray-300); }
.pago-opcion input { width: 20px; height: 20px; accent-color: var(--red); cursor: pointer; flex-shrink: 0; }
.pago-opcion > i { width: 22px; height: 22px; color: var(--red); flex-shrink: 0; }
.pago-opcion strong { display: block; font-size: .95rem; color: var(--ink); }
.pago-opcion small { display: block; font-size: .8rem; color: var(--gray-600); }
.pago-opcion:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
/* Opción deshabilitada (ej. Tarjetas · Próximamente) */
.pago-opcion-disabled { cursor: not-allowed; opacity: .65; background: var(--gray-50); }
.pago-opcion-disabled:hover { border-color: var(--gray-200); }
.pago-opcion-disabled input { cursor: not-allowed; }
.pago-opcion-disabled > i { color: var(--gray-500); }
.pago-pronto {
  margin-left: auto;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gray-600);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: .25rem .5rem;
  border-radius: 999px;
  white-space: nowrap;
}
/* Opción de pago online (Nave) */
.pago-opcion-online { border-color: var(--gray-200); }
.pago-opcion-online > i { color: #7b2ff7; }
.pago-opcion-online:has(input:checked) { border-color: #7b2ff7; background: rgba(123,47,247,.06); }
.pago-badge {
  margin-left: auto;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  background: #7b2ff7;
  padding: .25rem .5rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* Bloque de zona de entrega en el checkout */
.envio-block {
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  padding: 1rem;
  margin: 1rem 0 1.1rem;
}
.envio-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.envio-head > i { width: 22px; height: 22px; color: var(--red); flex-shrink: 0; }
.envio-head strong { display: block; font-size: .95rem; color: var(--ink); }
.envio-head small { display: block; font-size: .8rem; color: var(--gray-600); }
.checkout-select, .checkout-input {
  width: 100%;
  padding: .7rem .8rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
}
.checkout-select:focus, .checkout-input:focus { outline: none; border-color: var(--red); }
.checkout-input { margin-top: .7rem; }
.envio-info {
  display: flex; justify-content: space-between; align-items: center;
  gap: .8rem; margin-top: .7rem; padding: .6rem .8rem;
  background: var(--red-soft); border-radius: 10px;
  font-size: .85rem; color: var(--ink);
}
.envio-info i { width: 15px; height: 15px; color: var(--red); vertical-align: -2px; }
.envio-info strong { color: var(--red); font-size: 1rem; }
.checkout-resumen { margin-bottom: .8rem; }
.resumen-linea {
  display: flex; justify-content: space-between; align-items: center;
  padding: .35rem 0; font-size: .9rem; color: var(--gray-700);
}
.resumen-linea span:last-child { color: var(--ink); font-weight: 600; }

.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  background: var(--ink);
  color: var(--white);
  border-radius: 12px;
  margin-bottom: 1rem;
}
.checkout-total span { font-size: .9rem; color: rgba(255,255,255,.75); }
.checkout-total strong { font-size: 1.5rem; color: var(--white); }
.checkout-note {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .8rem;
  color: var(--gray-600);
  margin-top: .9rem;
  line-height: 1.4;
}
.checkout-note i { width: 15px; height: 15px; color: var(--red); flex-shrink: 0; margin-top: 1px; }

/* Modal OK confirmación */
.modal-ok { text-align: center; width: min(420px, 94vw); }
.ok-icon {
  width: 72px; height: 72px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: var(--green-soft);
  display: flex; align-items: center; justify-content: center;
}
.ok-icon i { width: 36px; height: 36px; color: var(--green); stroke-width: 2.5; }
.modal-ok h2 { font-size: 1.5rem; margin-bottom: .4rem; }
.ok-num {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--red);
  background: var(--red-soft);
  padding: .6rem 1rem;
  border-radius: 12px;
  margin: 1rem 0 1.4rem;
  letter-spacing: .04em;
}

/* ========================================================= */
/* ADMIN · Pedidos web                                        */
/* ========================================================= */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--red);
  color: var(--white);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  margin-left: .15rem;
}
.tab-badge:empty, .tab-badge.hidden { display: none; }

.estado-filtros { display: inline-flex; gap: .3rem; background: var(--gray-100); border-radius: 999px; padding: 3px; }
.estado-filtro {
  border: 0; background: transparent; cursor: pointer;
  padding: .45rem .9rem; border-radius: 999px;
  font-family: var(--font); font-weight: 700; font-size: .82rem;
  color: var(--gray-600); transition: background .15s, color .15s;
}
.estado-filtro:hover { color: var(--ink); }
.estado-filtro.active { background: var(--ink); color: var(--white); }

.pedidos-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1rem; }
.pedido-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-sm);
}
.pedido-card.estado-pendiente { border-left-color: var(--orange); }
.pedido-card.estado-entregado { border-left-color: var(--green); }
.pedido-card.estado-cancelado { border-left-color: var(--gray-300); opacity: .75; }
.pedido-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .7rem; }
.pedido-id { display: flex; align-items: center; gap: .6rem; }
.pnum { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.pedido-estado {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: .25rem .55rem; border-radius: 999px; font-family: var(--mono);
}
.pedido-estado i { width: 12px; height: 12px; }
.pedido-total { font-family: var(--mono); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.pedido-meta {
  display: flex; flex-wrap: wrap; gap: .4rem 1rem;
  font-size: .8rem; color: var(--gray-600);
  padding-bottom: .8rem; margin-bottom: .8rem; border-bottom: 1px dashed var(--gray-200);
}
.pedido-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.pedido-meta i { width: 13px; height: 13px; color: var(--gray-500); }
.pedido-lineas { display: flex; flex-direction: column; gap: .25rem; margin-bottom: 1rem; }
.pl-line { display: flex; justify-content: space-between; font-size: .85rem; color: var(--ink); }
.pl-line .mono { color: var(--gray-700); }
.pedido-actions { display: flex; gap: .5rem; }
.pedido-actions .btn { flex: 1; justify-content: center; }
.ped-done, .ped-cancel {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .82rem; font-weight: 600; width: 100%;
}
.ped-done { color: var(--green); }
.ped-cancel { color: var(--gray-500); }
.ped-done i, .ped-cancel i { width: 15px; height: 15px; }

@media (max-width: 700px) {
  .pedidos-list { grid-template-columns: 1fr; }
  .estado-filtros { width: 100%; overflow-x: auto; }
}

/* ===== Peso variable en carrito web ===== */
.cart-item-peso { font-size: .72rem; color: var(--gray-600); margin-top: .15rem; font-family: var(--mono); }
.est-tag {
  font-family: var(--mono); font-size: .6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--orange); background: var(--orange-soft);
  padding: .1rem .35rem; border-radius: 4px; margin-left: .2rem;
}
.badge-peso-mini {
  display: inline-block; font-family: var(--mono); font-size: .55rem; font-weight: 700;
  text-transform: uppercase; background: var(--ink); color: var(--white);
  padding: .1rem .3rem; border-radius: 3px; vertical-align: middle;
}
.checkout-peso-nota { background: var(--orange-soft); border-radius: 10px; padding: .7rem .9rem; color: var(--gray-800); }
.checkout-peso-nota i { color: var(--orange); }

/* Línea de entrega en tarjeta de pedido (admin) */
.pedido-entrega {
  display: block;
  font-size: .85rem;
  padding: .55rem .7rem;
  border-radius: 10px;
  margin: .5rem 0 .2rem;
  line-height: 1.5;
}
.pedido-entrega i { width: 15px; height: 15px; vertical-align: -2px; }
.pedido-entrega.envio { background: #fff4e6; color: #8a4b00; }
.pedido-entrega.retiro { background: #eef6ff; color: #1257a0; }
.pedido-entrega .pedido-dir { font-weight: 600; }

/* ===== Checkout: grupos de formulario ===== */
.checkout-group { margin: 0 0 1.1rem; }
.checkout-group-title {
  display: flex; align-items: center; gap: .5rem;
  font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gray-600); margin-bottom: .7rem;
}
.checkout-group-title i { width: 15px; height: 15px; color: var(--red); }
.checkout-group.envio-block { border: 1.5px solid var(--gray-200); border-radius: 14px; padding: 1rem; }
.campo { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .7rem; }
.campo:last-child { margin-bottom: 0; }
.campo label { font-size: .82rem; font-weight: 600; color: var(--gray-700); }
.campo-row { display: flex; gap: .7rem; }
.campo-row .campo { flex: 1; margin-bottom: .7rem; }
@media (max-width: 480px) { .campo-row { flex-direction: column; gap: 0; } }

/* Pedido admin: chips de contacto */
.pedido-contacto { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin: .4rem 0 .2rem; font-size: .85rem; color: var(--gray-700); }
.pedido-contacto span { display: inline-flex; align-items: center; gap: .35rem; }
.pedido-contacto a { color: var(--red); font-weight: 600; }
.pedido-contacto i { width: 14px; height: 14px; }
