/* Cart Overlay */
.cart-overlay {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1100;
  transition: right 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.cart-overlay.show {
  right: 0;
  pointer-events: auto;
}

.cart-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
  margin-bottom: 15px;
}

.close-cart {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-cart:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s ease;
}

.cart-item:hover {
  background: #fafafa;
  margin: 0 -10px;
  padding: 12px 10px;
  border-radius: 8px;
}

.item-details {
  flex: 1;
}

.item-details h4 {
  margin: 0 0 5px 0;
  font-size: 16px;
}

.item-details p {
  margin: 0;
  color: #0891b2;
  font-weight: 600;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  transition: all 0.2s ease;
}

.quantity-btn:hover {
  background: #f1f5f9;
  border-color: #0891b2;
  color: #0891b2;
}

.quantity {
  min-width: 20px;
  text-align: center;
}

.remove-item {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 5px;
  transition: color 0.2s ease;
}

.remove-item:hover {
  color: #ff4d4f;
}

.cart-footer {
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
}

.checkout-btn {
  width: 100%;
  padding: 14px;
  background: #0891b2;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.checkout-btn:hover {
  background: #0e7490;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.checkout-btn:active {
  transform: translateY(0);
}

.checkout-btn:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.empty-cart {
  text-align: center;
  color: #666;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

/* Cart icon in header */
.cart-icon {
  position: relative;
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  margin-right: 15px;
}

.cart-symbol {
  font-size: 20px;
  margin-right: 5px;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff4d4f;
  color: white;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(255, 77, 79, 0.3);
  animation: badgePop 0.3s ease;
}

@keyframes badgePop {
  0% { transform: scale(0.5); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Overlay background */
.cart-overlay::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.cart-overlay.show::before {
  opacity: 1;
}
