/* Mobile styles live in the component files; this layer starts at tablet width (same breakpoints as the cashback landing). */
@media (min-width: 768px) {
  :root { --ap-page-width: 1200px; --ap-gutter: 32px; }
  .ap-shell { padding-top: 16px; padding-bottom: 80px; }

  .ap-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; text-align: start; }
  /* Art on the left, copy on the right (RTL grid: the second column is the left one). */
  .ap-hero__scene { order: 2; max-width: 500px; margin: 0; justify-self: center; }
  .ap-hero__copy { margin-top: 0; }
  .ap-hero__title { font-size: 2.25rem; line-height: 1.55; }
  .ap-hero__description { max-width: none; margin: 10px 0 0; font-size: 1rem; }
  .ap-search-entry { max-width: 460px; margin-top: 28px; }
  .ap-search-entry__open { min-height: 56px; padding: 12px 18px; font-size: .875rem; }
  .ap-hero-pill { min-height: 54px; font-size: .9375rem; padding-inline: 18px; }

  .ap-section, .ap-banner-slot, .ap-banner-row { margin-top: 56px; }
  /* All banners side by side; columns follow the screen width. */
  .ap-banner-row { display: grid; grid-template-columns: repeat(var(--count, 3), minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
  .ap-banner-row .ap-banner { border-radius: var(--ap-radius-m); }
  .ap-section__head { min-height: 48px; margin-bottom: 10px; }
  .ap-section__title, .ap-guide__title { font-size: 1.25rem; }
  .ap-section__all { font-size: .8125rem; }

  /* Prev/next beside «مشاهده همه»; hidden again when the rail fits (Swiper locks). */
  .ap-controls:not([hidden]) { display: flex; align-items: center; gap: 8px; }
  .ap-controls button {
    display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--ap-line); border-radius: 50%;
    background: #fff; color: var(--ap-ink); box-shadow: var(--ap-elev-1); transition: background-color 160ms ease, opacity 160ms ease;
  }
  .ap-controls button:hover:not(:disabled) { background: var(--ap-surface); }
  .ap-controls button:disabled { opacity: .35; cursor: default; box-shadow: none; }
  .ap-controls svg { width: 20px; height: 20px; }

  .ap-slide--product { width: calc((min(100vw, var(--ap-page-width)) - 2 * var(--ap-gutter) - 3 * 16px) / 3.4); }
  .ap-skeleton--product { width: calc((min(100vw, var(--ap-page-width)) - 2 * var(--ap-gutter) - 3 * 16px) / 3.4); }
  .ap-product__body { padding: 14px; }
  .ap-product__title { font-size: .8125rem; }
  .ap-product__price { font-size: 1rem; }

  .ap-tile-grid { gap: 20px; }
  .ap-banner__frame img { object-fit: cover; }
  .ap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

  .ap-guide { margin-top: 72px; }
  .ap-guide__lead { max-width: 820px; font-size: .875rem; }
  .ap-faq { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }

  /* Panel: a centred sheet instead of full screen. */
  .ap-panel { max-width: 760px; }
}

@media (min-width: 1024px) {
  .ap-slide--product { width: calc((min(100vw, var(--ap-page-width)) - 2 * var(--ap-gutter) - 4 * 20px) / 5.3); }
  .ap-skeleton--product { width: calc((min(100vw, var(--ap-page-width)) - 2 * var(--ap-gutter) - 4 * 20px) / 5.3); }
  .ap-tile-grid { grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; }
  .ap-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
