@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ═══════════════════════ VARIABLES ═══════════════════════ */
:root {
  --na:    #f97316;   /* naranja principal */
  --na2:   #ea6a0a;   /* naranja oscuro hover */
  --na3:   #fff7ed;   /* naranja muy claro fondo */
  --na4:   #fed7aa;   /* naranja claro borde */
  --ma:    #0f2137;   /* marino principal */
  --ma2:   #1a3252;   /* marino medio */
  --ma3:   #234267;   /* marino claro */
  --wh:    #ffffff;
  --bg:    #f5f6fa;
  --bd:    #e2e5ee;
  --tx:    #0f2137;
  --tx2:   #4b5675;
  --tx3:   #9aa0b4;
  --ok:    #16a34a;
  --err:   #dc2626;
  --r:     10px;
  --rsm:   6px;
  --sh:    0 1px 4px rgba(15,33,55,.07), 0 2px 10px rgba(15,33,55,.05);
  --shm:   0 4px 20px rgba(15,33,55,.13);
  --tr:    .16s ease;
  --f:     'Plus Jakarta Sans', sans-serif;
}

/* ═══════════════════════ RESET ═══════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--f); background: var(--bg); color: var(--tx); -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.5; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--f); }
img { display: block; max-width: 100%; }
input, select { font-family: var(--f); }

/* ═══════════════════════ NAVBAR ═══════════════════════ */
.navbar-premium {
  background: var(--ma);
  height: 60px;
  border-bottom: 3px solid var(--na);
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 500;
}
.nav-inner {
  max-width: 1440px; margin: 0 auto;
  height: 100%; display: flex; align-items: center;
  gap: 12px; padding: 0 18px;
}
.logo-navbar { height: 36px; object-fit: contain; flex-shrink: 0; }

.nav-search-bar { flex: 1; max-width: 400px; position: relative; display: none; }
@media(min-width:992px){ .nav-search-bar { display: block; } }
.nav-search-bar input {
  width: 100%; padding: 8px 14px 8px 34px;
  border-radius: 50px; border: 1.5px solid transparent;
  background: var(--ma2); color: #fff;
  font-size: 13px; outline: none; transition: var(--tr);
}
.nav-search-bar input::placeholder { color: #5f7a9a; }
.nav-search-bar input:focus { border-color: var(--na); }
.nav-search-bar i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #5f7a9a; font-size: 12px; pointer-events: none; }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.select-sucursal-nav {
  background: var(--ma2); color: #c5d6e8;
  border: 1.5px solid rgba(255,255,255,.1); border-radius: 50px;
  padding: 6px 12px; font-size: 12px; font-weight: 500;
  outline: none; cursor: pointer; transition: var(--tr);
  display: none;
}
@media(min-width:768px){ .select-sucursal-nav { display: block; } }
.select-sucursal-nav:focus { border-color: var(--na); }

.nav-link-item {
  color: #c5d6e8; font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: var(--rsm);
  transition: var(--tr); white-space: nowrap;
  display: none; align-items: center; gap: 5px;
}
@media(min-width:992px){ .nav-link-item { display: flex; } }
.nav-link-item:hover { color: #fff; background: rgba(255,255,255,.08); }

.btn-cart {
  background: var(--na); color: #fff; border: none;
  border-radius: var(--rsm); width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; position: relative; transition: var(--tr); flex-shrink: 0;
}
.btn-cart:hover { background: var(--na2); }
.cart-badge {
  position: absolute; top: -5px; right: -5px;
  background: #fff; color: var(--na);
  width: 17px; height: 17px; border-radius: 50%;
  font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--na); line-height: 1;
}

/* ocultar carrito correcto por breakpoint */
#btnNavCarrito    { display: flex; }
#btnNavCarritoDesktop { display: none; }
@media(min-width:992px){
  #btnNavCarrito         { display: none !important; }
  #btnNavCarritoDesktop  { display: flex !important; }
}

.nav-spacer { height: 60px; }

/* ═══════════════════════ TABS BAR ═══════════════════════ */
.tabs-bar {
  background: var(--ma2);
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: sticky; top: 60px; z-index: 400;
  overflow-x: auto;
}
.tabs-bar::-webkit-scrollbar { display: none; }
.tabs-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; padding: 0 18px;
}
.tab-btn {
  color: #8aaac4; font-size: 13px; font-weight: 600;
  padding: 10px 18px; border: none; background: none;
  border-bottom: 3px solid transparent;
  transition: var(--tr); cursor: pointer;
  white-space: nowrap; display: flex; align-items: center; gap: 7px;
}
.tab-btn:hover { color: #fff; }
.tab-btn.activo { color: var(--na); border-bottom-color: var(--na); }
.tab-spacer { height: 43px; }

/* ═══════════════════════ PÁGINA INICIO ═══════════════════════ */
.pg-inicio {
  max-width: 1440px; margin: 0 auto;
  padding: 14px 10px 80px;
}
@media (min-width: 576px)  { .pg-inicio { padding: 16px 14px 80px; } }
@media (min-width: 992px)  { .pg-inicio { padding: 20px 18px 80px; } }

/* Hero */
.hero-inicio {
  background: linear-gradient(135deg, var(--ma) 0%, var(--ma2) 60%, #1e3d6e 100%);
  border-radius: var(--r); padding: 36px 40px;
  margin-bottom: 24px; position: relative; overflow: hidden;
}
.hero-inicio::before {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(249,115,22,.18) 0%, transparent 70%);
}
.hero-inicio::after {
  content: ''; position: absolute; left: -40px; bottom: -80px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(249,115,22,.08) 0%, transparent 70%);
}
.hero-txt { position: relative; z-index: 1; }
.hero-pretag {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(249,115,22,.2); color: #fdba74;
  border-radius: 50px; padding: 4px 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; margin-bottom: 10px;
}
.hero-tit {
  font-size: clamp(22px, 3vw, 34px); font-weight: 800;
  color: #fff; line-height: 1.2; margin-bottom: 8px;
}
.hero-tit em { color: var(--na); font-style: normal; }
.hero-sub { color: #8aaac4; font-size: 14px; margin-bottom: 20px; }
.btn-cta {
  background: var(--na); color: #fff; border: none;
  border-radius: var(--rsm); padding: 12px 24px;
  font-size: 14px; font-weight: 700; transition: var(--tr);
  display: inline-flex; align-items: center; gap: 7px;
}
.btn-cta:hover { background: var(--na2); transform: translateY(-1px); }

/* Titulo de sección */
.sec-tit {
  font-size: 17px; font-weight: 800; color: var(--ma);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.sec-tit i { color: var(--na); }
.sec-tit::after {
  content: ''; flex: 1; height: 2px;
  background: linear-gradient(90deg, var(--na4), transparent);
  margin-left: 8px;
}

/* Categorías */
/* ── Contenedor con flechas ── */
.cats-wrap {
  position: relative; margin-bottom: 24px;
}
.cats-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--wh); border: 1.5px solid var(--bd);
  color: var(--tx2); font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 2; transition: var(--tr); box-shadow: var(--sh);
  flex-shrink: 0;
}
.cats-arrow:hover { background: var(--na); border-color: var(--na); color: #fff; }
.cats-arrow.prev { left: -6px; }
.cats-arrow.next { right: -6px; }
.cats-arrow.hidden { opacity: 0; pointer-events: none; }

/* ── Scroll horizontal ── */
.cats-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px 8px;
  /* ocultar scrollbar en todos los navegadores */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cats-grid::-webkit-scrollbar { display: none; }

/* ── Cada categoría: ancho fijo para que sean uniformes ── */
.cat-item {
  background: var(--wh); border: 1.5px solid var(--bd);
  border-radius: var(--r); padding: 10px 8px 8px;
  text-align: center; cursor: pointer;
  transition: var(--tr); display: flex;
  flex-direction: column; align-items: center; gap: 5px;
  flex: 0 0 80px;   /* ancho fijo, no crece ni encoge */
  min-width: 80px;
}
@media (min-width: 600px) { .cat-item { flex: 0 0 90px; min-width: 90px; padding: 12px 8px 10px; } }
@media (min-width: 992px) { .cat-item { flex: 0 0 100px; min-width: 100px; padding: 14px 8px 10px; gap: 6px; } }

.cat-item:hover { border-color: var(--na); transform: translateY(-2px); box-shadow: var(--shm); }
.cat-item.activa { border-color: var(--na); background: var(--na3); }
.cat-ico {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--na3); color: var(--na);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: var(--tr); flex-shrink: 0;
}
@media (min-width: 992px) { .cat-ico { width: 42px; height: 42px; font-size: 17px; } }
.cat-item:hover .cat-ico,
.cat-item.activa .cat-ico { background: var(--na); color: #fff; }
.cat-nom {
  font-size: 9px; font-weight: 600; color: var(--tx2);
  line-height: 1.2; word-break: break-word;
}
@media (min-width: 600px) { .cat-nom { font-size: 10px; } }
@media (min-width: 992px) { .cat-nom { font-size: 11px; } }

/* Layout inicio: promo sidebar + productos */
.inicio-layout { display: flex; gap: 18px; align-items: flex-start; }

.promo-sidebar { width: 230px; flex-shrink: 0; }
@media(max-width:991px){ .promo-sidebar { display: none; } }

.promo-card {
  background: var(--wh); border: 1px solid var(--bd);
  border-radius: var(--r); overflow: hidden; box-shadow: var(--sh);
}
.promo-hdr {
  background: linear-gradient(135deg, var(--na) 0%, var(--na2) 100%);
  padding: 10px 14px; display: flex; align-items: center; gap: 7px;
}
.promo-hdr span { color: #fff; font-size: 13px; font-weight: 700; }
.promo-hdr i { color: rgba(255,255,255,.8); }

.promo-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--bd);
  cursor: pointer; transition: var(--tr);
}
.promo-item:last-child { border-bottom: none; }
.promo-item:hover { background: var(--na3); }
.promo-img {
  width: 44px; height: 44px; border-radius: var(--rsm);
  background: var(--bg); object-fit: contain; padding: 4px;
  flex-shrink: 0; border: 1px solid var(--bd);
}
.promo-nom { font-size: 12px; font-weight: 600; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo-prec { font-size: 13px; font-weight: 800; color: var(--na); }

.productos-inicio { flex: 1; min-width: 0; }

/* ═══════════════════════ PÁGINA TIENDA ═══════════════════════ */
.buscador-tienda {
  background: linear-gradient(135deg, var(--ma) 0%, var(--ma2) 100%);
  padding: 18px;
}
.bus-inner {
  max-width: 600px; margin: 0 auto; position: relative;
}
.bus-inner input {
  width: 100%; padding: 13px 110px 13px 44px;
  border-radius: 50px; border: 2px solid transparent;
  background: rgba(255,255,255,.97); font-size: 14px;
  outline: none; color: var(--tx);
  box-shadow: 0 4px 20px rgba(0,0,0,.2); transition: var(--tr);
}
.bus-inner input:focus { border-color: var(--na); }
.bus-inner input::placeholder { color: var(--tx3); }
.bus-inner .ico-bus { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--na); font-size: 14px; pointer-events: none; }
.btn-bus {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  background: var(--na); color: #fff; border: none;
  border-radius: 50px; padding: 8px 20px;
  font-size: 12px; font-weight: 700; transition: var(--tr);
}
.btn-bus:hover { background: var(--na2); }

.pg-tienda {
  max-width: 1440px; margin: 0 auto;
  padding: 14px 10px 80px;           /* padding lateral pequeño en móvil */
  display: flex; gap: 18px; align-items: flex-start;
}
@media (min-width: 576px) {
  .pg-tienda { padding: 16px 14px 80px; }
}
@media (min-width: 992px) {
  .pg-tienda { padding: 18px 18px 80px; flex-direction: row; }
}
@media (max-width: 991px) {
  .pg-tienda { flex-direction: column; }
}

/* ─── SIDEBAR FILTROS ─── */
.sidebar-filtros {
  width: 215px; flex-shrink: 0;
  background: var(--wh); border-radius: var(--r);
  border: 1px solid var(--bd); box-shadow: var(--sh);
  position: sticky; top: 103px; /* 60 nav + 43 tabs */
  overflow: hidden;
}

/* Drawer en móvil */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 600;
}
.sidebar-overlay.show { display: block; }
@media(max-width:991px){
  .sidebar-filtros {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 270px; z-index: 700;
    border-radius: 0 var(--r) var(--r) 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .24s ease;
  }
  .sidebar-filtros.open { transform: translateX(0); }
  .btn-cerrar-sidebar { display: flex !important; }
}

.sb-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px;
  background: linear-gradient(135deg, var(--na) 0%, var(--na2) 100%);
}
.sb-tit { font-size: 13px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 6px; }
.btn-cerrar-sidebar {
  display: none; background: rgba(255,255,255,.2); border: none;
  color: #fff; width: 26px; height: 26px; border-radius: 50%;
  font-size: 12px; cursor: pointer; align-items: center; justify-content: center;
}
.btn-cerrar-sidebar:hover { background: rgba(255,255,255,.35); }

.filtro-sec { padding: 11px 14px; border-bottom: 1px solid var(--bd); }
.filtro-sec:last-child { border-bottom: none; padding-bottom: 14px; }
.filtro-lbl { font-size: 10px; font-weight: 700; color: var(--tx3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; display: block; }

.filtro-sel {
  width: 100%; padding: 8px 26px 8px 10px;
  border: 1.5px solid var(--bd); border-radius: var(--rsm);
  font-size: 12px; background: var(--bg); color: var(--tx);
  outline: none; cursor: pointer; transition: var(--tr);
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239aa0b4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.filtro-sel:focus { border-color: var(--na); background-color: var(--wh); }

.precio-range { width: 100%; accent-color: var(--na); cursor: pointer; margin: 6px 0 3px; }
.precio-labs { display: flex; justify-content: space-between; font-size: 10px; color: var(--tx3); }

.btn-limpiar {
  width: 100%; padding: 8px; border: 1.5px solid var(--bd);
  border-radius: var(--rsm); background: none; font-size: 11px;
  font-weight: 600; color: var(--tx2); cursor: pointer;
  transition: var(--tr); display: flex; align-items: center; justify-content: center; gap: 5px;
}
.btn-limpiar:hover { border-color: var(--na); color: var(--na); }

/* ─── ÁREA PRODUCTOS ─── */
.area-productos { flex: 1; min-width: 0; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
  background: var(--wh); border: 1px solid var(--bd);
  border-radius: var(--r); padding: 8px 10px; box-shadow: var(--sh);
}
@media (min-width: 992px) { .toolbar { padding: 9px 14px; margin-bottom: 12px; } }
.toolbar-left { display: flex; align-items: center; gap: 10px; }
.toolbar-count { font-size: 13px; color: var(--tx2); }
.toolbar-count strong { color: var(--tx); font-weight: 700; }
.btn-mobile-filter {
  display: none; background: var(--na); color: #fff; border: none;
  border-radius: var(--rsm); padding: 7px 13px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  align-items: center; gap: 5px;
}
@media(max-width:991px){ .btn-mobile-filter { display: flex; } }
.sel-orden {
  padding: 7px 12px; border: 1.5px solid var(--bd);
  border-radius: var(--rsm); font-size: 12px;
  background: var(--wh); outline: none; cursor: pointer;
}

/* ═══════════════════════ CARDS — TAMAÑO FIJO ═══════════════════════ */

/* MÓVIL: 2 columnas exactas, padding reducido para que entren bien */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* TABLET (≥ 600px): 3 columnas */
@media (min-width: 600px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

/* TABLET GRANDE / iPad (≥ 768px): 3 columnas con más gap */
@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

/* DESKTOP (≥ 992px): auto-fill para aprovechar el espacio junto al sidebar */
@media (min-width: 992px) {
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 14px;
  }
}

/* DESKTOP GRANDE (≥ 1200px) */
@media (min-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  }
}

.card-prod {
  background: var(--wh);
  border-radius: var(--r);
  border: 1.5px solid var(--bd);
  overflow: hidden;
  box-shadow: var(--sh);
  display: flex; flex-direction: column;
  height: 300px;                        /* altura fija igual para todos */
  transition: box-shadow var(--tr), border-color var(--tr), transform var(--tr);
  cursor: pointer;
  width: 100%;                          /* ocupa todo el ancho de la columna */
}
.card-prod:hover { box-shadow: var(--shm); border-color: var(--na); transform: translateY(-2px); }
.card-prod:active { transform: scale(.99); }

.card-img-wrap {
  width: 100%; height: 120px; flex-shrink: 0;  /* más pequeño en móvil */
  background: var(--bg); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
@media (min-width: 600px) { .card-img-wrap { height: 130px; } }
@media (min-width: 992px) { .card-img-wrap { height: 145px; } }
.card-img-wrap img {
  width: 100%; height: 100%; object-fit: contain;
  padding: 10px; transition: transform .32s ease;
}
.card-prod:hover .card-img-wrap img { transform: scale(1.06); }

.card-bdg {
  position: absolute; top: 6px; left: 6px;
  font-size: 9px; font-weight: 800;
  padding: 2px 7px; border-radius: 50px;
  background: var(--na); color: #fff;
}
.card-bdg.stock { background: #fef3c7; color: #92400e; }

.card-body {
  padding: 7px 9px 9px;
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}
@media (min-width: 600px) { .card-body { padding: 8px 10px 10px; } }
@media (min-width: 992px) { .card-body { padding: 9px 11px 11px; } }

.card-suctag { font-size: 8px; font-weight: 700; color: var(--na); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 1px; }
.card-marca  { font-size: 9px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 2px; }
.card-nombre {
  font-size: 11px; font-weight: 600; color: var(--tx);
  line-height: 1.3; margin-bottom: auto; min-height: 28px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (min-width: 600px) {
  .card-suctag { font-size: 9px; }
  .card-marca  { font-size: 10px; }
  .card-nombre { font-size: 12px; min-height: 31px; }
}
.card-precio { font-size: 16px; font-weight: 800; color: var(--na); margin: 5px 0 7px; line-height: 1; }
.card-precio small { font-size: 9px; font-weight: 400; color: var(--tx3); }
@media (min-width: 600px) { .card-precio { font-size: 17px; } }
@media (min-width: 992px) { .card-precio { font-size: 18px; } }

.btn-ver-detalle {
  background: var(--ma); color: #fff; border: none;
  border-radius: var(--rsm); padding: 7px 6px;
  font-size: 10px; font-weight: 600; width: 100%;
  transition: background var(--tr); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
@media (min-width: 600px) { .btn-ver-detalle { font-size: 11px; padding: 8px; gap: 5px; } }
.btn-ver-detalle:hover { background: var(--na); }

/* Skeleton */
.skel-wrap {
  background: var(--wh); border-radius: var(--r);
  border: 1px solid var(--bd); overflow: hidden;
  height: 300px; width: 100%;
}
.skel {
  background: linear-gradient(90deg, #e8eaf0 25%, #f2f4f8 50%, #e8eaf0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite; border-radius: 4px;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Paginación */
.pag-wrap { display: flex; justify-content: center; gap: 5px; margin-top: 22px; }
.pg {
  min-width: 34px; height: 34px; border-radius: var(--rsm);
  border: 1.5px solid var(--bd); background: var(--wh);
  color: var(--tx); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: var(--tr);
  display: flex; align-items: center; justify-content: center; padding: 0 6px;
}
.pg:hover:not([disabled]) { border-color: var(--na); color: var(--na); }
.pg.activo { background: var(--na); border-color: var(--na); color: #fff; font-weight: 700; }
.pg[disabled] { opacity: .35; cursor: default; }

/* ═══════════════════════ MODAL DETALLE ═══════════════════════ */
.modal-content { border: none !important; border-radius: var(--r) !important; overflow: hidden !important; box-shadow: 0 12px 48px rgba(0,0,0,.2) !important; }
.modal-hdr {
  background: var(--ma); color: #fff;
  padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; border: none;
}
.modal-hdr h5 { font-size: 14px; font-weight: 700; margin: 0; }
.btn-x {
  background: rgba(255,255,255,.12); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 50%; font-size: 12px;
  cursor: pointer; transition: var(--tr);
  display: flex; align-items: center; justify-content: center;
}
.btn-x:hover { background: var(--na); }

.det-img { background: var(--bg); border-radius: var(--rsm); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.det-img img { max-height: 210px; width: 100%; object-fit: contain; padding: 14px; }
.det-marca { font-size: 10px; font-weight: 700; color: var(--tx3); text-transform: uppercase; letter-spacing: .4px; }
.det-nombre { font-size: 17px; font-weight: 800; color: var(--tx); margin: 4px 0 6px; }
.det-precio { font-size: 26px; font-weight: 800; color: var(--na); margin-bottom: 12px; line-height: 1; }
.det-precio small { font-size: 12px; font-weight: 400; color: var(--tx3); }
.det-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.det-chip { background: var(--bg); border: 1px solid var(--bd); border-radius: var(--rsm); padding: 6px 11px; }
.det-chip .lbl { font-size: 10px; color: var(--tx3); font-weight: 500; display: block; margin-bottom: 1px; }
.det-chip .val { font-weight: 700; color: var(--tx); font-size: 13px; }

.alerta-suc {
  background: #fff7ed; border: 1.5px solid var(--na4);
  border-radius: var(--rsm); padding: 10px 14px;
  font-size: 12px; color: #9a3412;
  display: flex; align-items: flex-start; gap: 7px; margin-bottom: 12px;
}
.alerta-suc i { flex-shrink: 0; margin-top: 1px; color: var(--na); }

.cant-ctrl { display: flex; align-items: center; border: 1.5px solid var(--bd); border-radius: var(--rsm); overflow: hidden; width: fit-content; }
.cant-ctrl button { width: 34px; height: 38px; border: none; background: var(--bg); font-size: 17px; color: var(--tx); transition: var(--tr); }
.cant-ctrl button:hover { background: var(--na); color: #fff; }
.cant-ctrl input { width: 52px; height: 38px; border: none; border-left: 1.5px solid var(--bd); border-right: 1.5px solid var(--bd); text-align: center; font-size: 14px; font-weight: 700; outline: none; }

.btn-agregar {
  flex: 1; background: var(--na); color: #fff; border: none;
  border-radius: var(--rsm); padding: 11px 20px;
  font-size: 14px; font-weight: 700; transition: var(--tr);
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-agregar:hover { background: var(--na2); transform: translateY(-1px); }

/* ═══════════════════════ MODAL CARRITO ═══════════════════════ */
.cart-hdr {
  background: var(--ma); color: #fff;
  padding: 14px 18px; display: flex; align-items: flex-start; justify-content: space-between; border: none;
}
.cart-hdr h5 { font-size: 14px; font-weight: 700; margin: 0 0 3px; }
.cart-suc-lbl { font-size: 11px; color: var(--na); display: flex; align-items: center; gap: 4px; }

.cart-scroll { max-height: 300px; overflow-y: auto; padding-right: 2px; }
.cart-scroll::-webkit-scrollbar { width: 3px; }
.cart-scroll::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 3px; }

/* Cart item: imagen | nombre+precio | cantidad | subtotal | [borrar] */
.cart-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--bd);
}
.cart-item:last-child { border-bottom: none; }

.ci-img { width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--rsm); background: var(--bg); object-fit: contain; padding: 4px; border: 1px solid var(--bd); }
.ci-data { flex: 1; min-width: 0; }
.ci-nom  { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.ci-prec { font-size: 11px; color: var(--tx3); }

.mini-cant { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.mini-cant button {
  width: 26px; height: 26px; border-radius: var(--rsm);
  border: 1.5px solid var(--bd); background: var(--bg);
  font-size: 14px; font-weight: 700; color: var(--tx);
  transition: var(--tr); display: flex; align-items: center; justify-content: center;
}
.mini-cant button:hover { background: var(--na); color: #fff; border-color: var(--na); }
.mini-cant input {
  width: 38px; height: 26px; border: 1.5px solid var(--bd);
  border-radius: var(--rsm); text-align: center;
  font-size: 12px; font-weight: 700; outline: none;
}

.ci-sub { font-size: 13px; font-weight: 800; color: var(--na); min-width: 56px; text-align: right; flex-shrink: 0; white-space: nowrap; }

/* Botón eliminar — siempre visible, siempre a la derecha */
.btn-eliminar {
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: #fee2e2; color: var(--err);
  border: 1.5px solid #fecaca; border-radius: var(--rsm);
  font-size: 12px; cursor: pointer; transition: var(--tr);
  display: flex; align-items: center; justify-content: center;
}
.btn-eliminar:hover { background: var(--err); color: #fff; border-color: var(--err); }

/* Cart vacío */
.cart-empty { text-align: center; padding: 30px 0; color: var(--tx3); }
.cart-empty i { font-size: 36px; opacity: .2; display: block; margin-bottom: 10px; }
.cart-empty p { font-size: 13px; }

/* Total */
.total-box {
  background: var(--na3); border: 1.5px solid var(--na4);
  border-radius: var(--rsm); padding: 12px 14px;
  display: flex; justify-content: space-between; align-items: center;
  margin: 12px 0;
}
.total-lbl { font-size: 12px; color: var(--tx2); font-weight: 600; }
.total-num { font-size: 22px; font-weight: 800; color: var(--na); }
/* El símbolo de moneda lo inserta el JS directamente en el texto */

/* Formulario entrega */
.form-sep { font-size: 10px; font-weight: 700; color: var(--tx3); text-transform: uppercase; letter-spacing: .5px; margin: 4px 0 7px; display: block; }
.inp-prem { width: 100%; padding: 9px 12px; border: 1.5px solid var(--bd); border-radius: var(--rsm); font-size: 13px; color: var(--tx); outline: none; transition: var(--tr); background: var(--wh); }
.inp-prem:focus { border-color: var(--na); }
.tel-wrap { display: flex; }
.tel-pre { background: var(--ma); color: #fff; border-radius: var(--rsm) 0 0 var(--rsm); padding: 9px 11px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.inp-tel { border-radius: 0 var(--rsm) var(--rsm) 0 !important; border-left: none !important; }

.btn-loc { width: 100%; background: var(--ma2); color: #fff; border: none; border-radius: var(--rsm); padding: 9px; font-size: 12px; font-weight: 600; transition: var(--tr); display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 7px; }
.btn-loc:hover { background: var(--ma3); }
.btn-loc.ok { background: #14532d; }
.loc-txt { font-size: 11px; color: var(--tx3); margin-top: 4px; min-height: 16px; display: block; }

.btn-comprar { width: 100%; background: var(--na); color: #fff; border: none; border-radius: var(--rsm); padding: 12px; font-size: 14px; font-weight: 700; transition: var(--tr); display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 10px; }
.btn-comprar:hover { background: var(--na2); box-shadow: 0 5px 18px rgba(249,115,22,.3); transform: translateY(-1px); }
.btn-comprar:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }

.btn-wa { width: 100%; background: #16a34a; color: #fff; border: none; border-radius: var(--rsm); padding: 10px; font-size: 13px; font-weight: 600; transition: var(--tr); display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 7px; }
.btn-wa:hover { background: #15803d; }

/* ═══════════════════════ BOTTOM NAV MÓVIL ═══════════════════════ */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  height: 56px; background: var(--wh); border-top: 1px solid var(--bd);
  z-index: 400; align-items: center; padding: 0 6px;
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
}
@media(max-width:991px){ .bottom-nav { display: flex; } }
.bnav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px;
  color: var(--tx3); font-size: 9px; font-weight: 600;
  background: none; border: none; cursor: pointer;
  transition: var(--tr); padding: 4px 0; text-decoration: none;
}
.bnav-item i { font-size: 17px; }
.bnav-item.activo, .bnav-item:hover { color: var(--na); }
.bnav-cart {
  background: var(--na) !important; color: #fff !important;
  border-radius: var(--r) !important; padding: 7px 16px !important;
  flex: none !important; flex-direction: row !important;
  gap: 5px !important; font-size: 11px !important; position: relative;
}
.bnav-cart:hover { background: var(--na2) !important; }
.bnav-cart .cart-badge { top: -5px; right: -5px; }

/* ═══════════════════════ FOOTER ═══════════════════════ */
footer { background: var(--ma); color: #7a8fa3; padding: 44px 0 20px; }
@media(max-width:991px){ footer { padding-bottom: 70px; } }
.footer-titulo { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--na); margin-bottom: 12px; }
footer p { font-size: 13px; line-height: 1.8; }
footer a { color: #7a8fa3; transition: color var(--tr); }
footer a:hover { color: var(--na); }
.fsoc a { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ma2); font-size: 12px; color: #7a8fa3; margin-right: 5px; margin-top: 8px; transition: var(--tr); }
.fsoc a:hover { background: var(--na); color: #fff; }
footer hr { border-color: var(--ma2); margin: 18px 0 12px; }
.fcopy { text-align: center; font-size: 12px; color: #4b5c70; }

/* ═══════════════════════ UTILS ═══════════════════════ */
.empty-state { text-align: center; padding: 50px 20px; color: var(--tx3); }
.empty-state i { font-size: 42px; opacity: .2; display: block; margin-bottom: 12px; }
.empty-state h6 { font-size: 15px; font-weight: 700; color: var(--tx2); margin-bottom: 4px; }
.empty-state p { font-size: 13px; }
.fade-in { animation: fiu .28s ease both; }
@keyframes fiu { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
textarea.inp-prem { resize: vertical; min-height: 100px; }

.mb-3 { margin-bottom: 12px !important; }
.mt-3 { margin-top: 12px !important; }
.text-center { text-align: center; }