.cart-panel {
  position: fixed;
  top: 120px;
  right: 0;

  width: 280px;
  height: auto;

  background: white;
  border-radius: 16px 0 0 16px;
  border: 1px solid #ddd;

  padding: 16px;

  opacity: 0.5;
  transform: translateX(220px);

  transition: all 0.3s ease;

  z-index: 10;

  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}

.cart-panel:hover {
  opacity: 1;
  transform: translateX(0);

  z-index: 9999;
}

.cart-header h3 {
  margin: 0;
  font-size: 18px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.cart-items {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-item img {
  width: 60px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
}

.item-info {
  flex: 1;
}

.item-name {
  font-size: 14px;
  font-weight: bold;
  margin: 0 0 6px;
}

.item-info input[type="number"] {
  width: 60px;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.cart-summary {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-size: 16px;
}

.total-price {
  font-weight: bold;
  color: #e63946;
}

.remove-btn {
  background: #e63946;
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-top: 6px;
}

.remove-btn:hover {
  background: #d62839;
}

.quantity-input {
  text-align: center;
}


.checkout-btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px;

  border: none;
  border-radius: 12px;

  background: #0077cc;
  color: white;
  font-size: 15px;

  cursor: pointer;
  transition: 0.3s;
}

.checkout-btn:hover {
  background: #005fa3;
}

.cart-toggle, .cart-close {
  display: none;
}

.cart-checkbox {
  display: none;
}


@media (max-width: 600px) {
  .cart-panel {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    transform: translateY(180px);
    opacity: 0;
    z-index: 100;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .cart-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0077cc;
    color: white;
    border: none;
    font-size: 24px;
    z-index: 101;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
  }
  
  .cart-toggle:hover {
    background: #005fa3;
  }
  .cart-checkbox {
    display: none;
  }
  
  .cart-checkbox:checked ~ .cart-panel {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .cart-checkbox:checked + .cart-toggle {
    background: #005fa3;
  }
  
  .cart-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    z-index: 102;
    display: block;
  }
  
}