/* =========================
   BOTÓN FLOTANTE
========================= */
#carritoFab{
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #111827;
  color: #fff;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  z-index: 1001;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

#carritoFabCount{
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   OVERLAY
========================= */
#carritoOverlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 998;
  display: none;
}

/* =========================
   DRAWER
========================= */
#carritoDrawer{
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: #fff;
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: right .35s ease;
  box-shadow: -10px 0 30px rgba(0,0,0,.25);
}

#carritoDrawer.open{
  right: 0;
}

/* =========================
   HEADER
========================= */
.carrito-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid #e5e7eb;
}

.carrito-header h3{
  margin: 0;
  font-size: 18px;
}

.carrito-header button{
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

/* =========================
   BODY
========================= */
.carrito-body{
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.carrito-body h4{
  margin: 15px 0 5px;
  font-size: 15px;
  color: #111827;
}

.carrito-item{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  background: #f9fafb;
  border-radius: 10px;
}

.carrito-item b{
  font-size: 14px;
}

.carrito-item button{
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

/* =========================
   FOOTER
========================= */
.carrito-footer{
  padding: 15px;
  border-top: 1px solid #e5e7eb;
}

.btn-pagar{
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  background: #22c55e;
  color: #fff;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

/* =========================
   LOADING / EMPTY
========================= */
.carrito-body .loading,
.carrito-body p{
  text-align: center;
  color: #6b7280;
  margin-top: 40px;
}

/* =========================
   DESKTOP AJUSTES
========================= */
@media (min-width: 768px){
  #carritoFab{
    bottom: 30px;
    right: 30px;
  }
}

/* =========================
   OCULTAR BOTÓN CUANDO CARRITO ABIERTO
========================= */
#carritoFab.hidden{
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition: all .2s ease;
}
