:root { color-scheme: light; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #fff !important;
  color: #111827 !important;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body > style,
body > script { display: none !important; }
#page-content { flex: 1; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; }

.cart-toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 700;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.cart-toast {
  min-width: 260px;
  max-width: 340px;
  background: #111827;
  color: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, .22);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}
.cart-toast.show { opacity: 1; transform: translateY(0); }
.cart-toast.ok { background: #14532d; }
.cart-toast.err { background: #7f1d1d; }
.cart-toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .14);
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
}
.cart-toast-text { font-size: 13px; line-height: 1.5; }
.cart-toast-text strong { display: block; font-size: 13px; margin-bottom: 2px; }

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 100vw;
  background: #fff;
  z-index: 501;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  box-shadow: -8px 0 40px rgba(0, 0, 0, .12);
  will-change: transform;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.cart-drawer-head h2 { font-size: 18px; font-weight: 700; color: #111827; }
.cart-drawer-count { font-size: 14px; font-weight: 500; color: #6b7280; }
.cart-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  transition: background .15s;
  flex-shrink: 0;
}
.cart-drawer-close:hover { background: #e5e7eb; }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-drawer-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  color: #9ca3af;
  text-align: center;
}
.cart-drawer-empty svg,
.cart-drawer-empty-icon {
  width: 64px;
  height: 64px;
  stroke: #d1d5db;
  fill: none;
}
.cart-drawer-empty p { font-size: 16px; }
.cart-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #f3f4f6;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #f0fdf4;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price { font-size: 13px; color: #6b7280; }
.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.cart-item-subtotal { font-size: 15px; font-weight: 700; color: #16a34a; }
.cart-item-remove {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: #fee2e2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
}
.cart-item-remove:hover { background: #fecaca; }
.cart-item-remove svg { width: 14px; height: 14px; stroke: #dc2626; fill: none; }
.cart-drawer-foot {
  padding: 20px 24px;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
  background: #fff;
}
.cart-drawer-foot[hidden] { display: none !important; }
.cart-drawer-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.cart-drawer-total span { font-size: 15px; color: #6b7280; }
.cart-drawer-total strong { font-size: 20px; font-weight: 700; color: #111827; }
.cart-drawer-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-cart-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  transition: background .15s;
  text-decoration: none;
}
.btn-cart-checkout:hover { background: #15803d; }
.btn-cart-continue {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: #374151;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s;
}
.btn-cart-continue:hover { background: #e5e7eb; }

.btn-green {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  transition: background .15s;
}
.btn-green:hover { background: #15803d; }
.btn-outline-green {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #16a34a;
  border: 2px solid #16a34a;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  transition: background .15s;
}
.btn-outline-green:hover { background: #f0fdf4; }
.btn-outline-gray {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid #16a34a;
  color: #16a34a;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  background: #fff;
  transition: background .15s;
}
.btn-outline-gray:hover { background: #f0fdf4; }

.wrap { max-width: 1400px; margin: 0 auto; padding: 0 48px; }
.sec-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 16px;
}
.sec-head-row h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.sec-head-row p { font-size: 14px; color: #6b7280; margin-top: 4px; }

@media (max-width: 768px) {
  .wrap { padding: 0 16px; }
  .cart-drawer { width: 100vw; }
}
