/* components.css — اکانتینو shared components (v2, P1-5b)
   Every storefront/account page is built from these blocks. Do not add one-off styles in .cshtml.
   Sections: 1 buttons · 2 links · 3 forms · 4 phone/otp · 5 price · 6 plan option · 7 badges/chips
   8 notice · 9 breadcrumb · 10 pagination · 11 empty state · 12 table · 13 credential block
   14 header · 15 dropdown · 16 mobile drawer · 17 footer · 18 page head · 19 card/panel
   20 product card · 21 delivery slip · 22 product page · 23 faq · 24 prose · 25 cart/checkout
   26 auth · 27 account · 28 info pages · 29 cta band · 30 error · 31 steps */

/* ---------- 1. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-sans);
  font-size: var(--step-body);
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease,
              color var(--t-hover) ease, box-shadow var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.btn svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
.btn:active:not([disabled]) { transform: scale(0.98); }
.btn[disabled], .btn.is-disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: var(--shadow-xs); }
.btn-primary:hover:not([disabled]) { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }

.btn-secondary { background: var(--bg); color: var(--ink); border-color: var(--border-dark); }
.btn-secondary:hover:not([disabled]) { background: var(--surface); border-color: var(--muted); }

.btn-soft { background: var(--accent-soft); color: var(--accent-hover); border-color: transparent; }
.btn-soft:hover:not([disabled]) { background: #d3ebe6; }

.btn-quiet { background: transparent; color: var(--ink-soft); border-color: transparent; }
.btn-quiet:hover:not([disabled]) { background: var(--surface); color: var(--accent); }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover:not([disabled]) { background: #912018; border-color: #912018; }

.btn-on-dark { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.btn-on-dark:hover:not([disabled]) { background: rgba(255, 255, 255, 0.16); }

.btn-sm { min-height: 2.25rem; padding: 0.25rem 0.875rem; font-size: var(--step-small); border-radius: calc(var(--radius) - 2px); }
.btn-lg { min-height: 3.125rem; padding-inline: 1.75rem; font-size: var(--step-lead); }
.btn-block { width: 100%; }
.btn-icon { min-width: 2.75rem; padding-inline: 0.625rem; }
.btn-sm.btn-icon { min-width: 2.25rem; padding-inline: 0.5rem; }

.btn.is-loading { position: relative; pointer-events: none; color: transparent !important; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 1rem; height: 1rem;
  border: 2px solid var(--accent-ink); border-top-color: transparent;
  border-radius: var(--radius-full); animation: ac-spin 0.6s linear infinite;
}
.btn-secondary.is-loading::after, .btn-quiet.is-loading::after { border-color: var(--ink); border-top-color: transparent; }
.htmx-request.btn, .htmx-request .btn[type="submit"] { opacity: 0.7; pointer-events: none; }
@keyframes ac-spin { to { transform: rotate(360deg); } }

/* ---------- 2. Links ---------- */
.link-inline {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 0.3em;
  transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease;
}
.link-inline:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
button.link-inline { background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--ink-soft);
  font-size: var(--step-small);
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color var(--t-hover) ease, background-color var(--t-hover) ease;
}
.nav-link:hover, .nav-link.is-active { color: var(--accent); background: var(--accent-wash); }

/* ---------- 3. Form fields ---------- */
.form-group { display: flex; flex-direction: column; gap: 0.375rem; margin-block-end: 1.125rem; }
.form-label { font-size: var(--step-small); font-weight: 600; color: var(--ink-soft); }
.form-label .req { color: var(--danger); }

.form-control, .form-select, .form-textarea {
  width: 100%;
  min-height: 2.875rem;
  padding: 0.5rem 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: var(--step-body);
  line-height: 1.5;
  transition: border-color var(--t-hover) ease, box-shadow var(--t-hover) ease;
}
.form-control::placeholder, .form-textarea::placeholder { color: #94a3b8; }
.form-textarea { min-height: 6rem; resize: vertical; }
.form-control:hover, .form-select:hover, .form-textarea:hover { border-color: var(--muted); }
.form-control:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}
.form-control.is-invalid, .form-select.is-invalid, .form-textarea.is-invalid { border-color: var(--danger); }
.form-help { font-size: var(--step-small); color: var(--muted); line-height: 1.6; }
.form-error { font-size: var(--step-small); color: var(--danger); line-height: 1.6; }
.form-control-ltr { direction: ltr; text-align: left; }
.form-check { display: flex; align-items: flex-start; gap: 0.625rem; font-size: var(--step-small); line-height: 1.8; cursor: pointer; }
.form-check input { width: 1.125rem; height: 1.125rem; margin-block-start: 0.3rem; accent-color: var(--accent); flex-shrink: 0; }

/* Input with attached button (search, discount code) */
.input-group { display: flex; align-items: stretch; gap: 0.5rem; }
.input-group .form-control { flex: 1; min-width: 0; }

/* Big code input (OTP single field) */
input.code-input, .form-control.code-input {
  direction: ltr;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.6em;           /* digits only (Latin context) */
  padding-inline-start: 0.6em;
  min-height: 3.5rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- 4. Phone & OTP ---------- */
.phone-group {
  display: flex;
  direction: ltr;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
  transition: border-color var(--t-hover) ease, box-shadow var(--t-hover) ease;
}
.phone-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15); }
.phone-group.is-invalid { border-color: var(--danger); }
.phone-prefix {
  display: flex; align-items: center; padding-inline: 0.875rem;
  background: var(--surface); color: var(--muted);
  font-size: var(--step-small); font-weight: 600;
  border-inline-end: 1px solid var(--border);
}
.phone-input {
  border: none; outline: none; flex: 1; min-width: 0; min-height: 3rem;
  padding-inline: 0.875rem; font-size: var(--step-lead); letter-spacing: 0.04em;
  color: var(--ink); background: transparent; font-variant-numeric: tabular-nums;
}
.otp-container { display: flex; gap: 0.5rem; direction: ltr; justify-content: center; }
.otp-digit {
  width: 3rem; height: 3.5rem; text-align: center; font-size: 1.5rem; font-weight: 700;
  font-variant-numeric: tabular-nums; background: var(--bg);
  border: 1px solid var(--border-dark); border-radius: var(--radius);
}
.otp-digit:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15); }

/* ---------- 5. Price ---------- */
.price { display: inline-flex; align-items: baseline; gap: 0.375rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-amount { font-size: var(--step-lead); font-weight: 800; color: var(--ink); }
.price-unit, .price-amount .price-unit { font-size: var(--step-small); font-weight: 500; color: var(--muted); }
.price-compare { font-size: var(--step-small); color: var(--muted); text-decoration: line-through; }
.price-from { display: block; font-size: var(--step-xs); color: var(--muted); line-height: 1.4; }

/* ---------- 6. Plan option (radio card) ---------- */
.plan-option { position: relative; display: block; cursor: pointer; height: 100%; }
.plan-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.plan-card {
  position: relative;
  display: flex; flex-direction: column; justify-content: center; gap: 0.5rem;
  height: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease, box-shadow var(--t-hover) ease;
}
.plan-option:hover .plan-card { border-color: var(--border-dark); box-shadow: var(--shadow-sm); }
.plan-option input[type="radio"]:focus-visible + .plan-card { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-option input[type="radio"]:checked + .plan-card { border-color: var(--accent); background: var(--accent-wash); }
.plan-option:has(input:disabled) { cursor: not-allowed; }
.plan-option input:disabled + .plan-card { background: var(--surface); color: var(--muted); border-color: var(--border); box-shadow: none; }
.plan-card::after {
  content: ""; position: absolute; inset-block-start: 0.625rem; inset-inline-end: 0.625rem;
  width: 0.95rem; height: 0.95rem; border-radius: var(--radius-full);
  border: 1.5px solid var(--border-dark); background: var(--bg);
}
.plan-option input[type="radio"]:checked + .plan-card::after { border: 5px solid var(--accent); }
.plan-card-header { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; padding-inline-end: 1.25rem; }
.plan-title { font-size: var(--step-xs); font-weight: 700; color: var(--ink); }
.plan-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: var(--step-xs); color: var(--muted); }
.plan-stock { font-size: var(--step-xs); color: var(--muted); }
.plan-card-info { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; padding-inline-end: 1.25rem; }
.plan-facts { display: flex; flex-wrap: wrap; gap: 0.125rem 0; margin: 0; padding: 0; list-style: none; font-size: var(--step-xs); color: var(--muted); }
.plan-facts li + li::before { content: "·"; margin-inline: 0.5rem; }
.plan-facts .plan-facts-note { color: var(--danger); font-weight: 600; }
.plan-card-price { flex-direction: row; align-items: baseline; justify-self: end; gap: 0.375rem; white-space: nowrap; }
.plan-card .price-amount { font-size: var(--step-lead); font-weight: 800; }
.plan-card .price-unit { font-size: var(--step-xs); }
.plan-selector-grid > div { display: flex; }
.plan-selector-grid > div > .plan-option { flex: 1; }

/* ---------- 7. Badges & chips ---------- */
.status-badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.125rem 0.5rem;
  font-size: var(--step-xs); font-weight: 700; line-height: 1.8;
  border-radius: var(--radius-sm); border: 1px solid transparent; white-space: nowrap;
}
.status-badge::before { content: ""; width: 0.375rem; height: 0.375rem; border-radius: var(--radius-full); background: currentColor; opacity: 0.8; }
.status-ok     { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-border); }
.status-warn   { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.status-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.status-info   { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.status-neutral { background: var(--surface); color: var(--ink-soft); border-color: var(--border); }

.chip-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  min-height: 2.375rem; padding: 0.25rem 1rem;
  font-size: var(--step-small); font-weight: 600; color: var(--ink-soft);
  background: var(--bg); border: 1px solid var(--border-dark); border-radius: var(--radius-full);
  transition: border-color var(--t-hover) ease, color var(--t-hover) ease, background-color var(--t-hover) ease;
}
.chip:hover, .chip.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }

/* ---------- 8. Notices ---------- */
.notice {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border); border-inline-start-width: 4px;
  border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
  font-size: var(--step-small); line-height: 1.8;
  margin-block-end: 1rem;
}
.notice-title { font-weight: 700; font-size: var(--step-body); }
.notice-info    { background: var(--info-bg); border-color: var(--info-border); border-inline-start-color: var(--info); color: #134e48; }
.notice-success { background: var(--ok-bg); border-color: var(--ok-border); border-inline-start-color: var(--ok); color: #14532d; }
.notice-warning { background: var(--warn-bg); border-color: var(--warn-border); border-inline-start-color: #b7791f; color: #713f12; }
.notice-error   { background: var(--danger-bg); border-color: var(--danger-border); border-inline-start-color: var(--danger); color: #7a1a12; }

/* ---------- 9. Breadcrumb ---------- */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.375rem;
  font-size: var(--step-small); color: var(--muted);
  margin-block-end: 0.75rem;
}
.breadcrumb-item a { color: var(--muted); transition: color var(--t-hover) ease; }
.breadcrumb-item a:hover { color: var(--accent); }
.breadcrumb-item.is-active { color: var(--ink-soft); font-weight: 600; }
.breadcrumb-separator { color: var(--border-dark); }

/* ---------- 10. Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.375rem; margin-block-start: 2rem; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.375rem; height: 2.375rem; padding-inline: 0.75rem;
  font-size: var(--step-small); font-weight: 600; font-variant-numeric: tabular-nums;
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--ink-soft); background: var(--bg);
  transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease, color var(--t-hover) ease;
}
.page-link:hover { border-color: var(--accent); color: var(--accent); }
.page-link.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- 11. Empty state ---------- */
.empty-state {
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem) 1.25rem;
  max-width: 560px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px dashed var(--border-dark);
  border-radius: var(--radius-lg);
}
.empty-state-title { font-size: var(--step-h3); font-weight: 700; margin-block-end: 0.375rem; }
.empty-state-desc { font-size: var(--step-body); color: var(--muted); margin-block-end: 1.25rem; margin-inline: auto; }

/* ---------- 12. Data table ---------- */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); }
.data-table { width: 100%; border-collapse: collapse; text-align: start; font-size: var(--step-small); }
.data-table th {
  padding: 0.75rem 1rem; background: var(--surface); text-align: start;
  border-block-end: 1px solid var(--border); font-weight: 700; color: var(--ink-soft); white-space: nowrap;
}
.data-table td { padding: 0.875rem 1rem; border-block-end: 1px solid var(--border); color: var(--ink); vertical-align: middle; }
.data-table tr:last-child td { border-block-end: none; }
.data-table tbody tr:hover td { background: var(--surface); }

/* ---------- 13. Credential block ---------- */
.credential-block {
  background: var(--surface-dark); color: #e2e8f0;
  border-radius: var(--radius-lg); padding: 0.5rem 1.125rem;
  font-family: var(--font-mono); font-size: var(--step-small);
  direction: ltr; text-align: left;
}
.credential-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 0.625rem; border-block-end: 1px solid rgba(255, 255, 255, 0.08);
}
.credential-row:last-child { border-block-end: none; }
.credential-label { color: #94a3b8; min-width: 80px; }
.credential-value { flex: 1; min-width: 0; font-weight: 600; color: #f8fafc; white-space: pre-wrap; overflow-wrap: anywhere; }
.credential-actions { display: flex; align-items: center; gap: 0.375rem; }
.credential-block .btn { font-family: var(--font-sans); }
.credential-block .btn-secondary { background: rgba(255, 255, 255, 0.08); color: #f8fafc; border-color: rgba(255, 255, 255, 0.2); }
.credential-block .btn-secondary:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------- 14. Header (two rows: brand/search/actions + nav) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-block-end: 1px solid var(--border);
}
.header-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: var(--header-h);
}
.header-brand { display: flex; align-items: center; gap: 0.5rem; }
.header-brand-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ink); }
.header-brand-mark { width: 2.125rem; height: 2.125rem; flex-shrink: 0; }
.header-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.header-brand-wordmark { font-weight: 800; font-size: 1.3125rem; color: var(--ink); }
.header-brand-tag { font-size: 0.6875rem; color: var(--muted); font-weight: 500; }

.header-search { width: 100%; max-width: 600px; justify-self: center; }
.search-box {
  position: relative;
  display: flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease, box-shadow var(--t-hover) ease;
}
.search-box:focus-within { background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12); }
.search-box-icon { position: absolute; inset-inline-start: 0.875rem; width: 1.125rem; height: 1.125rem; color: var(--muted); pointer-events: none; }
.search-box input {
  flex: 1; min-width: 0; min-height: 2.75rem;
  padding-inline: 2.75rem 0.75rem;
  background: transparent; border: 0; outline: none;
  font-size: var(--step-small); line-height: 1.7; color: var(--ink);
}
.search-box input::placeholder { color: var(--muted); font-size: var(--step-small); opacity: 1; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box-submit {
  margin-inline-end: 0.3125rem; min-height: 2.125rem; padding-inline: 0.875rem;
  font-size: var(--step-small); font-weight: 600; color: var(--accent-ink);
  background: var(--accent); border-radius: calc(var(--radius) - 3px);
}
.search-box-submit:hover { background: var(--accent-hover); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; justify-self: end; }
.header-action {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 2.75rem; padding-inline: 0.875rem;
  font-size: var(--step-small); font-weight: 600; color: var(--ink-soft);
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg);
  transition: border-color var(--t-hover) ease, color var(--t-hover) ease;
}
.header-action:hover { border-color: var(--accent); color: var(--accent); }
.header-action svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.cart-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.375rem; height: 1.375rem; padding-inline: 0.3rem;
  font-size: var(--step-xs); font-weight: 700; line-height: 1;
  background: var(--accent); color: var(--accent-ink); border-radius: var(--radius-full);
}
.cart-count.is-empty { background: var(--surface-alt); color: var(--muted); }
.header-user-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.header-nav-row { border-block-start: 1px solid var(--border); }
.header-nav {
  display: flex; align-items: center; gap: 0.25rem;
  min-height: 3rem;
}
.header-nav-sep { width: 1px; height: 1.25rem; background: var(--border); margin-inline: 0.5rem; }
.header-nav-end { margin-inline-start: auto; display: flex; align-items: center; gap: 0.5rem; font-size: var(--step-small); color: var(--muted); }
.header-nav-end a { color: var(--accent); font-weight: 600; }
.mobile-nav-toggle { display: none; }
.header-search-mobile { display: none; padding-block-end: 0.75rem; }

@media (max-width: 860px) {
  :root { --header-h: 5.25rem; }
  .site-header { border-block-end: none; background: var(--bg); padding-block: 0.5rem; }
  body:has(.hero, .page-head) .site-header { background: var(--accent-wash); }
  .header-main {
    grid-template-columns: auto 1fr auto; gap: 0.5rem; min-height: 0;
    padding: 0.5rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg);
  }
  .header-brand { display: contents; }
  .header-search, .header-nav-row, .header-brand-text, .header-search-mobile { display: none; }
  .mobile-nav-toggle { display: inline-flex; grid-column: 1; }
  .header-brand-link { grid-column: 2; justify-self: center; }
  .header-actions { grid-column: 3; gap: 0.5rem; }
  .header-action-label { display: none; }
  .header-action { min-height: 3rem; min-width: 3rem; padding-inline: 0.75rem; justify-content: center; }
  .header-action svg { width: 1.5rem; height: 1.5rem; }
  .header-brand-mark { width: 2.75rem; height: 2.75rem; }
}

/* ---------- 15. Dropdown menu (categories, user) ---------- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; inset-block-start: calc(100% + 0.375rem); inset-inline-start: 0; z-index: 60;
  min-width: 240px; padding: 0.375rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.dropdown-menu.is-end { inset-inline-start: auto; inset-inline-end: 0; }
.dropdown-item {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  width: 100%; padding: 0.5rem 0.75rem;
  font-size: var(--step-small); font-weight: 500; color: var(--ink); text-align: start;
  border-radius: var(--radius-sm);
}
.dropdown-item:hover { background: var(--accent-wash); color: var(--accent); }
.dropdown-item.is-accent { color: var(--accent); font-weight: 700; }
.dropdown-item.is-danger { color: var(--danger); }
.dropdown-item.is-danger:hover { background: var(--danger-bg); }
.dropdown-divider { height: 1px; background: var(--border); margin: 0.375rem 0.25rem; }
.dropdown-head { padding: 0.5rem 0.75rem 0.25rem; font-size: var(--step-xs); color: var(--muted); }
.nav-trigger { background: var(--accent-wash); color: var(--accent); }
.nav-trigger svg { width: 1rem; height: 1rem; }

/* ---------- 16. Mobile drawer ---------- */
.mobile-drawer { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, 0.45); display: flex; justify-content: flex-start; }
.mobile-drawer-content {
  width: min(320px, 86vw); height: 100%; background: var(--bg);
  display: flex; flex-direction: column; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.mobile-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-block-end: 1px solid var(--border); }
.mobile-drawer-body { padding: 1rem 1.25rem 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.mobile-drawer-title { font-size: var(--step-xs); font-weight: 700; color: var(--muted); margin-block-end: 0.25rem; }
.mobile-nav { display: flex; flex-direction: column; }
.mobile-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 0.25rem; font-size: var(--step-body); font-weight: 600; color: var(--ink);
  border-block-end: 1px solid var(--border);
}
.mobile-nav a:hover { color: var(--accent); }
.mobile-drawer-head .header-brand-mark { width: 3rem; height: 3rem; }
.mobile-drawer-head .header-brand-wordmark { font-size: 1.625rem; }
.mobile-drawer-search { width: 100%; }
.mobile-nav-group {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 0.75rem 0.25rem; font: inherit; font-size: var(--step-body); font-weight: 600; color: var(--ink);
  background: none; border: 0; border-block-end: 1px solid var(--border); cursor: pointer; text-align: start;
}
.mobile-nav-group svg { width: 1.125rem; height: 1.125rem; transition: transform var(--t-hover) ease; }
.mobile-nav-group svg.is-open { transform: rotate(180deg); }
.mobile-nav-sub { display: flex; flex-direction: column; padding-inline-start: 1.25rem; }
.mobile-nav-sub a { font-weight: 500; font-size: var(--step-small); color: var(--ink-soft); }

/* ---------- 17. Footer ---------- */
.site-footer { margin-block-start: auto; background: var(--surface-dark); color: #cbd5e1; padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: inline-flex; align-items: center; gap: 0.625rem; margin-block-end: 0.875rem; }
.footer-brand-mark { width: 2.25rem; height: 2.25rem; }
.footer-wordmark { font-size: 1.375rem; font-weight: 800; color: #fff; }
.footer-about { font-size: var(--step-small); line-height: 1.9; color: #94a3b8; max-width: 34ch; }
.footer-col-title { font-size: var(--step-small); font-weight: 700; color: #fff; margin-block-end: 0.875rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: var(--step-small); color: #94a3b8; transition: color var(--t-hover) ease; }
.footer-links a:hover { color: #fff; }
.footer-claims { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-start: 1rem; }
/* Trust seals under the support column: small light tiles so third-party logos stay readable on the dark band. */
.footer-trust { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-block-start: 1.25rem; }
.footer-trust-seal { display: flex; align-items: center; justify-content: center; width: 4.5rem; height: 4.5rem; padding: 0.25rem; background: var(--bg); border-radius: var(--radius); }
.footer-trust-seal-plain { background: transparent; padding: 0; }
.footer-trust-seal a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.footer-trust-seal img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.footer-claim { font-size: var(--step-xs); font-weight: 600; color: #d1fae5; padding: 0.25rem 0.625rem; border: 1px solid rgba(209, 250, 229, 0.25); border-radius: var(--radius-sm); }
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .footer-brand { justify-content: center; }
  .footer-about { margin-inline: auto; font-size: var(--step-body); }
  .footer-claims { justify-content: center; }
  .footer-trust { justify-content: center; }
  .footer-links { align-items: center; gap: 0.75rem; }
  .footer-col-title { font-size: var(--step-lead); margin-block-end: 0.75rem; }
  .footer-links a, .footer-links span { font-size: var(--step-body); }
  .footer-bottom { flex-direction: column; justify-content: center; text-align: center; }
}
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
  margin-block-start: 2.5rem; padding-block-start: 1.25rem;
  border-block-start: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--step-xs); color: #64748b;
}

/* ---------- 18. Page head band (every inner page starts with this) ---------- */
.page-head {
  background-color: var(--accent-wash);
  background-image: var(--pattern-dots);
  background-size: var(--pattern-size);
  border-block-end: 1px solid var(--accent-line);
  padding-block: clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 3.5vw, 2.25rem);
}
.page-head-inner { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; }
.page-head h1 { font-size: var(--step-title); }
.page-head-lead { margin-block-start: 0.375rem; color: var(--ink-soft); font-size: var(--step-lead); line-height: var(--leading-lead); max-width: 62ch; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.page-body { padding-block: clamp(1.5rem, 4vw, 2.5rem) var(--section-y); }

/* ---------- 19. Card / panel ---------- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.125rem, 2.5vw, 1.5rem);
}
.card-muted { background: var(--surface); border-color: transparent; }
.card-title { font-size: var(--step-h3); font-weight: 700; margin-block-end: 0.5rem; }
.card-sub { font-size: var(--step-small); color: var(--muted); }
.card + .card { margin-block-start: 1rem; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.kv { display: flex; flex-direction: column; gap: 0.625rem; }
.kv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-size: var(--step-small); }
.kv-row dt, .kv-key { color: var(--muted); }
.kv-row dd, .kv-val { font-weight: 600; color: var(--ink); text-align: end; }
.kv-total { padding-block-start: 0.75rem; border-block-start: 1px dashed var(--border-dark); font-size: var(--step-body); }
.kv-total .kv-key { color: var(--ink); font-weight: 700; }
.kv-total .kv-val { font-size: var(--step-lead); font-weight: 800; }

/* ---------- 20. Product card ---------- */
.product-grid, .showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: var(--gutter);
}
.product-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--t-hover) ease, box-shadow var(--t-ui) ease;
}
.product-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); }
.product-card-media {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--surface);
  background-image: var(--pattern-dots);
  background-size: var(--pattern-size);
  border-block-end: 1px solid var(--border);
}
.product-card-media img { width: 100%; height: 100%; max-width: 100%; object-fit: contain; background: transparent; }
.product-card-monogram {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.5rem; height: 3.5rem; border-radius: var(--radius-lg);
  background: var(--bg); border: 1px solid var(--accent-line);
  font-size: 1.375rem; font-weight: 800; color: var(--accent);
  direction: ltr;
}
.product-card-body { display: flex; flex-direction: column; gap: 0.375rem; padding: 1rem 1.125rem 0.75rem; flex: 1; }
.product-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.product-plan-tag, .product-card-category { font-size: var(--step-xs); font-weight: 600; color: var(--muted); }
.product-title { font-size: var(--step-lead); font-weight: 700; line-height: 1.5; }
.product-title a { color: var(--ink); }
.product-title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.product-title a:hover { color: var(--accent); }
.product-desc {
  font-size: var(--step-small); color: var(--muted); line-height: 1.8;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card-footer {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem 1.125rem 1rem;
  border-block-start: 1px dashed var(--border);
}
.product-card-footer .btn { position: relative; z-index: 1; }
.product-card-cta { font-size: var(--step-small); font-weight: 700; color: var(--accent); white-space: nowrap; }
/* Old (compare-at) price shares the «شروع قیمت از» line, so every card footer keeps the same height. */
.product-card-footer > div { min-width: 0; }
.product-card-footer .price-from { white-space: nowrap; }
.product-card-footer .price-from .price-compare { margin-inline-start: 0.375rem; font-size: inherit; }

/* ---------- 21. Delivery slip (the brand's signature object: a ticket) ---------- */
.delivery-slip {
  --slip-notch: 0.875rem;
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.slip-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.125rem 1.25rem; }
.slip-brand { display: flex; align-items: center; gap: 0.5rem; font-size: var(--step-body); font-weight: 800; color: var(--ink); }
.slip-brand img { width: 1.5rem; height: 1.5rem; }
.slip-order-id { font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr; }
.slip-tear {
  position: relative; height: 0; margin-inline: 1.25rem;
  border-block-start: 2px dashed var(--border);
}
.slip-tear::before, .slip-tear::after {
  content: ""; position: absolute; inset-block-start: calc(var(--slip-notch) / -2 - 1px);
  width: var(--slip-notch); height: var(--slip-notch); border-radius: var(--radius-full);
  background: var(--slip-bg, var(--accent-wash)); border: 1px solid var(--border);
}
.slip-tear::before { inset-inline-start: calc(-1.25rem - var(--slip-notch) / 2); clip-path: inset(0 0 0 50%); }
.slip-tear::after  { inset-inline-end: calc(-1.25rem - var(--slip-notch) / 2); clip-path: inset(0 50% 0 0); }
[dir="rtl"] .slip-tear::before { clip-path: inset(0 50% 0 0); }
[dir="rtl"] .slip-tear::after  { clip-path: inset(0 0 0 50%); }
.slip-body { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.125rem 1.25rem; }
.slip-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.slip-row-label { font-size: var(--step-small); color: var(--muted); }
.slip-row-val { font-size: var(--step-small); font-weight: 700; color: var(--ink); text-align: end; }
.slip-credential-box {
  background: var(--surface-dark); color: #e2e8f0;
  border-radius: var(--radius); padding: 0.75rem 0.875rem;
  font-family: var(--font-mono); font-size: var(--step-xs); line-height: 2;
  direction: ltr; text-align: left;
}
.slip-credential-box .k { color: #94a3b8; }
.slip-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; background: var(--surface);
  border-block-start: 1px solid var(--border);
  border-end-start-radius: var(--radius-lg); border-end-end-radius: var(--radius-lg);
}
.slip-footer .price-amount { font-size: var(--step-head); }
.slip-tabs { display: flex; gap: 0.25rem; padding: 0.25rem; margin-block-end: 0.875rem; background: var(--bg); border: 1px solid var(--accent-line); border-radius: var(--radius); }
.slip-tab {
  flex: 1 1 0; min-width: 0; min-height: 2.25rem; padding-inline: 0.5rem;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  font-size: var(--step-small); font-weight: 600; color: var(--muted);
  border-radius: calc(var(--radius) - 3px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color var(--t-hover) ease, background-color var(--t-hover) ease;
}
.slip-tab:hover { color: var(--ink); text-decoration: none; }
.slip-tab.is-active { background: var(--accent); color: var(--accent-ink); }

/* ---------- 22. Product page ---------- */
.product-page-wide { max-width: min(100%, 1440px); }
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) minmax(0, 24rem);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}
@media (max-width: 1100px) {
  .product-detail { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); }
  .product-summary { grid-column: 1 / -1; }
}
.product-gallery { display: flex; flex-direction: column; gap: 0.75rem; }
.product-main-media, .product-visual {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1rem;
  aspect-ratio: 1 / 1;
  background-color: var(--accent-wash);
  background-image: var(--pattern-dots);
  background-size: var(--pattern-size);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}
.product-main-media { padding: 0; overflow: hidden; }
.product-main-media img { width: 100%; height: 100%; max-width: 100%; object-fit: contain; }
.product-visual-title { font-size: var(--step-head); font-weight: 800; color: var(--ink); }
.product-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0.5rem; }
.product-thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.product-info { display: flex; flex-direction: column; gap: 1.25rem; }
.product-info-head h1 { font-size: var(--step-title); margin-block-end: 0.375rem; }
.product-info-head p { color: var(--muted); font-size: var(--step-lead); line-height: var(--leading-lead); }
.product-claims { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.plan-fieldset { border: none; padding: 0; margin: 0; min-width: 0; }
.plan-fieldset legend { font-size: var(--step-body); font-weight: 700; margin-block-end: 0.75rem; padding: 0; }
.plan-selector-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
@media (max-width: 520px) { .plan-selector-grid { grid-template-columns: minmax(0, 1fr); } }
/* Selected-plan details under the plan selector (plain-text lists from admin, one item per line). */
.plan-details { margin-block-start: 1rem; }
.plan-details-title { font-size: var(--step-body); font-weight: 700; margin-block-end: 0.625rem; }
.plan-details .kv { gap: 0.375rem; }
.plan-details-section { margin-block-start: 0.875rem; }
.plan-details-section h3 { font-size: var(--step-small); font-weight: 700; color: var(--ink); margin-block-end: 0.25rem; }
.plan-details .checklist { gap: 0.25rem; }
ul.plan-terms { list-style: disc; padding-inline-start: 1.125rem; margin: 0; font-size: var(--step-small); color: var(--ink-soft); line-height: 1.9; }
.plan-terms li + li { margin-block-start: 0.25rem; }
.plan-terms li::marker { color: var(--muted); }
.plan-details-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-block-start: 0.75rem; font-size: var(--step-small); }
.plan-details-links a { color: var(--accent); }
.summary-saving { font-size: var(--step-small); font-weight: 600; color: var(--ok); margin: 0; }
.checkout-plan-terms { margin-block-start: 0.5rem; font-size: var(--step-small); }
.checkout-plan-terms summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.checkout-plan-terms .plan-terms { margin-block-start: 0.375rem; }
.buy-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.buy-box-title { font-size: var(--step-lead); padding: 1rem 1.25rem 0; }
.buy-box-body { padding: 0.75rem 1.25rem; }
.product-summary { position: sticky; top: calc(var(--header-h) + 1rem); }
@media (max-width: 1100px) { .product-summary { position: static; } }
.kv dd.text-ok { color: var(--ok); font-weight: 700; }
.kv dd.text-danger { color: var(--danger); font-weight: 700; }
.buy-box .kv { gap: 0.375rem; }
.buy-box-foot {
  display: flex; flex-direction: column; gap: 0.875rem;
  padding: 1rem 1.25rem; background: var(--surface); border-block-start: 1px solid var(--border);
}
.buy-box-total { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; font-weight: 600; color: var(--ink-soft); }
.buy-box-foot .price-amount { font-size: var(--step-head); }
/* Phones: one column that never grows past the screen (a plain 1fr track grows to its widest content, so a large
   image or table in the description widened the whole page). The info column is unwrapped so the buy box can sit
   right after the plan details, above the description/terms/FAQ (DESIGN.md §8, product page). */
@media (max-width: 760px) {
  .product-detail { grid-template-columns: minmax(0, 1fr); }
  .product-detail > * { min-width: 0; }
  .product-info { display: contents; }
  .product-gallery { order: 1; }
  .product-info > .product-info-head, .product-info > .product-claims, .product-info > .notice, .product-info > .plan-fieldset, .product-info > .plan-details { order: 2; }
  .product-summary { order: 3; }
  .product-info > .product-note { order: 4; }
  /* Directly under the plan details on phones: price and button only, the rows would repeat the panel above. */
  .product-summary .buy-box-title, .product-summary .buy-box-body { display: none; }
  .product-summary .buy-box-foot { border-block-start: 0; }
}
.price-block { display: flex; flex-direction: column; align-items: flex-end; gap: 0.125rem; }
.price-block .price { gap: 0.5rem; }
.price-discount { font-size: var(--step-small); font-weight: 600; color: var(--ok); }
.price-block [hidden], .price [hidden] { display: none; }
.product-sections { margin-block-start: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; width: 100%; }
.product-sections .prose { text-align: start; max-width: none; }
.product-sections .prose p { max-width: none; }
.product-sections .faq-summary > span { flex: 1; text-align: start; }
.product-content-section { min-width: 0; text-align: start; }
.product-content-section > h2 { margin-block-end: 0.875rem; font-size: var(--step-h3); text-align: start; }
.product-content-section .prose { text-align: start; font-size: var(--step-body); line-height: var(--leading-body); }
.product-content-section .prose p { max-width: none; }
.product-content-section .faq-summary > span { flex: 1; text-align: start; }

/* legacy (selected plan summary used by cart/checkout) */
.selected-plan-summary { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.selected-plan-rows { display: flex; flex-direction: column; gap: 0.75rem; }

/* ---------- 23. FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 0.625rem; width: 100%; }
.faq-item {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color var(--t-hover) ease;
}
.faq-item[open] { border-color: var(--accent-line); }
.faq-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.875rem 1.125rem; font-size: var(--step-body); font-weight: 700; color: var(--ink);
  cursor: pointer; list-style: none;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-icon { width: 1.125rem; height: 1.125rem; color: var(--muted); flex-shrink: 0; transition: transform var(--t-ui) ease; }
details[open] > .faq-summary .faq-icon { transform: rotate(180deg); color: var(--accent); }
.faq-answer { padding: 0 1.125rem 1rem; font-size: var(--step-body); color: var(--ink-soft); line-height: var(--leading-body); }

/* ---------- 24. Prose (long text: terms, warranty, product description) ---------- */
.prose { font-size: var(--step-body); line-height: 2; color: var(--ink-soft); }
.prose > * + * { margin-block-start: 0.875rem; }
.prose h2 { font-size: var(--step-h3); color: var(--ink); margin-block-start: 2.75rem; }
.prose h3 { font-size: var(--step-lead); color: var(--ink); margin-block-start: 1.5rem; }
.prose h2:first-child, .prose h3:first-child { margin-block-start: 0; }
.prose ul, .prose ol { padding-inline-start: 1.25rem; }
.prose li + li { margin-block-start: 0.375rem; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.25em; }
.prose img { border-radius: var(--radius); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; } }
.article-aside { position: sticky; top: calc(var(--header-h) + 4rem); display: flex; flex-direction: column; gap: 1rem; }
@media (max-width: 900px) { .article-aside { position: static; } }
.toc { display: flex; flex-direction: column; gap: 0.25rem; }
.toc a { font-size: var(--step-small); color: var(--ink-soft); padding: 0.375rem 0.625rem; border-radius: var(--radius-sm); border-inline-start: 2px solid var(--border); }
.toc a:hover { color: var(--accent); border-inline-start-color: var(--accent); background: var(--accent-wash); }

/* ---------- 25. Cart & checkout ---------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(1.25rem, 3vw, 2rem); align-items: start; }
@media (max-width: 960px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-lines { display: flex; flex-direction: column; gap: 0.875rem; }
.cart-line-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.125rem 1.25rem; display: flex; flex-direction: column; gap: 0.875rem; }
.cart-line-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.cart-line-title { font-size: var(--step-lead); font-weight: 700; color: var(--ink); }
.cart-line-title a:hover { color: var(--accent); }
.cart-line-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-block-start: 0.25rem; font-size: var(--step-small); color: var(--muted); }
.cart-line-controls { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 0.875rem; padding-block-start: 0.875rem; border-block-start: 1px dashed var(--border); }
.cart-line-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.875rem; flex: 1; }
.cart-line-fields .form-group { margin: 0; }
.cart-qty-group { display: inline-flex; align-items: center; border: 1px solid var(--border-dark); border-radius: var(--radius); overflow: hidden; }
.cart-qty-group .btn { border: 0; border-radius: 0; min-height: 2.5rem; min-width: 2.5rem; background: var(--surface); }
.cart-qty-group .form-control { width: 3.5rem; min-height: 2.5rem; border: 0; border-radius: 0; text-align: center; box-shadow: none; -moz-appearance: textfield; }
.cart-qty-group .form-control::-webkit-inner-spin-button { -webkit-appearance: none; }
.summary-card { position: sticky; top: calc(var(--header-h) + 4rem); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
@media (max-width: 960px) { .summary-card { position: static; } }
.summary-title { font-size: var(--step-h3); font-weight: 700; }
.checkout-steps { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: var(--step-small); color: var(--muted); }
.checkout-steps .is-current { color: var(--accent); font-weight: 700; }
.checkout-steps .sep { color: var(--border-dark); }

/* ---------- 26. Auth (login) ---------- */
.auth-page {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1.5rem, 5vw, 3.5rem) var(--margin);
  background-color: var(--accent-wash);
  background-image: var(--pattern-dots);
  background-size: var(--pattern-size);
}
.auth-shell { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 1rem; }
.auth-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}
.auth-card-brand { display: flex; align-items: center; gap: 0.5rem; margin-block-end: 1.25rem; font-weight: 800; color: var(--ink); }
.auth-card-brand img { width: 2rem; height: 2rem; }
.auth-steps { display: flex; gap: 0.375rem; margin-block-end: 1.25rem; }
.auth-steps span { flex: 1; height: 4px; border-radius: var(--radius-full); background: var(--border); }
.auth-steps span.is-done { background: var(--accent); }
.auth-title { font-size: var(--step-head); font-weight: 800; margin-block-end: 0.375rem; }
.auth-lead { font-size: var(--step-small); color: var(--muted); line-height: 1.9; margin-block-end: 1.25rem; }
.auth-lead strong { color: var(--ink); }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block-start: 1rem; font-size: var(--step-small); }
.auth-legal { margin-block-start: 1rem; font-size: var(--step-xs); color: var(--muted); line-height: 1.9; text-align: center; }
.auth-benefits { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1rem; font-size: var(--step-small); color: var(--ink-soft); }
.auth-benefits li { display: inline-flex; align-items: center; gap: 0.375rem; }
.auth-benefits li::before { content: ""; width: 0.375rem; height: 0.375rem; border-radius: var(--radius-full); background: var(--accent); }

/* ---------- 27. Account ---------- */
.account-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2rem); align-items: start; }
.account-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; padding: 0.5rem; }
.account-tabs a, .account-tabs button {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 0.75rem; border-radius: var(--radius-sm);
  font-size: var(--step-small); font-weight: 600; color: var(--ink-soft); text-align: start;
}
.account-tabs a:hover, .account-tabs a.is-active { background: var(--accent-wash); color: var(--accent); }
.account-tabs form { margin-inline-start: auto; }
.account-tabs button { color: var(--danger); }
.account-tabs button:hover { background: var(--danger-bg); }
.account-management { font-size: var(--step-small); }
.account-management .grid-2 { align-items: start; }
.account-management :is(.form-control, .form-label, .form-help, .btn, .status-badge) { font-size: var(--step-small); }
.account-management .form-group { margin-block-end: 0; }
.account-management .stack { gap: 0.875rem; }
.account-management > .notice { margin-block-end: 1rem; }
.account-wallet .grid-2 { align-items: start; }
.account-orders-cards { display: none; }
@media (max-width: 639px) {
  .account-orders-table { display: none; }
  .account-orders-cards { display: flex; }
}
.account-identity { display: flex; align-items: center; gap: 0.875rem; padding: 0.75rem; border-block-end: 1px solid var(--border); margin-block-end: 0.25rem; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius-full);
  background: var(--accent-soft); color: var(--accent); font-weight: 800;
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.875rem; }
.stat { align-self: start; background: var(--surface); border-radius: var(--radius-lg); padding: 1rem 1.125rem; }
.stat-label { font-size: var(--step-small); color: var(--muted); }
.stat-value { font-size: var(--step-lead); font-weight: 800; color: var(--ink); margin-block-start: 0.25rem; }

/* ---------- 28. Info pages (about, contact) ---------- */
.fact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.875rem; }
@media (max-width: 720px) { .fact-list { grid-template-columns: 1fr; } }
.fact { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.125rem 1.25rem; border-inline-start: 3px solid var(--accent); }
.fact h3 { font-size: var(--step-lead); margin-block-end: 0.25rem; }
.fact p { font-size: var(--step-small); color: var(--muted); line-height: 1.9; }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.channel {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.125rem 1.25rem;
}
.channel-primary { border-color: var(--accent-line); background: var(--accent-wash); }
a.channel { color: inherit; text-decoration: none; transition: border-color var(--t-hover) var(--ease-out); }
a.channel:hover { border-color: var(--accent-line); }
.channel-name { font-size: var(--step-lead); font-weight: 700; }
.channel-value { font-size: var(--step-small); color: var(--muted); margin-block-start: 0.125rem; }
.checklist { display: flex; flex-direction: column; gap: 0.5rem; font-size: var(--step-small); color: var(--ink-soft); line-height: 1.9; }
.checklist li { display: flex; gap: 0.625rem; }
.checklist li::before {
  content: ""; flex-shrink: 0; width: 1.125rem; height: 1.125rem; margin-block-start: 0.3rem;
  border-radius: var(--radius-full); background: var(--accent-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f766e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 0.7rem no-repeat;
}

/* ---------- 29. CTA band ---------- */
.cta-band {
  margin-block-start: var(--section-y);
  background: var(--surface-dark); color: #cbd5e1;
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.25rem;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.2px);
  background-size: var(--pattern-size);
}
.cta-band h2 { color: #fff; font-size: var(--step-head); }
.cta-band p { color: #94a3b8; margin-block-start: 0.25rem; font-size: var(--step-body); }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 0.625rem; }

/* ---------- 30. Error / status pages ---------- */
.status-page { flex: 1; display: flex; align-items: center; justify-content: center; padding: var(--section-y) var(--margin); background-color: var(--surface); background-image: var(--pattern-dots); background-size: var(--pattern-size); }
.status-card { width: 100%; max-width: 560px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: clamp(1.5rem, 4vw, 2.5rem); display: flex; flex-direction: column; gap: 1rem; }
.error-code { font-size: var(--step-display); font-weight: 800; color: var(--accent); line-height: 1.1; font-variant-numeric: tabular-nums; }
.error-title { font-size: var(--step-head); font-weight: 800; }
.error-message { color: var(--muted); }
.error-telemetry-box { background: var(--surface); border-radius: var(--radius); padding: 0.875rem 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.error-telemetry-box code { font-family: var(--font-mono); font-size: var(--step-small); font-weight: 700; color: var(--ink); direction: ltr; word-break: break-all; }

/* ---------- 31. Steps (a real sequence → numbers are meaningful) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 1.25rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); counter-increment: step; }
.step::before {
  content: counter(step, persian);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; margin-block-end: 0.75rem;
  border-radius: var(--radius-full); background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: var(--step-small);
}
.step h3 { font-size: var(--step-lead); margin-block-end: 0.25rem; }
.step p { font-size: var(--step-small); color: var(--muted); line-height: 1.9; }

/* Delivery types list (home + warranty) */
.delivery-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
@media (max-width: 860px) { .delivery-types { grid-template-columns: 1fr; } }
.delivery-type { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.delivery-type h3 { font-size: var(--step-lead); }
.delivery-type p { font-size: var(--step-small); color: var(--muted); line-height: 1.9; }
.delivery-type dl { display: flex; flex-direction: column; gap: 0.375rem; margin-block-start: auto; padding-block-start: 0.75rem; border-block-start: 1px dashed var(--border); }
.delivery-type .status-badge { align-self: flex-start; }
.slip-on-white { --slip-bg: var(--bg); }
.search-box-page { flex: 1; max-width: 560px; }
.select-inline { width: auto; min-width: 160px; min-height: 2.5rem; }
.cart-email-field { flex: 1; min-width: 220px; }
.cart-line-remove { display: flex; justify-content: flex-end; margin-block-start: -0.5rem; }
.text-accent { color: var(--accent); }
.kv-total dt { color: var(--ink); font-weight: 700; }
.kv-total dd { font-size: var(--step-lead); font-weight: 800; }
.badge-start { align-self: flex-start; }

/* The alpha mask feathers image edges into the sampled image tone; no crop. */
.media-fade { display: flex; align-items: center; justify-content: center; background-color: var(--media-tone, var(--surface)); background-image: none; }
.media-fade img {
  width: var(--media-width, 100%); height: var(--media-height, 100%); max-width: 100%; max-height: 100%; object-fit: contain;
  mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent), linear-gradient(to bottom, transparent, black 4%, black 96%, transparent);
  mask-composite: intersect;
}

/* Compact account settings and the combined basket/checkout editor. */
.account-management .grid-2 { gap: 1.5rem; }
.account-management .input-group { max-width: 30rem; }
.account-management .form-control { min-height: 2.25rem; padding-block: 0.375rem; }
.account-management .input-group .btn { flex: 0 0 auto; white-space: nowrap; }
.account-management .card-title { font-size: var(--step-body); margin-block-end: 0; }
.account-phone { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.account-management .stack { gap: 0.625rem; }
.account-management .grid-2 > .stack { gap: 1.25rem; }
.account-management .form-help { margin-block-start: 0.25rem; }
.checkout-line-actions { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; }
.checkout-quantity { display: flex; align-items: center; gap: 0.25rem; }
.checkout-quantity .form-control { inline-size: 3rem; min-height: 2rem; padding: 0.25rem; text-align: center; font-size: var(--step-small); }
.checkout-quantity .btn { min-height: 2rem; padding: 0.25rem 0.5rem; }
.checkout-remove { padding: 0.375rem; min-height: 2rem; color: var(--danger); }
.checkout-remove svg { width: 1rem; height: 1rem; }
.checkout-line-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-block-start: 0.75rem; }
.checkout-line-fields .form-group { margin: 0; }
.checkout-line-fields :is(.form-control, .form-textarea) { font-size: var(--step-small); min-height: 2.5rem; }
.checkout-line-fields .form-textarea { resize: vertical; }
.order-payment-action { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
/* Orders table: status badge and «جزئیات» side by side; a compact button keeps the row as tall as the badge */
.account-orders-table .order-payment-action .btn-sm { min-height: 2rem; padding-block: 0; }
@media (max-width: 640px) {
  .checkout-line-fields { grid-template-columns: minmax(0, 1fr); }
  .account-management .input-group .btn { padding-inline: 0.625rem; }
}

.checkout-quantity output { min-inline-size: 1.5rem; text-align: center; font-size: var(--step-small); }
.checkout-line-actions .cart-line-fields { flex: 0 1 auto; }
.checkout-line-actions:has(.cart-line-fields) { align-items: flex-end; }
.account-layout .stat-grid .stat { padding: 0.75rem 1rem; }
.account-layout .stat-grid .stat-value { font-size: var(--step-body); }
@media (max-width: 900px) {
  .account-layout .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.625rem; }
}

.account-management { display: flex; flex-direction: column; gap: 1.25rem; }
.account-info-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: end; }
@media (max-width: 640px) { .account-info-fields { grid-template-columns: minmax(0, 1fr); gap: 0.625rem; } }

/* Encoded plain text in ticket conversations. */
.ticket-message, .delivery-note { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Editorial content reuses prose, cards and the article layout. */
.editorial-prose { max-inline-size: 70ch; line-height: 1.9; overflow-wrap: anywhere; }
.editorial-prose pre { white-space: pre-wrap; }
.editorial-cover { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 16 / 9; object-fit: contain; border-radius: var(--radius); }

/* Phones: calmer product cards with more side air */
@media (max-width: 639px) {
  .product-grid { gap: 1.25rem; }
  .product-card-media { aspect-ratio: 2 / 1; }
  .product-card-media img { padding: 0.75rem; }
}
.product-sections .section { padding-block: 2rem 1rem; }

.product-sections .section-head { margin-block-end: 1rem; }

/* Product notes (description, terms, FAQ) live under the plans, in plan-sized type */
.product-notes-gap { display: none; }
.product-note { margin-block-start: 1.125rem; }
.product-info > .product-note:last-child { margin-block-end: 2rem; }
.product-note h2 { font-size: var(--step-lead); margin-block-end: 0.375rem; }
.product-note h2 + .faq-list { margin-block-start: 0.875rem; }
.product-note .prose, .product-note .faq-answer, .product-note .faq-summary { font-size: var(--step-small); line-height: 1.9; }
.product-note .prose p { max-width: none; }
.product-note .faq-summary > span { flex: 1; text-align: start; }
