/* ===================== Ícono flotante ===================== */
#carrito-icono {
  position: fixed;
  bottom: 18px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  right: 18px;
  width: clamp(84px, 18vw, 108px);
  height: clamp(84px, 18vw, 108px);
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 89, 59, 0.2), rgba(8, 8, 8, 0.96) 58%),
    linear-gradient(135deg, #080808, #220b08);
  border: 1px solid rgba(255, 90, 60, 0.32);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.25s ease, background 0.3s ease, box-shadow 0.3s ease;
  z-index: 3000;
}

#carrito-icono:hover {
  transform: translateY(-4px) scale(1.02);
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 106, 76, 0.28), rgba(8, 8, 8, 0.98) 58%),
    linear-gradient(135deg, #0d0d0d, #2d0c06);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#carrito-icono svg {
  width: clamp(36px, 8vw, 46px);
  height: clamp(36px, 8vw, 46px);
  fill: #fff6f1;
}


#carrito-count {
  position: absolute;
  top: 9px;
  right: 8px;
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  background: linear-gradient(135deg, #ff3f20, #b31200);
  color: white;
  font-size: 0.85rem;
  line-height: 1;
  border-radius: 50%;
  font-weight: bold;
  border: 2px solid rgba(8, 8, 8, 0.92);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
  z-index: 3100;
}

#carrito-count.is-empty {
  opacity: 0;
  transform: scale(0.82);
  pointer-events: none;
}

#carrito-count:hover {
  transform: scale(1.2);
}

@media (max-width: 780px) {
  #carrito-icono {
    right: 16px;
    bottom: 16px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    width: 88px;
    height: 88px;
  }

  #carrito-count {
    min-width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  #carrito-icono {
    right: 14px;
    width: 80px;
    height: 80px;
  }

  #carrito-count {
    top: 7px;
    right: 6px;
    min-width: 26px;
    height: 26px;
    font-size: 0.76rem;
  }
}

/* ===================== Panel lateral ===================== */
#carrito-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 350px;
  height: 100%;
  background: #111;
  color: #fff;
  box-shadow: -3px 0 15px rgba(0,0,0,0.6);
  padding: 20px;
  transition: right 0.4s ease, opacity 0.3s ease;
  z-index: 2500;
  border-left: 3px solid #e60000;
  overflow-y: auto;
  opacity: 0;
}

#carrito-panel.visible {
  right: 0;
  opacity: 1;
}

/* ===================== Fondo oscuro ===================== */
#carrito-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 2000;
}

#carrito-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* ===================== Contenido del carrito ===================== */
#carrito-panel h3 {
  margin-bottom: 15px;
  color: #e60000;
  text-align: center;
  font-size: 1.3em;
}

.carrito-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
}

.carrito-item img {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  margin-right: 10px;
}

.carrito-item .info {
  flex-grow: 1;
}

.carrito-item button {
  background: none;
  border: none;
  color: #e60000;
  font-size: 20px;
  cursor: pointer;
}

/* ===================== Total y botones ===================== */
.carrito-total {
  margin-top: 10px;
  font-weight: bold;
  text-align: center;
  color: #fff;
}

#vaciar-carrito,
#btn-finalizar {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

#vaciar-carrito {
  background: #e60000;
  color: white;
}

#btn-finalizar {
  background: linear-gradient(135deg, #e60000, #330000);
  color: white;
}

#vaciar-carrito:hover {
  background: #ff1a1a;
}

#btn-finalizar:hover {
  background: linear-gradient(135deg, #ff1a1a, #660000);
}

/* ===================== Productos ===================== */
.producto {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  background: white;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.producto:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.producto img {
  width: 100%;
  border-radius: 10px;
}

.producto button {
  margin-top: 10px;
  background: linear-gradient(135deg, #e60000, #330000);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.producto button:hover {
  background: linear-gradient(135deg, #ff1a1a, #660000);
}

/* ===================== Notificación ===================== */
/* ===== Notificación del carrito ===== */
.notificacion-carrito {
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: linear-gradient(135deg, #ff3c3c, #e60000);
  color: #fff;
  padding: 16px 28px;
  border-radius: 12px;
  font-size: 1.2rem; /* más grande */
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  opacity: 0;
  z-index: 9999;
  transition: all 0.35s ease;
  pointer-events: none;
}

.notificacion-carrito.visible {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}


/* ===================== Modal de confirmación (Vaciar carrito) ===================== */
.modal-vaciar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 5000;
}

.modal-vaciar.visible {
  opacity: 1;
  visibility: visible;
}

.modal-vaciar .modal-contenido {
  background: linear-gradient(145deg, #000000, #330000);
  padding: 25px 35px;
  border-radius: 15px;
  text-align: center;
  color: white;
  box-shadow: 0 4px 20px rgba(255,0,0,0.3);
  border: 2px solid #e60000;
  animation: aparecerModal 0.3s ease-out;
  width: 350px;
}

.modal-vaciar .modal-contenido h3 {
  margin-bottom: 20px;
  color: #ff1a1a;
  font-size: 1.3em;
}

.modal-vaciar .modal-botones {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.modal-vaciar .modal-botones button {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
}

#confirmar-si {
  background: linear-gradient(135deg, #e60000, #660000);
  color: white;
}

#confirmar-si:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #ff1a1a, #990000);
}

#confirmar-no {
  background: #444;
  color: white;
}

#confirmar-no:hover {
  transform: scale(1.05);
  background: #666;
}

@keyframes aparecerModal {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}



.modal-vaciar, .modal-entrega {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex; justify-content: center; align-items: center;
  z-index: 9998;
}

.modal-vaciar .modal-contenido, .modal-entrega .contenido {
  background: #111;
  border: 2px solid red;
  border-radius: 12px;
  padding: 25px 35px;
  color: #fff;
  text-align: center;
  max-width: 400px;
  position: relative;
}

.modal-entrega {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.modal-entrega .contenido {
  background: linear-gradient(145deg, #000, #330000);
  border: 2px solid #e60000;
  border-radius: 12px;
  padding: 25px 35px;
  color: #fff;
  text-align: center;
  max-width: 380px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.modal-entrega .img-entrega {
  width: 130px;
  height: auto;
  margin: 0 auto 15px;
  display: block;
  filter: drop-shadow(0 0 10px rgba(230,0,0,0.6));
}

.modal-entrega h2 {
  margin-bottom: 15px;
  color: #fff;
}

.modal-entrega .botones {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
