:root {
  color-scheme: light;
  --sp-brand: #008dfa; --sp-ink: #202437; --sp-muted: #667085;
  --sp-border: #e2e5ed; --sp-surface: #f6f7fb; --sp-page-width: 480px;
  --sp-safe-top: env(safe-area-inset-top, 0px); --sp-safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: IRANSansXFaNum, Tahoma, Arial, sans-serif;
  font-size: 16px; line-height: 1.8; color: var(--sp-ink); background: #fff;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[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; }
:focus-visible { outline: 3px solid var(--sp-brand); outline-offset: 3px; }
.sp-shell {
  max-width: var(--sp-page-width); min-height: 100vh; min-height: 100dvh; margin: 0 auto;
  padding: calc(16px + var(--sp-safe-top)) 16px calc(24px + var(--sp-safe-bottom));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.sp-hero { margin: 0; }
.sp-hero__link { display: block; border-radius: 12px; }
.sp-hero__image { width: 100%; height: auto; border-radius: 12px; }
.sp-categories { margin-top: 24px; scroll-margin-top: 16px; }
.sp-section-title { margin: 0 0 18px; font-size: 1rem; font-weight: 700; }
.sp-category-rows { display: grid; gap: 10px; }
.sp-category-row { width: 100%; max-width: 100%; position: relative; overflow-x: auto; scrollbar-width: none; padding: 3px 0; }
.sp-category-row::-webkit-scrollbar { display: none; }
.sp-category-row.swiper-initialized { overflow: hidden; }
.sp-category-row > .swiper-wrapper { display: flex; margin: 0; padding: 0; }
.sp-category-row:not(.swiper-initialized) > .swiper-wrapper { gap: 12px; }
.sp-category-row:not(.swiper-initialized) .sp-category-slide[data-copy="true"] { display: none; }
.sp-category-row .sp-category-slide { flex-shrink: 0; width: 88px; height: 120px; }
.sp-category__item {
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; min-height: 110px;
  padding: 0 2px; border: 0; background: transparent; text-align: center; border-radius: 12px;
}
.sp-category__item:active { opacity: .72; }
.sp-category__image { width: 56px; height: 56px; object-fit: contain; border-radius: 18px; flex-shrink: 0; }
.sp-category__name { font-size: .75rem; line-height: 1.65; overflow-wrap: anywhere; }
.sp-status { margin: 16px 0; color: var(--sp-muted); font-size: .875rem; }
.sp-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--sp-border); border-radius: 12px; background: #fff; text-decoration: none; font-size: .8125rem; }
.sp-button:disabled { opacity: .6; cursor: wait; }
.sp-merchant-panel {
  position: fixed; z-index: 1000; inset: 0; top: var(--sp-panel-top, 0px); bottom: auto;
  width: 100%; max-width: var(--sp-page-width); height: 100vh; height: var(--sp-panel-height, 100dvh);
  max-height: 100vh; max-height: var(--sp-panel-height, 100dvh); margin: 0 auto; border: 0; padding: var(--sp-safe-top) 0 var(--sp-safe-bottom);
  overflow: hidden; background: #fff; color: var(--sp-ink); box-shadow: 0 0 36px #20243712;
}
.sp-merchant-panel[open] { display: flex; flex-direction: column; }
.sp-merchant-panel::backdrop { background: #20243735; }
.sp-panel-header { display: flex; align-items: center; flex-shrink: 0; gap: 8px; min-height: 64px; padding: 6px 12px; }
.sp-panel-header h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.sp-panel-back { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; }
.sp-panel-back:active { background: var(--sp-surface); }
.sp-merchant-tools { flex-shrink: 0; padding: 8px 16px 12px; background: #fff; }
.sp-search-field { position: relative; display: block; }
.sp-search-field input { width: 100%; height: 48px; padding: 10px 14px 10px 46px; border: 1px solid #ced2df; border-radius: 12px;
  background: #f7f8fd; font-size: 16px; line-height: 1.5; outline-offset: 2px; }
.sp-search-field input::placeholder { color: #77839b; font-size: .8125rem; }
.sp-search-field svg { position: absolute; left: 14px; top: 13px; color: #687182; pointer-events: none; }
.sp-search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.sp-merchant-filters { display: flex; gap: 8px; margin-top: 12px; }
.sp-merchant-filters button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 1; min-height: 40px;
  padding: 4px 10px; background: #fff; border: 1px solid var(--sp-border); border-radius: 12px; font-size: .8125rem; }
.sp-merchant-filters button[aria-pressed="true"] { color: #006bbe; border-color: #b4dcff; background: #edf7ff; }
.sp-merchant-filters small { font-size: .6875rem; color: var(--sp-muted); }
.sp-merchant-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 24px; -webkit-overflow-scrolling: touch; }
.sp-result-count { margin: 0 4px 10px; font-size: .6875rem; color: var(--sp-muted); }
.sp-merchant-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.sp-merchant-card { position: relative; display: block; width: 100%; min-width: 0; aspect-ratio: 1; overflow: hidden; border: 0;
  border-radius: 18px; padding: 0; text-align: right; text-decoration: none; background: #435166; color: #fff; isolation: isolate; }
.sp-merchant-card::after { content: ''; position: absolute; z-index: 0; inset: 0; background: linear-gradient(180deg, transparent 18%, #0000000a 38%, #000000b0 100%); }
.sp-merchant-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.sp-merchant-content { position: absolute; z-index: 1; inset-inline: 12px; bottom: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.sp-merchant-logo { width: 32px; height: 32px; padding: 3px; margin-bottom: 3px; border-radius: 10px; object-fit: contain; background: #fff; }
.sp-merchant-name { max-width: 100%; font-size: .875rem; font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.sp-merchant-channel { font-size: .6875rem; line-height: 1.5; }
.sp-merchant-card.has-no-photo { background: linear-gradient(145deg, #749bb3, #314252); }
.sp-merchant-card:active { transform: scale(.985); }
.sp-empty { margin: 44px 10px 24px; text-align: center; color: var(--sp-muted); font-size: .875rem; line-height: 2; }
.sp-merchant-profile { margin: 0 -12px 22px; }
.sp-detail-hero { height: 240px; background: linear-gradient(140deg, #dfe7ed, #abc0d0); overflow: hidden; }
.sp-detail-hero > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.sp-detail-summary { position: relative; margin: -58px 14px 0; padding: 18px; border: 1px solid #ffffffc9;
  border-radius: 24px; background: #f5f5f8f2; box-shadow: 0 8px 28px #20243708; }
.sp-detail-heading { display: flex; align-items: center; gap: 12px; }
.sp-detail-logo { width: 56px; height: 56px; object-fit: contain; padding: 5px; border: 1px solid var(--sp-border); background: #fff; border-radius: 18px; }
.sp-detail-heading h3 { margin: 0 0 6px; font-size: 1rem; }
.sp-detail-category { display: inline-block; padding: 2px 10px; border-radius: 20px; background: #e7e8ed; font-size: .6875rem; }
.sp-detail-channels { margin: 16px 0 0; font-size: .8125rem; }
.sp-branch-heading { margin: 14px 4px 14px; font-size: .9375rem; }
.sp-branch { margin-bottom: 14px; border: 1px solid var(--sp-border); border-radius: 18px; overflow: hidden; }
.sp-branch-body { padding: 14px; }
.sp-branch-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.sp-branch h4 { margin: 0 0 10px; font-size: .875rem; }
.sp-branch p { margin: 0; font-size: .8125rem; color: var(--sp-muted); line-height: 2; }
.sp-branch-top h4 { flex: 1 1 130px; margin: 8px 0 0; }
.sp-branch-actions { display: flex; align-items: center; gap: 8px; }
.sp-branch-action { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 7px 11px;
  border-radius: 22px; background: #f5f4fc; text-decoration: none; font-size: .6875rem; }
.sp-branch-call { width: 44px; padding: 8px; }
.sp-branch-directions { color: #006bbe; background: #edf7ff; }
.sp-branch-hours { border-top: 1px solid var(--sp-border); padding-top: 14px; margin-top: 16px; }
.sp-branch-hours summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .8125rem; list-style: none; }
.sp-branch-hours summary::after { content: '‹'; margin-inline-start: auto; }
.sp-branch-hours[open] summary::after { transform: rotate(-90deg); }
.sp-branch-hours summary::-webkit-details-marker { display: none; }
.sp-branch-hours > p { margin-top: 12px; white-space: pre-line; }
.sp-branch-link { width: 100%; color: #006bbe; }
.sp-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 359px) {
  .sp-category-row .sp-category-slide { width: 80px; }
  .sp-category__image { width: 52px; height: 52px; border-radius: 16px; }
  .sp-merchant-content { inset-inline: 10px; bottom: 10px; }
  .sp-merchant-name { font-size: .8125rem; }
  .sp-merchant-logo { width: 28px; height: 28px; }
}
@keyframes sp-reveal { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sp-panel-enter { from { opacity: 0; transform: translateX(-8%); } to { opacity: 1; transform: none; } }
@keyframes sp-panel-leave { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-8%); } }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .sp-hero { animation: sp-reveal 650ms cubic-bezier(.16, 1, .3, 1) both; }
  .sp-section-title { animation: sp-reveal 650ms 90ms cubic-bezier(.16, 1, .3, 1) both; }
  .sp-category-row { animation: sp-reveal 700ms 140ms cubic-bezier(.16, 1, .3, 1) both; }
  .sp-category-row + .sp-category-row { animation-delay: 230ms; }
  .sp-merchant-panel[open] { animation: sp-panel-enter 320ms cubic-bezier(.16, 1, .3, 1) both; }
  .sp-merchant-panel.is-closing { animation: sp-panel-leave 220ms ease both; }
  .sp-merchant-card { animation: sp-reveal 380ms var(--card-delay, 0ms) cubic-bezier(.16, 1, .3, 1) both; transition: transform 120ms ease; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Keep card geometry usable when an embedded browser lacks aspect-ratio. */
@supports not (aspect-ratio: 1) {
  .sp-merchant-card::before { content: ''; display: block; padding-top: 100%; }
  .sp-store-card::before { content: ''; display: block; padding-top: 133.333%; }
  .sp-offer-media::before { content: ''; display: block; padding-top: 100%; }
  .sp-offer-photo { position: absolute; top: 0; left: 0; }
  .sp-banner-frame::before { content: ''; display: block; padding-top: 43.892%; }
}

.sp-catalog-more { display: block; margin: 20px auto; }
.sp-catalog-more[hidden] { display: none; }
