#cart {
  position: fixed;
  top: 120px;
  right: 20px;
  width: 260px;
  background: #222;
  color: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  z-index: 1000;
  font-size: 14px;
  transition: all 0.3s;
}

/* Header */
#cart-header {
  padding: 12px 15px;
  font-weight: bold;
  background-color: #00ff99;
  color: #000;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  text-align: center;
}

/* Details */
#cart-details {
  display: none;
  padding: 15px;
  max-height: 450px;
  overflow-y: auto;
}

#cart.open #cart-details {
  display: block;
}

/* Cart items */
#cart ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#cart ul li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #333;
}

/* Product image */
#cart ul li img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid #444;
}

/* Product info */
#cart ul li .item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#cart ul li .item-info span {
  font-size: 14px;
  color: #f2f2f2;
}

/* Quantity / Price */
#cart ul li .item-price {
  font-weight: 600;
  color: #00ff99;
  text-align: right;
}

/* Checkout button */
#checkout-button {
  position: fixed;
  top: calc(120px + 52px);
  right: 20px;
  width: 260px;
  padding: 14px;
  background-color: #2980b9;
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 0 0 8px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s;
  z-index: 999;
}

#checkout-button:hover {
  background-color: #1f6fa8;
}

/* Match expanded cart width */
#cart.open + #checkout-button {
  width: 390px;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
  #cart {
    width: 100%;
    top: auto;
    bottom: 0;
    border-radius: 0;
  }

  #cart-header {
    border-radius: 0;
  }

  #checkout-button {
    width: 100%;
    top: auto;
    bottom: 0;
    border-radius: 0;
  }

  #cart ul li img {
    width: 50px;
    height: 50px;
  }
}
