:root {
  --bg: #ffffff;
  --primary: #0f9d58;
  --primary-dark: #0c7a45;
  --accent: #ff3b30;
  --text: #111111;
  --muted: #6b7280;
  --surface: #f6f7f9;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: transparent;
}

.widget-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 12px;
  background: transparent;
}

.card {
  border-radius: 12px;
  background: transparent;
  overflow: hidden;
  position: relative;
}

.product {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 12px;
}

.product .img {
  width: 100%;
  height: 120px; /* giữ chỗ cao 120px */
  border-radius: 10px;
  background: transparent;
  opacity: 0; /* ẩn ảnh nhưng vẫn chiếm chỗ */
  pointer-events: none;
}

.title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 6px 0;
  padding-right: 32px; /* chừa chỗ cho nút Xoá khi có nhiều sản phẩm */
}
/* Nếu chỉ có 1 sản phẩm, bỏ padding-right */
.widget-shell.single .title { padding-right: 0; }

.price-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.price-top { display: flex; align-items: baseline; gap: 8px; }
.price {
  font-size: 18px;
  font-weight: 800;
  color: #ef4444;
}
.price-row .badge { align-self: auto; }
.strike {
  font-size: 14px;
  color: var(--muted);
  text-decoration: line-through;
}
.badge {
  margin-left: auto;
  background: #ffe9ea;
  color: var(--accent);
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.qty {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.qty button {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 22px;
  font-weight: 700;
  padding: 10px 0;
  cursor: pointer;
}

.qty button:active { background: #f3f4f6; }
.qty input {
  text-align: center;
  border: none;
  padding: 10px 0;
  font-size: 18px;
  width: 100%;
}

.toggle-off {
  position: absolute;
  top: 10px;
  right: 6px;
  min-width: 36px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  color: #ef4444;
  text-decoration: underline;
}
.toggle-off.restore { color:#0f9d58; text-decoration: none; }
.card.disabled { opacity: 0.35; filter: grayscale(1); }
.card.disabled .qty { pointer-events: none; opacity: 0.6; }

.picked-line { padding: 7px 0 1px 0; font-size: 14px; }
.picked-list { list-style: none; margin: 0 0 5px 0; padding: 0; }
.picked-item { font-size: 12px; color: #374151; font-style: italic; display: flex; align-items: center; gap: 5px; }
.picked-dot { width: 5px; height: 5px; background: #9ca3af; border-radius: 999px; display: inline-block; }

.min-qty-error {
  font-size: 11px;
  color: #ef4444;
  font-style: italic;
  margin-top: 4px;
  padding: 4px 7px;
  background: #fef2f2;
  border-radius: 5px;
  border-left: 2px solid #ef4444;
  transition: all 0.3s ease;
}

.totals {
  padding: 0 12px;
  background: transparent;
  border-top: 1px dashed #e5e7eb;
}

.row { display: flex; justify-content: space-between; margin: 5px 0; font-size: 14px; }
.row strong { font-weight: 800; }

.pay {
  margin-top: 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.pay:active { background: var(--primary-dark); }

.note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* Ensure the iframe container can stretch to full width up to 420px */
.widget-shell.full-width { width: 100%; max-width: 420px; }


