/*
 * `mobile` — the phone and accessories shop demo's theme (Antenna). Fetched,
 * not compiled.
 *
 * Subject and visitor: a two-counter phone shop in a Tehran mobile arcade that
 * sells registered phones, cases, glass and chargers, fits the protector at
 * the counter and takes the old phone in part-exchange; a buyer who starts
 * from a budget, not a model, and who fears an unregistered handset.
 * Tone: a lit shop counter at night — quick, bright, numeric. Prices first.
 * The detail only this subject has: the signal. Four rising bars mark every
 * dark band, the top strip and the footer, and the cards are rounded like a
 * phone's body.
 *
 * Indigo ink and one hot magenta on the calls to buy, the links and the sale
 * price. Rounded corners (10–22px), cards as handsets with a soft shadow.
 * Headings in Vazirmatn Black (VazirmatnFD); body copy is the platform's
 * VazirmatnFD. Never letter-spaced.
 *
 * It selects only the hooks the builder publishes (`sb-*`, `data-sb-*`).
 */

@font-face {
  font-family: 'VazirmatnFD';
  src: url('fonts/vazirmatn/Vazirmatn-FD-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'VazirmatnFD';
  src: url('fonts/vazirmatn/Vazirmatn-FD-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root.theme-mobile {
  --theme-font-display: 'VazirmatnFD';
  --background: #f6f6fb;
  --foreground: #14163d;
  --card: #ffffff;
  --card-foreground: #14163d;
  --popover: #ffffff;
  --popover-foreground: #14163d;
  --primary: #e0136c;
  --primary-foreground: #ffffff;
  --secondary: #ebebf5;
  --secondary-foreground: #14163d;
  --muted: #ebebf5;
  --muted-foreground: #565a7a;
  --accent: #fde4ef;
  --accent-foreground: #a30d4e;
  --destructive: #c62828;
  --destructive-foreground: #ffffff;
  --border: #dedff0;
  --input: #cfd0e6;
  --ring: #e0136c;

  --primary-50: #fff0f6;
  --primary-100: #fde4ef;
  --primary-200: #fbc2da;
  --primary-300: #f791bb;
  --primary-400: #f0569a;
  --primary-500: #e82a7c;
  --primary-600: #e0136c;
  --primary-700: #b80d57;
  --primary-800: #930c47;
  --primary-900: #790d3d;
  --primary-950: #4a0321;

  --brand-accent: var(--brand-secondary, #14163d);
  --brand-accent-foreground: var(--brand-secondary-foreground, #f6f6fb);
  --chrome-ink: var(--brand-secondary, #14163d);
  --chrome-ink-foreground: var(--brand-secondary-foreground, #f6f6fb);

  --surface-page: #f6f6fb;
  --surface-alt: #ebebf5;
  --surface-input: #ffffff;
  --surface-panel: #f0f0f8;
  --ink-secondary: #3a3d62;

  --radius-step-sm: 10px;
  --radius-step-md: 14px;
  --radius-step-lg: 18px;
  --radius-step-xl: 22px;

  --mobile-display: var(--app-font-display);
  --mobile-band: var(--brand-secondary, #14163d);
  --mobile-signal: var(--primary);
  --mobile-glow: color-mix(in oklab, var(--primary) 35%, transparent);
}

@media (prefers-color-scheme: dark) {
  :root:not(.light).theme-mobile {
    --background: #0b0c1f;
    --foreground: #ecebfa;
    --card: #15173a;
    --card-foreground: #ecebfa;
    --popover: #15173a;
    --popover-foreground: #ecebfa;
    --primary: #ff4f9a;
    --primary-foreground: #0b0c1f;
    --secondary: #1b1d45;
    --secondary-foreground: #ecebfa;
    --muted: #1b1d45;
    --muted-foreground: #a3a5c8;
    --accent: #3a1030;
    --accent-foreground: #ffc2dc;
    --border: #262958;
    --input: #30346a;
    --ring: #ff4f9a;
    --chrome-ink: #07081a;
    --chrome-ink-foreground: #ecebfa;
    --surface-page: #0b0c1f;
    --surface-alt: #121433;
    --surface-input: #15173a;
    --surface-panel: #15173a;
    --ink-secondary: #c9caea;
    --mobile-band: #07081a;
  }
}

/* Same palette as the media query above — change both. */
:root.dark.theme-mobile {
  --background: #0b0c1f;
  --foreground: #ecebfa;
  --card: #15173a;
  --card-foreground: #ecebfa;
  --popover: #15173a;
  --popover-foreground: #ecebfa;
  --primary: #ff4f9a;
  --primary-foreground: #0b0c1f;
  --secondary: #1b1d45;
  --secondary-foreground: #ecebfa;
  --muted: #1b1d45;
  --muted-foreground: #a3a5c8;
  --accent: #3a1030;
  --accent-foreground: #ffc2dc;
  --border: #262958;
  --input: #30346a;
  --ring: #ff4f9a;
  --chrome-ink: #07081a;
  --chrome-ink-foreground: #ecebfa;
  --surface-page: #0b0c1f;
  --surface-alt: #121433;
  --surface-input: #15173a;
  --surface-panel: #15173a;
  --ink-secondary: #c9caea;
  --mobile-band: #07081a;
}

/* ── Type: Vazirmatn Black, tight ──────────────────────────────────────── */

.theme-mobile :is(h1, h2, .sb-heading, .sb-cta-title) {
  font-family: var(--mobile-display);
  font-weight: 800;
  line-height: 1.35;
}

.theme-mobile h1.sb-heading {
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  font-weight: 900;
}

.theme-mobile h2.sb-heading {
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
}

.theme-mobile .sb-heading {
  overflow-wrap: anywhere;
  min-width: 0;
}

/* ── The header: a signal strip, the counter row, the shelves ─────────── */

.theme-mobile .sb-chrome-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--background) 94%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.theme-mobile .sb-chrome-header .sb-section-inner {
  align-items: center;
}

.theme-mobile .sb-chrome-header .sb-column {
  align-self: center;
  flex-wrap: nowrap;
  gap: 0.25rem;
}

.theme-mobile .sb-chrome-header .sb-section:nth-child(2) .sb-column:last-child {
  justify-content: flex-end;
}

/* The strip: dark ink, four rising bars before the line. */
.theme-mobile .sb-chrome-header .sb-section:first-child {
  background: var(--mobile-band);
  color: var(--chrome-ink-foreground);
  font-size: 0.75rem;
  line-height: 1.6;
  padding-block: 0.35rem;
}

.theme-mobile .sb-chrome-header .sb-section:first-child :is(p, span, a, button) {
  color: inherit;
  font-size: inherit;
}

.theme-mobile .sb-chrome-header .sb-section:first-child .sb-column:first-child {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-inline-start: 1.4rem;
  background-image:
    linear-gradient(var(--mobile-signal), var(--mobile-signal)),
    linear-gradient(var(--mobile-signal), var(--mobile-signal)),
    linear-gradient(var(--mobile-signal), var(--mobile-signal)),
    linear-gradient(color-mix(in oklab, var(--chrome-ink-foreground) 35%, transparent), color-mix(in oklab, var(--chrome-ink-foreground) 35%, transparent));
  background-size: 3px 4px, 3px 7px, 3px 10px, 3px 13px;
  background-position: right 0 bottom 3px, right 5px bottom 3px, right 10px bottom 3px, right 15px bottom 3px;
  background-repeat: no-repeat;
}

[dir='ltr'] .theme-mobile .sb-chrome-header .sb-section:first-child .sb-column:first-child,
.theme-mobile[dir='ltr'] .sb-chrome-header .sb-section:first-child .sb-column:first-child {
  background-position: left 0 bottom 3px, left 5px bottom 3px, left 10px bottom 3px, left 15px bottom 3px;
}

.theme-mobile .sb-chrome-header .sb-section:first-child .sb-column:last-child {
  justify-content: flex-end;
  gap: 0.75rem;
}

.theme-mobile .sb-chrome-header .sb-section:first-child .sb-chrome-contact {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.theme-mobile .sb-chrome-header .sb-section:first-child .sb-chrome-contact > li:not(:first-child) {
  display: none;
}

.theme-mobile .sb-chrome-header .sb-section:first-child .sb-chrome-contact svg {
  width: 0.85rem;
  height: 0.85rem;
}

.theme-mobile .sb-chrome-logo > span {
  font-family: var(--mobile-display);
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  color: var(--foreground);
}

/* The search is a pill, the way the visitor types a model. */
.theme-mobile .sb-chrome-header :is(input[type='search'], .sb-chrome-search-field) {
  border-radius: 999px;
}

.theme-mobile .sb-chrome-header .sb-chrome-menu-link {
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  color: var(--ink-secondary);
  font-weight: 600;
  white-space: nowrap;
  transition: color 150ms, background-color 150ms;
}

.theme-mobile .sb-chrome-header .sb-chrome-menu-link:hover,
.theme-mobile .sb-chrome-header .sb-chrome-menu-link:focus-visible,
.theme-mobile .sb-chrome-header .sb-chrome-menu-link[aria-current='page'] {
  color: var(--primary);
  background: var(--accent);
}

.theme-mobile .sb-chrome-header :is(a.sb-chrome-search, button.sb-chrome-search, .sb-chrome-cart, .sb-chrome-account, .sb-chrome-theme) {
  display: inline-grid;
  place-items: center;
  min-width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  color: var(--ink-secondary);
  transition: color 150ms, background-color 150ms;
}

.theme-mobile .sb-chrome-header :is(a.sb-chrome-search, button.sb-chrome-search, .sb-chrome-cart, .sb-chrome-account, .sb-chrome-theme):hover {
  background: var(--accent);
  color: var(--primary);
}

.theme-mobile .sb-chrome-cart-count {
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
}

.theme-mobile .sb-chrome-mega-panel {
  border-radius: var(--radius-step-lg);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px -22px rgb(20 22 61 / 0.5);
}

.theme-mobile .sb-chrome-mega-link:hover {
  color: var(--primary);
}

@media (max-width: 47.99rem) {
  .theme-mobile .sb-chrome-header .sb-section:first-child .sb-column:last-child {
    display: none;
  }

  .theme-mobile .sb-chrome-logo > span {
    font-size: 1.35rem;
  }
}

/* ── Bands: indigo, with the signal bars in the top corner ────────────── */

.theme-mobile .sb-section[data-sb-background='muted'] {
  background: var(--surface-alt);
}

.theme-mobile .sb-section[data-sb-background='color'] {
  position: relative;
  overflow: hidden;
}

.theme-mobile .sb-section[data-sb-background='color']::before {
  content: '';
  position: absolute;
  inset-inline-end: clamp(1rem, 4vw, 3rem);
  top: 1.25rem;
  width: 2.4rem;
  height: 1.8rem;
  background-image:
    linear-gradient(var(--mobile-signal), var(--mobile-signal)),
    linear-gradient(var(--mobile-signal), var(--mobile-signal)),
    linear-gradient(var(--mobile-signal), var(--mobile-signal)),
    linear-gradient(var(--mobile-signal), var(--mobile-signal));
  background-size: 6px 25%, 6px 50%, 6px 75%, 6px 100%;
  background-position: 0 100%, 33% 100%, 66% 100%, 100% 100%;
  background-repeat: no-repeat;
  opacity: 0.9;
  pointer-events: none;
  z-index: 1;
}

.theme-mobile .sb-section[data-sb-background='color']::after {
  content: '';
  position: absolute;
  inset: auto -10% -60% auto;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--mobile-glow), transparent 65%);
  pointer-events: none;
}

.theme-mobile .sb-section[data-sb-background='color'] :is(.sb-heading, .sb-text, p, a:not(.sb-button)) {
  color: inherit;
}

.theme-mobile .sb-section[data-sb-background='color'] .sb-text:not([data-sb-tone='custom']) {
  color: inherit;
  --tw-prose-body: currentColor;
}

.theme-mobile .sb-section[data-sb-background='color'] :is(.sb-stat-value, .sb-stat-label) {
  color: inherit;
}

.theme-mobile .sb-section[data-sb-background='color'] .sb-stat-value {
  font-family: var(--mobile-display);
  font-weight: 900;
  color: var(--primary-300);
}

.theme-mobile .sb-section[data-sb-background='color'][data-sb-width='full'] .sb-column:has(.sb-heading) {
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

/* ── Buttons, pictures, cards ───────────────────────────────────────────── */

.theme-mobile .sb-button {
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.theme-mobile :is(.sb-image, .sb-banner, .sb-image-box, .sb-gallery) img {
  border-radius: var(--radius-step-lg);
}

/* A product is a handset on the counter: round corners, a soft lift. */
.theme-mobile [data-catalog-card] {
  border: 1px solid var(--border);
  border-radius: var(--radius-step-lg);
  background: var(--card);
  box-shadow: 0 10px 24px -20px rgb(20 22 61 / 0.45);
  transition: transform 150ms, box-shadow 150ms, border-color 150ms;
}

.theme-mobile [data-catalog-card]:hover {
  transform: translateY(-2px);
  border-color: var(--primary-200);
  box-shadow: 0 16px 30px -20px var(--mobile-glow);
}

.theme-mobile [data-catalog-card] img {
  border-radius: var(--radius-step-md) var(--radius-step-md) 0 0;
}

.theme-mobile [data-catalog-card] h3 {
  font-weight: 700;
  transition: color 150ms;
}

.theme-mobile [data-catalog-card]:hover h3 {
  color: var(--primary);
}

/* The budget doors: each a card with a bar that fills by price step. */
.theme-mobile #budget .sb-icon-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-step-lg);
  background: var(--card);
  padding: 1.25rem;
  height: 100%;
  transition: border-color 150ms, transform 150ms;
}

.theme-mobile #budget .sb-icon-box:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.theme-mobile .sb-image-box[data-sb-layout='inline'] {
  flex-direction: row;
  align-items: center;
}

.theme-mobile .sb-image-box[data-sb-layout='inline'] .sb-image-box-figure {
  flex: 0 0 4.5rem;
}

/* Tables (warranty, instalments): ruled, with numbers that line up. */
.theme-mobile .sb-text table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.theme-mobile .sb-text :is(th, td) {
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  text-align: start;
}

.theme-mobile .sb-text th {
  color: var(--muted-foreground);
  font-weight: 700;
}

/* ── The footer: indigo, the bars along its top edge ──────────────────── */

.theme-mobile .sb-chrome-footer {
  position: relative;
  background: var(--mobile-band);
  color: var(--chrome-ink-foreground);
  padding-top: 1.5rem;
}

.theme-mobile .sb-chrome-footer::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0 25%, var(--primary-400) 25% 50%, var(--primary-300) 50% 75%, var(--primary-200) 75%);
}

.theme-mobile .sb-chrome-footer :is(p, span, a, li) {
  color: inherit;
}

.theme-mobile .sb-chrome-footer .sb-chrome-menu-link {
  opacity: 0.85;
}

.theme-mobile .sb-chrome-footer .sb-chrome-menu-link:hover {
  opacity: 1;
  color: var(--primary-300);
}

.theme-mobile .sb-chrome-footer .sb-chrome-logo > span {
  color: var(--chrome-ink-foreground);
  font-size: 2.2rem;
}

.theme-mobile .sb-chrome-footer .sb-section:last-child {
  border-top: 1px solid color-mix(in oklab, var(--chrome-ink-foreground) 16%, transparent);
  font-size: 0.8125rem;
}

/* The accessory doors: two per row on a phone. */
@media (max-width: 47.99rem) {
  .theme-mobile .sb-banners {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
