/* ===============================
   🛒 CONTENEDOR DEL CARRITO
=============================== */
.cart-container {
  position: relative;
  margin-left: auto;
  padding-right: 1rem;
}

/* ===============================
     🛒 ICONO DE CARRITO
  =============================== */
.cart-icon {
  font-size: 24px;
  text-decoration: none;
  color: black;
  cursor: pointer;
}

/* ===============================
     📦 DESPLEGABLE DEL CARRITO
  =============================== */
.cart-dropdown {
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  position: absolute;
  right: 0;
  top: 100%;
  background-color: #111;
  padding: 10px;
  z-index: 1000;
  border: 1px solid #e3fc02;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  width: max-content;
  min-width: 200px;
}

.cart-dropdown.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.cart-dropdown p {
  margin: 0 0 10px 0;
}

/* ===============================
     💳 BOTÓN FINALIZAR COMPRA
  =============================== */
.checkout-button {
  display: block;
  text-align: center;
  background-color: #007bff;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 5px;
  margin-top: 10px;
}

.checkout-button:hover {
  background-color: #0056b3;
}

/* ===============================
     🧾 LISTADO DE PRODUCTOS EN MINI CARRITO
  =============================== */
.cart-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.cart-item {
  display: flex;
  align-items: center;
  background-color: #2a2a2a;
  padding: 8px;
  border-radius: 6px;
  gap: 10px;
  color: white;
  font-size: 14px;
}

.cart-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.cart-item-info span:first-child {
  font-weight: bold;
}

.cart-item-info span:last-child {
  font-size: 13px;
  color: #ccc;
}

/* ===============================
     🛍️ PÁGINA DE CARRITO (DETALLE COMPLETO)
  =============================== */
main {
  padding: 30px;
  background: #1f1f1f;
  color: white;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #e3fc02;
}

.carrito-item {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid #444;
}

.carrito-item span {
  flex: 1;
}

/* ===============================
     💰 TOTAL Y ACCIONES
  =============================== */
.total {
  font-weight: bold;
  font-size: 20px;
  margin-top: 20px;
  text-align: right;
}

.acciones {
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
}

.btn {
  padding: 10px 20px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
}

.btn-vaciar {
  background-color: #444;
  color: white;
}

.btn-comprar {
  background-color: #e3fc02;
  color: #000;
}

/* ===============================
     ➕➖ BOTONES DE CANTIDAD
  =============================== */
.carrito-item button {
  padding: 5px 10px;
  margin: 0 3px;
  font-size: 14px;
  cursor: pointer;
  background: #e3fc02;
  border: none;
  border-radius: 3px;
  font-weight: bold;
}

.carrito-item button:hover {
  background: #cbe100;
}
