/* ============================================================
   هوش بازار — استایل صفحات داخلی (محصولات، محصول، سفارش، پیگیری)
   ============================================================ */

/* ---------- Page header (light) ---------- */
.page-head { position: relative; padding: 48px 0 36px; background: radial-gradient(800px 300px at 90% 0%, rgba(43,214,219,.16), transparent 60%), var(--ivory); border-bottom: 1px solid var(--line); overflow: hidden; }
.page-head::before { content: ''; position: absolute; inset: 0; background-image: var(--girih-dark); background-size: 84px 84px; opacity: .035; mask-image: linear-gradient(90deg, transparent, #000 40%, #000 60%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000 60%, transparent); }
.page-head > .container { position: relative; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .84rem; color: var(--faint); margin-bottom: 14px; }
.crumbs a:hover { color: var(--lapis); }
.crumbs li + li::before { content: '›'; margin-inline-end: 6px; opacity: .6; }
.page-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: 6px; }
.page-head p { color: var(--muted); max-width: 640px; margin: 0; }

/* ---------- Catalog ---------- */
.catalog-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 28px 0 22px; }
.search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; background: var(--paper); border: 1.5px solid var(--line-2); border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: var(--turq-2); box-shadow: 0 0 0 4px rgba(36,203,209,.15); }
.search svg { width: 20px; height: 20px; color: var(--faint); flex: none; }
.search input { flex: 1; border: 0; background: none; outline: none; height: 100%; font-size: .98rem; }
.sortsel { height: 50px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--paper); font-family: var(--font-display); font-weight: 600; font-size: .92rem; color: var(--muted); }
.result-count { font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--muted); background: var(--paper); border: 1px dashed var(--line-2); border-radius: 22px; }

/* ---------- Product page ---------- */
.p-hero { position: relative; padding: 44px 0 40px; background: var(--ivory); border-bottom: 1px solid var(--line); overflow: hidden; }
.p-hero::before { content: ''; position: absolute; width: 640px; height: 640px; border-radius: 50%; top: -360px; inset-inline-end: -160px; background: var(--c, var(--turq)); opacity: .12; filter: blur(80px); }
.p-hero::after { content: ''; position: absolute; inset: 0; background-image: var(--girih-dark); background-size: 84px 84px; opacity: .03; }
.p-hero > .container { position: relative; }
.p-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
.p-title { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.p-title h1 { margin: 0; font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
.p-title h1 small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .95rem; color: var(--muted); margin-top: 2px; }
.p-lead { font-size: 1.05rem; color: var(--muted); max-width: 620px; }
.p-lead b { color: var(--ink); font-weight: 600; }
.p-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.fact { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.fact .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--turq-soft); color: var(--turq-2); display: grid; place-items: center; flex: none; }
.fact .ico svg { width: 20px; height: 20px; }
.fact small { display: block; font-size: .76rem; color: var(--faint); line-height: 1.5; }
.fact b { font-family: var(--font-display); font-size: .95rem; color: var(--ink); }
.p-side { position: sticky; top: calc(var(--nav-h) + 16px); background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: var(--shadow-md); }
.p-side h3 { font-size: 1.05rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.p-side h3 svg { width: 20px; height: 20px; color: var(--turq-2); }
.needs li { position: relative; padding-inline-start: 26px; margin-bottom: 8px; font-size: .94rem; color: var(--text); }
.needs li::before { content: ''; position: absolute; inset-inline-start: 0; top: .55em; width: 16px; height: 16px; border-radius: 50%; background: var(--success-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E9A5F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/10px no-repeat; }
.p-side .note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--saffron-soft); color: #6E4703; font-size: .86rem; line-height: 1.7; }
.p-side .btn { margin-top: 16px; }

/* Plans */
.plans-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.plans-head h2 { margin: 0; }
.kind-legend { display: flex; gap: 8px; flex-wrap: wrap; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px 22px 22px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 24px; transition: transform .3s, box-shadow .3s, border-color .3s; }
.plan:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--turq); }
.plan.featured { border-color: var(--lapis); box-shadow: 0 24px 50px -24px rgba(19,33,92,.5); }
.plan.featured::before { content: attr(data-badge); position: absolute; top: -14px; inset-inline-start: 20px; padding: 3px 12px; border-radius: 999px; background: var(--grad-saffron); color: #2A1B00; font-family: var(--font-display); font-weight: 700; font-size: .78rem; box-shadow: 0 6px 14px -6px rgba(244,184,64,.9); }
.plan h3 { margin: 0; font-size: 1.12rem; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan .kind { font-size: .72rem; }
.plan .price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan .price b { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; color: var(--ink); line-height: 1.2; }
.plan .price span { color: var(--muted); font-size: .86rem; }
.plan .usd { font-size: .8rem; color: var(--faint); margin-top: -8px; }
.plan .usd i { font-style: normal; }
.plan ul { display: grid; gap: 7px; padding-top: 12px; border-top: 1px dashed var(--line); flex: 1; }
.plan li { position: relative; padding-inline-start: 22px; font-size: .9rem; color: var(--text); line-height: 1.7; }
.plan li::before { content: ''; position: absolute; inset-inline-start: 0; top: .5em; width: 14px; height: 14px; border-radius: 50%; background: var(--turq-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23129FA6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/9px no-repeat; }
.plan .btn { margin-top: 4px; }

/* Product info tabs / body */
.p-body { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
.prose h2 { font-size: 1.4rem; margin-top: 8px; }
.prose h3 { font-size: 1.08rem; margin-top: 22px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-inline-start: 18px; list-style: disc; }
.prose li { margin-bottom: 6px; }
.callout { padding: 18px 20px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); border-inline-start: 4px solid var(--turq); margin: 18px 0; }
.callout b { font-family: var(--font-display); color: var(--ink); display: block; margin-bottom: 4px; }
.callout p { margin: 0; font-size: .93rem; }
.callout.warn { border-inline-start-color: var(--saffron); }
.related { display: grid; gap: 10px; }
.related a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; transition: border-color .2s, transform .2s; }
.related a:hover { border-color: var(--turq); transform: translateX(-3px); }
.related .logo-tile { width: 44px; height: 44px; border-radius: 12px; }
.related .logo-tile svg { width: 24px; height: 24px; }
.related b { display: block; font-family: var(--font-display); font-size: .95rem; color: var(--ink); }
.related small { color: var(--muted); font-size: .8rem; }

/* Sticky mobile order bar */
.sticky-bar { display: none; position: fixed; bottom: 0; inset-inline: 0; z-index: 40; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -16px rgba(14,20,48,.3); align-items: center; justify-content: space-between; gap: 12px; }
.sticky-bar .price-from b { font-size: 1.05rem; }

/* ---------- Checkout ---------- */
.checkout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: start; padding: 36px 0 80px; }
.co-steps { display: flex; gap: 8px; margin-bottom: 26px; }
.co-steps li { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); font-family: var(--font-display); font-weight: 600; font-size: .88rem; color: var(--faint); }
.co-steps li i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--ivory); font-style: normal; font-size: .8rem; }
.co-steps li.active { color: var(--ink); border-color: var(--lapis); }
.co-steps li.active i { background: var(--lapis); color: #fff; }
.co-steps li.done { color: var(--success); }
.co-steps li.done i { background: var(--success-soft); color: var(--success); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 26px; margin-bottom: 18px; }
.panel h2 { font-size: 1.15rem; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.panel h2 .n { width: 30px; height: 30px; border-radius: 9px; background: var(--lapis); color: #fff; display: grid; place-items: center; font-size: .85rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--font-display); font-weight: 600; font-size: .88rem; color: var(--ink); }
.field label small { font-weight: 400; color: var(--faint); font-family: var(--font-body); }
.field input, .field select, .field textarea { height: 50px; padding: 0 14px; border-radius: 13px; border: 1.5px solid var(--line-2); background: var(--ivory); transition: border-color .2s, box-shadow .2s, background .2s; direction: rtl; }
.field textarea { height: auto; padding: 12px 14px; min-height: 96px; resize: vertical; }
.field input.ltr { direction: ltr; text-align: left; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--turq-2); background: #fff; box-shadow: 0 0 0 4px rgba(36,203,209,.15); }
.field input:invalid:not(:placeholder-shown) { border-color: var(--danger); }
.field .hint { font-size: .78rem; color: var(--faint); }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--ivory); cursor: pointer; transition: all .2s; }
.choice:hover { border-color: var(--lapis); }
.choice input { position: absolute; opacity: 0; }
.choice .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; margin-top: 4px; display: grid; place-items: center; transition: all .2s; }
.choice .dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .2s; }
.choice:has(input:checked) { border-color: var(--lapis); background: #fff; box-shadow: 0 0 0 4px rgba(19,33,92,.08); }
.choice:has(input:checked) .dot { border-color: var(--lapis); background: var(--lapis); }
.choice:has(input:checked) .dot::after { transform: scale(1); }
.choice:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.choice b { display: block; font-family: var(--font-display); font-size: .95rem; color: var(--ink); }
.choice span { font-size: .82rem; color: var(--muted); line-height: 1.6; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); margin-top: 6px; }
.agree input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--lapis); }
.agree a { color: var(--turq-2); font-weight: 600; }

.summary { position: sticky; top: calc(var(--nav-h) + 16px); background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: var(--shadow-md); }
.summary h2 { font-size: 1.1rem; margin-bottom: 16px; }
.sum-product { display: flex; gap: 14px; align-items: center; padding-bottom: 16px; border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.sum-product b { display: block; font-family: var(--font-display); color: var(--ink); }
.sum-product small { color: var(--muted); font-size: .84rem; }
.sum-rows { display: grid; gap: 10px; font-size: .93rem; }
.sum-rows div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.sum-rows div b { color: var(--ink); font-weight: 600; }
.sum-rows .total { padding-top: 12px; border-top: 1px solid var(--line); margin-top: 4px; }
.sum-rows .total b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; }
.sum-rows .total b i { font-style: normal; font-size: .8rem; font-weight: 500; color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.qty button { width: 34px; height: 34px; background: var(--ivory); font-weight: 700; }
.qty b { width: 40px; text-align: center; }
.secure { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--faint); margin-top: 14px; justify-content: center; }
.secure svg { width: 16px; height: 16px; color: var(--success); }

/* Success / tracking */
.success-box { max-width: 720px; margin: 40px auto 90px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 44px 32px; box-shadow: var(--shadow-md); }
.success-box .ico { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; animation: pop .7s cubic-bezier(.2,.9,.3,1.3) forwards; }
.success-box .ico svg { width: 40px; height: 40px; }
.code-box { display: inline-flex; align-items: center; gap: 12px; margin: 16px 0 24px; padding: 12px 18px; border-radius: 16px; background: var(--ivory); border: 1.5px dashed var(--line-2); font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; letter-spacing: .06em; color: var(--lapis); direction: ltr; }
.code-box button { font-family: var(--font-body); font-size: .82rem; font-weight: 500; letter-spacing: 0; padding: 6px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line-2); color: var(--muted); }
.next-steps { text-align: start; display: grid; gap: 12px; margin: 26px 0; }
.next-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--ivory); font-size: .93rem; }
.next-steps li i { width: 28px; height: 28px; border-radius: 9px; background: var(--lapis); color: #fff; display: grid; place-items: center; font-style: normal; font-family: var(--font-display); font-weight: 700; font-size: .84rem; flex: none; }
.order-card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 22px; margin-top: 22px; text-align: start; }
.order-card .row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; color: var(--muted); }
.order-card .row:last-child { border-bottom: 0; }
.order-card .row b { color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-family: var(--font-display); font-weight: 600; font-size: .8rem; }
.status.pending { background: var(--saffron-soft); color: #8A5A05; }
.status.paid { background: #EEF1FA; color: var(--lapis-2); }
.status.done { background: var(--success-soft); color: var(--success); }
.track-form { max-width: 560px; margin: 36px auto 0; }

/* Simple pages */
.simple { max-width: 800px; margin: 0 auto; padding: 40px 0 80px; }

@media (max-width: 900px) {
  .p-grid, .p-body, .checkout { grid-template-columns: 1fr; }
  .p-side { position: static; }
  .summary { position: static; }
  .p-facts { grid-template-columns: 1fr; }
  .sticky-bar { display: flex; }
  .co-steps li span { display: none; }
}
@media (max-width: 640px) {
  .form-grid, .choice-grid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .panel { padding: 20px 16px; border-radius: 20px; }
  .success-box { padding: 32px 18px; }
  .code-box { font-size: 1.2rem; }
  .catalog-bar { flex-direction: column; align-items: stretch; }
}
.p-kicker { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
