/* shopops.ir — clean product layout, auto light/dark, RTL & LTR via logical properties */
@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --gutter: max(50px, 3vw);
  --red: #f0284a;
  --red-hover: #d91e3e;
  --red-soft: color-mix(in srgb, var(--red) 14%, transparent);
  --on-red: #ffffff;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface2: #f4f6f9;
  --line: #e7eaf0;
  --fg: #12151c;
  --muted: #5c6472;
  --doc-fg: #2b313d;
  --frame-bg: #111318;
  --shadow: 0 12px 34px rgba(15, 17, 21, 0.06), 0 2px 8px rgba(15, 17, 21, 0.03);
  --shadow-hover: 0 18px 42px rgba(15, 17, 21, 0.09), 0 4px 12px rgba(15, 17, 21, 0.04);
  --radius-card: 24px;
  --radius-btn: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #181b22;
    --surface2: #21252f;
    --line: #292e3b;
    --fg: #f0f2f7;
    --muted: #98a1b2;
    --doc-fg: #cfd6df;
    --frame-bg: #0a0c10;
    --shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
    --shadow-hover: 0 20px 44px rgba(0, 0, 0, 0.48);
  }
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface2: #f4f6f9;
  --line: #e7eaf0;
  --fg: #12151c;
  --muted: #5c6472;
  --doc-fg: #2b313d;
  --frame-bg: #111318;
  --shadow: 0 12px 34px rgba(15, 17, 21, 0.06), 0 2px 8px rgba(15, 17, 21, 0.03);
  --shadow-hover: 0 18px 42px rgba(15, 17, 21, 0.09), 0 4px 12px rgba(15, 17, 21, 0.04);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115;
  --surface: #181b22;
  --surface2: #21252f;
  --line: #292e3b;
  --fg: #f0f2f7;
  --muted: #98a1b2;
  --doc-fg: #cfd6df;
  --frame-bg: #0a0c10;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
  --shadow-hover: 0 20px 44px rgba(0, 0, 0, 0.48);
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Vazirmatn", system-ui, -apple-system, sans-serif;
  line-height: 1.75;
  font-size: clamp(16px, 0.35vw + 15px, 17px);
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

html.lb-open,
body.lb-open {
  overflow: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

header,
main,
footer {
  padding-inline: var(--gutter);
}

main {
  width: 100%;
  padding-block: 16px 48px;
}

[id] {
  scroll-margin-top: 132px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: clamp(18px, 1.4vw, 22px);
  color: var(--fg);
  flex-shrink: 0;
  min-height: 44px;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
}

.brand b {
  color: var(--red);
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.theme-btn:hover {
  background: var(--surface2);
  border-color: var(--muted);
}

.theme-btn:active {
  transform: scale(0.96);
}

.theme-btn svg {
  display: none;
  width: 20px;
  height: 20px;
}

html:not([data-theme]) .theme-btn .ico-auto,
html[data-theme="light"] .theme-btn .ico-light,
html[data-theme="dark"] .theme-btn .ico-dark {
  display: block;
}

.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding-inline: 20px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: var(--on-red);
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.lang:hover {
  background: var(--red-hover);
}

.lang:active {
  transform: scale(0.98);
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
}

.menu-btn svg {
  width: 22px;
  height: 22px;
}

.menu-btn .ico-close {
  display: none;
}

header.is-open .menu-btn .ico-open {
  display: none;
}

header.is-open .menu-btn .ico-close {
  display: block;
}

header nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 28px;
  flex-wrap: wrap;
  padding-block: 4px 12px;
}

header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  transition: color 0.15s ease;
}

header nav a:hover,
header nav a[aria-current="page"] {
  color: var(--fg);
  text-decoration: none;
}

header nav a[aria-current="page"] {
  color: var(--red);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding-block: clamp(24px, 4vw, 52px) clamp(28px, 4vw, 48px);
  direction: ltr;
}

.hero-media {
  order: -1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: min(100%, clamp(168px, 24vw, 220px));
  padding: 8px;
  border-radius: 28px;
  background: var(--frame-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-hover);
}

.phone-frame img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  cursor: zoom-in;
}

.hero-copy {
  min-width: 0;
}

html[dir="rtl"] .hero-copy {
  direction: rtl;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.hero h1 b {
  color: var(--red);
}

.hero p {
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.75;
  margin: 0 0 26px;
  max-width: 68ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: var(--radius-btn);
  font: inherit;
  font-size: 15.5px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.99);
}

.btn-primary {
  background: var(--red);
  color: var(--on-red);
}

.btn-primary:hover {
  background: var(--red-hover);
}

.btn-soft {
  background: var(--red-soft);
  color: var(--red);
}

.btn-soft:hover {
  background: color-mix(in srgb, var(--red) 20%, transparent);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  padding-inline: 14px;
}

.btn-ghost:hover {
  color: var(--red);
}

.chev {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

html[dir="rtl"] .chev {
  transform: scaleX(-1);
}

/* Cards Row */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 22px;
  margin-block: 8px 40px;
}

.app-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.app-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.app-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.app-pricing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 84px;
  margin: 0 0 18px;
}

.app-price {
  font-size: clamp(20px, 1.85vw, 25px);
  font-weight: 800;
  color: var(--red);
  line-height: 1.3;
  margin: 0;
}

.app-sub {
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
  line-height: 1.45;
  margin: 0;
}

.app-trial {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--red);
  line-height: 1.45;
  margin: 0;
}

.app-card-icon {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin: 0 auto 18px;
  background: var(--frame-bg);
}

.app-card h2 {
  font-size: clamp(20px, 1.8vw, 23px);
  font-weight: 800;
  margin: 0 0 8px;
}

.app-card-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 24px;
  max-width: 34ch;
}

.app-card .btn {
  margin-top: auto;
  width: 100%;
  min-height: 48px;
}

/* Detailed Features & Screenshots */
.details {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin-block: 12px 32px;
}

.detail-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-split {
  display: grid;
  grid-template-columns: clamp(180px, 40%, 450px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 34px);
  direction: ltr;
}

.detail-split--single {
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
}

.detail-split .shots {
  order: -1;
}

.detail-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

html[dir="rtl"] .detail-copy,
html[dir="rtl"] .shots {
  direction: rtl;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 220px;
}

.detail-title > div {
  min-width: 0;
}

.detail-title img {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  flex-shrink: 0;
  background: var(--frame-bg);
}

.detail-title h2 {
  margin: 0 0 2px;
  font-size: clamp(20px, 2vw, 24px);
}

.detail-title p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.detail-card ul {
  margin: 0;
  padding-inline-start: 22px;
  display: grid;
  gap: 8px;
}

.detail-card li {
  color: var(--doc-fg);
}

.detail-card li::marker {
  color: var(--red);
}

.shots {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.shots img {
  height: 360px;
  width: auto;
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  scroll-snap-align: start;
  flex: none;
  background: var(--surface2);
  cursor: zoom-in;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(6px);
  direction: ltr;
  touch-action: none;
}

.lightbox[hidden] {
  display: none;
}

.lb-img {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  user-select: none;
  -webkit-user-drag: none;
}

.lb-btn {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(24, 27, 34, 0.78);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.lb-btn:hover {
  background: var(--red);
  border-color: transparent;
}

.lb-btn:active {
  transform: scale(0.95);
}

.lb-btn svg {
  width: 22px;
  height: 22px;
}

.lb-close {
  top: 14px;
  right: 14px;
}

.lb-prev {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev:active,
.lb-next:active {
  transform: translateY(-50%) scale(0.95);
}

.lb-btn[hidden] {
  display: none;
}

.lb-count {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(24, 27, 34, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.lb-count[hidden] {
  display: none;
}

/* Privacy Box */
section.box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 30px);
  margin-block: 24px;
}

section.box h2 {
  margin: 0 0 16px;
  font-size: clamp(20px, 2vw, 24px);
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}

.card {
  min-width: 0;
  background: var(--surface2);
  border-radius: 16px;
  padding: 18px;
}

.card b {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.card span {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.box-links {
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}

.box-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

/* Document Pages (Privacy & Terms) */
.doc-wrap {
  padding-block: 24px 48px;
}

.doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: clamp(22px, 3.5vw, 38px);
}

.doc-card h1 {
  font-size: clamp(26px, 3.2vw, 36px);
  margin: 0 0 6px;
  line-height: 1.3;
}

.doc-card h2 {
  font-size: clamp(19px, 2vw, 22px);
  margin: 28px 0 10px;
}

.doc-card p,
.doc-card li {
  color: var(--doc-fg);
}

.doc-card ul {
  padding-inline-start: 22px;
  display: grid;
  gap: 8px;
  margin: 0;
}

.doc-card li::marker {
  color: var(--red);
}

.note {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 18px;
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding-block: 20px 28px;
  color: var(--muted);
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 8px 20px;
  flex-wrap: wrap;
}

footer a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

footer a:hover {
  color: var(--red);
}

footer .foot-end {
  margin-inline-start: auto;
}

/* Bilingual Toggle */
[lang] .en,
[lang] .fa {
  display: none;
}

html[lang="fa"] .fa,
html[lang="en"] .en {
  display: revert;
}

/* Responsive: Mobile Navigation, Phone Stacking & Full-Width Buttons */
@media (max-width: 640px) {
  [id] {
    scroll-margin-top: 86px;
  }

  .head-top {
    padding-block: 12px;
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .head-actions {
    gap: 8px;
  }

  .lang {
    padding-inline: 14px;
    font-size: 14px;
  }

  .menu-btn {
    display: inline-flex;
  }

  header nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-inline: var(--gutter);
    padding-block: 8px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-hover);
  }

  header.is-open nav {
    display: flex;
  }

  header nav a {
    width: 100%;
    min-height: 48px;
    padding-inline: 12px;
    border-radius: 12px;
    font-size: 16px;
    color: var(--fg);
  }

  header nav a:hover {
    background: var(--surface2);
  }

  .hero,
  .detail-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .hero-media,
  .detail-split .shots {
    order: 0;
  }

  .phone-frame {
    width: min(100%, 220px);
  }

  .app-pricing {
    min-height: 0;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .detail-head .btn {
    width: 100%;
  }

  .shots img {
    height: 300px;
  }

  footer .foot-end {
    margin-inline-start: 0;
  }
}
