/*
 * Aperina components — plain CSS on role tokens (styles/aperino-tokens.css).
 * RTL-first: only logical properties (inline-start/end, block-start/end).
 * Imported into Tailwind's components layer by app/globals.css, and linked by the style guide.
 */

/* =========================================================
   Base text helpers
   ========================================================= */
.t-display { font-size: var(--text-display); line-height: var(--lh-display); font-weight: var(--fw-display); text-wrap: balance; }
.t-h1 { font-size: var(--text-h1); line-height: var(--lh-h1); font-weight: var(--fw-h1); text-wrap: balance; }
.t-h2 { font-size: var(--text-h2); line-height: var(--lh-h2); font-weight: var(--fw-h2); text-wrap: balance; }
.t-h3 { font-size: var(--text-h3); line-height: var(--lh-h3); font-weight: var(--fw-h3); }
.t-title { font-size: var(--text-title); line-height: var(--lh-title); font-weight: var(--fw-title); }
.t-body-lg { font-size: var(--text-body-lg); line-height: var(--lh-body-lg); }
.t-body { font-size: var(--text-body); line-height: var(--lh-body); }
.t-small { font-size: var(--text-small); line-height: var(--lh-small); }
.t-caption { font-size: var(--text-caption); line-height: var(--lh-caption); color: var(--text-muted); }
.t-label { font-size: var(--text-label); line-height: var(--lh-label); font-weight: var(--fw-label); }
.t-muted { color: var(--text-muted); }
.num { font-variant-numeric: normal; }
.ltr { direction: ltr; unicode-bidi: isolate; }

.link { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.4em; transition: text-decoration-color var(--dur-base) var(--ease-out); }
.link:hover { text-decoration-thickness: 2px; }

.divider { border: 0; border-block-start: 1px solid var(--divider); margin-block: var(--space-8); }

.prose { max-width: var(--measure); font-size: var(--text-body); line-height: var(--lh-body); }
.prose > * + * { margin-block-start: var(--space-4); }
.prose h2 { font-size: var(--text-h3); font-weight: 600; line-height: var(--lh-h3); margin-block-start: var(--space-10); }
.prose ul, .prose ol { padding-inline-start: var(--space-6); }
.prose li + li { margin-block-start: var(--space-2); }
.prose blockquote { margin: var(--space-8) 0; padding-inline-start: var(--space-6); border-inline-start: 1px solid var(--primary); font-size: var(--text-title); font-weight: 200; line-height: 1.8; }

/* =========================================================
   Buttons & CTAs
   ========================================================= */
.btn {
  --btn-h: var(--control-md);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--btn-h); padding-inline: var(--space-6); padding-block: 0;
  border-radius: var(--radius-cta); border: 1px solid transparent;
  font: inherit; font-size: var(--text-label); font-weight: 500; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer; user-select: none;
  transition: background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm { --btn-h: var(--control-sm); padding-inline: var(--space-4); font-size: var(--text-caption); }
.btn-lg { --btn-h: var(--control-lg); padding-inline: var(--space-8); font-size: var(--text-body); }
.btn-block { display: flex; width: 100%; }

.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }

.btn-secondary { background: transparent; color: var(--text); border-color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: var(--text); color: var(--bg); }

.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: color-mix(in oklab, var(--text) 7%, transparent); }

.btn-inverse { background: var(--ap-cream); color: var(--ap-mocha); }
.btn-inverse:hover:not(:disabled) { background: var(--ap-sand); }
.btn-outline-inverse { background: transparent; color: var(--ap-cream); border-color: color-mix(in oklab, var(--ap-cream) 70%, transparent); }
.btn-outline-inverse:hover:not(:disabled) { background: var(--ap-cream); color: var(--ap-mocha); }

.btn-danger { background: transparent; color: var(--error); border-color: var(--error); }
.btn-danger:hover:not(:disabled) { background: var(--error); color: var(--bg); }

.btn-link { background: none; border: 0; padding-inline: 0; min-height: auto; color: var(--link); text-decoration: underline; text-underline-offset: 0.45em; text-decoration-thickness: 1px; }
.btn-link:hover { text-decoration-thickness: 2px; }

.btn-icon { width: var(--btn-h); padding-inline: 0; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"] .btn-label { opacity: 0.85; }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; border-inline-end-color: transparent; animation: ap-spin 0.8s linear infinite; flex: none; }
@keyframes ap-spin { to { transform: rotate(360deg); } }

/* Arrow that points in reading direction (RTL → left) */
.arrow { transition: transform var(--dur-base) var(--ease-out); }
.btn:hover .arrow { transform: translateX(-4px); }

/* CTA: full-width wine band */
.cta-band {
  background: var(--bg-brand); color: var(--text-on-brand);
  padding: clamp(var(--space-8), 6vw, var(--space-20)) clamp(var(--space-6), 5vw, var(--space-16));
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-8); align-items: end;
  border-radius: var(--radius-cta);
}
.cta-band p { color: var(--text-on-brand-muted); }
@media (max-width: 720px) { .cta-band { grid-template-columns: 1fr; } }

/* CTA: inline card within content */
.cta-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-6); border: 1px solid var(--border); background: var(--bg-raised); border-radius: var(--radius-panel); }

/* CTA: sticky mobile booking bar */
.cta-sticky { position: sticky; bottom: 0; z-index: var(--z-sticky);
  display: flex; gap: var(--space-3); align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4); padding-block-end: calc(var(--space-3) + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--bg) 94%, transparent); backdrop-filter: blur(12px);
  border-block-start: 1px solid var(--border); box-shadow: var(--shadow-2); }

/* CTA: contact row (phone, WhatsApp, Instagram) */
.contact-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* =========================================================
   Forms
   ========================================================= */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.label { font-size: var(--text-label); font-weight: 500; color: var(--text); }
.label .req { color: var(--text-muted); font-weight: 400; }
.hint { font-size: var(--text-caption); line-height: var(--lh-caption); color: var(--text-muted); }
.error-text { display: flex; gap: var(--space-2); align-items: flex-start; font-size: var(--text-caption); line-height: var(--lh-caption); color: var(--error); }
.error-text svg { width: 16px; height: 16px; flex: none; margin-block-start: 3px; }

.input, .textarea, .select {
  width: 100%; min-height: var(--control-md);
  padding: 0 var(--space-4); border-radius: var(--radius-field);
  background: var(--bg-raised); color: var(--text);
  border: 1px solid var(--border-strong);
  font: inherit; font-size: var(--text-body); line-height: 1.6;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-base);
}
.textarea { padding-block: var(--space-3); min-height: 120px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); opacity: 0.8; }
.input:hover, .textarea:hover, .select:hover { border-color: var(--text); }
.input:focus, .textarea:focus, .select:focus, .input.is-focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in oklab, var(--focus-ring) 22%, transparent); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--error); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px color-mix(in oklab, var(--error) 22%, transparent); }
.input:disabled, .textarea:disabled, .select:disabled { background: var(--bg-muted); color: var(--text-muted); border-color: var(--border); cursor: not-allowed; }
.input[readonly] { background: transparent; border-style: dashed; }

.select {
  appearance: none; padding-inline-end: var(--space-10); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238A7E73' stroke-width='1.6'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left var(--space-4) center;
}

/* Input with addon: «تومان», «نفر», icons */
.input-group { display: flex; align-items: stretch; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-field); background: var(--bg-raised); transition: border-color var(--dur-base), box-shadow var(--dur-base); }
.input-group:focus-within { border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in oklab, var(--focus-ring) 22%, transparent); }
.input-group .input { border: 0; background: transparent; box-shadow: none; }
.input-group .addon { display: flex; align-items: center; padding-inline: var(--space-4); color: var(--text-muted); font-size: var(--text-small); border-inline-start: 1px solid var(--border); white-space: nowrap; }
.input-group .addon:first-child { border-inline-start: 0; border-inline-end: 1px solid var(--border); }

/* Search */
.search { position: relative; }
.search svg { position: absolute; inset-inline-start: var(--space-4); top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.search .input { padding-inline-start: var(--space-12); }

/* Guest / quantity stepper */
.qty { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-field); background: var(--bg-raised); }
.qty button { width: var(--control-md); height: var(--control-md); border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1.25rem; cursor: pointer; }
.qty button:hover:not(:disabled) { background: color-mix(in oklab, var(--text) 7%, transparent); }
.qty button:disabled { color: var(--text-subtle); cursor: not-allowed; }
.qty output { min-width: 3.5rem; text-align: center; font-variant-numeric: normal; font-weight: 500; }

/* Checkbox & radio */
.check, .radio { display: inline-flex; align-items: flex-start; gap: var(--space-3); cursor: pointer; font-size: var(--text-body); line-height: 1.7; }
.check input, .radio input {
  appearance: none; flex: none; width: 20px; height: 20px; margin: 0; margin-block-start: 0.25em;
  border: 1px solid var(--border-strong); background: var(--bg-raised); cursor: pointer;
  display: grid; place-content: center; transition: background-color var(--dur-fast), border-color var(--dur-fast);
}
.check input { border-radius: var(--radius-sm); }
.radio input { border-radius: 50%; }
.check input::after { content: ""; width: 10px; height: 6px; border: 1.75px solid var(--on-primary); border-block-start: 0; border-inline-end: 0; rotate: -45deg; translate: 0 -1px; scale: 0; transition: scale var(--dur-fast) var(--ease-out); }
.radio input::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--on-primary); scale: 0; transition: scale var(--dur-fast) var(--ease-out); }
.check input:checked, .radio input:checked { background: var(--primary); border-color: var(--primary); }
.check input:checked::after, .radio input:checked::after { scale: 1; }
.check input:focus-visible, .radio input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.check input:disabled, .radio input:disabled { background: var(--bg-muted); border-color: var(--border); cursor: not-allowed; }
.check:has(input:disabled), .radio:has(input:disabled) { color: var(--text-muted); cursor: not-allowed; }

/* Switch */
.switch { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; }
.switch input { appearance: none; margin: 0; width: 44px; height: 26px; border-radius: var(--radius-pill); background: var(--bg-muted); border: 1px solid var(--border-strong); position: relative; cursor: pointer; transition: background-color var(--dur-base) var(--ease-out); }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg-raised); box-shadow: var(--shadow-1); transition: inset-inline-start var(--dur-base) var(--ease-out); }
.switch input:checked { background: var(--primary); border-color: var(--primary); }
.switch input:checked::after { inset-inline-start: 21px; background: var(--on-primary); }
.switch input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Choice card (radio as card: package, event type) */
.choice { position: relative; display: grid; gap: var(--space-1); padding: var(--space-5); border-radius: var(--radius-field); border: 1px solid var(--border); background: var(--bg-raised); cursor: pointer; transition: border-color var(--dur-base), background-color var(--dur-base); }
.choice:hover { border-color: var(--border-strong); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--primary); }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--space-5); }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.fieldset legend { font-size: var(--text-label); font-weight: 500; margin-block-end: var(--space-2); padding: 0; }

/* =========================================================
   Chips, badges, tags
   ========================================================= */
.chip { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 36px; padding-inline: var(--space-4); border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: transparent; color: var(--text); font: inherit; font-size: var(--text-caption); font-weight: 500; cursor: pointer; transition: background-color var(--dur-base), color var(--dur-base), border-color var(--dur-base); }
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--radius-pill); font-size: var(--text-micro); font-weight: 500; line-height: 1.7; white-space: nowrap; background: var(--bg-muted); color: var(--text); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge-brand { background: var(--accent-tint); color: var(--on-accent-tint); }
.badge-success { background: var(--success-tint); color: var(--success); }
.badge-warning { background: var(--warning-tint); color: var(--warning); }
.badge-error { background: var(--error-tint); color: var(--error); }
.badge-info { background: var(--info-tint); color: var(--info); }

.tag { display: inline-flex; align-items: center; padding: 0 10px; min-height: 26px; border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: var(--text-micro); color: var(--text-muted); }

/* =========================================================
   Navigation
   ========================================================= */
.navbar { position: sticky; top: 0; z-index: var(--z-sticky); background: color-mix(in oklab, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-block-end: 1px solid var(--divider); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); min-height: 72px; }
.navbar-links { display: flex; gap: var(--space-8); list-style: none; margin: 0; padding: 0; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: var(--text-label); font-weight: 500; padding-block: var(--space-2); border-block-end: 1px solid transparent; transition: color var(--dur-base), border-color var(--dur-base); }
.nav-link:hover { color: var(--text); }
.nav-link[aria-current="page"] { color: var(--text); border-block-end-color: var(--primary); }
.navbar.on-photo { background: transparent; border-color: transparent; backdrop-filter: none; color: var(--ap-cream); }
.navbar.on-photo .nav-link { color: color-mix(in oklab, var(--ap-cream) 80%, transparent); }
@media (max-width: 900px) { .navbar-links { display: none; } }

.breadcrumb { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: 0; font-size: var(--text-caption); color: var(--text-muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: var(--space-2); color: var(--text-subtle); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 0.4em; }
.breadcrumb [aria-current] { color: var(--text); }

.tabs { display: flex; gap: var(--space-6); border-block-end: 1px solid var(--divider); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; background: none; border: 0; padding: var(--space-3) 0; color: var(--text-muted); font: inherit; font-size: var(--text-label); font-weight: 500; cursor: pointer; white-space: nowrap; }
.tab::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px; background: var(--primary); scale: 0 1; transition: scale var(--dur-base) var(--ease-out); }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after { scale: 1 1; }
.tab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--bg-raised); }
.segmented button { border: 0; background: transparent; color: var(--text-muted); font: inherit; font-size: var(--text-caption); font-weight: 500; min-height: 32px; padding-inline: var(--space-4); border-radius: var(--radius-pill); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.segmented button[aria-checked="true"], .segmented button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.segmented svg { width: 14px; height: 14px; }

.pagination { display: flex; gap: var(--space-1); align-items: center; list-style: none; margin: 0; padding: 0; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; padding-inline: var(--space-3); border-radius: var(--radius-cta); color: var(--text); text-decoration: none; font-size: var(--text-small); font-variant-numeric: normal; }
.pagination a:hover { background: color-mix(in oklab, var(--text) 7%, transparent); }
.pagination [aria-current="page"] { background: var(--text); color: var(--bg); }
.pagination .is-disabled { color: var(--text-subtle); pointer-events: none; }

/* Booking steps */
.steps { display: flex; list-style: none; margin: 0; padding: 0; gap: var(--space-2); counter-reset: step; }
.steps li { flex: 1; display: grid; gap: var(--space-2); font-size: var(--text-caption); color: var(--text-muted); counter-increment: step; }
.steps li::before { content: ""; height: 2px; background: var(--border); }
.steps li[aria-current="step"], .steps li.is-done { color: var(--text); }
.steps li.is-done::before { background: var(--text); }
.steps li[aria-current="step"]::before { background: var(--primary); }

/* Accordion (FAQ) — native <details> */
.accordion { border-block-start: 1px solid var(--divider); }
.accordion details { border-block-end: 1px solid var(--divider); }
.accordion summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding-block: var(--space-5); cursor: pointer; font-size: var(--text-title); font-weight: 500; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; width: 12px; height: 12px; flex: none; border-inline-end: 1.5px solid currentColor; border-block-end: 1.5px solid currentColor; rotate: 45deg; translate: 0 -3px; transition: rotate var(--dur-base) var(--ease-out); }
.accordion details[open] summary::after { rotate: -135deg; translate: 0 3px; }
.accordion summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.accordion .panel { padding-block-end: var(--space-6); color: var(--text-muted); max-width: var(--measure); }

/* =========================================================
   Tables
   ========================================================= */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-small); line-height: 1.7; text-align: start; }
.table caption { caption-side: top; text-align: start; padding-block-end: var(--space-3); font-size: var(--text-caption); color: var(--text-muted); }
.table th, .table td { padding: var(--space-4) var(--space-4); text-align: start; vertical-align: top; border-block-end: 1px solid var(--divider); }
.table thead th { font-size: var(--text-caption); font-weight: 500; color: var(--text-muted); border-block-end: 1px solid var(--border-strong); white-space: nowrap; vertical-align: bottom; }
.table tbody th { font-weight: 500; }
.table .num, .table td.num, .table th.num { text-align: end; font-variant-numeric: normal; white-space: nowrap; }
.table tbody tr { transition: background-color var(--dur-fast); }
.table-hover tbody tr:hover { background: color-mix(in oklab, var(--text) 4%, transparent); }
.table-striped tbody tr:nth-child(even) { background: color-mix(in oklab, var(--bg-muted) 35%, transparent); }
.table-compact th, .table-compact td { padding-block: var(--space-2); }
.table tr[aria-selected="true"] { background: var(--accent-tint); }
.table tfoot td, .table tfoot th { border-block-end: 0; padding-block: var(--space-3); }
.table tfoot tr.total td, .table tfoot tr.total th { border-block-start: 1px solid var(--text); font-size: var(--text-body); font-weight: 600; padding-block-start: var(--space-4); }

/* Package comparison: featured column */
.table-compare th[scope="col"], .table-compare td { text-align: center; }
.table-compare th[scope="row"] { text-align: start; font-weight: 400; color: var(--text); }
.table-compare .is-featured { background: var(--accent-tint); }
.table-compare thead .is-featured { color: var(--on-accent-tint); border-block-start: 2px solid var(--primary); }
.table-compare .yes { color: var(--success); }
.table-compare .no { color: var(--text-subtle); }

/* Mobile stack: each row becomes a block, labels from data-label */
@media (max-width: 640px) {
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-stack tr { display: block; padding-block: var(--space-3); border-block-end: 1px solid var(--divider); }
  .table-stack td, .table-stack tbody th { display: flex; justify-content: space-between; gap: var(--space-4); border: 0; padding: var(--space-1) 0; text-align: start; }
  .table-stack td::before, .table-stack tbody th::before { content: attr(data-label); color: var(--text-muted); font-size: var(--text-caption); font-weight: 400; }
  .table-stack td.num { text-align: start; }
}

/* Description list: key/value details (booking summary) */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-3) var(--space-8); margin: 0; font-size: var(--text-small); }
.dl dt { color: var(--text-muted); }
.dl dd { margin: 0; }

/* =========================================================
   Cards & content blocks
   ========================================================= */
.card { background: var(--bg-raised); border: 1px solid var(--border); display: flex; flex-direction: column; }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-muted); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: scale var(--dur-slow) var(--ease-out); }
a.card:hover .card-media img, .card.is-link:hover .card-media img { scale: 1.03; }
.card-body { display: grid; gap: var(--space-2); padding: var(--space-5) var(--space-5) var(--space-6); }
.card-footer { margin-block-start: auto; padding: var(--space-4) var(--space-5); border-block-start: 1px solid var(--divider); display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }

.package { position: relative; display: flex; flex-direction: column; gap: var(--space-5); padding: var(--space-8) var(--space-6); border: 1px solid var(--border); background: var(--bg-raised); }
.package.is-featured { background: var(--bg-inverse); color: var(--text-inverse); border-color: var(--bg-inverse); }
.package.is-featured .t-muted, .package.is-featured .t-caption { color: color-mix(in oklab, var(--text-inverse) 72%, transparent); }
.package ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); font-size: var(--text-small); }
.package li { display: grid; grid-template-columns: 18px 1fr; gap: var(--space-3); }
.package li svg { width: 16px; height: 16px; margin-block-start: 6px; }
.package .btn { margin-block-start: auto; }

.menu-item { display: grid; gap: var(--space-1); padding-block: var(--space-5); border-block-end: 1px solid var(--divider); }
.menu-item-line { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: baseline; }
.menu-item-line .leader { border-block-end: 1px dotted var(--border-strong); translate: 0 -0.4em; }
.menu-item-line .price { font-size: var(--text-small); color: var(--text-muted); font-variant-numeric: normal; }

.quote { display: grid; gap: var(--space-4); }
.quote blockquote { margin: 0; font-size: var(--text-h3); font-weight: 200; line-height: 1.7; }
.quote figcaption { font-size: var(--text-caption); color: var(--text-muted); }

.photo { position: relative; overflow: hidden; background: var(--bg-muted); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo figcaption { position: absolute; inset-inline: 0; bottom: 0; padding: var(--space-10) var(--space-4) var(--space-3); color: var(--ap-cream); font-size: var(--text-caption); background: linear-gradient(to top, rgb(33 29 26 / 0.8), transparent); }

/* =========================================================
   Feedback
   ========================================================= */
.alert { display: grid; grid-template-columns: 20px 1fr auto; gap: var(--space-3); align-items: start; padding: var(--space-4) var(--space-5); border: 1px solid; border-radius: var(--radius-panel); font-size: var(--text-small); line-height: 1.8; }
.alert svg { width: 20px; height: 20px; margin-block-start: 3px; }
.alert b { font-weight: 600; display: block; }
.alert-info { background: var(--info-tint); color: var(--info); border-color: color-mix(in oklab, var(--info) 30%, transparent); }
.alert-success { background: var(--success-tint); color: var(--success); border-color: color-mix(in oklab, var(--success) 30%, transparent); }
.alert-warning { background: var(--warning-tint); color: var(--warning); border-color: color-mix(in oklab, var(--warning) 30%, transparent); }
.alert-error { background: var(--error-tint); color: var(--error); border-color: color-mix(in oklab, var(--error) 30%, transparent); }
.alert p { color: var(--text); }

.toast-region { position: fixed; inset-block-end: var(--space-6); inset-inline-start: var(--space-6); z-index: var(--z-toast); display: grid; gap: var(--space-3); }
.toast { display: flex; align-items: center; gap: var(--space-3); min-width: 280px; max-width: 420px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-panel); background: var(--bg-inverse); color: var(--text-inverse); box-shadow: var(--shadow-3); font-size: var(--text-small); animation: ap-toast-in var(--dur-slow) var(--ease-out); }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast .btn-link { color: inherit; margin-inline-start: auto; font-size: var(--text-caption); }
@keyframes ap-toast-in { from { opacity: 0; translate: 0 12px; } }

.dialog { border: 0; padding: 0; border-radius: var(--radius-panel); overflow: hidden; width: min(560px, calc(100vw - 32px)); background: var(--bg-raised); color: var(--text); box-shadow: var(--shadow-3); }
.dialog::backdrop { background: var(--overlay); }
.dialog[open] { animation: ap-dialog-in var(--dur-slow) var(--ease-out); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding: var(--space-5) var(--space-6); border-block-end: 1px solid var(--divider); }
.dialog-body { padding: var(--space-6); display: grid; gap: var(--space-4); }
.dialog-foot { display: flex; justify-content: flex-end; gap: var(--space-3); padding: var(--space-4) var(--space-6); border-block-start: 1px solid var(--divider); }
@keyframes ap-dialog-in { from { opacity: 0; translate: 0 16px; } }

.drawer { position: fixed; inset-block: 0; inset-inline-end: 0; width: min(380px, 88vw); z-index: var(--z-drawer); background: var(--bg); box-shadow: var(--shadow-3); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-6); translate: -100% 0; transition: translate var(--dur-slow) var(--ease-out); }
[dir="rtl"] .drawer { inset-inline-end: auto; inset-inline-start: 0; translate: 100% 0; }
.drawer.is-open { translate: 0 0; }

.tooltip { position: relative; }
.tooltip[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); inset-inline-start: 50%; translate: 50% 4px; z-index: var(--z-tooltip); white-space: nowrap; padding: 6px 10px; background: var(--bg-inverse); color: var(--text-inverse); font-size: var(--text-micro); line-height: 1.5; opacity: 0; pointer-events: none; transition: opacity var(--dur-fast), translate var(--dur-fast); }
.tooltip[data-tip]:hover::after, .tooltip[data-tip]:focus-visible::after { opacity: 1; translate: 50% 0; }

.skeleton { background: var(--skeleton); border-radius: var(--radius-xs); position: relative; overflow: hidden; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--bg-raised) 55%, transparent), transparent); translate: 100% 0; animation: ap-shimmer 1.4s var(--ease-in-out) infinite; }
@keyframes ap-shimmer { to { translate: -100% 0; } }

.progress { height: 4px; background: var(--bg-muted); overflow: hidden; }
/* Set the value with style="--value: 0.66" (0–1). Fills from the reading start (right in RTL). */
.progress > span { display: block; height: 100%; background: var(--primary); transform-origin: right center; scale: var(--value, 0) 1; transition: scale var(--dur-slow) var(--ease-out); }
[dir="ltr"] .progress > span { transform-origin: left center; }

.empty { display: grid; justify-items: center; text-align: center; gap: var(--space-3); padding: var(--space-12) var(--space-6); border: 1px dashed var(--border-strong); }
.empty svg { width: 40px; height: 40px; color: var(--text-subtle); }
.empty p { max-width: 38ch; color: var(--text-muted); }

/* =========================================================
   Footer
   ========================================================= */
.footer { background: var(--bg-inverse); color: var(--text-inverse); padding-block: var(--space-16) var(--space-8); }
.footer a { color: color-mix(in oklab, var(--text-inverse) 78%, transparent); text-decoration: none; }
.footer a:hover { color: var(--text-inverse); text-decoration: underline; text-underline-offset: 0.4em; }

/* =========================================================
   Site patterns
   ========================================================= */

/* Hero: copy + photo. On mobile the photo leads (food is the protagonist). */
.hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(var(--space-8), 5vw, var(--space-16)); align-items: center; }
.hero-copy { display: grid; gap: var(--space-6); align-content: center; }
.hero-copy .lede { color: var(--text-muted); font-size: var(--text-body-lg); line-height: var(--lh-body-lg); max-width: 44ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero-note { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-caption); line-height: var(--lh-caption); color: var(--text-muted); }
.hero-note svg { width: 16px; height: 16px; color: var(--success); flex: none; }
.hero-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-muted); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .hero-media { aspect-ratio: 4 / 3; order: -1; } }

/* Jalali date picker. Week starts on Saturday (شنبه). */
.datepicker { width: min(100%, 340px); padding: var(--space-4); background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-panel); box-shadow: var(--shadow-2); }
.datepicker-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-block-end: var(--space-2); }
.datepicker-head b { font-size: var(--text-title); line-height: var(--lh-title); font-weight: 600; }
.datepicker-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.datepicker-grid .dow { font-size: var(--text-micro); line-height: var(--lh-micro); color: var(--text-muted); padding-block: var(--space-2); }
.day { position: relative; height: 40px; border: 0; border-radius: var(--radius-field); background: transparent; color: var(--text); font: inherit; font-size: var(--text-small); cursor: pointer; transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.day:hover:not(:disabled) { background: color-mix(in oklab, var(--text) 7%, transparent); }
.day:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.day.is-today { box-shadow: inset 0 0 0 1px var(--border-strong); }
.day[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.day:disabled { color: var(--text-subtle); text-decoration: line-through; cursor: not-allowed; }
.day.is-few::after { content: ""; position: absolute; inset-inline: 0; bottom: 5px; margin-inline: auto; width: 4px; height: 4px; border-radius: 50%; background: var(--warning); }
.day[aria-pressed="true"].is-few::after { background: var(--on-primary); }
.datepicker-legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-block-start: var(--space-3); padding-block-start: var(--space-3); border-block-start: 1px solid var(--divider); font-size: var(--text-caption); line-height: var(--lh-caption); color: var(--text-muted); }
.datepicker-legend span { display: inline-flex; align-items: center; gap: 6px; }
.datepicker-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* Floating WhatsApp button. Sits above .cta-sticky on mobile. */
.fab { position: fixed; inset-block-end: var(--space-6); inset-inline-end: var(--space-6); z-index: var(--z-sticky); display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 52px; padding-inline: var(--space-5); border-radius: var(--radius-cta); background: var(--bg-inverse); color: var(--text-inverse); font-size: var(--text-label); font-weight: 500; text-decoration: none; box-shadow: var(--shadow-2); transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.fab svg { width: 22px; height: 22px; flex: none; }
.fab:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); }
.fab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.fab.is-demo { position: absolute; }
@media (max-width: 640px) {
  .fab { width: 52px; padding-inline: 0; }
  .fab .fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  body:has(.cta-sticky) .fab:not(.is-demo) { inset-block-end: calc(var(--space-6) + 72px); }
}

/* Result pages: confirmation, 404, errors */
.result { display: grid; gap: var(--space-6); max-width: 560px; align-content: start; }
.result-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--success-tint); color: var(--success); }
.result-icon svg { width: 28px; height: 28px; }
.result-code { font-size: var(--text-display); line-height: 1; font-weight: 100; color: var(--text-muted); }
.next-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); counter-reset: next; }
.next-steps li { display: grid; grid-template-columns: 28px 1fr; gap: var(--space-3); align-items: center; font-size: var(--text-small); line-height: var(--lh-small); counter-increment: next; }
.next-steps li::before { content: counter(next, persian); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-strong); font-size: var(--text-caption); }

/* Logo lockup (temporary wordmark until a real logo exists). Size with font-size on the element. */
.logo { display: inline-grid; gap: 0.3em; line-height: 1; color: inherit; text-decoration: none; }
.logo b { font-weight: 600; }
.logo small { font-size: 0.34em; font-weight: 400; opacity: 0.78; }

@media (prefers-reduced-motion: reduce) {
  .btn, .card-media img, .tab::after, .drawer, .toast, .dialog[open], .skeleton::after, .switch input::after { transition: none !important; animation: none !important; }
}
