/* =========================
CARRITO
========================= */

.cart {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100%;
  

  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.9);

  transition: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2000;

  padding: 20px;
  display: flex;
  flex-direction: column;
}

.cart.active {
  right: 0;
}

/* HEADER */
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.cart-header h2 {
  font-size: 1.4rem;
  letter-spacing: 2px;
}

.cart-close {
  cursor: pointer;
  font-size: 1.2rem;
  transition: 0.2s;
}

.cart-close:hover {
  transform: scale(1.2);
}

/* ITEMS */
.cart-items {
  flex: 1;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 14px;

  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);

  border-radius: 10px;
  margin-bottom: 16px;

  transition: 0.25s ease;
}

.cart-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.cart-item img {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  object-fit: fill;
}

.cart-item div {
  flex: 1;
}

.cart-item div div:first-child {
  font-weight: 600;
  font-size: 0.9rem;
}

.cart-item div div:nth-child(2) {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 4px;
}

.quantity-controls{
  display:flex;
  align-items:center;

  margin-top:12px;

  background:#111;

  border-radius:14px;

  overflow:hidden;

  width:fit-content;
}

.quantity-controls button{
  all: unset;

  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #000000;

  border-radius: 10px;

  color: white;

  font-size: 1rem;
  font-weight: 600;

  cursor: pointer;

  transition: .2s ease;
}

.quantity-controls button:hover{
  background:rgba(255,255,255,.05);
}

.quantity-controls span{
  width: 30px;

  text-align:center;

  font-size:.95rem;
  font-weight:600;
}

.remove-btn{
  width:42px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-left:1px solid rgba(255,255,255,.08);

  color:rgba(255,255,255,.5);

  cursor:pointer;

  transition:.2s ease;
}

.remove-btn:hover{
  color:#ff0000;
  background:rgba(255,0,0,.08);
}

/* CONTADOR */
#cart-count {
  position: absolute;
  top: -8px;
  right: -10px;

  background: rgb(255, 0, 0);
  color: rgb(255, 255, 255);

  font-size: 0.7rem;
  font-weight: 600;

  padding: 2px 6px;
  border-radius: 50%;

  min-width: 20px;
  height: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 0 8px rgba(255, 0, 0, 0.6), 0 0 15px rgba(255, 0, 0, 0.3);
  transition: all 0.2s ease;
}

#cart-count.bump {
  animation: bump 0.3s ease;
}

/* ICONO */
.cart-icon {
  position: relative;
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: 8px;
  margin-right: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: 0.25s ease;
}

.cart-icon:hover {
  transform: scale(1.1);
}

.cart-icon:hover #cart-count {
  transform: scale(1.1);
}

.cart-icon:active {
  transform: scale(0.9);
}
