/* Floating Cart Widget - bottom-left */
#cart-widget {
  position: fixed;
  left: 16px; /* stick to left */
  right: auto !important; /* ensure no override keeps it on right */
  bottom: 15%;
  z-index: 1050;
  font-family: 'Kanit', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  transform: none;
}
#cart-widget .cart-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0f2d1a; /* dark green */
  color: #fff;
  border: 1px solid #245c35; /* green border */
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(34,197,94,0.2);
}
#cart-widget .cart-toggle .badge {
  background: #22c55e; /* green accent */
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}
#cart-widget .panel {
  margin-top: 8px;
  width: 320px;
  max-height: 60vh;
  overflow: hidden;
  background: rgba(10,20,14,0.98); /* deep greenish */
  color: #e7f6ec; /* light greenish text */
  border: 1px solid #245c35;
  border-radius: 12px;
  display: none;
  backdrop-filter: blur(6px);
}
#cart-widget.open .panel { display: block; }
#cart-widget .panel .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #2a2a2a;
}
#cart-widget .panel .panel-body {
  max-height: 40vh;
  overflow: auto;
}
#cart-widget .panel .panel-footer {
  padding: 10px 12px;
  border-top: 1px solid #2a2a2a;
}
#cart-widget .item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px dashed #2a2a2a;
}
#cart-widget .item:last-child { border-bottom: none; }
#cart-widget .item .title { font-weight: 600; color: #fff; }
#cart-widget .item .price { color: #86efac; font-weight: 600; }
#cart-widget .item .meta { display: flex; align-items: center; gap: 10px; }
#cart-widget .item .thumb { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; border: 1px solid #333; background:#111; }
#cart-widget .item .thumb.placeholder { background: #1a1a1a; }
#cart-widget .qty-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
#cart-widget .qty-controls button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #1d1d1d;
  color: #eee;
  cursor: pointer;
}
#cart-widget .qty-controls input {
  width: 36px;
  text-align: center;
  background: #121212;
  color: #fff;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 2px 4px;
}
#cart-widget .btn {
  display: inline-block;
  background: #22c55e; /* primary green */
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
#cart-widget .btn.secondary { background: #1b3b2a; }
#cart-widget .empty {
  padding: 16px;
  text-align: center;
  color: #aaa;
}
/* Add-to-cart buttons styling enhancement (optional) */
.add-to-cart.btn {
  background: #22c55e;
  border: none;
}

/* Toasts */
#toast-container {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast-box {
  background: rgba(20,20,20,0.95);
  color: #fff;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast-box.show {
  opacity: 1;
  transform: translateY(0);
}
