:root {
  --accent: #ff6b00;
  --accent-dark: #e05e00;
  --ink: #1a2a3a;
  --muted: #6b7280;
  --surface: #ffffff;
  --surface-soft: #f4f7fa;
}

.cart-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2500;
  border: 0;
  background: linear-gradient(135deg, var(--accent), #ff8c42);
  color: white;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(255, 107, 0, 0.35);
  cursor: pointer;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #111827;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0 5px;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(420px, 100%);
  height: 100vh;
  background: var(--surface);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.18);
  z-index: 2600;
  transition: right 0.25s ease;
  display: flex;
  flex-direction: column;
}

.cart-panel.open {
  right: 0;
}

.cart-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: var(--surface-soft);
}

.cart-panel-header h3 {
  color: var(--ink);
  font-size: 1.2rem;
}

.cart-close {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 8px;
}

.cart-empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 12px;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  margin-top: 24px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

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

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.cart-item-price {
  color: var(--accent);
  font-weight: 700;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-btn {
  border: 0;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  background: #e5e7eb;
  cursor: pointer;
}

.remove-item {
  border: 0;
  background: transparent;
  color: #b91c1c;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 6px;
}

.cart-summary {
  padding: 16px 20px 24px;
  border-top: 1px solid #e5e7eb;
  background: white;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.cart-clear,
.checkout-btn,
.add-to-cart-btn,
.quote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 14px;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cart-clear {
  background: #f3f4f6;
  color: var(--ink);
}

.checkout-btn,
.add-to-cart-btn {
  background: var(--accent);
  color: white;
}

.add-to-cart-btn:hover,
.checkout-btn:hover,
.quote-btn:hover,
.cart-clear:hover {
  transform: translateY(-1px);
}

.quote-btn {
  background: #111827;
  color: white;
  margin-top: 8px;
}

.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.95);
  color: white;
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 3000;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .cart-panel {
    width: 100%;
  }

  .cart-toggle {
    right: 12px;
    bottom: 12px;
    width: 54px;
    height: 54px;
  }
}
