/* ============================================================
   AL RAYEES — Storefront (Phase 1). Scoped with the .st- prefix;
   uses the existing design tokens from variables.css only.
   ============================================================ */
.st-hero {
  min-height: 340px;
}

.st-hero--compact {
  min-height: 260px;
  padding-bottom: var(--space-10);
}

.st-hero h1 {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
}

.st-crumb {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.st-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.st-section {
  padding: var(--space-12) 0 var(--space-20);
  background: var(--cream, #f5f3ec);
}

.st-section>.container {
  max-width: 1260px;
  padding-inline: clamp(1rem, 3.5vw, 2.5rem);
}

@media (min-width: 1600px) {
  .st-section>.container {
    max-width: 1440px;
  }
}

.st-loading {
  text-align: center;
  padding: var(--space-16) 0;
  color: var(--color-text-muted, #666);
}

/* Toolbar */
.st-toolbar {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: var(--space-5);
}

.st-search {
  flex: 1 1 260px;
  min-width: 0;
}

.st-search input,
.st-sort select,
.st-field input,
.st-field select,
.st-field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--color-border, rgba(10, 36, 25, .18));
  border-radius: var(--radius-md);
  background: #fff;
  font: inherit;
  font-size: var(--text-sm);
  color: inherit;
}

.st-search input:focus,
.st-sort select:focus,
.st-field input:focus,
.st-field select:focus,
.st-field textarea:focus,
.st-qty input:focus {
  outline: 2px solid var(--gold-400);
  outline-offset: 1px;
  border-color: var(--gold-500, var(--gold-400));
}

.st-sort {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 1 220px;
  min-width: min(100%, 180px);
}

.st-sort label {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-family: var(--font-display);
}

.st-chips {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.st-chip {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border, rgba(10, 36, 25, .18));
  background: #fff;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.st-chip:hover {
  border-color: var(--gold-400);
}

.st-chip.is-active {
  background: var(--navy-900);
  color: #fff;
  border-color: var(--navy-900);
}

.st-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted, #666);
  margin-bottom: var(--space-4);
}

/* Grid + card (Unified Editorial Style matching category pages) */
.st-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  justify-items: stretch;
  gap: clamp(1.25rem, 2vw, 1.75rem);
}

.st-card {
  background: #fff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  border: 1px solid rgba(10, 36, 25, 0.1);
  box-shadow: 0 4px 20px rgba(10, 36, 25, 0.08), 0 1px 3px rgba(10, 36, 25, 0.06);
  transition: box-shadow 220ms var(--ease-out),
    border-color 220ms var(--ease-out);
}

.st-card-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  background: var(--navy-800);
  overflow: hidden;
}

.st-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 36, 25, 0.16) 0%, transparent 38%, rgba(10, 36, 25, 0.22) 100%);
  pointer-events: none;
}

.st-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(0);
  will-change: transform;
  transition: transform 420ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .st-card:hover {
    box-shadow: 0 14px 36px rgba(10, 36, 25, 0.14), 0 4px 12px rgba(232, 163, 23, 0.14);
    border-color: rgba(232, 163, 23, 0.45);
  }

  .st-card:hover .st-card-media img {
    transform: scale(1.04) translateZ(0);
  }
}

.st-card-tag {
  position: absolute;
  top: 0.85rem;
  inset-inline-start: 0.85rem;
  z-index: 2;
  background: var(--grad-gold);
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.78rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(10, 36, 25, 0.22);
}

.st-card-tag--inline {
  position: static;
  display: inline-block;
  align-self: flex-start;
}

.st-card-body {
  padding: clamp(1.25rem, 2vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.st-card-body h3 {
  font-size: clamp(1.2rem, 1.45vw, 1.38rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy-800);
  min-height: 1.25em;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.st-card-body h3 a:hover {
  color: var(--gold-600);
}

.st-card-sci {
  font-size: 0.85rem;
  line-height: 1.45;
  min-height: 2.9em;
  font-style: italic;
  color: var(--color-text-light, #6a8073);
  margin: 0 0 0.45rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(10, 36, 25, 0.08);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.st-card-pack {
  font-size: 0.8125rem;
  line-height: 1.4;
  min-height: 2.6rem;
  padding: 0.5rem 0.75rem;
  margin: 0 0 0.65rem;
  background: linear-gradient(90deg, rgba(232, 163, 23, 0.11) 0%, rgba(255, 248, 224, 0.65) 100%);
  border: 1px solid rgba(232, 163, 23, 0.24);
  border-left: 3px solid var(--gold-500);
  border-radius: var(--radius-md);
  color: var(--gold-900);
  font-weight: 500;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-card-foot {
  margin-top: auto;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(10, 36, 25, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.st-price strong {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
}

.st-price small {
  color: var(--color-text-muted, #666);
  font-size: var(--text-xs);
}

.st-price--card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  line-height: 1.15;
}

.st-price-prefix {
  display: block;
  font-size: 0.75rem;
  height: 1.05rem;
  line-height: 1.05rem;
  color: var(--color-text-muted, #666);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.st-price-main {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
  white-space: nowrap;
}

.st-price--card strong {
  font-size: 1.18rem;
  color: var(--navy-800);
}

.st-price--lg strong {
  font-size: var(--text-4xl);
}

.st-price--lg small {
  font-size: var(--text-base);
}

.st-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.05rem;
  border: 1.5px solid var(--navy-700);
  cursor: pointer;
  background-color: var(--navy-700);
  color: var(--gold-200);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(10, 36, 25, 0.16);
  transition: background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.st-card-foot .st-add-btn {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 1rem;
}

@media (hover: hover) and (pointer: fine) {
  .st-add-btn:hover:not(.st-add-btn--out) {
    background-color: var(--navy-600);
    color: var(--gold-100);
    border-color: var(--gold-500);
    box-shadow: 0 6px 18px rgba(10, 36, 25, 0.24);
  }
}

.st-add-btn:active:not(.st-add-btn--out) {
  background-color: var(--navy-900);
  color: var(--gold-300);
  border-color: var(--navy-900);
}

.st-add-btn:focus-visible,
.st-chip:focus-visible,
.st-qty button:focus-visible {
  outline: 2px solid var(--navy-900);
  outline-offset: 2px;
}

/* Empty / notfound */
.st-empty {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.st-empty-icon {
  font-size: 3rem;
}

.st-notfound {
  padding-top: calc(var(--nav-height) + var(--space-12));
  min-height: 70vh;
}

/* Quantity stepper */
.st-qty {
  display: inline-flex;
  border: 1.5px solid var(--color-border, rgba(10, 36, 25, .18));
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.st-qty button {
  width: 36px;
  border: 0;
  background: #f3f5f3;
  cursor: pointer;
  font-size: var(--text-lg);
  color: var(--navy-900);
}

.st-qty button:hover:not(:disabled) {
  background: var(--gold-200, #f8dc9b);
}

.st-qty button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.st-qty input {
  width: 64px;
  text-align: center;
  border: 0;
  font: inherit;
  font-size: var(--text-sm);
  padding: 0.5rem 0;
}

/* Detail page */
.st-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: start;
  margin-bottom: var(--space-10);
}

.st-detail-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  background: #eef1ee;
}

.st-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.st-detail-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.st-detail-desc {
  line-height: var(--leading-relaxed);
}

.st-cert {
  font-weight: 600;
  color: var(--navy-700, var(--navy-900));
}

.st-purchase {
  border: 1px solid var(--color-border, rgba(10, 36, 25, .15));
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: #fafbf9;
}

.st-purchase-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.st-label {
  font-size: var(--text-sm);
  font-family: var(--font-display);
}

.st-purchase-total {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--navy-900);
}

.st-purchase-btn {
  justify-content: center;
}

.st-link-sm,
.st-link-btn {
  font-size: var(--text-sm);
  color: var(--navy-700, var(--navy-900));
  text-decoration: underline;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.st-link-sm:hover,
.st-link-btn:hover {
  color: var(--gold-600);
}

.st-detail-extra {
  margin-bottom: var(--space-12);
}

.st-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.st-specs div {
  background: #f3f5f3;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

.st-specs dt {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-muted, #666);
}

.st-specs dd {
  font-weight: 600;
  margin: 0;
}

.st-tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin: var(--space-2) 0 var(--space-4);
}

.st-tags span {
  background: #eef3ee;
  border-radius: var(--radius-full);
  padding: 0.25rem 0.8rem;
  font-size: var(--text-xs);
}

.st-related-title {
  margin-bottom: var(--space-5);
}

.st-panel h3 {
  font-size: var(--text-base);
  margin-top: var(--space-4);
}

/* Panels / layout */
.st-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: var(--space-8);
  align-items: start;
}

.st-panel {
  background: #fff;
  border: 1px solid var(--color-border, rgba(10, 36, 25, .12));
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.st-panel h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.st-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.st-panel-head h2 {
  margin: 0;
}

.st-summary {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-4));
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.st-summary h2 {
  margin: 0;
}

.st-block {
  justify-content: center;
  width: 100%;
}

.st-demo-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted, #666);
  margin-top: var(--space-3);
}

.st-demo-banner {
  background: #fff7e0;
  border: 1px solid var(--gold-400);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  margin: var(--space-4) 0;
}

/* Cart lines */
.st-lines {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
}

.st-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto 110px 36px;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border, rgba(10, 36, 25, .1));
}

.st-lines--compact .st-line {
  grid-template-columns: 56px minmax(0, 1fr) auto;
}

.st-line-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #eef1ee;
  display: block;
}

.st-line-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.st-line-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.st-line-name {
  font-family: var(--font-display);
  font-weight: 600;
}

.st-line-unit {
  font-size: var(--text-xs);
  color: var(--color-text-muted, #666);
}

.st-line-total {
  text-align: right;
  font-family: var(--font-display);
}

.st-remove {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: .6;
}

.st-remove:hover {
  opacity: 1;
}

/* Totals */
.st-totals {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.st-totals div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-sm);
}

.st-totals dd {
  margin: 0;
  font-weight: 600;
}

.st-totals-note dd {
  font-weight: 400;
  color: var(--color-text-muted, #666);
}

.st-totals-grand {
  border-top: 1px solid var(--color-border, rgba(10, 36, 25, .15));
  padding-top: var(--space-3);
  font-size: var(--text-lg) !important;
  font-family: var(--font-display);
}

.st-mini {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.st-mini li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
}

.st-summary-country {
  font-size: var(--text-sm);
  margin: 0;
}

/* Forms */
.st-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.st-span-2 {
  grid-column: 1 / -1;
}

.st-field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 4px;
}

.st-field label span {
  color: #b3261e;
}

.st-field label em {
  font-weight: 400;
  font-style: normal;
  color: var(--color-text-muted, #666);
}

.st-field.has-error input,
.st-field.has-error select,
.st-field.has-error textarea {
  border-color: #b3261e;
  background: #fff8f7;
}

.st-error {
  color: #b3261e;
  font-size: var(--text-xs);
  margin: 4px 0 0;
}

.st-error--block {
  background: #fdecea;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.st-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted, #666);
  margin: 4px 0 0;
}

.st-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

.st-actions .btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

/* Mandatory legal consent checkbox at checkout */
.st-consent {
  margin-top: var(--space-5);
  padding: var(--space-4);
  background: #f9faf8;
  border: 1.5px solid var(--color-border, rgba(10, 36, 25, .16));
  border-radius: var(--radius-md);
}

.st-consent.has-error {
  border-color: #b3261e;
  background: #fff8f7;
}

.st-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.st-consent-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--navy-700, #123c29);
  cursor: pointer;
}

.st-consent-row input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--gold-500, #e8a317);
  outline-offset: 2px;
}

.st-consent-row label {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text, #14241b);
  cursor: pointer;
}

.st-consent-row label a {
  color: var(--navy-700, #123c29);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.st-consent-row label a:hover {
  color: var(--gold-700, #b07c00);
}

/* Steps */
.st-steps {
  list-style: none;
  display: flex;
  gap: var(--space-3);
  margin: 0 0 var(--space-6);
  padding: 0;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-size: var(--text-sm);
}

.st-steps li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted, #777);
}

.st-steps li span:first-child {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid currentColor;
  font-size: var(--text-xs);
  flex-shrink: 0;
}

.st-steps li.is-current {
  color: var(--navy-900);
  font-weight: 700;
}

.st-steps li.is-current span:first-child {
  background: var(--navy-900);
  color: #fff;
  border-color: var(--navy-900);
}

.st-steps li.is-done {
  color: var(--navy-700, var(--navy-900));
}

.st-steps li.is-done span:first-child {
  background: var(--gold-400);
  border-color: var(--gold-400);
  color: var(--navy-900);
}

.st-steps li:not(:last-child)::after {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--color-border, rgba(10, 36, 25, .25));
  margin-left: var(--space-2);
}

/* Review / confirmation */
.st-review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-4);
}

.st-review-grid p {
  line-height: 1.7;
}

.st-review-notes {
  font-size: var(--text-sm);
}

.st-confirm {
  max-width: 820px;
}

.st-confirm-head {
  text-align: center;
  margin-bottom: var(--space-4);
}

.st-confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--gold-300, #f5c24a);
  display: inline-grid;
  place-items: center;
  font-size: 1.6rem;
  margin-bottom: var(--space-3);
}

.st-order-id strong {
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

/* Toast */
.st-toast-region {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-6);
  z-index: var(--z-toast);
  pointer-events: none;
}

.st-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--navy-900);
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--gold-400);
  max-width: min(92vw, 420px);
  font-size: var(--text-sm);
  animation: st-toast-in .35s var(--ease-out);
}

.st-toast-icon {
  color: var(--gold-300, #f5c24a);
  font-weight: 700;
}

.st-toast-link {
  color: var(--gold-300, #f5c24a);
  text-decoration: underline;
  white-space: nowrap;
}

.st-toast-close {
  background: none;
  border: 0;
  color: rgba(255, 255, 255, .7);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

@keyframes st-toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .st-toast {
    animation: none;
  }

  .st-card,
  .st-card-media img {
    transition: none;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .st-layout {
    grid-template-columns: 1fr;
  }

  .st-summary {
    position: static;
  }

  .st-detail {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

@media (max-width: 680px) {
  .st-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .st-search,
  .st-sort {
    flex: 1 1 auto;
    width: 100%;
  }

  .st-line {
    grid-template-columns: 64px minmax(0, 1fr) 36px;
    grid-template-areas: "img info rm" "img qty total";
    row-gap: var(--space-2);
  }

  .st-line .st-line-img {
    grid-area: img;
  }

  .st-line .st-line-info {
    grid-area: info;
  }

  .st-line .st-qty,
  .st-line .st-qty-wrap {
    grid-area: qty;
    justify-self: start;
  }

  .st-line .st-line-total {
    grid-area: total;
  }

  .st-line .st-remove {
    grid-area: rm;
  }

  .st-lines--compact .st-line {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    grid-template-areas: none;
  }

  .st-lines--compact .st-line>* {
    grid-area: auto;
  }

  .st-form-grid,
  .st-review-grid {
    grid-template-columns: 1fr;
  }

  .st-toast-region {
    bottom: calc(var(--space-6) + 64px);
    left: var(--space-4);
  }

  .st-hero {
    min-height: 280px;
  }

  .st-hero--compact {
    min-height: 220px;
  }
}

@media (max-width: 380px) {
  .st-card-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .st-card-foot .st-add-btn {
    width: 100%;
    min-width: 0;
  }
}

/* Pack sizes + line size label */
.st-purchase-row--stack {
  flex-direction: column;
  align-items: flex-start;
}

.st-sizes {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.st-size {
  min-width: 56px;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1.5px solid var(--color-border, rgba(10, 36, 25, .18));
  background: #fff;
  font-family: var(--font-display);
  font-size: var(--text-sm);
}

.st-size:hover {
  border-color: var(--gold-400);
}

.st-size.is-active {
  background: var(--navy-900);
  color: #fff;
  border-color: var(--navy-900);
}

.st-size:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 2px;
}

.st-line-size {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--navy-700, var(--navy-900));
}

a.st-add-btn {
  text-decoration: none;
}

/* Mandatory quantity, MT/kg switcher, and prominent cart quantity display */
.st-req {
  color: #b3261e;
}

.st-purchase-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.st-qty-wrap {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.st-unit-toggle {
  display: inline-flex;
  border: 1.5px solid var(--color-border, rgba(10, 36, 25, .2));
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.st-unit-toggle button {
  padding: 0.45rem 0.7rem;
  border: 0;
  background: #fff;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--navy-900);
}

.st-unit-toggle button:hover:not(.is-active) {
  background: #f3f5f3;
}

.st-unit-toggle button.is-active {
  background: var(--navy-900);
  color: #fff;
}

.st-unit-toggle button:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: -2px;
}

.st-line-qty {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--navy-900);
  margin: 2px 0;
}

.st-mini-qty {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--navy-900);
}

.st-addr-line {
  display: block;
}

/* Out-of-stock card state */
.st-card-stock-badge {
  position: absolute;
  top: 0.85rem;
  inset-inline-end: 0.85rem;
  z-index: 2;
  background: #b42318;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(10, 36, 25, 0.25);
}

.st-card--out .st-card-media img {
  opacity: 0.72;
}

.st-add-btn--out {
  background: #e5e7eb;
  color: #6b7280;
  box-shadow: none;
  cursor: not-allowed;
}

.st-add-btn--out:hover {
  transform: none;
  box-shadow: none;
}

/* Payment confirmation states */
.st-confirm-icon--pending {
  background: #d97706;
  color: #fff;
}

.st-confirm-icon--failed {
  background: #b42318;
  color: #fff;
}

.st-mono {
  font-family: var(--font-mono);
}