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

button {
  font-family: inherit;
}

input,
textarea {
  font-family: inherit;
}
:root {
  /* PALETA */

  --color-primario: #023341;
  --color-secundario: #fd5e02;
  --color-secundario-hover: #e55300;
  --color-fondo: #fcf5e3;

  /* BASE */

  --color-blanco: #ffffff;
  --color-texto: #023341;
  --color-texto-sec: #666;

  /* UI */

  --color-card: #ffffff;
  --color-borde: #e7e0cf;

  /* ESTADOS */

  --color-exito: var(--color-secundario);
  --color-error: var(--color-secundario);
}
html,
body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}
* {
  -webkit-tap-highlight-color: transparent;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
/* =====================================================
   HEADER PREMIUM GLOBAL (REUTILIZABLE)
===================================================== */

.header-premium {
  position: relative;
  background: var(--color-primario);
  padding: 28px 20px 40px;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.header-premium h1,
.header-premium h2 {
  margin: 0;
  color: white;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.header-premium .btn-back {
  position: absolute;
  left: 20px;
  top: 28px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(5px);
}
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #fcf5e3;
  padding-bottom: 110px;
}
body.no-scroll {
  overflow: hidden;
  height: 100vh;
}
/* HEADER */

.header {
  background: white;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header {
  transition: 0.3s ease;
}

.header.small {
  padding: 6px 12px;
}

.header.small .logo {
  font-size: 16px;
}
.logo {
  font-size: 22px;
  font-weight: bold;
  color: #fd5e02;
}

.search-box {
  display: flex;
  align-items: center;
  background: #f1f3f6;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 18px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 16px;
  margin-left: 8px;
}

/* CATEGORIAS
.categorias{
    display:flex;
    gap:10px;
    padding:15px;
    overflow-x:auto;
}

.categorias button{
    border:none;
    background:#fff;
    padding:8px 15px;
    border-radius:20px;
    cursor:pointer;
    box-shadow:0 2px 5px rgba(0,0,0,0.08);
}

.categorias button:hover{
    background:#FD5E02;
    color:white;
}
    */
.categorias {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px;
  background: white;
  position: sticky;
  top: 60px; /* debajo del header */
  z-index: 500;
}

.categorias::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 8px 16px;
  border-radius: 20px;
  background: #f1f1f1;
  white-space: nowrap;
  cursor: pointer;
  font-size: 16px;
  transition: 0.25s;
}

.chip.activo {
  background: var(--color-secundario);
  color: white;
  transform: scale(1.05);
}

/* PRODUCTOS GRID */
.productos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 12px;
}

/* Tablet */
@media (min-width: 768px) {
  .productos {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop */
@media (min-width: 1200px) {
  .productos {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* CARD */
.card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  animation: aparecerProducto 0.25s ease;
  position: relative;
}

@keyframes aparecerProducto {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 10px;
}

.precio {
  font-weight: bold;
  color: #444;
}

.agregar {
  margin-top: 8px;
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: var(--color-primario);
  color: white;
  font-weight: bold;
}
.agregar:hover {
  transform: scale(1.04);
}

/* CARRITO FLOTANTE */
.carrito-flotante {
  position: fixed;
  bottom: 95px;
  right: 18px;

  background: #fd5e02;
  color: white;

  padding: 12px 18px;
  border-radius: 30px;

  display: flex;
  align-items: center;
  gap: 6px;

  font-size: 16px;
  font-weight: 600;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  z-index: 2000;

  cursor: pointer;
  transition: 0.2s ease;
}

.carrito-flotante:hover {
  transform: scale(1.05);
}
.agregar:active {
  transform: scale(0.95);
}
/* PANEL CARRITO 
.overlay{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.4);
    opacity:0;
    visibility:hidden;
    transition:0.3s;
}

.overlay.activo{
    opacity:1;
    visibility:visible;
}

.carrito-panel{
    position:fixed;
    top:0;
    right:-400px;
    width:350px;
    height:100%;
    box-shadow:-4px 0 20px rgba(0,0,0,0.2);
    transition:0.3s;
    display:flex;
    flex-direction:column;
    z-index:1001;
    background:#f8f9fb;
}

.carrito-panel.activo{
    right:0;
}
    */
/****Carrito Lateral Mas Suave***/
.carrito-vacio {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 30px;
  color: #666;
}

.carrito-vacio-icono {
  font-size: 70px;
  margin-bottom: 15px;
}

.carrito-vacio h3 {
  margin-bottom: 6px;
  font-size: 20px;
}

.carrito-vacio p {
  font-size: 14px;
  margin-bottom: 20px;
}

.btn-seguir-comprando {
  padding: 12px 22px;
  border: none;
  border-radius: 20px;
  background: var(--color-primario);
  color: white;
  font-weight: 600;
  cursor: pointer;
}
#carritoPanel {
  position: fixed;
  top: 0;
  right: 0;

  width: 100%;
  max-width: 420px;

  height: 100dvh;
  background: white;

  display: flex;
  flex-direction: column;

  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: 1000;
}

#carritoPanel.activo {
  transform: translateX(0);
}
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#overlay.activo {
  opacity: 1;
  pointer-events: auto;
}

.carrito-items {
  flex: 1;
  overflow: auto;
  padding: 25px 15px 15px;
  display: flex;
  flex-direction: column;
}
#carritoCantidad {
  font-weight: 500;
  opacity: 0.8;
  font-size: 16px;
}
.carrito-header-pro {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.carrito-header-pro h1 {
  font-size: 18px;
  font-weight: 600;
}

.carrito-header-pro .btn-back {
  position: absolute;
  left: 15px;
}
.item-carrito {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px;
  margin: 10px 0;

  background: white;
  border-radius: 14px;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

@keyframes fadeItem {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.btn-eliminar {
  width: 32px;
  height: 32px;

  border-radius: 10px;
  border: none;

  background: #f1f1f1;
  color: #888;
}
.btn-eliminar:hover {
  background: #ffebee;
  color: var(--color-secundario);
}
.miniatura {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.info {
  flex: 1;
}

.btn-pagar {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--color-primario);
  color: white;
  font-weight: bold;
  font-size: 16px;
}

/* ANIMACIÓN */
@keyframes saltar {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.animar {
  animation: saltar 0.4s ease;
}
.bottom-app {
  position: fixed;
  bottom: 0;
  left: 0;

  width: 100%;
  height: 80px;

  background: #fff;

  display: flex;
  justify-content: space-around;
  align-items: center;

  border-top-left-radius: 25px;
  border-top-right-radius: 25px;

  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);

  z-index: 999;
}

/* items */

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;

  font-size: 13px;
  color: #777;

  gap: 4px;

  cursor: pointer;
}

.nav-item span {
  font-size: 11px;
}

.nav-item.activo {
  color: #fd5e02;
}

/* BOTON CENTRAL */

.fab-cart {
  position: absolute;
  top: -28px;

  width: 65px;
  height: 65px;

  background: #fd5e02;
  color: white;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 24px;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);

  cursor: pointer;
}

/* contador */

.fab-cart span {
  position: absolute;
  top: -6px;
  right: -6px;

  background: white;
  color: #fd5e02;

  font-size: 12px;
  font-weight: bold;

  width: 22px;
  height: 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #fd5e02;
  color: white;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 6px;
}

.fly-img {
  position: fixed;
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  z-index: 2000;
  pointer-events: none;
  transition: all 0.7s ease;
}
.controles {
  display: flex;
  align-items: center;
  gap: 6px;
}

.controles span {
  min-width: 18px;
  text-align: center;
  font-weight: 600;
}

.controles button {
  width: 30px;
  height: 30px;

  border: none;
  border-radius: 8px;

  background: var(--color-primario);
  color: white;

  font-size: 18px;
  font-weight: bold;

  cursor: pointer;
}
/******SLIDER**********/
/* SLIDER */
.slider {
  width: 100%;
  height: 130px; /* más bajo */
  overflow: hidden;
  border-radius: 0px;
  margin: 0px 0;
  position: relative;
}

.slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/***/
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-primario);
  padding: 15px;
  color: white;
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar h1 {
  font-size: 18px;
  margin: 0;
}

.search-box {
  margin-top: 12px;
  background: white;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
}

.search-box input {
  border: none;
  outline: none;
  width: 100%;
  margin-left: 8px;
  font-size: 16px;
}
.banner {
  margin: 15px;
  background: var(--color-primario);
  border-radius: 16px;
  padding: 15px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.banner img {
  width: 130px;
  border-radius: 12px;
}

.banner-text h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

/***NUEVOS ESTILO***/
.btn-agregar {
  width: 100%;
  background: var(--color-secundario);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.control-cantidad {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.control-cantidad button {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--color-secundario);
  color: white;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
}

.control-cantidad span {
  font-weight: bold;
  min-width: 20px;
  text-align: center;
}
/***Animación suave en el botón Agregar*/
.btn-agregar,
.control-cantidad {
  animation: aparecer 0.25s ease;
}

@keyframes aparecer {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
/****Animación del contador del carrito*/
.latido {
  animation: latido 0.25s ease;
}

/**SKELETON CARGA*/
.skeleton {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
  background-size: 400% 100%;
  animation: skeleton 1.2s ease infinite;
  border-radius: 10px;
}

@keyframes skeleton {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.card-skeleton {
  height: 180px;
  margin-bottom: 12px;
}
/**toast producto*/
#toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #333;
  color: white;
  padding: 12px 20px;
  border-radius: 30px;
  opacity: 0;
  transition: 0.3s ease;
  z-index: 2000;

  pointer-events: none; /* 🔥 SOLUCIÓN */
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.lazy-img {
  opacity: 0;
  transform: scale(1.05);
  transition: all 0.4s ease;
}

.lazy-img.loaded {
  opacity: 1;
  transform: scale(1);
}

.card-skeleton {
  height: 220px;
  border-radius: 16px;
}

.skeleton {
  background: linear-gradient(90deg, #eee 25%, #ddd 37%, #eee 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}
/***ORDENAR PRODUCTOS***/
.filtros-contenedor {
  width: 100%;
  padding: 12px 15px;
}

/* CHIPS */
.categorias {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.chip {
  padding: 8px 14px;
  border-radius: 20px;
  background: #eee;
  font-size: 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s;
}

.chip.activo {
  background: #ff5722;
  color: #fff;
}

/* SELECT MODERNO */
.barra-filtros {
  display: flex;
  gap: 12px;
  padding: 10px 15px;
  margin-bottom: 15px;
}

.filtro {
  position: relative;
  flex: 1;
}

.filtro select {
  width: 100%;
  padding: 10px 35px 10px 15px;
  border-radius: 25px;
  border: none;
  background: #f5f5f5;
  font-size: 16px;
  font-weight: 500;
  color: #444;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
  appearance: none;
  cursor: pointer;
  transition: 0.2s;
}

.filtro select:focus {
  outline: none;
  background: white;
  box-shadow: 0 0 0 2px rgba(255, 90, 60, 0.2);
}

.filtro::after {
  content: "▾";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #888;
  pointer-events: none;
}

/**favoritos*/
.card-img-container {
  position: relative;
}

.btn-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.btn-fav.activo {
  background: var(--color-secundario);
  color: white;
}

.btn-fav:hover {
  transform: scale(1.1);
}

.sin-resultados {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  min-height: 100%; /* 🔥 ESTA LÍNEA ES LA CLAVE */
}

.sin-resultados h2 {
  font-size: 24px;
  font-weight: 600;
}

.sin-resultados p {
  margin-top: 8px;
  color: #999;
}

.icono-vacio {
  font-size: 70px;
  margin-bottom: 15px;
  animation: latido 1.6s infinite;
}
@keyframes latido {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}
#listaProductos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  padding: 16px;
}
#listaProductos:has(.sin-resultados) {
  display: flex;
  justify-content: center;
  align-items: center;
}
/* FOOTER CARRITO */
.carrito-footer {
  position: sticky;
  bottom: 0;

  background: white;

  padding: 16px;

  border-top: 1px solid #eee;

  display: flex;
  flex-direction: column;
  gap: 10px; /* 🔥 mejor separación */

  z-index: 5;
}

/* TOTAL GRANDE */
.total-box {
  font-size: 24px;
  font-weight: 700;

  color: var(--color-secundario);

  text-align: center;

  margin-bottom: 15px;
}

/* BOTÓN VACIAR */
.btn-vaciar {
  width: 100%;
  padding: 14px;
  margin-bottom: 10px;

  border: none;
  border-radius: 12px;

  background: #f2f2f2;

  font-weight: 600;
  font-size: 15px;

  cursor: pointer;

  display: block; /* 🔥 importante */
  position: relative; /* 🔥 evita problemas de capa */
  z-index: 2;
}

.btn-vaciar:hover {
  background: #e0e0e0;
}

/* BOTÓN CHECKOUT */
.btn-checkout {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: var(--color-secundario);
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.btn-checkout:hover {
  background: var(--color-secundario);
}
.btn-vaciar,
.btn-checkout {
  width: 100%;
  display: block;
}

/***CHECKOUT*/
/* ============================= */
/* CHECKOUT ESTILO RAPPI */
/* ============================= */

.checkout {
  position: fixed;
  top: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(to bottom, #ffffff, #f8f8f8);
  z-index: 9999;
  right: -100%;
  left: auto;
  transition: right 0.4s ease;
  display: flex;
  flex-direction: column;
}

.checkout.activo {
  right: 0;
}

/* ================= HEADER RAPPI ================= */

.checkout-body {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}
.bloque {
  background: white;
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.bloque h3 {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
}

.tipo-entrega {
  display: flex;
  gap: 10px;
}

.tipo-btn {
  flex: 1;
  padding: 16px;
  border: none;
  border-radius: 40px;
  background: #f2f2f2;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}

.tipo-btn.activo {
  background: var(--color-primario);
  color: #fff;
  box-shadow: 0 6px 15px rgba(255, 0, 79, 0.35);
}
.metodos-pago {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ================= MÉTODO PAGO ANIMADO ================= */

.metodo {
  padding: 16px;
  border-radius: 16px;
  background: #f5f5f5;
  cursor: pointer;
  transition: 0.25s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  transform: scale(1);
}

.metodo:hover {
  transform: scale(1.02);
}

.metodo.activo {
  background: #ffffff;
  border: 2px solid var(--color-secundario);
  box-shadow: 0 8px 20px rgba(255, 0, 79, 0.2);
  animation: popMetodo 0.25s ease;
}

@keyframes popMetodo {
  0% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

.checkout-footer {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 20px;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.08);
  border-top-left-radius: 25px;
  border-top-right-radius: 25px;
}

.total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.btn-confirmar {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 18px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  background: var(--color-secundario);
  box-shadow: 0 10px 25px rgba(255, 60, 50, 0.4);
  cursor: pointer;
  transition: 0.2s;
}

.btn-confirmar:active {
  transform: scale(0.96);
}

@keyframes bounceBtn {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(0.9);
  }
  70% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.btn-confirmar:hover {
  transform: translateY(-2px);
}

.checkout input {
  width: 100%;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 16px;
  outline: none;
  transition: 0.3s;
}

.checkout input:focus {
  border-color: var(--color-secundario);
}

.pantalla-exito {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}

.pantalla-exito.activo {
  opacity: 1;
  pointer-events: auto;
}

.exito-card {
  text-align: center;
  padding: 40px;
  max-width: 350px;
}

.check-animado {
  width: 120px;
  height: 120px;
  margin: auto;
  position: relative;
}

.check-circulo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #27c46b;
  animation: pop 0.4s ease;
}

.check-paloma {
  position: absolute;
  top: 35px;
  left: 40px;
  width: 30px;
  height: 60px;
  border-right: 6px solid white;
  border-bottom: 6px solid white;
  transform: rotate(45deg);
  animation: check 0.5s ease 0.3s forwards;
  opacity: 0;
}

@keyframes pop {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes check {
  0% {
    opacity: 0;
    transform: rotate(45deg) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }
}

.exito-texto {
  margin-top: 10px;
  color: #666;
}

.exito-info {
  margin-top: 20px;
  font-size: 14px;
  color: #444;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-ver-pedidos {
  margin-top: 25px;
  background: #ff6a00;
  border: none;
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
}
.contador-redireccion {
  margin-top: 14px;
  font-size: 13px;
  color: #666;
  text-align: center;
}

#contadorRedireccion {
  font-weight: 700;
  color: var(--color-secundario);
  font-size: 16px;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popImg {
  0% {
    transform: scale(0.6);
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.oculto {
  display: none !important;
}
/***CATEGORIAS ESTILO RAPPI*/
.categorias-grandes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.categorias-pequenas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 12px;
}

.categoria {
  border-radius: 25px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  cursor: pointer;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;

  background: #f2f2f2;
  transition: all 0.25s ease;
}

.categoria img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
}
/* categoria activa */
.categoria.activa {
  background: var(--color-primario);
  color: white;
  transform: scale(1.03);
  box-shadow: 0 12px 25px rgba(2, 51, 65, 0.25);
}

/* icono activo */
.categoria.activa img {
  filter: brightness(1) invert(0);
}

/* hover */
.categoria:hover {
  transform: translateY(-3px);
}

/* icono activo */

.grande span {
  font-size: 16px;
  font-weight: 600;
}

.pequena {
  background: #f4f4f4;
  padding: 15px 10px;
}

.pequena span {
  font-size: 13px;
}

.beige {
  background: #f3e8e2;
}
.verde {
  background: #dff2e3;
}

.categoria:active {
  transform: scale(0.95);
}
.categoria.pequena.activa {
  background: rgb(248, 130, 94);
  border: 2px solid var(--color-secundario);
}
.control button {
  background: #ff7d56;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
}
/* ================================
   SPLASH SCREEN
================================ */

#splash {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #ffffff, var(--color-secundario));
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

#splash.ocultar {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  text-align: center;
  color: white;
  animation: fadeSplash 1s ease;
}

.splash-logo {
  width: 250px;
  margin-bottom: 20px;
  animation: logoAnim 1.2s ease;
}

@keyframes logoAnim {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeSplash {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/******CHECKOUT .CSS*/
.bloque {
  background: white;
  padding: 15px;
  border-radius: 14px;
  margin-bottom: 15px;
}

.tipo-entrega {
  display: flex;
  gap: 10px;
}

.tipo-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #eee;
  cursor: pointer;
  font-weight: bold;
}

.metodos-pago {
  display: flex;
  gap: 10px;
}

.metodo {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  background: #eee;
  text-align: center;
  cursor: pointer;
}

.metodo.activo {
  background: var(--color-secundario);
  color: white;
}

.checkout-footer {
  background: white;
  padding: 20px;
  border-top: 1px solid #eee;
}

.btn-confirmar {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  background: var(--color-secundario);
  color: white;
  font-size: 16px;
  font-weight: bold;
}

.modal-exito {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}

.exito-card {
  background: white;
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  animation: pop 0.4s ease;
}
/* ================= ENVÍO GRATIS ================= */

.envio-gratis {
  margin-top: 8px;
  font-size: 16px;
  color: #00a86b;
  font-weight: 600;
  animation: fadeInGratis 0.4s ease;
}
.envio-gratis-box {
  margin-top: 15px;
}

.envio-barra {
  width: 100%;
  height: 8px;
  background: #eee;
  border-radius: 20px;
  overflow: hidden;
}

.envio-progreso {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff3b3b, #ff7a7a);
  transition: width 0.5s ease;
}

.envio-mensaje {
  font-size: 16px;
  margin-top: 8px;
  font-weight: 600;
  color: #ff3b3b;
}

.envio-mensaje.exito {
  color: #16a34a;
}

@keyframes fadeInGratis {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.propinas {
  display: flex;
  gap: 10px;
}

.propinas button {
  flex: 1;
  border: none;
  padding: 10px;
  border-radius: 12px;
  background: #f3f3f3;
  cursor: pointer;
  transition: 0.2s;
}

.propinas button.activo {
  background: var(--color-secundario);
  color: white;
}
.barra-envio {
  width: 100%;
  height: 8px;
  background: #eee;
  border-radius: 20px;
  margin-top: 8px;
  overflow: hidden;
}

#barraProgresoEnvio {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff2d55, #ff8a00);
  transition: 0.4s ease;
}
.desglose-body {
  background: white;
  border-radius: 20px;
  padding: 18px;
  margin-top: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.desglose-body .linea {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 16px;
}
.resumen-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.resumen-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resumen-nombre {
  font-weight: 600;
  font-size: 16px;
}

.resumen-detalle {
  font-size: 16px;
  color: #777;
}

.resumen-precio {
  font-weight: 700;
  font-size: 16px;
}

.resumen-total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid #eee;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
}
/* CONTENEDOR CUPÓN */
.bloque input#inputCupon {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 16px;
  transition: 0.2s;
  margin-bottom: 10px;
}

.bloque input#inputCupon:focus {
  border-color: #ff3b3b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 59, 59, 0.15);
}

/* BOTÓN CUPÓN */
.bloque button {
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  background: var(--color-secundario);
  color: white;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
}

.bloque button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 59, 59, 0.3);
}

.bloque button:active {
  transform: scale(0.98);
}
#notasPedido {
  width: 100%;
  min-height: 90px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 16px;
  resize: none;
  transition: 0.2s;
}

#notasPedido:focus {
  border-color: #ff3b3b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 59, 59, 0.15);
}
.desglose-body .linea {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
}

.desglose-body .linea span:last-child {
  font-size: 18px;
  font-weight: 700;
}

.desglose-body {
  background: white;
  padding: 18px;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}
/* ===== PANEL CUENTA APP STYLE ===== */
/* PANEL CUENTA ESTILO APP */
.panel-cuenta {
  position: fixed;
  top: 0;

  width: 100%;
  max-width: 420px;
  background: #f8f8f8;
  z-index: 9999;
  right: -100%;
  height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transition: right 0.3s ease;

  display: flex; /* 🔥 */
  flex-direction: column; /* 🔥 */
}
.panel-cuenta.activo {
  right: 0;
}

/* Overlay oscuro */
.overlay-cuenta {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: none;
}

.overlay-cuenta.activo {
  display: block;
}

/* ===== HEADER PRO ===== */
.cuenta-header-pro {
  background: var(--color-primario);
  height: 170px; /* 🔥 altura fija */
  padding: 20px;
  border-bottom-left-radius: 35px;
  border-bottom-right-radius: 35px;
  text-align: center;
  color: white;
  position: sticky;
  top: 0;
  z-index: 5;
  overflow: hidden; /* 🔥 clave */
}

.cuenta-header-pro .btn-back {
  position: absolute;
  left: 20px;
  top: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 12px;
  padding: 8px 12px;
  color: white;
  font-size: 18px;
}
.cuenta-header-pro h2,
.cuenta-header-pro p {
  transition: all 0.3s ease;
}

/* 🔥 Estado compacto */

/* 🔥 Estado compacto sin cambiar altura */
.cuenta-header-pro.compacto .cuenta-avatar {
  transform: scale(0.6) translateY(-10px);
}

.cuenta-header-pro.compacto h2 {
  transform: translateY(-15px) scale(0.85);
}

.cuenta-header-pro.compacto p {
  opacity: 0;
  transform: translateY(-10px);
}
.cuenta-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #fd5e02;
  color: white;
  font-size: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}
.cuenta-avatar,
.cuenta-header-pro h2,
.cuenta-header-pro p {
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}
/* ===== BODY ===== */
.cuenta-body-pro {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  overscroll-behavior: contain;
}

/* ===== CARD ===== */
.cuenta-card-pro {
  background: white;
  border-radius: 22px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
}

.cuenta-card-pro h3 {
  margin-bottom: 15px;
  font-size: 16px;
}

/* ===== INPUTS ===== */
.cuenta-card-pro input {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #eee;
  margin-bottom: 12px;
  font-size: 14px;
}

/* ===== BOTÓN PRINCIPAL ===== */
.btn-principal-pro {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: none;
  background: var(--color-secundario);
  color: white;
  font-weight: 600;
}

/* ===== MENU ===== */
.menu-pro {
  padding: 0;
}

.menu-item-pro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid #f1f1f1;
  cursor: pointer;
}

.menu-item-pro:last-child {
  border-bottom: none;
}

.menu-item-pro:hover {
  background: #fafafa;
}

/* ===== BOTÓN CERRAR ===== */
.btn-cerrar-pro {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  border: none;
  background: var(--color-secundario);
  color: white;
  font-weight: 600;
}
/******MODAL DIRECCION****/
.modal-direccion {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background: white;

  border-radius: 25px 25px 0 0;

  overflow: hidden; /* 🔥 ESTA ES LA CLAVE */

  z-index: 10000;
  bottom: -100%;
  transition: bottom 0.35s ease;

  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
  padding-top: env(safe-area-inset-top);
}

.modal-direccion.activo {
  bottom: 0;
}

.modal-card {
  background: white;
  padding: 25px;
  border-radius: 20px;
  width: 90%;
  max-width: 400px;
  animation: fadeUp 0.3s ease;
}

@keyframes fadeUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  font-weight: bold;
}

.mapa-box {
  height: 220px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 12px;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-body input {
  width: 100%;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
}

.btn-ubicacion {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: #fff3e0;
  margin-bottom: 15px;
  font-weight: bold;
}

.btn-guardar-dir {
  width: 100%;
  padding: 14px;
  background: var(--color-secundario);
  color: white;
  border: none;
  border-radius: 15px;
  font-weight: bold;
  font-size: 16px;
}
/* Campo buscar dirección */
/* Evita que el autocomplete rompa el layout */
.pac-container {
  position: fixed !important;
  z-index: 999999 !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25) !important;
  font-family: "Segoe UI", sans-serif;
  width: auto !important;
}
.pac-container:after {
  display: none !important;
}
/* Buscador estilo Rappi */
.input-buscar-mapa {
  width: 100%;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid #eee;
  background: #fff;
  font-size: 16px;
  margin: 10px 0;
  outline: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: 0.2s ease;
  position: sticky;
  top: 0;
  z-index: 2;
  background: white;
}

.input-buscar-mapa:focus {
  border-color: var(--color-secundario);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.direccion-card {
  background: #fff;
  border-radius: 16px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.direccion-card.predeterminada {
  border: 2px solid var(--color-secundario);
}
.direccion-card-checkout {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 14px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.dir-icon {
  font-size: 20px;
  color: var(--color-secundario);
}

.dir-info {
  flex: 1;
}

.dir-alias {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 3px;
}

.dir-text {
  font-size: 13px;
  color: #666;
  line-height: 1.3;
}

.btn-cambiar-dir {
  background: var(--color-secundario);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}
.dir-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.dir-tiempo {
  font-size: 12px;
  color: #777;
  margin-top: 4px;
}
.badge-star {
  background: #fff3e0;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 16px;
}

.mini-mapa {
  height: 120px;
  border-radius: 16px;
  margin: 10px 0;
}

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

.dir-actions button {
  flex: 1;
  border: none;
  padding: 8px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
}

.dir-actions button:nth-child(1) {
  background: var(--color-secundario);
  color: white;
}

.dir-actions button:nth-child(2) {
  background: #eee;
}

.dir-actions button:nth-child(3) {
  background: #ffebee;
  color: var(--color-secundario);
}

/****DISEÑO VISTA DIRECIONES**/
.direcciones-vista {
  position: fixed;
  inset: 0;
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(to bottom, #ffffff, #f8f8f8);
  z-index: 9999;
  right: -100%;
  left: auto;
  transition: right 0.4s ease;
  transition: 0.4s ease;
  display: flex;
  flex-direction: column;
}

.direcciones-vista.activo {
  right: 0;
}
.direcciones-vacio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.icono-direccion {
  font-size: 70px;
  margin-bottom: 15px;
}

.direcciones-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.btn-agregar-dir {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 15px;
  background: var(--color-secundario);
  color: white;
  font-weight: bold;
  margin-top: 20px;
}
/* ================= PEDIDOS ================= */

.pedidos-vista {
  position: fixed;
  inset: 0;
  background: #fcf5e3;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* 🔥 */
}

.pedidos-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f7f8fa;
}

.pedidos-tabs {
  display: flex;
  gap: 10px;
  padding: 15px 20px;
  background: white;
}

.tab-pedido {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  border: none;
  background: #eee;
  font-weight: 600;
  cursor: pointer;
}

.tab-pedido.activo {
  background: var(--color-secundario);
  color: white;
}

/* CARD PEDIDO */

/* CARD */
.pedido-card-pro {
  background: white;
  border-radius: 26px;
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 170px; /* 🔥 más alto */
}

.pedido-card-pro:hover {
  transform: translateY(-3px);
}

/* IZQUIERDA */
.pedido-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pedido-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.pedido-info-top {
  flex: 1;
  min-width: 0; /* 🔥 clave */
}

.pedido-info-top h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.pedido-codigo {
  display: inline-block;
  background: #f4f4f4;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: #555;
}
.pedido-fecha {
  font-size: 14px;
  color: #777;
  margin-top: 6px;
}

.pedido-total {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
}

/* BOTONES */
.pedido-botones {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}
.pedido-botones button {
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
}

.btn-track {
  background: var(--color-secundario);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 80, 0, 0.25);
  transition: all 0.25s ease;
}

.btn-track:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(255, 80, 0, 0.35);
}

.btn-track:active {
  transform: scale(0.95);
}

.btn-detalle {
  background: transparent;
  border: 1.5px solid var(--color-secundario);
  color: var(--color-secundario);
  padding: 9px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-detalle:hover {
  background: #fff3e0;
}

/* IMAGEN */
.pedido-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pedido-img-pro {
  width: 95px;
  height: auto;
  object-fit: contain;
  transition: 0.3s ease;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.pedido-card-pro:hover .pedido-img-pro {
  transform: scale(1.05);
}

.tracking-vista {
  position: fixed;
  inset: 0;
  height: 100dvh;
  overflow: hidden;
  background: #fff;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s ease;
}

.tracking-vista.activo {
  transform: translateX(0);
}

.tracking-body {
  flex: 1; /* 🔥 ocupa el espacio disponible */
  overflow-y: auto; /* 🔥 activa scroll */
  -webkit-overflow-scrolling: touch;
  padding: 30px;
}
.tracking-body::-webkit-scrollbar {
  width: 6px;
}

.tracking-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

.tracking-line {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detalle-pedido {
  position: fixed;
  inset: 0;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fcf5e3;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.detalle-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.detalle-pedido.activo {
  transform: translateX(0);
}
.detalle-card {
  background: white;
  margin: 25px;
  padding: 28px;
  border-radius: 26px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.detalle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detalle-fecha {
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}

.badge-estado {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 600;
}

.badge-estado .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* 🔴 PENDIENTE */
.badge-estado.pendiente {
  background: #ffe4e4;
  color: #d32f2f;
}
.badge-estado.pendiente .dot {
  background: #d32f2f;
}

/* 🟣 PREPARANDO */
.badge-estado.preparando {
  background: #f3e5f5;
  color: #8e24aa;
}
.badge-estado.preparando .dot {
  background: #8e24aa;
}

/* 🟡 EN CAMINO */
.badge-estado.en_camino {
  background: #fff4e0;
  color: #fb8c00;
}
.badge-estado.en_camino .dot {
  background: #fb8c00;
}

/* 🟢 ENTREGADO */
.badge-estado.entregado {
  background: #e8f5e9;
  color: #2e7d32;
}
.badge-estado.entregado .dot {
  background: #2e7d32;
}

/* ⚫ CANCELADO */
.badge-estado.cancelado {
  background: #eeeeee;
  color: #616161;
}
.badge-estado.cancelado .dot {
  background: #616161;
}
.badge-estado {
  transition: all 0.25s ease;
}
.detalle-divider {
  height: 1px;
  background: #eee;
  margin: 18px 0;
}

.detalle-meta {
  margin-top: 12px;
  font-size: 13px;
  color: #555;
}

.meta-item {
  background: #f7f7f7;
  padding: 8px 12px;
  border-radius: 10px;
  display: inline-block;
}

.detalle-productos {
  margin: 15px 0;
}

.detalle-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px dashed #e0e0e0;
}

.detalle-item:last-child {
  border-bottom: none;
}

.detalle-left {
  display: flex;
  flex-direction: column;
}

.detalle-nombre {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.detalle-unitario {
  font-size: 13px;
  color: #777;
}

.detalle-total-item {
  font-weight: 600;
  font-size: 15px;
}

.detalle-resumen {
  margin-top: 10px;
  padding-top: 10px;
}

.detalle-resumen div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}

.descuento {
  color: #2e7d32;
  font-weight: 600;
}

.detalle-total {
  font-size: 18px;
  font-weight: 700;
  border-top: 1px solid #eee;
  padding-top: 12px;
  margin-top: 10px;
}
.detalle-info strong {
  font-size: 15px;
}

.detalle-precio {
  font-size: 15px;
  font-weight: 600;
}

.btn-repetir {
  width: 100%;
  margin-top: 25px;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: var(--color-secundario);
  color: white;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: 0.25s ease;
  box-shadow: 0 6px 18px rgba(255, 60, 80, 0.35);
}

.btn-repetir:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 60, 80, 0.45);
}
.tracking-map {
  width: 100%;
  height: 320px;
  border-radius: 28px;
  margin-bottom: 25px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.tracking-card {
  background: white;
  padding: 24px;
  border-radius: 30px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.tracking-progress {
  background: white;
  padding: 20px;
  border-radius: 25px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.tracking-progress h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 5px;
}

.tracking-progress p {
  font-size: 14px;
  color: #777;
  margin-bottom: 18px;
}
.tracking-header-estado {
  background: white;
  padding: 22px;
  border-radius: 25px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  margin-bottom: 15px;
}

.tracking-header-estado h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}

.tracking-header-estado p {
  font-size: 14px;
  color: #777;
}
.tracking-header-estado.pickup-listo {
  background: #eafaf1;
  border: 1px solid var(--color-secundario);
}
.distancia {
  font-size: 14px;
  margin-bottom: 6px;
  color: #444;
}

.estado-extra {
  font-size: 13px;
  color: #777;
}
.progress-line {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  background: #eee;
  transform: translateY(-50%);
  border-radius: 4px;
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 4px;
  width: 0%;
  background: var(--color-secundario);
  transform: translateY(-50%);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.progress-step {
  width: 42px;
  height: 42px;
  background: #f3f3f3;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.progress-step.activo {
  background: var(--color-secundario);
  color: white;
  box-shadow: 0 8px 20px rgba(255, 60, 80, 0.35);
  transform: scale(1.1);
}
#estadoTexto {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
}
.info-ruta {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}
.toast-estado {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-secundario);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: bold;
  z-index: 9999;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.estado-listo {
  border: 2px solid var(--color-secundario);
  background: #eafaf1;
}
.btn-llegue {
  margin-top: 15px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--color-secundario);
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.btn-llegue:hover {
  opacity: 0.9;
}

.qr-container {
  margin-top: 15px;
  display: flex;
  justify-content: center;
}
/* 🔥 PICKUP LISTO PRO */
.estado-pickup-listo {
  border: 2px solid var(--color-secundario);
  background: linear-gradient(135deg, #eafaf1, #d4f5e3);
  box-shadow: 0 15px 40px rgba(39, 174, 96, 0.25);
  animation: glowPickup 2s infinite ease-in-out;
}

@keyframes glowPickup {
  0% {
    box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4);
  }
  50% {
    box-shadow: 0 0 25px 5px rgba(39, 174, 96, 0.35);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4);
  }
}
/* Botón más pro cuando esté listo */
.estado-pickup-listo .btn-llegue {
  background: linear-gradient(135deg, var(--color-secundario), #2ecc71);
  box-shadow: 0 10px 25px rgba(39, 174, 96, 0.35);
  animation: pulseBtn 1.5s infinite;
}

@keyframes pulseBtn {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
.tracking-header-estado.pickup-listo {
  background: #eafaf1;
  border: 1px solid var(--color-secundario);
}
.check-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 120px;
  color: var(--color-secundario);
  z-index: 99999;
  animation: fadeIn 0.3s ease;
}
.repartidor-cerca {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-secundario);
  color: white;
  padding: 14px 25px;
  border-radius: 30px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  animation: pulseNear 1.2s infinite;
}

@keyframes pulseNear {
  0% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.05);
  }
  100% {
    transform: translateX(-50%) scale(1);
  }
}
.pedido-entrega {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: #fff3e0;
  color: #ff6b3d;
}
.pedido-entrega.delivery {
  background: #e3f2fd;
  color: #1976d2;
}

.pedido-entrega.pickup {
  background: #e8f5e9;
  color: #2e7d32;
}
.detalle-card-rappi {
  background: white;
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  animation: slideUpDetalle 0.4s ease;
  transform-origin: bottom;
}
@keyframes slideUpDetalle {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
#detallePedidoVista.activo {
  backdrop-filter: blur(6px);
}
.detalle-seccion {
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.detalle-item-row {
  margin-bottom: 6px;
  font-size: 14px;
}

.pago-status {
  font-weight: 600;
}

.detalle-producto {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.prod-nombre {
  font-weight: 600;
}

.prod-detalle {
  font-size: 13px;
  color: #777;
}

.resumen-rappi .resumen-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.resumen-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  margin-top: 10px;
}

.detalle-acciones {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-secundario {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
}

.btn-ayuda {
  padding: 12px;
  border-radius: 14px;
  border: none;
  background: var(--color-primario);
  color: white;
  font-weight: 600;
}
.detalle-producto-img {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.prod-img-mini {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.prod-info {
  flex: 1;
}
.badge-pago {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}

.badge-pago.pagado {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-pago.pendiente {
  background: #fff3e0;
  color: #ff6b3d;
}
.btn-ayuda,
.btn-secundario {
  transition: 0.2s ease;
}

.btn-ayuda:active,
.btn-secundario:active {
  transform: scale(0.96);
}
.timeline-direcciones {
  margin-top: 15px;
  position: relative;
  padding-left: 20px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  position: relative;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 4px;
}

.timeline-dot.actual {
  background: #2196f3;
}

.timeline-dot.tienda {
  background: #ff6b3d;
}

.timeline-dot.cliente {
  background: #4caf50;
}

.timeline-line {
  position: absolute;
  left: 5px;
  top: 18px;
  width: 2px;
  height: 40px;
  background: #ddd;
}

.timeline-text {
  font-size: 14px;
  color: #444;
  line-height: 1.4;
}
/* ===== MODAL CARRITO VACÍO ===== */

.modal-vacio {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: 0.3s ease;
}

.modal-vacio.activo {
  opacity: 1;
}

.modal-vacio-card {
  background: white;
  width: 85%;
  max-width: 350px;
  border-radius: 24px;
  padding: 30px 25px;
  text-align: center;
  transform: translateY(30px);
  transition: 0.3s ease;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.modal-vacio.activo .modal-vacio-card {
  transform: translateY(0);
}

.modal-icono {
  font-size: 50px;
  margin-bottom: 15px;
}

.modal-vacio-card h3 {
  margin-bottom: 8px;
}

.modal-vacio-card p {
  font-size: 14px;
  color: #777;
  margin-bottom: 20px;
}

.btn-vacio {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: none;
  background: var(--color-primario);
  color: white;
  font-weight: 600;
  font-size: 15px;
}
/*ICONOS*/
.icono-buscar {
  color: #fd5e02;
  width: 20px;
  height: 20px;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
.entrega-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 0;
}

.entrega-contenido {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* =============================
   CONFETTI ANIMATION
============================= */

#confetti-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti {
  position: absolute;
  width: 8px;
  height: 14px;
  opacity: 0.9;
  animation: caerConfetti linear forwards;
}

@keyframes caerConfetti {
  0% {
    transform: translateY(-100px) rotate(0deg);
  }

  100% {
    transform: translateY(100vh) rotate(720deg);
  }
}
