/* ============================================================
   REDISEÑO "VITRINA" (tarjetas) + "VIDRIERA" (inicio)
   - Tarjeta de producto: build/js/tarjeta.js (catálogo y destacados)
   - Inicio: banner, círculos de marcas, destacados, cómo comprar,
     mosaico de marcas y categorías (index.php)
   Navbar, menú lateral y carrito no se tocan.
   El modo oscuro de estas piezas está al final de este archivo.
   Ojo: en esta web 1rem = 10px (html { font-size: 62.5% })
   ============================================================ */

/* ---------- Grilla de tarjetas ---------- */
.vt-grilla,
.cards-container.vt-grilla {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
  gap: 2rem;
}

/* ---------- Tarjeta "Vitrina" ---------- */
.vt-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid #eee5e5;
  border-radius: 1.6rem;
  overflow: hidden;
  font-family: "Montserrat", sans-serif;
  text-align: left;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.vt-card:hover {
  box-shadow: 0 12px 28px -14px rgba(80, 20, 20, 0.35);
  transform: translateY(-3px);
}
.vt-foto {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 1.6rem;
  background: #f6f2f1;
}
/* La foto va encima del recuadro cuadrado: así una foto vertical no estira la tarjeta */
.vt-foto img {
  position: absolute;
  inset: 1.6rem;
  width: calc(100% - 3.2rem);
  height: calc(100% - 3.2rem);
  object-fit: contain;
  /* las fotos tienen fondo blanco: así se funden con el recuadro */
  mix-blend-mode: multiply;
  transition: transform 0.3s ease;
}
.vt-card:hover .vt-foto img {
  transform: scale(1.04);
}
.vt-abrible .vt-foto,
.vt-abrible .vt-nombre {
  cursor: pointer;
}
.vt-badge {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  z-index: 1;
  padding: 0.4rem 0.9rem;
  border-radius: 0.6rem;
  background: #b91616;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.vt-cuerpo {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  padding: 1.4rem 1.6rem 1.6rem;
}
.vt-marca {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b91616;
}
.vt-nombre {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1d1d1d;
  text-align: left;
}
.vt-abrible .vt-nombre:hover {
  color: #b91616;
}
.vt-desc {
  font-size: 1.25rem;
  line-height: 1.4;
  color: #8a8a8a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vt-precio {
  margin-top: auto;
  padding-top: 0.6rem;
  font-size: 2.2rem;
  font-weight: 800;
  color: #111;
  font-variant-numeric: tabular-nums;
}
.vt-mayorista {
  width: fit-content;
  padding: 0.3rem 0.8rem;
  border-radius: 0.6rem;
  background: #f3f0ef;
  color: #555;
  font-size: 1.25rem;
  font-weight: 700;
}
.vt-stock {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #3d7a4f;
}
.vt-stock::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #2fa65a;
}
.vt-stock-poco {
  color: #a86a00;
}
.vt-stock-poco::before {
  background: #e3a008;
}
.vt-stock-sin {
  color: #999;
}
.vt-stock-sin::before {
  background: #ccc;
}
.vt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  width: 100%;
  margin-top: 0.8rem;
  padding: 1.2rem;
  border: none;
  border-radius: 1rem;
  background: #00a046;
  color: #fff;
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}
.vt-btn:hover {
  background: #008c3a;
}
.vt-btn:focus-visible {
  outline: 3px solid #0b6b33;
  outline-offset: 2px;
}
.vt-btn:disabled {
  background: #e5e1e1;
  color: #9a9393;
  cursor: not-allowed;
}
.vt-agotado .vt-foto img {
  opacity: 0.45;
  filter: grayscale(1);
}

@media (max-width: 600px) {
  .vt-grilla,
  .cards-container.vt-grilla {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem;
  }
  .vt-foto img {
    inset: 1rem;
    width: calc(100% - 2rem);
    height: calc(100% - 2rem);
  }
  .vt-cuerpo {
    padding: 1rem 1.1rem 1.2rem;
    gap: 0.4rem;
  }
  .vt-marca {
    font-size: 1rem;
  }
  .vt-nombre {
    font-size: 1.4rem;
  }
  .vt-precio {
    font-size: 1.8rem;
  }
  .vt-btn {
    padding: 1rem 0.6rem;
    font-size: 1.2rem;
  }
}

/* ============================================================
   INICIO "VIDRIERA"
   ============================================================ */

/* ---------- Banner: redondeado y debajo de la barra roja ---------- */
.banners.vd-banner {
  width: calc(100% - 4.8rem);
  max-width: 140rem;
  height: auto;
  aspect-ratio: 3 / 1;
  margin: 11rem auto 0;
  border-radius: 2.4rem;
}
.vd-banner .slide img {
  object-fit: cover;
}
/* En el celular se cargan los banners verticales (get_bannersCel.php) */
@media (max-width: 749px) {
  .banners.vd-banner {
    width: calc(100% - 2.4rem);
    aspect-ratio: 2333 / 2500;
    margin-top: 10.5rem;
    border-radius: 1.8rem;
  }
}

/* ---------- Círculos de marcas y categorías ---------- */
.vd-burbujas {
  display: flex;
  justify-content: center;
  gap: 2.4rem;
  max-width: 140rem;
  margin: 0 auto;
  padding: 3.2rem 2.4rem 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.vd-burbujas::-webkit-scrollbar {
  display: none;
}
.vd-burbujas a {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 10.4rem;
  font-family: "Montserrat", sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  color: #333;
}
.vd-burbuja {
  display: block;
  width: 8.8rem;
  height: 8.8rem;
  margin-top: 0.6rem;
  border-radius: 50%;
  overflow: hidden;
  /* aro rojo con un borde blanco en el medio */
  box-shadow: 0 0 0 3px #f8f8f8, 0 0 0 5.5px #bc171f;
  transition: transform 0.2s ease;
}
.vd-burbuja img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.vd-burbuja-foto img {
  object-fit: cover;
}
.vd-burbujas a:hover .vd-burbuja {
  transform: translateY(-3px);
}
@media (max-width: 900px) {
  .vd-burbujas {
    justify-content: flex-start;
    gap: 1.4rem;
    padding: 2.4rem 1.6rem 0.4rem;
  }
  .vd-burbujas a {
    width: 8rem;
    font-size: 1.15rem;
  }
  .vd-burbuja {
    width: 7rem;
    height: 7rem;
  }
}

/* ---------- Secciones y títulos ---------- */
.vd-seccion {
  max-width: 140rem;
  margin: 0 auto;
  padding: 6rem 2.4rem 0;
  font-family: "Montserrat", sans-serif;
}
.vd-seccion + .footer {
  margin-top: 8rem;
}
.vd-titulo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.6rem;
  margin-bottom: 2.4rem;
}
.vd-titulo h2 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: left;
  color: #1d1d1d;
}
.vd-titulo h2 span {
  color: #b91616;
}
.vd-titulo a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #b91616;
  white-space: nowrap;
}
.vd-titulo a:hover {
  text-decoration: underline;
}
@media (max-width: 600px) {
  .vd-seccion {
    padding: 4rem 1.2rem 0;
  }
  .vd-titulo h2 {
    font-size: 2.3rem;
  }
}

/* ---------- Destacados: 4 en fila; en pantallas chicas se deslizan ---------- */
.vt-grilla.vd-destacados {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .vt-grilla.vd-destacados {
    grid-template-columns: none !important;
    grid-auto-flow: column;
    grid-auto-columns: 31%;
    gap: 1.4rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 0.6rem;
  }
  .vt-grilla.vd-destacados::-webkit-scrollbar {
    display: none;
  }
  .vd-destacados .vt-card {
    scroll-snap-align: start;
  }
  .vd-destacados .vt-card:hover {
    transform: none;
  }
}
@media (max-width: 600px) {
  .vt-grilla.vd-destacados {
    grid-auto-columns: 46%;
    gap: 1rem;
  }
}

/* ---------- Cómo comprar ---------- */
.vd-beneficios {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.6rem;
}
.vd-beneficio {
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
  padding: 2rem;
  border: 1px solid #efe6e6;
  border-radius: 1.6rem;
  background: #fff;
  color: #6b6262;
  font-size: 1.3rem;
  line-height: 1.45;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.vd-beneficio i {
  flex: none;
  width: 2.8rem;
  font-size: 2.4rem;
  text-align: center;
  color: #bc171f;
}
.vd-beneficio strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1.5rem;
  color: #1d1d1d;
}
a.vd-beneficio:hover {
  border-color: #e3bcbc;
  transform: translateY(-2px);
}
@media (max-width: 1000px) {
  .vd-beneficios {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .vd-beneficios {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
  .vd-beneficio {
    padding: 1.4rem 1.6rem;
  }
}

/* ---------- Mosaico de marcas y categorías ---------- */
.vd-mosaico {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  grid-template-rows: repeat(2, 20rem);
  gap: 1.6rem;
}
.vd-tile-grande {
  grid-row: span 2;
}
.vd-tile-ancho {
  grid-column: span 2;
}
.vd-tile {
  position: relative;
  display: block;
  border-radius: 1.6rem;
  overflow: hidden;
}
.vd-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.vd-tile:hover img {
  transform: scale(1.04);
}
.vd-tile-ver {
  position: absolute;
  left: 1.4rem;
  bottom: 1.4rem;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1d1d1d;
  font-size: 1.2rem;
  font-weight: 700;
}
.vd-categorias {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.6rem;
}
.vd-tile-foto {
  aspect-ratio: 4 / 3;
  background: #eee;
}
.vd-tile-foto img {
  object-fit: cover;
}
.vd-tile-foto::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 55%);
}
.vd-tile-nombre {
  position: absolute;
  left: 1.4rem;
  bottom: 1.2rem;
  z-index: 1;
  color: #fff;
  font-size: 1.7rem;
  font-weight: 800;
}
@media (max-width: 700px) {
  .vd-mosaico {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 18rem 12rem 12rem;
    gap: 1rem;
  }
  .vd-tile-grande,
  .vd-tile-ancho {
    grid-column: span 2;
    grid-row: auto;
  }
  /* En el celular tapa los logos; toda la tarjeta ya es un link */
  .vd-tile-ver {
    display: none;
  }
  .vd-categorias {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
  .vd-tile-nombre {
    font-size: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vt-card,
  .vt-foto img,
  .vd-burbuja,
  .vd-tile img,
  .vd-beneficio {
    transition: none;
  }
}

/* ============================================================
   MODO OSCURO (paleta en tema.css). Las fotos de productos
   siguen sobre un recuadro claro, como en el resto de la tienda.
   ============================================================ */
html[data-tema="oscuro"] .vt-card {
  background: var(--o-superficie);
  border-color: var(--o-linea);
}
html[data-tema="oscuro"] .vt-card:hover {
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.7);
}
html[data-tema="oscuro"] .vt-nombre,
html[data-tema="oscuro"] .vt-precio {
  color: var(--o-texto);
}
html[data-tema="oscuro"] .vt-marca,
html[data-tema="oscuro"] .vt-abrible .vt-nombre:hover {
  color: var(--o-rojo);
}
html[data-tema="oscuro"] .vt-desc {
  color: var(--o-suave);
}
html[data-tema="oscuro"] .vt-mayorista {
  background: var(--o-superficie-2);
  color: var(--o-texto-2);
}
html[data-tema="oscuro"] .vt-stock {
  color: #7be39b;
}
html[data-tema="oscuro"] .vt-stock-poco {
  color: #f5c26b;
}
html[data-tema="oscuro"] .vt-stock-sin {
  color: var(--o-suave);
}
html[data-tema="oscuro"] .vt-btn:disabled {
  background: var(--o-superficie-2);
  color: var(--o-suave);
}
html[data-tema="oscuro"] .vd-titulo h2 {
  color: var(--o-texto);
}
html[data-tema="oscuro"] .vd-titulo h2 span,
html[data-tema="oscuro"] .vd-titulo a {
  color: var(--o-rojo);
}
html[data-tema="oscuro"] .vd-burbujas a {
  color: var(--o-texto-2);
}
html[data-tema="oscuro"] .vd-burbuja {
  box-shadow: 0 0 0 3px var(--o-fondo), 0 0 0 5.5px #bc171f;
}
html[data-tema="oscuro"] .vd-beneficio {
  background: var(--o-superficie);
  border-color: var(--o-linea);
  color: var(--o-suave);
}
html[data-tema="oscuro"] .vd-beneficio strong {
  color: var(--o-texto);
}
html[data-tema="oscuro"] .vd-beneficio i {
  color: var(--o-rojo);
}
html[data-tema="oscuro"] a.vd-beneficio:hover {
  border-color: #6b3a3c;
}

/* ============================================================
   CARRITO "VITRINA" (build/js/carrito.js)
   El panel lateral es el mismo; cambia cómo se ve por dentro.
   ============================================================ */
.carrito-drawer {
  background: #fff;
  font-family: "Montserrat", sans-serif;
}
.carrito-header {
  padding: 2rem 2.2rem 1.4rem;
  border-bottom: 1px solid #f1ebeb;
}
.carrito-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #1d1d1d;
}
.cv-cant {
  font-size: 1.7rem;
  font-weight: 600;
  color: #999;
}
#cerrarCarrito {
  display: grid;
  place-items: center;
  width: 3.8rem;
  height: 3.8rem;
  border-radius: 50%;
  background: #f3efee;
  color: #555;
  font-size: 2.6rem;
  line-height: 1;
}
#cerrarCarrito:hover {
  background: #ebe3e1;
}
.carrito-contenido {
  padding: 0.4rem 2.2rem;
}

/* Cada producto */
.cv-item {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr) auto;
  gap: 1.4rem;
  padding: 1.6rem 0;
  border-top: 1px solid #f1ebeb;
}
.cv-item:first-child {
  border-top: 0;
}
.cv-foto {
  display: grid;
  place-items: center;
  width: 7.2rem;
  height: 7.2rem;
  border-radius: 1.2rem;
  background: #f6f2f1;
}
.cv-foto img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.cv-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.cv-cat {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b91616;
}
.cv-nombre {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
  color: #1d1d1d;
}
.cv-unit {
  font-size: 1.2rem;
  color: #888;
}
.cv-unit-may {
  font-weight: 600;
  color: #00863b;
}
.cv-ctl {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: 0.8rem;
}
.cv-stepper {
  display: inline-flex;
  align-items: center;
  height: 3.2rem;
  border: 1px solid #e3dada;
  border-radius: 999px;
}
.cv-stepper button {
  width: 3.2rem;
  height: 100%;
  border: none;
  background: none;
  color: #444;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.cv-stepper span {
  min-width: 2.2rem;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.cv-quitar {
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 1.2rem;
  color: #999;
  text-decoration: underline;
  cursor: pointer;
}
.cv-quitar:hover {
  color: #b91616;
}
.cv-sub {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #111;
}
.cv-sub small {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #00863b;
}

/* Carrito vacío */
.cv-vacio {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  padding: 6rem 1rem;
  text-align: center;
  font-size: 1.3rem;
  color: #888;
}
.cv-vacio i {
  margin-bottom: 0.6rem;
  font-size: 4rem;
  color: #dcc4c4;
}
.cv-vacio strong {
  font-size: 1.7rem;
  color: #1d1d1d;
}
.cv-vacio-btn {
  margin-top: 1rem;
  padding: 1rem 2rem;
  border-radius: 999px;
  background: #bc171f;
  color: #fff;
  font-weight: 700;
}

/* Pie: totales y botón */
.carrito-footer {
  padding: 1.6rem 2.2rem 2rem;
  border-top: 1px solid #efe8e8;
  background: #fff;
}
.carrito-drawer .carrito-total .linea-total {
  align-items: baseline;
}
.carrito-drawer .carrito-total .linea-total span {
  font-size: 1.4rem;
  font-weight: 600;
  color: #555;
}
.carrito-drawer .carrito-total .linea-total strong {
  font-size: 2.2rem;
  font-weight: 800;
  color: #111;
  font-variant-numeric: tabular-nums;
}
.carrito-drawer .carrito-total .linea-total-mayorista span {
  color: #555;
}
.carrito-drawer .carrito-total .linea-total-mayorista strong {
  font-size: 1.6rem;
  color: #00863b;
  font-variant-numeric: tabular-nums;
}
.btn-iniciar-compra {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  height: 5rem;
  border-radius: 1.2rem;
  background: #00a046;
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 800;
  transition: background 0.2s ease;
}
.btn-iniciar-compra i {
  font-size: 2rem;
}
.btn-iniciar-compra:hover {
  background: #008c3a;
}

/* ---------- Aviso "Agregado al carrito" (idea 1) ---------- */
.aviso-carrito {
  position: fixed;
  left: 50%;
  bottom: calc(2.4rem + env(safe-area-inset-bottom, 0px));
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  width: min(44rem, calc(100% - 3.2rem));
  padding: 1rem 1.2rem;
  border-radius: 1.4rem;
  background: #1d1d1d;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 1.3rem;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translate(-50%, 140%);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.aviso-carrito.visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.aviso-carrito img {
  flex: none;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 0.8rem;
  background: #fff;
  object-fit: contain;
}
.aviso-texto {
  display: grid;
  min-width: 0;
}
.aviso-texto span {
  font-size: 1.15rem;
  color: #bdb3b3;
}
.aviso-texto strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aviso-ver {
  flex: none;
  margin-left: auto;
  padding: 0.8rem 0.4rem;
  border: none;
  background: none;
  color: #7be39b;
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Barra fija del carrito en el celular (idea 2) ---------- */
.barra-carrito {
  display: none;
}
@media (max-width: 760px) {
  body.con-carrito .barra-carrito {
    position: fixed;
    left: 1.2rem;
    right: 1.2rem;
    bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 1rem 1.6rem;
    border: none;
    border-radius: 1.6rem;
    background: #bc171f;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    text-align: left;
    box-shadow: 0 10px 24px -8px rgba(120, 10, 15, 0.55);
    cursor: pointer;
  }
  .barra-carrito strong {
    font-size: 1.6rem;
    font-variant-numeric: tabular-nums;
  }
  .barra-btn {
    flex: none;
    padding: 0.8rem 1.4rem;
    border-radius: 999px;
    background: #fff;
    color: #bc171f;
    font-weight: 800;
  }
  /* Con el carrito abierto no hace falta */
  body.carrito-abierto .barra-carrito {
    display: none;
  }
  /* WhatsApp, subir y el aviso se corren arriba de la barra */
  body.con-carrito .whatsapp-button,
  body.con-carrito #btnSubirArriba {
    bottom: calc(8.6rem + env(safe-area-inset-bottom, 0px));
  }
  body.con-carrito .aviso-carrito {
    bottom: calc(8.6rem + env(safe-area-inset-bottom, 0px));
  }
  /* Que el final de la página no quede tapado */
  body.con-carrito .footer {
    padding-bottom: 9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aviso-carrito {
    transition: none;
  }
}

/* ---------- Carrito en modo oscuro ---------- */
html[data-tema="oscuro"] .carrito-header {
  border-bottom-color: var(--o-linea);
}
html[data-tema="oscuro"] #cerrarCarrito {
  background: var(--o-superficie-2);
}
html[data-tema="oscuro"] .cv-item {
  border-top-color: var(--o-linea);
}
html[data-tema="oscuro"] .cv-nombre,
html[data-tema="oscuro"] .cv-sub,
html[data-tema="oscuro"] .cv-stepper button,
html[data-tema="oscuro"] .cv-stepper span,
html[data-tema="oscuro"] .cv-vacio strong {
  color: var(--o-texto);
}
html[data-tema="oscuro"] .cv-cat {
  color: var(--o-rojo);
}
html[data-tema="oscuro"] .cv-unit,
html[data-tema="oscuro"] .cv-quitar,
html[data-tema="oscuro"] .cv-vacio {
  color: var(--o-suave);
}
html[data-tema="oscuro"] .cv-unit-may,
html[data-tema="oscuro"] .cv-sub small {
  color: #7be39b;
}
html[data-tema="oscuro"] .cv-stepper {
  border-color: var(--o-linea);
}
html[data-tema="oscuro"] .carrito-drawer .carrito-total .linea-total span,
html[data-tema="oscuro"] .carrito-drawer .carrito-total .linea-total-mayorista span {
  color: var(--o-texto-2);
}
html[data-tema="oscuro"] .carrito-drawer .carrito-total .linea-total strong {
  color: var(--o-texto);
}
html[data-tema="oscuro"] .carrito-drawer .carrito-total .linea-total-mayorista strong {
  color: #7be39b;
}
html[data-tema="oscuro"] .aviso-carrito {
  background: #2e2627;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.8);
}
