/**
 * SMC native cart — reference-faithful Bag skin (Phase 4).
 * Source of truth: reference/bag-page/index.html. Tokens sampled from the
 * reference tailwind-config (surface #f9f9ff, on-surface #141b2b,
 * on-surface-variant #41493e, primary #002501, primary-container #003d03,
 * surface-container-high #e1e8fd, secondary-container #8bfb94, CTA #008730,
 * error #ba1a1a). Scope: EVERYTHING under `.smc-cart`. No bare element
 * selectors, no Tailwind dependency, no Material Symbols dependency
 * (unicode glyphs used for steppers/arrows).
 */
.smc-cart {
  --smc-ink: #141b2b;
  --smc-muted: #41493e;
  --smc-faint: #6b7280;
  --smc-line: rgba(229, 231, 235, 0.8);
  --smc-line-soft: #f3f4f6;
  --smc-card: #ffffff;
  --smc-thumb: rgba(245, 245, 245, 0.5);
  --smc-brand: #003d03;
  --smc-cta: #008730;
  --smc-danger: #ba1a1a;
  --smc-pill: rgba(225, 232, 253, 0.6);
  --smc-savebg: rgba(139, 251, 148, 0.4);
  box-sizing: border-box;
  width: 100%;
  color: var(--smc-ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.smc-cart *,
.smc-cart *::before,
.smc-cart *::after {
  box-sizing: inherit;
}
/* ---- container: max-w-6xl (1152px), reference rhythm ---- */
.smc-bag-container {
  width: 100%;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem 1rem 2rem;
}
@media (min-width: 640px) {
  .smc-bag-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
@media (min-width: 768px) {
  .smc-bag-container {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}
/* ---- title block ---- */
.smc-bag-head {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--smc-line);
}
.smc-bag-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding-bottom: 0.5rem;
}
.smc-bag-h1 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111827;
}
@media (min-width: 640px) {
  .smc-bag-h1 {
    font-size: 2.25rem;
  }
}
.smc-bag-continue {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
  font-size: 0.875rem;
  color: var(--smc-muted);
  text-decoration: none;
}
.smc-bag-continue:hover {
  color: var(--smc-brand);
}
/* ---- grid: 1 col → 12 col (7/5) ---- */
.smc-bag-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .smc-bag-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 3.5rem;
  }
  .smc-bag-main {
    grid-column: span 7 / span 7;
  }
  .smc-bag-side {
    grid-column: span 5 / span 5;
  }
}
.smc-bag-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.smc-bag-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* ---- row card ---- */
.smc-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  background: var(--smc-card);
  border: 1px solid var(--smc-line);
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  padding: 1rem;
  margin-bottom: 1rem;
}
@media (min-width: 640px) {
  .smc-row {
    gap: 1.5rem;
    padding: 1.5rem;
  }
}
.smc-row-thumb {
  width: 6rem;
  height: 6rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 0.75rem;
  background: var(--smc-thumb);
}
@media (min-width: 640px) {
  .smc-row-thumb {
    width: 12rem;
    height: 12rem;
    padding: 0.75rem;
  }
}
.smc-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.05));
}
.smc-row-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  justify-content: space-between;
  gap: 0.75rem;
}
.smc-row-titlewrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.375rem;
}
.smc-row-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #111827;
}
@media (min-width: 640px) {
  .smc-row-title {
    font-size: 20px;
  }
}
.smc-row-title a {
  color: inherit;
  text-decoration: none;
}
.smc-row-title a:hover {
  text-decoration: underline;
}
.smc-stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: var(--smc-pill);
  font-size: 10px;
  font-weight: 500;
  color: #4b5563;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .smc-stock-pill {
    font-size: 11px;
    padding: 0.25rem 0.625rem;
  }
}
.smc-stock-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--smc-cta);
}
.smc-stock-pill-out .smc-stock-dot {
  background: var(--smc-danger);
}
.smc-row-spec {
  font-size: 0.75rem;
  color: var(--smc-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.smc-row-spec dl.variation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin: 0;
  padding: 0;
}
.smc-row-spec dl.variation dt,
.smc-row-spec dl.variation dd {
  margin: 0;
  padding: 0;
  display: inline;
}
.smc-row-spec dl.variation dt {
  font-weight: 600;
}
.smc-row-spec dl.variation dd::after {
  content: '·';
  margin-left: 0.75rem;
  color: #d1d5db;
}
.smc-row-spec dl.variation dd:last-child::after {
  content: '';
}
.smc-row-spec p {
  margin: 0;
}
/* ---- controls ---- */
.smc-row-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .smc-row-controls {
    gap: 1rem;
  }
}
.smc-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  height: 1.75rem;
  padding: 0 0.25rem;
  border: 1px solid var(--smc-line);
  border-radius: 0.375rem;
  background: #fff;
}
.smc-stepper-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--smc-ink);
  cursor: pointer;
  border-radius: 0.25rem;
}
.smc-stepper-btn:hover {
  background: var(--smc-line-soft);
}
.smc-stepper-btn:disabled {
  opacity: 0.4;
  cursor: wait;
}
.smc-stepper-val {
  width: 1.5rem;
  text-align: center;
  border: 0;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1f2937;
  font-variant-numeric: tabular-nums;
}
.smc-row-remove {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 0;
  background: none;
  padding: 0.25rem 0;
  font-size: 11px;
  color: #9ca3af;
  cursor: pointer;
  text-decoration: none;
}
.smc-row-remove:hover {
  color: var(--smc-danger);
  text-decoration: underline;
}
/* ---- price bar ---- */
.smc-row-pricebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--smc-line-soft);
}
@media (min-width: 640px) {
  .smc-row-pricebar {
    padding-top: 0.75rem;
  }
}
.smc-row-price {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #111827;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 640px) {
  .smc-row-price {
    font-size: 20px;
  }
}
.smc-row-compare {
  font-size: 11px;
  color: #9ca3af;
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 640px) {
  .smc-row-compare {
    font-size: 12px;
  }
}
.smc-row-save {
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background: var(--smc-savebg);
  color: var(--smc-cta);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
@media (min-width: 640px) {
  .smc-row-save {
    font-size: 10px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}
/* ---- update button (native fallback) ---- */
.smc-bag-update.button {
  align-self: flex-start;
  height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--smc-line);
  background: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
/* ---- receipt sidebar ---- */
.smc-bag-side {
  width: 100%;
  min-width: 0;
}
@media (min-width: 1024px) {
  .smc-bag-side {
    display: flex;
    justify-content: flex-end;
  }
}
.smc-receipt {
  width: 100%;
  position: relative;
  user-select: none;
  filter: drop-shadow(0 12px 28px rgba(20, 27, 43, 0.07)) drop-shadow(0 2px 6px rgba(20, 27, 43, 0.04));
}
@media (min-width: 1024px) {
  .smc-receipt {
    position: sticky;
    top: 6rem;
  }
}
.smc-receipt-zigzag {
  width: 100%;
  height: 10px;
  line-height: 0;
  overflow: hidden;
  display: block;
}
.smc-receipt-zigzag svg {
  width: 100%;
  height: 10px;
  display: block;
  fill: #ffffff;
}
.smc-receipt-body {
  background: #ffffff;
  padding: 2rem 1.5rem 1.5rem;
  position: relative;
}
@media (min-width: 640px) {
  .smc-receipt-body {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
.smc-receipt-brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed #d1d5db;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.smc-receipt-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.smc-receipt-brand-tile {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: var(--smc-brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.smc-receipt-tag {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--smc-faint);
  background: var(--smc-line-soft);
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 500;
}
.smc-receipt-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-bottom: 1px dashed #d1d5db;
  padding: 1rem 0;
  margin-bottom: 1rem;
  font-size: 13px;
}
.smc-receipt-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--smc-muted);
}
.smc-receipt-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
  color: var(--smc-ink);
  font-weight: 400;
}
.smc-receipt-item-qty {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--smc-ink);
  white-space: nowrap;
}
.smc-receipt-lines {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-bottom: 1px dashed #d1d5db;
  padding: 1rem 0;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
  font-size: 13px;
}
.smc-receipt-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--smc-muted);
}
.smc-receipt-label {
  color: var(--smc-faint);
}
.smc-receipt-value {
  color: var(--smc-ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.smc-receipt-calc {
  font-weight: 500;
  color: #1f2937;
  text-decoration: underline;
  cursor: pointer;
}
.smc-receipt-calc:hover {
  color: var(--smc-brand);
}
.smc-receipt-uncoupon {
  border: 0;
  background: none;
  color: var(--smc-danger);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0 0.25rem;
}
.smc-receipt-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1rem;
}
.smc-receipt-total-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--smc-ink);
}
.smc-receipt-total-value {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--smc-ink);
  font-variant-numeric: tabular-nums;
  margin-top: 0.25rem;
}
/* Express slot: gateway output only; hides when empty. */
.smc-express-slot:empty {
  display: none;
}
.smc-express-slot {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.smc-receipt-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--smc-cta);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
}
.smc-receipt-cta:hover {
  background: var(--smc-brand);
  color: #fff;
}
.smc-receipt-cta:active {
  transform: scale(0.98);
}
/* ---- promo ---- */
.smc-receipt-promo {
  border-top: 1px dashed #d1d5db;
  padding-top: 1rem;
  padding-bottom: 0.25rem;
  margin-bottom: 0.5rem;
}
.smc-receipt-promo-label {
  margin: 0 0 0.5rem;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--smc-faint);
  font-weight: 500;
}
.smc-receipt-promo-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.smc-receipt-promo-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: var(--smc-line-soft);
  border: 1px solid transparent;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--smc-ink);
}
.smc-receipt-promo-input:focus {
  outline: 2px solid var(--smc-brand);
  outline-offset: 0;
  background: #fff;
}
.smc-receipt-promo-apply {
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: #111827;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.smc-receipt-promo-apply:hover {
  background: #000;
}
/* ---- empty state ---- */
.smc-bag-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}
.smc-bag-empty-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background: var(--smc-pill);
  color: var(--smc-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}
.smc-bag-empty-h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.smc-bag-empty-copy {
  margin: 0.5rem 0 2rem;
  font-size: 0.95rem;
  color: var(--smc-muted);
}
.smc-bag-empty-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 2rem;
  border-radius: 0.5rem;
  background: var(--smc-brand);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.smc-bag-empty-cta:hover {
  background: var(--smc-cta);
  color: #fff;
}
/* ---- notices + busy ---- */
.smc-cart .woocommerce-error,
.smc-cart .woocommerce-message,
.smc-cart .woocommerce-info {
  border-radius: 0.75rem;
}
.smc-cart-busy {
  opacity: 0.6;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .smc-cart * {
    transition: none !important;
    animation: none !important;
  }
}
