/**
 * Shared component library used by both the customer app and the admin
 * dashboard: buttons, cards, forms, bottom sheets, toasts, modals, tables.
 */

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-surface-alt);
  color: var(--color-text);
  font-weight: 600;
  font-size: var(--text-md);
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              background-color var(--duration-fast) var(--ease-out),
              opacity var(--duration-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--zov-green, #10b981), var(--zov-teal, #14b8a6));
  color: var(--color-on-primary);
  box-shadow: var(--shadow-green);
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo), filter 0.3s var(--ease-out-expo);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-xl);
  filter: saturate(1.08);
}
.btn-primary:active { transform: translateY(0) scale(0.97); }

.btn-accent {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.btn-secondary {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
}
.btn-ghost:hover { background: var(--color-surface-alt); }

.btn-outline {
  background: linear-gradient(135deg, var(--color-bg) 50%, var(--color-primary-soft) 50%);
  background-size: 200% 100%;
  background-position: 100% 0;
  color: var(--color-text);
  border: 1.5px solid var(--color-border-strong);
  transition: background-position 0.35s var(--ease-out), border-color 0.3s var(--ease-out), color 0.3s var(--ease-out), transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.btn-outline:hover {
  background-position: 0% 0;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-danger { background: var(--color-error-soft); color: var(--color-error); }
.btn-danger.btn-solid { background: var(--color-error); color: #fff; }

.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 38px; padding: 0 var(--space-4); font-size: var(--text-sm); }
.btn-lg { min-height: 56px; padding: 0 var(--space-8); font-size: var(--text-lg); }

.btn-icon {
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: var(--radius-pill);
  background: var(--color-surface-alt);
}
.btn-icon.btn-sm { min-height: 36px; min-width: 36px; }

/* Ripple */
.ripple { position: relative; overflow: hidden; }
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  animation: ripple-anim 550ms var(--ease-out);
}
.btn-secondary .ripple-effect,
.btn-ghost .ripple-effect,
.btn-outline .ripple-effect,
.btn-danger .ripple-effect { background: rgba(10, 168, 79, 0.14); }
@keyframes ripple-anim {
  to { transform: scale(2.6); opacity: 0; }
}

/* Loading state: hide label, show spinner */
.btn-loading { color: transparent !important; pointer-events: none; }
.btn-loading::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  animation: spin 700ms linear infinite;
}
.btn-secondary.btn-loading::after,
.btn-ghost.btn-loading::after,
.btn-outline.btn-loading::after {
  border-color: rgba(10, 168, 79, 0.25);
  border-top-color: var(--color-primary);
}
@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2.5px solid var(--color-border-strong);
  border-top-color: var(--color-primary);
  animation: spin 700ms linear infinite;
  display: inline-block;
}

/* =========================================================
   Pre-loader — shown on initial load of every customer page
   (markup in customer/includes/header.php, hidden by JS in
   components.js once the page + assets are ready). Pure text +
   the existing .spinner primitive, deliberately no logo image
   here so the pre-loader itself never waits on a network request.
   ========================================================= */

.preloader {
  position: fixed;
  inset: 0;
  z-index: var(--z-preloader);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  opacity: 1;
  visibility: visible;
  transition: opacity var(--duration-slow) var(--ease-out), visibility 0s linear 0s;
}
.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-slow) var(--ease-out), visibility 0s linear var(--duration-slow);
}
.preloader-icon {
  width: 84px;
  height: 84px;
  object-fit: contain;
  animation: preloader-pulse 1.4s ease-in-out infinite;
}
.preloader-spinner { width: 28px; height: 28px; }
@keyframes preloader-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Lock scroll behind the overlay while it's visible — no JS needed for
   this part, it just tracks the .is-hidden toggle above. */
body:has(> .preloader:not(.is-hidden)) { overflow: hidden; }

/* =========================================================
   Cards
   ========================================================= */

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.card-elevated { box-shadow: var(--shadow-md); border: none; }
.card-pad { padding: var(--space-5); }

.tap-card {
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.tap-card:active { transform: scale(0.97); box-shadow: var(--shadow-sm); }

/* =========================================================
   Badges / Chips / Avatars
   ========================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.6;
  background: var(--badge-bg, var(--color-surface-alt));
  color: var(--badge-color, var(--color-text-secondary));
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  min-height: 44px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.chip.is-selected {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
/* The native radio/checkbox stays in the accessibility tree and keeps
   working via the <label for> association — just not drawn, since the
   chip-check glyph is already the visible selection indicator. */
.chip input[type="radio"],
.chip input[type="checkbox"] {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: var(--text-lg); }
.avatar-sm { width: 28px; height: 28px; font-size: var(--text-xs); }

/* =========================================================
   Forms — floating labels, inputs, selects, toggles
   ========================================================= */

.field {
  position: relative;
  margin-bottom: var(--space-5);
}
.field-input,
.field-select,
.field-textarea {
  width: 100%;
  min-height: 56px;
  padding: 24px var(--space-4) 8px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-md);
  color: var(--color-text);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
  appearance: none;
}
.field-textarea { min-height: 96px; padding-top: 26px; resize: vertical; }
.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-soft);
}
.field-label {
  position: absolute;
  left: var(--space-4);
  top: 18px;
  color: var(--color-text-muted);
  font-size: var(--text-md);
  pointer-events: none;
  transform-origin: left top;
  transition: transform var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), top var(--duration-fast) var(--ease-out);
}
.field-input:focus ~ .field-label,
.field-input:not(:placeholder-shown) ~ .field-label,
.field-textarea:focus ~ .field-label,
.field-textarea:not(:placeholder-shown) ~ .field-label,
/* <select> is wrapped in .field-select-wrap (for the chevron caret), so it's
   not a direct sibling of .field-label — .field-select-wrap is. Reach
   through the wrapper with :has() instead of relying on ~ alone. */
.field-select-wrap:has(.field-select:focus) ~ .field-label,
.field-select-wrap:has(.field-select.has-value) ~ .field-label {
  top: 8px;
  transform: scale(0.78);
  color: var(--color-primary);
}
.field-input::placeholder,
.field-textarea::placeholder { color: transparent; }

.field-required { color: var(--color-error); margin-left: 2px; }
.field-help {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.field-error-msg {
  display: none;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-error);
  font-weight: 600;
}
.field.has-error .field-input,
.field.has-error .field-select,
.field.has-error .field-textarea { border-color: var(--color-error); }
.field.has-error .field-error-msg { display: block; }
.field.has-error .field-label { color: var(--color-error); }

.field-select-wrap { position: relative; }
.field-select-wrap::after {
  content: '';
  position: absolute;
  right: var(--space-4);
  top: 50%;
  width: 10px; height: 10px;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.field-static-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.chip-group { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* Toggle switch (price visibility, active/inactive, etc.) */
.toggle { position: relative; display: inline-flex; align-items: center; width: 44px; height: 26px; flex-shrink: 0; }
.toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--color-border-strong);
  border-radius: var(--radius-pill);
  transition: background var(--duration-fast) var(--ease-out);
}
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-base) var(--ease-spring);
}
.toggle input:checked ~ .toggle-track { background: var(--color-primary); }
.toggle input:checked ~ .toggle-thumb { transform: translateX(18px); }
.toggle input:focus-visible ~ .toggle-track { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* Password show/hide */
.field-password-toggle {
  position: absolute;
  right: var(--space-3);
  top: 0; bottom: 0;
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: var(--color-text-muted);
  padding: 0 var(--space-2);
}

/* =========================================================
   Skeleton loading
   ========================================================= */

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: skeleton-shimmer 1.3s infinite;
}
@keyframes skeleton-shimmer { to { transform: translateX(100%); } }

.skeleton-text { height: 12px; margin-bottom: var(--space-2); width: 100%; }
.skeleton-title { height: 18px; width: 60%; margin-bottom: var(--space-3); }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }
.skeleton-card { height: 104px; border-radius: var(--radius-lg); }

/* =========================================================
   Toasts
   ========================================================= */

.toast-container {
  position: fixed;
  top: calc(var(--space-4) + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 420px);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: var(--z-toast);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-text);
  color: var(--color-bg);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  animation: toast-in var(--duration-base) var(--ease-spring);
}
.toast.is-leaving { animation: toast-out var(--duration-fast) var(--ease-in) forwards; }
.toast-success { background: var(--color-success); color: #fff; }
.toast-error { background: var(--color-error); color: #fff; }
.toast-warning { background: var(--color-warning); color: #1a1300; }
.toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast-close { margin-left: auto; background: none; border: none; color: inherit; opacity: 0.7; flex-shrink: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-12px) scale(0.98); } }

/* =========================================================
   Bottom sheet
   ========================================================= */

.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 15, 23, 0.5);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}
.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: var(--app-max-width);
  transform: translate(-50%, 100%);
  background: var(--color-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-sheet);
  z-index: var(--z-sheet);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  transition: transform var(--duration-slow) var(--ease-spring);
  padding-bottom: var(--safe-bottom);
}
.sheet.is-open { transform: translate(-50%, 0); }

.sheet-handle {
  width: 40px; height: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-border-strong);
  margin: var(--space-3) auto var(--space-1);
  flex-shrink: 0;
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-5) var(--space-4);
  flex-shrink: 0;
  border-bottom: 1px solid var(--color-border);
}
.sheet-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; }
.sheet-body { padding: var(--space-5); overflow-y: auto; flex: 1; }
.sheet-footer {
  padding: var(--space-4) var(--space-5);
  padding-bottom: calc(var(--space-4) + var(--safe-bottom));
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
  background: var(--color-surface);
}

/* =========================================================
   Sticky bottom CTA (non-sheet contexts, e.g. home shell)
   ========================================================= */

.sticky-cta {
  position: sticky;
  bottom: 0;
  padding: var(--space-4) var(--space-5);
  padding-bottom: calc(var(--space-4) + var(--safe-bottom));
  background: linear-gradient(0deg, var(--color-surface) 60%, rgba(255, 255, 255, 0));
  z-index: var(--z-sticky);
}

/* =========================================================
   Modal (admin dialogs, confirmations)
   ========================================================= */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 15, 23, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(8px);
  opacity: 0;
  transition: transform var(--duration-base) var(--ease-spring), opacity var(--duration-base) var(--ease-out);
}
.modal-backdrop.is-open .modal { transform: scale(1) translateY(0); opacity: 1; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}
.modal-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; }
/* Most modals wrap .modal-body + .modal-footer in a <form> (for the
   data-ajax-form submit handler) — a plain <form> is a block box, not a
   flex participant, so without this it just grows to fit ALL its content
   and .modal's max-height/flex-column has nothing left to constrain:
   .modal-body's own overflow-y:auto never gets a bounded height to scroll
   within, and long content (e.g. a growing Options list) pushes
   .modal-footer's Save/Cancel buttons off-screen entirely instead of
   scrolling. Making the form itself a flex column that fills the
   remaining space restores the intended sticky-header/scrollable-middle/
   sticky-footer layout. min-height:0 is required on both — flex items
   default to min-height:auto, which ignores the parent's constraint and
   silently defeats overflow:auto on modal-body. */
.modal > form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.modal-body { padding: var(--space-5); overflow-y: auto; flex: 1; min-height: 0; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: var(--space-3);
  padding: var(--space-5);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}
.modal-close {
  background: var(--color-surface-alt);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-secondary);
}

/* =========================================================
   Empty states
   ========================================================= */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-10) var(--space-5);
  color: var(--color-text-secondary);
}
.empty-state-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
}
.empty-state-title { font-family: var(--font-display); font-weight: 700; color: var(--color-text); margin-bottom: var(--space-1); }

/* =========================================================
   Scroll-reveal — opt-in via [data-reveal] in markup. The
   .reveal class itself (which is what actually hides the
   element) is only ever added by JS (see initScrollReveal in
   customer.js), never present in static HTML — so on a browser
   without IntersectionObserver, or if JS fails to run at all,
   content simply stays visible instead of getting stuck hidden.
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   Icons
   ========================================================= */

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* =========================================================
   Data table (shared base, admin.css adds layout chrome)
   ========================================================= */

.data-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--color-border); background: var(--color-surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); min-width: 640px; }
.data-table th {
  text-align: left;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  font-weight: 700;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.data-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.data-table tbody tr { transition: background 0.15s ease, transform 0.15s ease; }
.data-table tbody tr:hover { background: rgba(16, 185, 129, 0.04); transform: scale(1.002); }
.data-table tbody tr:last-child td { border-bottom: none; }
.table-actions { display: flex; gap: var(--space-2); justify-content: flex-end; }

/* =========================================================
   Trust card (Why choose us) — shared primitive. Mobile lays these
   out in a horizontal scroll row (.trust-scroll in customer.css),
   desktop in a grid (.mkt-why-grid in marketing.css).
   ========================================================= */

.trust-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.trust-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-soft);
}
.trust-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
}
.trust-card-icon .icon { width: 22px; height: 22px; }
.trust-card h3 { font-size: var(--text-md); margin-bottom: var(--space-1); }
.trust-card p { font-size: var(--text-sm); color: var(--color-text-secondary); }

/* =========================================================
   Star rating + review card — shared primitives. Mobile: horizontal
   scroll row (.review-scroll in customer.css). Desktop: grid
   (.mkt-reviews-grid in marketing.css).
   ========================================================= */

.star-rating { display: inline-flex; gap: 2px; flex-shrink: 0; }
.star-rating .icon { width: 14px; height: 14px; stroke: none; fill: var(--color-border-strong); }
.star-rating .icon.is-filled { fill: var(--color-gold); }

.review-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.review-text { font-size: var(--text-sm); color: var(--color-text); line-height: 1.6; flex: 1; }
.review-author { display: flex; align-items: center; gap: var(--space-3); }
.review-author strong { display: block; font-size: var(--text-sm); }
.review-author .review-meta { font-size: var(--text-xs); color: var(--color-text-muted); }

/* =========================================================
   FAQ accordion — native <details>/<summary>, no JS required.
   Shared by the mobile home screen and the desktop FAQ section.
   ========================================================= */

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
}
.faq-item + .faq-item { margin-top: var(--space-3); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-weight: 700;
  font-size: var(--text-base);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-icon { flex-shrink: 0; color: var(--color-text-muted); transition: transform var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out); }
.faq-item[open] .faq-icon { transform: rotate(180deg); color: var(--color-primary); }
.faq-item .faq-answer { padding-top: var(--space-3); color: var(--color-text-secondary); font-size: var(--text-sm); line-height: 1.6; }
.faq-item .faq-answer p { margin: 0; }

/* =========================================================
   Utility layout classes
   ========================================================= */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); } .gap-2 { gap: var(--space-2); } .gap-3 { gap: var(--space-3); } .gap-4 { gap: var(--space-4); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); letter-spacing: -0.01em; }
.tone-driver { background: var(--color-driver-soft) !important; color: var(--color-driver) !important; }
.tone-appliance { background: var(--color-appliance-soft) !important; color: var(--color-appliance) !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
