/* Tokens. Brand blue for large text and icons; deeper tones for small text and buttons (WCAG AA). */
:root {
  color-scheme: light;
  --ap-brand: #008dfa;
  --ap-brand-strong: #0074d4;
  --ap-brand-ink: #006bbe;
  --ap-link: #0078d6;
  --ap-brand-soft: #eef7ff;
  --ap-brand-line: #cfe6fb;
  --ap-cyan: #6fdcff;
  --ap-ink: #1d2433;
  --ap-muted: #6b7486;
  --ap-subtle: #8a93a5;
  --ap-line: #edf0f5;
  --ap-surface: #f6f8fb;
  --ap-media: #f4f7fa;
  --ap-danger: #d42a42;
  --ap-danger-soft: #fff0f2;
  --ap-success: #087a43;
  --ap-instore: #685b8b;
  --ap-instore-soft: #f3f2fa;
  /* Soft, wide, low-contrast shadows; the Swiper keeps room around cards so they never get cut. */
  --ap-elev-1: 0 1px 2px #1018280a, 0 4px 14px -6px #10182814;
  --ap-elev-2: 0 2px 4px #1018280a, 0 18px 36px -14px #10182833;
  --ap-radius-s: 12px;
  --ap-radius-m: 16px;
  --ap-radius-l: 20px;
  --ap-page-width: 480px;
  --ap-gutter: 16px;
  --ap-ease: cubic-bezier(.16, 1, .3, 1);
  --ap-safe-top: env(safe-area-inset-top, 0px);
  --ap-safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: IRANSansXFaNum, Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ap-ink);
  background: #fff;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #fff; overflow-x: hidden; overflow-x: clip; }
/* No sideways shift when the panel locks scrolling. */
html { scrollbar-gutter: stable; }
html.is-panel-open, html.is-panel-open body { overflow: hidden; }
[hidden] { display: none !important; }
button, input, dialog { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--ap-brand); outline-offset: 3px; }

.ap-shell {
  max-width: var(--ap-page-width); min-height: 60vh; margin: 0 auto;
  padding: 4px var(--ap-gutter) calc(40px + var(--ap-safe-bottom));
  padding-left: max(var(--ap-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--ap-gutter), env(safe-area-inset-right, 0px));
}

.ap-status { margin: 16px 0; color: var(--ap-muted); font-size: .875rem; text-align: center; }
.ap-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--ap-line); border-radius: var(--ap-radius-s); background: #fff; color: var(--ap-ink);
  text-decoration: none; font-size: .8125rem; font-weight: 700;
}
.ap-button:active { opacity: .8; }
.ap-button svg { width: 18px; height: 18px; flex-shrink: 0; }

.ap-chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 20px; padding: 1px 7px; border-radius: 6px;
  background: var(--ap-brand-soft); color: #25649b; font-size: .625rem; line-height: 1.6; white-space: nowrap;
}
.ap-chip--instore { background: var(--ap-instore-soft); color: var(--ap-instore); }
.ap-chip svg { width: 11px; height: 11px; flex-shrink: 0; }

.ap-skip {
  position: fixed; z-index: 3000; top: 8px; right: 8px; padding: 10px 16px; border-radius: var(--ap-radius-s);
  background: var(--ap-ink); color: #fff; font-size: .8125rem; text-decoration: none; transform: translateY(-200%);
}
.ap-skip:focus { transform: none; }
.ap-shell:focus { outline: none; }
.ap-copy-buffer { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.ap-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Missing images keep their box and show a placeholder icon. */
[data-media] { position: relative; background: var(--ap-media); }
[data-media].is-broken > img { visibility: hidden; }
[data-media].is-broken::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 28px; height: 28px; opacity: .45;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237ba4c4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='m21 16-5-5-9 9'/%3E%3C/svg%3E");
}

.ap-skeleton { position: relative; overflow: hidden; background: #f0f3f7; border-radius: var(--ap-radius-m); }
.ap-skeleton::after {
  content: ''; position: absolute; inset: 0; transform: translateX(100%);
  background: linear-gradient(90deg, transparent, #ffffffa6, transparent);
}

.ap-toast {
  position: fixed; z-index: 2000; left: 50%; bottom: calc(24px + var(--ap-safe-bottom));
  transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 14px;
  background: #1d2433f2; color: #fff; font-size: .8125rem; box-shadow: 0 8px 24px #1d243329; white-space: nowrap;
}

@keyframes ap-shimmer { to { transform: translateX(-100%); } }
@keyframes ap-toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .ap-skeleton::after { animation: ap-shimmer 1.3s infinite; }
  .ap-toast:not([hidden]) { animation: ap-toast-in 260ms var(--ap-ease) both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
