/* Shared styles for sellable product pages and their checkout (products/_shop). */
/* Theme colours (--accent, --accent-dark, --accent-soft, --glow) are set inline per product. */

@font-face { font-family: 'Vazir'; src: url('../fonts/vazir/Vazir-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vazir'; src: url('../fonts/vazir/Vazir-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Vazir'; src: url('../fonts/vazir/Vazir-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Vazir'; src: url('../fonts/vazir/Vazir-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #172033; --muted: #5f6b80; --line: #dfe5ef; --soft: #f3f6fc; --white: #fff;
  --accent: #1769ff; --accent-dark: #0d50d7; --accent-soft: #eef5ff; --glow: #e6eeff;
  --amber: #b45309; --amber-soft: #fff7e6; --green: #1d8a4a; --green-soft: #e9f8ef; --zarin: #ffc439;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 10% 0%, var(--glow) 0, transparent 34rem), #f9fbff; color: var(--ink); font-family: 'Vazir', Tahoma, Arial, sans-serif; line-height: 1.8; }
a { color: inherit; }
.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }

/* Header / footer */
.topbar { padding: 1.2rem 0; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .8rem; background: var(--accent); color: white; font-weight: 900; }
.language { color: var(--muted); font-size: .9rem; text-decoration: none; border-bottom: 1px dashed currentColor; }
footer { padding: 2rem 0; color: var(--muted); font-size: .9rem; text-align: center; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .65rem 1.2rem; border: 0; border-radius: .8rem; text-decoration: none; font: inherit; font-weight: 700; cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: white; box-shadow: 0 .7rem 1.5rem color-mix(in srgb, var(--accent) 28%, transparent); }
.button-primary:hover:not(:disabled) { background: var(--accent-dark); }
.button-primary:disabled { background: #d5d9e2; color: #7a8497; box-shadow: none; cursor: not-allowed; }
.button-ghost { background: white; color: var(--ink); border: 1px solid var(--line); }
.button-ghost:hover { border-color: var(--ink); }
.button-block { width: 100%; }

/* Product page */
main { padding: clamp(2rem, 6vw, 4rem) 0; }
.hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.eyebrow { color: var(--accent); font-size: .85rem; font-weight: 800; letter-spacing: .04em; }
h1 { margin: .3rem 0 .6rem; font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.15; font-weight: 900; }
h2 { margin: 0 0 .6rem; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.35; font-weight: 800; }
.subheading { margin: 0 0 1.2rem; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); }
.lead { max-width: 46rem; color: var(--muted); font-size: 1.02rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.note { display: flex; align-items: center; gap: .5rem; margin-top: 1rem; color: var(--muted); font-size: .92rem; }
.note::before { content: '✉'; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: .5rem; background: var(--accent-soft); color: var(--accent); font-size: .95rem; }
.back-link { display: inline-block; margin-top: 1.5rem; color: var(--muted); text-decoration: none; }
.visual { margin: 0; padding: .8rem; border: 1px solid var(--line); border-radius: 1.5rem; background: rgba(255,255,255,.72); box-shadow: 0 1.5rem 4rem rgba(35, 57, 104, .12); }
.visual img { display: block; width: 100%; height: auto; max-height: 34rem; object-fit: contain; border-radius: 1rem; background: var(--soft); cursor: zoom-in; }
.visual figcaption { margin: .6rem .3rem 0; color: var(--muted); font-size: .88rem; text-align: center; }
.section { margin-top: clamp(3.5rem, 8vw, 6rem); }
.section-lead { margin: 0 0 1.5rem; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gallery figure { margin: 0; padding: .5rem; border: 1px solid var(--line); border-radius: 1rem; background: white; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: .7rem; background: var(--soft); cursor: zoom-in; transition: transform .2s; }
.gallery img:hover { transform: scale(1.02); }
.gallery figcaption { margin: .5rem .2rem 0; color: var(--muted); font-size: .85rem; line-height: 1.6; }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.about-single { grid-template-columns: 1fr; }
.about p { margin: 0; padding: 1.5rem; border: 1px solid var(--line); border-radius: 1.2rem; background: white; color: var(--muted); text-align: justify; }
.features { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.features-4 { grid-template-columns: repeat(4, 1fr); }
.feature { padding: 1.2rem; border: 1px solid var(--line); border-radius: 1rem; background: white; }
.feature-number { color: var(--accent); font-weight: 800; }
.feature h3 { margin: .3rem 0 .3rem; font-size: 1rem; line-height: 1.45; }
.feature p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.75; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.plans-1 { grid-template-columns: minmax(0, 32rem); justify-content: center; }
.plan { position: relative; display: flex; flex-direction: column; gap: 1rem; padding: 1.8rem; border: 1px solid var(--line); border-radius: 1.4rem; background: white; }
.plan-featured { border-color: var(--accent); box-shadow: 0 1.5rem 3rem color-mix(in srgb, var(--accent) 14%, transparent); }
.plan-badge { position: absolute; top: -.85rem; inset-inline-start: 1.6rem; padding: .2rem .8rem; border-radius: 999px; background: var(--accent); color: white; font-size: .8rem; font-weight: 700; }
.plan h3 { margin: 0; font-size: 1.25rem; }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.plan-price strong { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 900; color: var(--ink); }
.plan-price span { color: var(--muted); font-size: .92rem; }
.plan-price del { flex-basis: 100%; color: #9aa4b5; font-size: 1.05rem; font-weight: 700; text-decoration-thickness: 2px; text-decoration-color: #d64545; }
.plan-discount { display: inline-block; padding: .1rem .6rem; border-radius: 999px; background: #fdecec; color: #c62828; font-size: .8rem; font-weight: 800; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; color: var(--muted); font-size: .95rem; }
.plan li { display: flex; gap: .55rem; align-items: flex-start; }
.plan li::before { content: '✓'; flex-shrink: 0; display: grid; place-items: center; width: 1.35rem; height: 1.35rem; margin-top: .25rem; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: .8rem; font-weight: 900; }
.plan .button { margin-top: auto; width: 100%; }
.plan-note { margin: 1.2rem 0 0; color: var(--muted); font-size: .92rem; text-align: center; }

/* Intro video */
.button-video span { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--accent); color: white; font-size: .7rem; }
.video-frame { position: relative; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 1.5rem; background: #0b1220; box-shadow: 0 1.5rem 4rem rgba(35, 57, 104, .16); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-note { margin: .8rem 0 0; color: var(--muted); font-size: .88rem; text-align: center; }
.video-note a { color: var(--accent); text-decoration: none; }

/* Dialogs */
dialog { width: min(30rem, calc(100% - 2rem)); padding: 0; border: 0; border-radius: 1.4rem; box-shadow: 0 2rem 5rem rgba(9, 26, 56, .3); color: var(--ink); font-family: inherit; }
dialog::backdrop { background: rgba(9, 26, 56, .55); backdrop-filter: blur(3px); }
.modal { padding: 1.8rem; }
.modal h2 { margin-bottom: .3rem; font-size: 1.35rem; }
.modal p { margin: 0 0 1.2rem; color: var(--muted); font-size: .95rem; }
.modal-plan { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; padding: .9rem 1.1rem; border-radius: .9rem; background: var(--soft); }
.modal-plan small { display: block; color: var(--muted); font-size: .8rem; }
.modal-plan strong { font-size: 1.05rem; }
.modal-plan .modal-price { color: var(--accent); font-weight: 900; white-space: nowrap; }
.field { display: grid; gap: .4rem; margin-bottom: 1.2rem; }
.field label { font-weight: 700; font-size: .95rem; }
.field input { width: 100%; min-height: 3rem; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: .8rem; font: inherit; direction: ltr; text-align: left; }
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.modal-actions { display: flex; gap: .7rem; }
.modal-actions .button-primary { flex: 1; }
.lightbox { width: min(1100px, calc(100% - 2rem)); background: transparent; box-shadow: none; }
.lightbox img { display: block; width: 100%; height: auto; max-height: 85vh; object-fit: contain; border-radius: 1rem; background: #000; }
.lightbox figcaption { margin-top: .6rem; color: white; text-align: center; font-size: .95rem; }
.lightbox-close { position: absolute; top: .5rem; inset-inline-end: .5rem; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); font-size: 1.2rem; font-weight: 900; cursor: pointer; }

/* Checkout */
.checkout-main { padding: clamp(1.5rem, 5vw, 3.5rem) 0; }
.steps { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem 1.2rem; margin: 0 0 2rem; padding: 0; list-style: none; color: var(--muted); font-size: .88rem; counter-reset: step; }
.steps li { display: flex; align-items: center; gap: .45rem; }
.steps li::before { content: counter(step); counter-increment: step; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: white; border: 1px solid var(--line); font-size: .78rem; font-weight: 700; }
.steps li.done::before { content: '✓'; background: var(--green-soft); border-color: #b7e4c7; color: var(--green); }
.steps li.active { color: var(--ink); font-weight: 700; }
.steps li.active::before { background: var(--accent); border-color: var(--accent); color: white; }
.checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.card { padding: 1.8rem; border: 1px solid var(--line); border-radius: 1.4rem; background: white; box-shadow: 0 1.5rem 4rem rgba(35, 57, 104, .08); }
.card-narrow { width: min(32rem, 100%); margin: 0 auto; }
.card h1 { margin: 0 0 .4rem; font-size: 1.45rem; line-height: 1.4; }
.card h2 { margin: 0 0 .8rem; font-size: 1.1rem; }
.text { margin: 0 0 1.3rem; color: var(--muted); font-size: .97rem; }
.summary { display: grid; gap: .6rem; margin-bottom: 1.3rem; padding: 1rem 1.1rem; border-radius: .9rem; background: var(--soft); }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.summary-row small { color: var(--muted); font-size: .82rem; }
.summary-row strong { font-size: 1rem; }
.summary-row .price { color: var(--accent); font-weight: 900; }
.summary-row .email { direction: ltr; font-family: Consolas, monospace; font-size: .95rem; word-break: break-all; }
.errors { margin: 0 0 1.2rem; padding: .9rem 1.1rem; border-radius: .9rem; background: #fff1f0; color: #a11d1d; font-size: .93rem; }
.errors ul { margin: 0; padding-inline-start: 1.2rem; }
.maintenance { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.3rem; padding: 1rem 1.1rem; border: 1px solid #f5d9a8; border-radius: 1rem; background: var(--amber-soft); }
.maintenance-icon { flex-shrink: 0; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .7rem; background: white; color: var(--amber); font-size: 1.2rem; }
.maintenance strong { display: block; color: var(--amber); font-size: 1rem; }
.maintenance p { margin: .15rem 0 0; color: #6b5a3a; font-size: .92rem; line-height: 1.75; }
.gateways { display: grid; gap: .8rem; margin: 0 0 1.2rem; }
.gateway { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 1rem; background: white; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.gateway:hover { border-color: var(--accent); }
.gateway input { position: absolute; opacity: 0; pointer-events: none; }
.gateway input:checked + .gateway-logo { box-shadow: 0 0 0 2px var(--accent); }
.gateway.is-disabled { cursor: not-allowed; background: #fafbfd; }
.gateway.is-disabled:hover { border-color: var(--line); }
.gateway.is-disabled .gateway-logo, .gateway.is-disabled .gateway-copy { opacity: .55; filter: grayscale(1); }
.gateway-logo { flex-shrink: 0; display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: .9rem; background: var(--zarin); color: #1c1c1c; font-family: 'Segoe UI', Arial, sans-serif; font-size: .7rem; font-weight: 900; letter-spacing: .04em; text-align: center; line-height: 1.2; }
.gateway-copy { flex: 1; min-width: 0; }
.gateway-copy strong { display: block; font-size: 1rem; }
.gateway-copy small { display: block; color: var(--muted); font-size: .85rem; }
.gateway-status { flex-shrink: 0; display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.gateway-status::before { content: ''; width: .5rem; height: .5rem; border-radius: 50%; background: var(--amber); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.guide { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; counter-reset: guide; }
.guide li { display: flex; gap: .8rem; }
.guide li::before { content: counter(guide); counter-increment: guide; flex-shrink: 0; display: grid; place-items: center; width: 1.8rem; height: 1.8rem; margin-top: .2rem; border-radius: .6rem; background: var(--accent-soft); color: var(--accent); font-size: .85rem; font-weight: 900; }
.guide strong { display: block; font-size: .95rem; }
.guide p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.75; }
.notes { margin: 0; padding: 0; list-style: none; display: grid; gap: .55rem; color: var(--muted); font-size: .9rem; }
.notes li { display: flex; gap: .55rem; align-items: flex-start; }
.notes li::before { content: '•'; color: var(--accent); font-weight: 900; }
.support { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.2rem; padding: .9rem 1.1rem; border-radius: .9rem; background: var(--soft); font-size: .9rem; }
.support a { direction: ltr; font-family: Consolas, monospace; font-weight: 700; text-decoration: none; color: var(--accent); }
.side { display: grid; gap: 1.5rem; }
.side .card { box-shadow: none; }
.small-link { display: inline-block; margin-top: .3rem; color: var(--muted); font-size: .85rem; }
.stack > .button + .button { margin-top: .7rem; }

@media (max-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .hero, .about, .plans { grid-template-columns: 1fr; } .features, .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .topbar-inner { align-items: flex-start; flex-direction: column; } .features, .gallery { grid-template-columns: 1fr; } .actions .button { width: 100%; } .modal-actions { flex-direction: column; } .gateway { flex-wrap: wrap; } .support { flex-direction: column; align-items: flex-start; } }

/* Gateway logos, hand-off and result pages */
.gateway-logo-sizpay { background: #0a3d8f; color: #fff; font-size: .78rem; letter-spacing: .02em; }
.gateway-logo-zarinpal { background: var(--zarin); color: #1c1c1c; }
.gateway-logo-zibal { background: #0b8f6a; color: #fff; }
.gateway-logo-card { background: #eef2ff; color: #3730a3; font-size: 1.4rem; }
.gateway input:checked ~ .gateway-check { opacity: 1; transform: scale(1); }
.gateway-check { flex-shrink: 0; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: .85rem; font-weight: 900; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; }
.gateway:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.secure-note { display: flex; align-items: flex-start; gap: .5rem; margin: .9rem 0 0; color: var(--muted); font-size: .85rem; line-height: 1.7; }
.secure-note::before { content: '🔒'; flex-shrink: 0; }
.redirecting { text-align: center; }
.spinner { width: 3rem; height: 3rem; margin: 0 auto 1rem; border: 4px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.redirecting .summary-row { justify-content: center; gap: .6rem; }
.result-mark { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; margin-bottom: 1rem; border-radius: 1rem; font-size: 1.8rem; font-weight: 900; }
.result-ok { background: var(--green-soft); color: var(--green); }
.result-bad { background: #fdecec; color: #c62828; }

/* Product page: breadcrumb and card header used by the dynamic pages */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 1.2rem; padding: 0; list-style: none; color: var(--muted); font-size: .85rem; }
.breadcrumb li { display: flex; align-items: center; gap: .4rem; }
.breadcrumb li + li::before { content: '›'; opacity: .5; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.brand-logo-img { display: block; width: 2.5rem; height: 2.5rem; object-fit: contain; }
.topbar .brand-mark:has(.brand-logo-img) { background: transparent; box-shadow: none; }
.gateway-logo-zibal { background: #1a1a2e; color: #ffd400; font-size: .8rem; }

/* Video: notice shown when YouTube cannot be reached from the visitor's network. */
.video-frame.is-blocked { display: grid; place-items: center; background: var(--soft); }
.video-blocked { max-width: 34rem; padding: 2rem 1.5rem; text-align: center; }
.video-blocked-icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin: 0 auto .8rem; border-radius: 50%; background: var(--amber-soft); color: var(--amber); font-size: 1.4rem; }
.video-blocked strong { display: block; font-size: 1.05rem; }
.video-blocked p { margin: .4rem 0 1.1rem; color: var(--muted); font-size: .92rem; line-height: 1.8; }
.video-blocked-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }

/* Rich text written in the admin panel (links, lists, bold, headings). */
.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.rich p { margin: 0 0 .9rem; }
.rich h3 { margin: 1.2rem 0 .5rem; font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.rich h4, .rich h5 { margin: 1rem 0 .4rem; font-size: .98rem; font-weight: 700; color: var(--ink); }
.rich ul, .rich ol { margin: 0 0 .9rem; padding-inline-start: 1.3rem; display: grid; gap: .3rem; }
.rich li { line-height: 1.85; }
.rich ul { list-style: none; padding-inline-start: 0; }
.rich ul > li { position: relative; padding-inline-start: 1.3rem; }
.rich ul > li::before { content: ''; position: absolute; inset-inline-start: .3rem; top: .75em; width: .4rem; height: .4rem; border-radius: 50%; background: var(--accent); }
.rich ol { list-style: decimal; }
.rich ol > li::marker { color: var(--accent); font-weight: 800; }
.rich a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.rich a:hover { color: var(--accent-dark); }
.rich strong { font-weight: 800; color: var(--ink); }
.rich code { padding: .1rem .35rem; border-radius: .3rem; background: var(--soft); font-family: Consolas, monospace; font-size: .9em; direction: ltr; display: inline-block; }
.rich small { font-size: .85em; opacity: .8; }
.rich-compact p { margin: 0 0 .5rem; font-size: .9rem; line-height: 1.75; }
.rich-compact ul, .rich-compact ol { margin: 0 0 .5rem; font-size: .9rem; }

/* What a plan delivers, when it is not a plain download. */
.plan-delivery { display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start; padding: .25rem .75rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .82rem; font-weight: 700; }
.plan-delivery::before { content: '⬇'; }
.plan-delivery-license::before { content: '🔑'; }
.plan-delivery-shipping::before { content: '📦'; }
.plan-delivery-service::before { content: '🛠'; }
.form-subhead { margin: 1.4rem 0 .3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: 1.05rem; font-weight: 800; }
