/* LikeJo SMM storefront styles — order form, catalog, wallet, checkout.
   Uses the shared design tokens from likejo-tokens.css. RTL, no circles. */

/* ---- layout ---- */
.lj-section { background: var(--lj-bg); }
.lj-container { max-width: 72rem; margin-inline: auto; padding-inline: var(--sp-5); }

/* NOTE: .section-title-block and .badge are defined by likejo-theme.css —
   do NOT redefine here (a duplicate border-inline-end caused a double border). */
.section-title-block h1 { font-family: Estedad, inherit; font-size: var(--fs-2xl); color: var(--lj-ink); line-height: var(--lh-tight); margin: var(--sp-3) 0; }
.lj-lead { color: var(--lj-muted); font-size: var(--fs-md); line-height: var(--lh-body); }

/* ---- card ---- */
.lj-card {
    background: var(--lj-bg); border: 1px solid var(--lj-hairline);
    border-radius: var(--r-lg); box-shadow: var(--shadow-card, 0 1px 3px rgba(15,10,30,.06));
}

/* ---- form ---- */
.lj-field { display: block; }
.lj-label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--lj-ink); margin-bottom: var(--sp-2); }
.lj-hint { font-size: var(--fs-xs); color: var(--lj-muted); margin-top: var(--sp-1); }
/* tappable min/max quantity pills inside the hint */
.qty-pill {
    font: inherit; font-weight: 700; color: var(--lj-primary);
    background: var(--lj-primary-50); border: 1px solid var(--lj-primary-100);
    border-radius: var(--r-xs, 4px); padding: 1px 6px; cursor: pointer;
    font-variant-numeric: tabular-nums; transition: background .15s var(--lj-ease);
}
.qty-pill:hover { background: var(--lj-primary-100); }

.lj-input, .lj-select {
    width: 100%; padding: var(--sp-3) var(--sp-4);
    font-family: inherit; font-size: var(--fs-sm); color: var(--lj-ink);
    background: var(--lj-bg); border: 1px solid var(--lj-hairline); border-radius: var(--r-md);
    transition: border-color .2s var(--lj-ease), box-shadow .2s var(--lj-ease);
    appearance: none; -webkit-appearance: none;
}
.lj-input::placeholder { color: var(--lj-muted); }
.lj-input:focus, .lj-select:focus {
    outline: none; border-color: var(--lj-primary);
    box-shadow: 0 0 0 3px var(--lj-primary-50);
}
/* iOS Safari auto-zooms any focused control whose font-size is < 16px, then
   never zooms back out — on iPhone the whole order form looks broken after a
   tap. Bump every form control to 16px on small screens to kill the zoom.
   Desktop keeps the tighter 14px look. */
@media (max-width: 768px) {
    .lj-input, .lj-select, .otp-digit, .otp-mobile-row .lj-input,
    select, input[type="text"], input[type="email"], input[type="tel"],
    input[type="number"], input[type="password"], input[type="search"] {
        font-size: 16px;
    }
}

/* select with a custom left-side chevron (RTL: chevron on the left) */
.lj-select-wrap { position: relative; }
.lj-select { padding-inline-start: var(--sp-7); }
.lj-select-wrap::after {
    content: ""; position: absolute; inset-inline-start: var(--sp-4); top: 50%;
    width: 10px; height: 10px; margin-top: -6px; pointer-events: none;
    border-inline-end: 2px solid var(--lj-muted); border-block-end: 2px solid var(--lj-muted);
    transform: rotate(45deg);
}

.lj-checkbox { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--lj-body-text); cursor: pointer; }
.lj-checkbox input { width: 18px; height: 18px; accent-color: var(--lj-primary); }

/* live price row */
.lj-price-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--sp-4); background: var(--lj-primary-50);
    border-radius: var(--r-md); color: var(--lj-ink); font-weight: 600;
}

/* ---- order summary (live price block on send-order) ---- */
.order-summary {
    margin-block-end: var(--sp-5);
    padding: var(--sp-4) var(--sp-5);
    border: 1px solid var(--lj-primary-100);
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--lj-primary-50), color-mix(in oklab, var(--lj-primary-50) 55%, var(--lj-bg)));
}
.order-summary[hidden] { display: none; }
.order-summary-line { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.order-summary-label { font-size: var(--fs-sm); font-weight: 600; color: var(--lj-body-text); }
.order-summary-amount {
    font-family: Estedad, inherit; font-weight: 800;
    font-size: var(--fs-xl); color: var(--lj-primary);
    font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.order-summary-note {
    margin-top: var(--sp-2); padding-top: var(--sp-2);
    border-top: 1px dashed var(--lj-primary-100);
    font-size: var(--fs-xs); color: var(--lj-muted); line-height: 1.7;
}

/* ---- guest account block (register / login on checkout) ---- */
.acct-block {
    border: 1px solid var(--lj-hairline); border-radius: var(--r-md);
    padding: var(--sp-4); background: var(--lj-bg-alt);
}
.acct-tabs { display: flex; gap: var(--sp-2); margin-block-end: var(--sp-4); }
.acct-tab {
    flex: 1; font: inherit; font-size: var(--fs-sm); font-weight: 600;
    padding: var(--sp-2) var(--sp-3); cursor: pointer;
    color: var(--lj-muted); background: var(--lj-bg);
    border: 1px solid var(--lj-hairline); border-radius: var(--r-sm);
    transition: all .15s var(--lj-ease);
}
.acct-tab:hover { color: var(--lj-primary); border-color: var(--lj-primary-100); }
.acct-tab.is-active { color: #fff; background: var(--lj-primary); border-color: var(--lj-primary); }
.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); margin-block-end: var(--sp-4); }
.acct-grid:last-child { margin-block-end: 0; }
.acct-panel[hidden] { display: none; }
.lj-hint-error { color: var(--lj-danger, #c0225a); }
.lj-input.is-error { border-color: var(--lj-danger, #c0225a); }
.lj-checkbox.is-error { color: var(--lj-danger, #c0225a); }
.lj-checkbox.is-error input { accent-color: var(--lj-danger, #c0225a); }
.login-sub[hidden] { display: none; }
.pw-wrap { position: relative; }
.pw-wrap .lj-input { padding-inline-end: 2.5rem; }
.pw-toggle {
  position: absolute; inset-block: 0; inset-inline-end: 0; width: 2.5rem;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--lj-muted);
}
.pw-toggle:hover { color: var(--lj-primary); }
.pw-toggle::before {
  content: ""; width: 20px; height: 20px; display: block;
  background: currentColor; -webkit-mask: var(--eye) center / contain no-repeat; mask: var(--eye) center / contain no-repeat;
  --eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.pw-toggle[aria-pressed="true"]::before {
  --eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-10-8-10-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 10 8 10 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='2' y1='2' x2='22' y2='22'/%3E%3C/svg%3E");
}

/* logged-in welcome strip */
.acct-welcome {
    display: flex; align-items: center; gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
    background: var(--lj-primary-50); border: 1px solid var(--lj-primary-100);
}
.acct-welcome-ic {
    display: inline-flex; flex: none; width: 40px; height: 40px;
    align-items: center; justify-content: center; border-radius: var(--r-sm);
    background: var(--lj-primary); color: #fff;
}
.acct-welcome-ic svg { width: 20px; height: 20px; }
.acct-welcome strong { color: var(--lj-ink); font-size: var(--fs-sm); }
.acct-welcome p { color: var(--lj-muted); font-size: var(--fs-xs); margin-top: 2px; }

@media (max-width: 520px) { .acct-grid { grid-template-columns: 1fr; } }

/* ---- mobile OTP ---- */
.otp-mobile-row { display: flex; gap: var(--sp-2); align-items: stretch; }
.otp-mobile-row .lj-input { flex: 1; }
.otp-send-btn { flex: none; white-space: nowrap; }
.otp-box {
    margin-block-start: var(--sp-4); padding: var(--sp-4);
    border: 1px dashed var(--lj-primary-100); border-radius: var(--r-md);
    background: var(--lj-primary-50);
}
.otp-box[hidden], .otp-verified[hidden] { display: none; }
.otp-box-head { display: flex; justify-content: space-between; align-items: center; margin-block-end: var(--sp-3); font-size: var(--fs-sm); font-weight: 600; color: var(--lj-ink); }
.otp-timer { font-size: var(--fs-xs); font-weight: 400; color: var(--lj-muted); font-variant-numeric: tabular-nums; }
.otp-inputs { display: flex; gap: var(--sp-2); justify-content: center; }
.otp-digit {
    width: 44px; height: 52px; text-align: center;
    font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums;
    color: var(--lj-ink); background: var(--lj-bg);
    border: 1px solid var(--lj-hairline); border-radius: var(--r-sm);
    transition: border-color .15s var(--lj-ease), box-shadow .15s var(--lj-ease);
}
.otp-digit:focus { outline: none; border-color: var(--lj-primary); box-shadow: 0 0 0 3px var(--lj-primary-50); }
.otp-actions { display: flex; align-items: center; gap: var(--sp-3); margin-block-start: var(--sp-4); }
.login-pass-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3) var(--sp-4); margin-block-start: var(--sp-4); }
.login-pass-actions .lj-btn { flex: none; }
.otp-resend { font: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--lj-primary); background: none; border: none; cursor: pointer; }
.otp-resend:disabled { color: var(--lj-muted); cursor: not-allowed; }
.otp-msg { margin-block-start: var(--sp-2); font-size: var(--fs-xs); color: var(--lj-muted); min-height: 1.2em; }
.otp-msg.is-error { color: var(--lj-danger, #c0225a); }
.otp-verified {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    margin-block-start: var(--sp-3); padding: var(--sp-2) var(--sp-4);
    border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: 600;
    color: #067a51; background: #e8f9f1; border: 1px solid #bce8d5;
}
.otp-verified svg { width: 16px; height: 16px; }
.lj-btn:disabled { opacity: .5; cursor: not-allowed; }

/* insufficient-balance alert with inline topup CTA */
.otp-alert-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.otp-alert-row .lj-btn { flex: none; }

/* ---- confirm dialog ---- */
.lj-confirm[hidden] { display: none; }
.lj-confirm { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: var(--sp-5); }
.lj-confirm-scrim { position: absolute; inset: 0; background: rgba(15,10,30,.55); }
.lj-confirm-box {
    position: relative; width: 100%; max-width: 26rem;
    background: var(--lj-bg); border: 1px solid var(--lj-hairline);
    border-radius: var(--r-lg); padding: var(--sp-6);
    box-shadow: 0 24px 60px -12px rgba(15,10,30,.4);
}
.lj-confirm-box h3 { font-family: Estedad, inherit; font-size: var(--fs-lg); color: var(--lj-ink); margin: 0 0 var(--sp-3); }
.lj-confirm-box p { color: var(--lj-body-text); font-size: var(--fs-sm); line-height: 1.8; margin: 0 0 var(--sp-5); }
.lj-confirm-actions { display: flex; gap: var(--sp-3); justify-content: flex-start; }

/* ---- buttons ---- */
.lj-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
    font-family: inherit; font-size: var(--fs-sm); font-weight: 600; line-height: 1;
    padding: var(--sp-3) var(--sp-6); border-radius: var(--r-md); border: 1px solid transparent;
    cursor: pointer; text-decoration: none; transition: background .2s var(--lj-ease), box-shadow .2s var(--lj-ease), transform .1s var(--lj-ease);
}
.lj-btn-primary { background: var(--lj-primary); color: #fff; box-shadow: var(--shadow-btn, 0 2px 8px rgba(67,53,145,.25)); }
.lj-btn-primary:hover { background: var(--lj-primary-dark); }
.lj-btn-primary:active { transform: translateY(1px); }
.lj-btn-secondary { background: var(--lj-bg); color: var(--lj-primary); border-color: var(--lj-hairline); }
.lj-btn-secondary:hover { border-color: var(--lj-primary); }
.lj-link { color: var(--lj-primary); }
.lj-link:hover { text-decoration: underline; }

/* ---- chips / filter ---- */
.lj-chip {
    display: inline-flex; align-items: center; gap: var(--sp-1);
    font-size: var(--fs-sm); color: var(--lj-body-text); text-decoration: none;
    padding: var(--sp-2) var(--sp-4); background: var(--lj-bg-alt);
    border: 1px solid var(--lj-hairline); border-radius: var(--r-sm);
    transition: all .15s var(--lj-ease);
}
.lj-chip:hover { border-color: var(--lj-primary); }
.lj-chip.is-active { background: var(--lj-primary); color: #fff; border-color: var(--lj-primary); }
.lj-chip-sm { font-size: var(--fs-xs); padding: var(--sp-1) var(--sp-2); }

/* ---- alerts ---- */
.lj-alert { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); margin-block-end: var(--sp-5); font-size: var(--fs-sm); }
.lj-alert-error { background: var(--lj-accent-50); color: #c0225a; border: 1px solid var(--lj-accent-100); }
.lj-alert-success { background: #e8f9f1; color: #067a51; border: 1px solid #bce8d5; }
.lj-alert-info { background: var(--lj-primary-50); color: var(--lj-primary); border: 1px solid var(--lj-primary-100); }

/* ---- tables ---- */
.lj-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.lj-table th { font-weight: 600; color: var(--lj-ink); }
.lj-table td { color: var(--lj-body-text); }

/* ---- order-form quality tip (deliberately low-key, not attractive) ---- */
.order-quality-tip {
  margin-block-start: var(--sp-5);
  padding-inline-start: var(--sp-4);
  border-inline-start: 2px solid var(--lj-hairline);
  color: var(--lj-muted);
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: var(--lh-body);
  max-width: 48rem;
}

/* ---- muted helper ---- */
.lj-muted { color: var(--lj-muted); }
.lj-h4 { font-family: Estedad, inherit; color: var(--lj-ink); }

/* ---- prices page ---- */
.pr-intro { color: var(--lj-body-text); line-height: var(--lh-body); font-size: var(--fs-base); max-width: 60rem; margin-block-end: var(--sp-5); }
.pr-table-wrap { padding: 0; overflow: hidden; }
.pr-table { width: 100%; }
.pr-table thead th { background: var(--lj-bg-alt); padding: var(--sp-3) var(--sp-4); text-align: right; font-size: var(--fs-sm); color: var(--lj-ink); }
.pr-table td { padding: var(--sp-3) var(--sp-4); border-block-start: 1px solid var(--lj-hairline); vertical-align: middle; }
.pr-name { font-weight: 600; color: var(--lj-ink); }
/* .svc-name-*, .pr-flag, .svc-tag → shared in likejo-service-name.css */
.pr-cat { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--lj-muted); font-weight: 400; margin-top: 4px; }
.pr-cat-ic { width: .95em; height: .95em; flex: none; opacity: .75; }
/* platform icon inside a filter chip */
.pr-chip-ic { width: 1.05em; height: 1.05em; flex: none; }
.pr-min, .pr-max { color: var(--lj-muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.pr-price strong { font-family: Estedad, inherit; color: var(--lj-primary); font-variant-numeric: tabular-nums; }
.pr-unit { display: block; font-size: var(--fs-xs); color: var(--lj-muted); }
.lj-btn-sm { padding: var(--sp-1) var(--sp-4); font-size: var(--fs-xs); }
.pr-loading { text-align: center; padding: var(--sp-4); color: var(--lj-muted); font-size: var(--fs-sm); }
.pr-pagination { display: flex; align-items: center; justify-content: center; gap: var(--sp-4); padding: var(--sp-5); }
.pr-page-info { color: var(--lj-muted); font-size: var(--fs-sm); }
@media (max-width: 640px) {
  .pr-table .pr-min, .pr-table .pr-max { display: none; }
  .pr-table thead th:nth-child(2), .pr-table thead th:nth-child(3) { display: none; }
}

/* prices lazy-load: skeleton + fade-in */
.pr-skeleton { padding: var(--sp-2) var(--sp-4) var(--sp-4); }
.pr-skel-row { display: flex; gap: var(--sp-4); padding: var(--sp-3) 0; border-block-start: 1px solid var(--lj-hairline); }
.pr-skel-row span { height: 14px; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--lj-bg-alt) 25%, var(--lj-hairline) 37%, var(--lj-bg-alt) 63%); background-size: 400% 100%; animation: pr-shimmer 1.2s ease-in-out infinite; }
.pr-skel-row span:nth-child(1) { flex: 3; }
.pr-skel-row span:nth-child(2) { flex: 1; }
.pr-skel-row span:nth-child(3) { flex: 1; }
@keyframes pr-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.pr-fade-in { animation: pr-fade .35s var(--lj-ease) both; }
@keyframes pr-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pr-fade-in, .pr-skel-row span { animation: none; } }

/* ============ a11y + interaction polish (UI/UX audit) ============ */
/* cursor on all interactive */
.lj-btn, .lj-chip, .lj-select, .lj-checkbox, .lj-checkbox input, .lj-link,
.pr-order a, .price-row a { cursor: pointer; }

/* visible focus rings for keyboard nav (WCAG 2.4.7) */
.lj-btn:focus-visible,
.lj-chip:focus-visible,
.lj-input:focus-visible,
.lj-select:focus-visible,
.lj-link:focus-visible,
.lj-checkbox input:focus-visible {
    outline: 2px solid var(--lj-primary);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}
/* keep focus ring off when mouse-clicking (focus-visible handles this) */
.lj-btn:focus:not(:focus-visible) { outline: none; }

/* smooth hover on chips + table rows + buttons already have transition */
.price-row { transition: background .15s var(--lj-ease); }
.price-row:hover { background: var(--lj-primary-50); }

/* disabled state clarity */
.lj-btn:disabled, .lj-btn[aria-disabled="true"] {
    opacity: .5; cursor: not-allowed; box-shadow: none;
}

/* respect reduced motion globally for SMM UI */
@media (prefers-reduced-motion: reduce) {
    .lj-btn, .lj-chip, .lj-input, .lj-select, .price-row { transition: none; }
}

/* ============ service tags (extracted from name) ============ */
.svc-tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-block: var(--sp-2) var(--sp-3); }
.svc-tag {
    display: inline-flex; align-items: center;
    font-size: var(--fs-xs); font-weight: 500; line-height: 1;
    color: var(--lj-primary); background: var(--lj-primary-50);
    border: 1px solid var(--lj-primary-100);
    padding: 5px var(--sp-3); border-radius: var(--r-sm);
    white-space: nowrap;
}
.svc-tag-sm { margin-inline-start: var(--sp-2); padding: 3px var(--sp-2); font-size: 11px; }

/* Persian numbers: use the body Persian font (Vazirmatn) which has proper
   Farsi numerals; drop tabular-nums (it can force Latin-style glyphs). */
.pr-min, .pr-max, .pr-price strong, .svc-price, .price-value, .svc-desc {
    font-family: 'Vazirmatn', var(--lj-font-body, inherit);
    font-feature-settings: normal;
    font-variant-numeric: normal;
}

/* ============ contact page ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: var(--sp-6); align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: var(--sp-5); padding-block: var(--sp-3); }
.contact-info-row { display: flex; gap: var(--sp-4); align-items: flex-start; }
.contact-ic { flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--lj-primary-50); color: var(--lj-primary); border-radius: var(--r-md); }
.contact-ic svg, .contact-ic-svg { width: 20px; height: 20px; }
.contact-label { display: block; font-size: var(--fs-xs); color: var(--lj-muted); margin-bottom: 2px; }
.contact-info-row a { color: var(--lj-ink); font-weight: 500; }
.contact-info-row a:hover { color: var(--lj-primary); }
.contact-socials { display: flex; gap: var(--sp-3); }
.contact-form { padding: var(--sp-6); }
.contact-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form-grid { grid-template-columns: 1fr; }
}

/* ============ likejo pagination (numbered, Persian, RTL) ============ */
.lj-pagination { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); flex-wrap: wrap; margin-block: var(--sp-6) var(--sp-3); }
.lj-page {
  min-width: 40px; height: 40px; padding: 0 var(--sp-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-sm); font-weight: 600; color: var(--lj-body-text);
  background: var(--lj-bg); border: 1px solid var(--lj-hairline); border-radius: var(--r-md);
  text-decoration: none; font-variant-numeric: normal;
  transition: border-color .15s var(--lj-ease), background .15s var(--lj-ease), color .15s var(--lj-ease);
}
.lj-page:hover { border-color: var(--lj-primary); color: var(--lj-primary); }
.lj-page.is-active { background: var(--lj-primary); border-color: var(--lj-primary); color: #fff; cursor: default; }
.lj-page-nav { width: 40px; padding: 0; color: var(--lj-muted); }
.lj-page-nav svg { width: 18px; height: 18px; }
.lj-page.is-disabled { opacity: .4; pointer-events: none; }
.lj-page-gap { color: var(--lj-muted); padding: 0 var(--sp-1); }
.lj-pagination-info { text-align: center; font-size: var(--fs-sm); color: var(--lj-muted); }

/* ══ Popular services (curated landing cards) on /services ══ */
.cat-popular { margin-block: var(--sp-6) var(--sp-8); }
.cat-popular-head { margin-bottom: var(--sp-5); }
.cat-popular-head h2 { font-size: var(--fs-xl); }
.cat-popular-head p { color: var(--lj-muted); font-size: var(--fs-sm); margin-top: var(--sp-1); }
.cat-popular-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4);
}
.cat-pop-card {
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--lj-surface); border: 1.5px solid var(--lj-hairline);
  border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-5);
  transition: border-color 150ms, transform 150ms, box-shadow 150ms;
}
.cat-pop-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--cat-plat, #433591) 45%, var(--lj-hairline));
  box-shadow: 0 10px 26px -8px color-mix(in oklab, var(--cat-plat, #433591) 40%, transparent);
}
.cat-pop-ic {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 46px; height: 46px; border-radius: var(--r-md);
  background: var(--cat-plat, #433591); color: #fff;
}
.cat-pop-ic svg { width: 24px; height: 24px; color: #fff; }
.cat-pop-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.cat-pop-body b { font-size: var(--fs-base); font-weight: 700; color: var(--lj-foreground, #111); }
.cat-pop-body small { font-size: var(--fs-xs); color: var(--lj-muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-pop-go { width: 18px; height: 18px; color: var(--cat-plat, #433591); flex-shrink: 0; transition: transform 150ms; }
.cat-pop-card:hover .cat-pop-go { transform: translateX(-3px); }
/* per-platform accent */
.cat-pop-instagram { --cat-plat: #dd2a7b; }
.cat-pop-telegram  { --cat-plat: #29a5e4; }
.cat-pop-youtube   { --cat-plat: #ff0000; }
.cat-pop-tiktok    { --cat-plat: #111111; }
.cat-pop-rubika    { --cat-plat: #6c4bf6; }
@media (max-width: 900px) { .cat-popular-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cat-popular-grid { grid-template-columns: 1fr; } }

/* contact social cards + note */
.contact-social-block { display: flex; flex-direction: column; gap: var(--sp-3); }
.contact-social-cards { display: flex; flex-direction: column; gap: var(--sp-3); }
.contact-social-card {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--lj-bg-alt); border: 1px solid var(--lj-hairline); border-radius: var(--r-md);
  text-decoration: none; transition: border-color .15s var(--lj-ease), transform .15s var(--lj-ease);
}
.contact-social-card:hover { border-color: var(--lj-primary); transform: translateY(-1px); }
.csc-ic { flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-md); color: #fff; }
.csc-ic svg { width: 20px; height: 20px; }
.csc-ic.pi-ig { background: linear-gradient(135deg,#f58529,#dd2a7b,#8134af); }
.csc-ic.pi-tg { background: #26A5E4; }
.csc-text { display: flex; flex-direction: column; }
.csc-text b { color: var(--lj-ink); font-size: var(--fs-sm); }
.csc-text small { color: var(--lj-muted); font-size: var(--fs-xs); direction: ltr; }
.contact-note { display: flex; gap: var(--sp-4); align-items: flex-start; }
.contact-ic-ghost { background: var(--lj-bg-alt); color: var(--lj-muted); }
.contact-note > div { display: flex; flex-direction: column; }
.contact-note span:last-child { color: var(--lj-body-text); font-size: var(--fs-sm); }

/* ── Service detail card (progressive disclosure on service pick) ─────────
   Matches the LikeJo design system: --lj-surface card, hairline border,
   --lj-radius-lg + --lj-shadow-card, --lj-primary tag chips (see .svc-tag).
   Works in light + dark mode via tokens (no hardcoded colors). */
.svc-detail {
  /* subtle brand-tinted surface so the detail card reads as a distinct,
     "info" panel rather than a plain white box */
  background:
    linear-gradient(180deg, var(--lj-primary-50), color-mix(in oklab, var(--lj-primary-50) 40%, var(--lj-surface)));
  border: 1px solid var(--lj-primary-100);
  border-radius: var(--lj-radius-lg, 1rem);
  box-shadow: var(--lj-shadow-card);
  overflow: hidden;
  /* Ease the card open (height + fade) instead of snapping — the sudden
     appearance shoved the fields below (the "jump"). Class-driven so we don't
     fight the [hidden] attribute. Collapsed by default. */
  max-height: 0; margin-top: 0; opacity: 0; border-width: 0;
  transition: max-height .3s var(--lj-ease, ease-out), opacity .22s var(--lj-ease, ease-out),
              margin-top .3s var(--lj-ease, ease-out);
}
.svc-detail.is-shown {
  max-height: 32rem; margin-top: var(--sp-3); opacity: 1; border-width: 1px;
}
/* collapsible header — «جزئیات سرویس» toggle */
.svc-detail-toggle {
  display: flex; align-items: center; gap: var(--sp-2);
  width: 100%; padding: var(--sp-4) var(--sp-5);
  background: none; border: 0; cursor: pointer; text-align: start;
  font-family: inherit; color: var(--lj-ink);
}
.svc-detail-toggle-label { font-size: var(--fs-sm); font-weight: 700; color: var(--lj-primary); }
.svc-detail-toggle .svc-detail-title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: var(--fs-sm); font-weight: 500; color: var(--lj-muted);
}
.svc-detail-caret {
  width: 18px; height: 18px; flex: none; color: var(--lj-primary);
  transition: transform .2s var(--lj-ease, ease-out);
}
.svc-detail-toggle[aria-expanded="true"] .svc-detail-caret { transform: rotate(180deg); }
.svc-detail-body { padding: 0 var(--sp-5) var(--sp-5); }
@media (prefers-reduced-motion: reduce) { .svc-detail-caret { transition: none; } }
@keyframes svcFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .svc-detail { animation: none; } }

.svc-detail-head {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--sp-2) var(--sp-3);
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--lj-hairline);
}
.svc-detail-title {
  font-family: 'Vazirmatn', var(--lj-font-body, inherit);
  font-weight: 700; color: var(--lj-ink); font-size: var(--fs-md);
}
.svc-detail-tags { display: inline-flex; flex-wrap: wrap; gap: var(--sp-2); }
/* reuse the same chip look the catalog already uses (.svc-tag) */
.svc-chip {
  display: inline-flex; align-items: center; line-height: 1;
  font-size: var(--fs-xs); font-weight: 500;
  color: var(--lj-primary); background: var(--lj-primary-50);
  border: 1px solid var(--lj-primary-100);
  padding: 4px var(--sp-3); border-radius: var(--lj-radius-pill, 9999px);
  white-space: nowrap;
}
.svc-detail-desc {
  margin: 0 0 var(--sp-4); color: var(--lj-body-text);
  font-size: var(--fs-sm); line-height: var(--lh-body);
}

/* price highlight banner — the key decision fact, stands out */
.svc-price-banner {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3);
  margin: var(--sp-4) 0;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--lj-radius, 0.75rem);
  background: color-mix(in oklab, var(--lj-primary) 10%, var(--lj-surface));
  border: 1px solid var(--lj-primary-100);
}
.svc-price-banner .svc-price-k { font-size: var(--fs-sm); color: var(--lj-primary-dark, var(--lj-primary)); }
.svc-price-banner .svc-price-v {
  font-family: Estedad, 'Vazirmatn', inherit; font-weight: 800; font-size: var(--fs-lg);
  color: var(--lj-primary); letter-spacing: -.01em;
}

/* spec grid — icon + label + value rows */
.svc-detail-specs {
  display: grid; grid-template-columns: 1fr; gap: 0; margin: 0;
}
.svc-spec {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: var(--sp-3); padding-block: var(--sp-3);
  border-bottom: 1px solid var(--lj-hairline);
}
.svc-spec:last-child { border-bottom: 0; }
.svc-spec-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--lj-primary-50); color: var(--lj-primary);
}
.svc-spec-ic svg { width: 17px; height: 17px; }
.svc-spec dt { font-size: var(--fs-sm); color: var(--lj-muted); margin: 0; }
.svc-spec dd {
  margin: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--lj-ink);
  text-align: end; font-family: 'Vazirmatn', var(--lj-font-body, inherit);
}

/* note (non key:value lines like «سفارش تکراری برای یک لینک ثبت نکنید») */
.svc-detail-note {
  margin: var(--sp-4) 0 0; padding-top: var(--sp-3);
  border-top: 1px dashed var(--lj-hairline);
  font-size: var(--fs-xs); color: var(--lj-muted); line-height: 1.8;
}
.svc-detail-note[hidden], .svc-price-banner[hidden] { display: none; }

/* on wide cards, show specs in two columns for density */
@media (min-width: 560px) {
  .svc-detail-specs { grid-template-columns: 1fr 1fr; column-gap: var(--sp-6); }
  .svc-spec:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}

/* ── Platform picker (step 0): pick the network before the category ─────── */
.plat-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.plat-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;                 /* WCAG/HIG touch target */
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--lj-hairline);
  border-radius: var(--r-md);
  background: var(--lj-bg-alt);
  color: var(--lj-body-text);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color .15s var(--lj-ease), background .15s var(--lj-ease), box-shadow .15s var(--lj-ease), transform .1s var(--lj-ease);
}
.plat-chip:focus-visible { outline: 2px solid var(--plat-accent, var(--lj-primary)); outline-offset: 2px; }
/* selected marker — not color-only (WCAG color-not-only) */
.plat-chip-check { width: 0; height: 15px; margin-inline-start: calc(var(--sp-1) * -1); color: var(--plat-accent, var(--lj-primary)); opacity: 0; transition: opacity .15s var(--lj-ease), width .15s var(--lj-ease); }
.plat-chip.is-active .plat-chip-check { opacity: 1; width: 15px; }
@media (prefers-reduced-motion: reduce) { .plat-chip, .plat-chip-check { transition: none; } }
/* reserve the active-state shadow at rest (transparent) so activating a chip
   doesn't grow its box and shove the row — no hover/select "jump" */
.plat-chip { box-shadow: 0 6px 18px -8px transparent; }
.plat-chip:hover {
  border-color: color-mix(in oklab, var(--plat-accent, var(--lj-primary)) 45%, var(--lj-hairline));
}
.plat-chip.is-active {
  border-color: var(--plat-accent, var(--lj-primary));
  background: color-mix(in oklab, var(--plat-accent, var(--lj-primary)) 12%, var(--lj-bg-alt));
  box-shadow: 0 6px 18px -8px color-mix(in oklab, var(--plat-accent, var(--lj-primary)) 55%, transparent);
}
.plat-chip.is-active:active { transform: translateY(1px); }
.plat-chip-ic {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  color: var(--plat-accent, var(--lj-primary));
  flex: none;
}
.plat-chip-ic .plat-svg { width: 20px; height: 20px; }
/* per-platform accent — mirrors the .cat-pop-* palette above */
.plat-chip-instagram { --plat-accent: #dd2a7b; }
.plat-chip-telegram  { --plat-accent: #29a5e4; }
.plat-chip-youtube   { --plat-accent: #ff0000; }
.plat-chip-tiktok    { --plat-accent: #111111; }
.plat-chip-rubika    { --plat-accent: #6c4bf6; }
.plat-chip-twitter   { --plat-accent: #111111; }
.plat-chip-facebook  { --plat-accent: #1877f2; }
.plat-chip-other     { --plat-accent: var(--lj-primary); }

/* ── Order form: two-column layout ─────────────────────────────────────── */
.order-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6) var(--sp-8);
  align-items: start;
}
@media (min-width: 860px) {
  .order-grid { grid-template-columns: 1.15fr 1fr; }
  /* keep the payment/account column sticky-ish next to the taller left col */
  .order-col-side { align-self: start; }
}

/* ── Polished select (payment method + others) ─────────────────────────── */
.lj-select {
  padding-block: var(--sp-3);
  background: var(--lj-surface);
  border-radius: var(--lj-radius, 0.75rem);
  font-weight: 500;
  cursor: pointer;
}
.lj-select:hover { border-color: var(--lj-primary-mid, var(--lj-primary)); }
.lj-select-wrap::after { transition: border-color .2s var(--lj-ease); }
.lj-select-wrap:hover::after { border-color: var(--lj-primary); }

/* ── Wallet balance note (shown when wallet payment picked) ─────────────── */
.wallet-note {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm); color: var(--lj-ink);
  background: var(--lj-primary-50);
  border: 1px solid var(--lj-primary-100);
  border-radius: var(--lj-radius, 0.75rem);
}
.wallet-note strong { font-family: 'Vazirmatn', var(--lj-font-body, inherit); color: var(--lj-primary); }
.wallet-note-ic { display: inline-flex; color: var(--lj-primary); }
.wallet-note-ic svg { width: 18px; height: 18px; }

/* ── Order form UX fixes ───────────────────────────────────────────────── */
/* Register email/mobile stack full-width (the side column is narrow; a 2-col
   grid squeezed the mobile input + "ارسال کد" button too tight). */
.acct-stack { display: flex; flex-direction: column; gap: var(--sp-4); margin-block-end: var(--sp-4); }
.acct-stack:last-child { margin-block-end: 0; }
.acct-stack .otp-mobile-row .lj-input { min-width: 0; }

/* Select chevron: sit it a touch closer to the edge + vertically centered. */
.lj-select { padding-inline-start: var(--sp-8); }
.lj-select-wrap::after {
  inset-inline-start: var(--sp-4);
  width: 8px; height: 8px; margin-top: -5px;
  opacity: .6;
}

/* ── Order detail (member) key-value grid + status chips ── */
.ord-kv {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4) var(--sp-5);
}
.ord-kv-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ord-kv-item .lj-muted { font-size: var(--fs-xs); }
.ord-kv-item strong { font-size: var(--fs-sm); }
.ord-kv-wide { grid-column: 1 / -1; }
.ord-status {
  display: inline-flex; align-items: center;
  font-size: var(--fs-xs); font-weight: 700; line-height: 1;
  padding: 4px var(--sp-2); border-radius: var(--r-sm);
  color: var(--lj-primary); background: var(--lj-primary-50);
  border: 1px solid var(--lj-primary-100);
}
.ord-status-completed { color: var(--lj-success); background: var(--lj-success-50); border-color: var(--lj-success); }
.ord-status-in_progress, .ord-status-processing { color: var(--lj-primary); background: var(--lj-primary-50); border-color: var(--lj-primary-100); }
.ord-status-partial { color: var(--lj-amber); background: var(--lj-amber-50); border-color: var(--lj-amber); }
.ord-status-canceled, .ord-status-failed, .ord-status-refunded { color: var(--lj-danger); background: var(--lj-danger-50); border-color: var(--lj-danger); }
.ord-status-pending { color: var(--lj-amber); background: var(--lj-amber-50); border-color: var(--lj-amber); }
@media (max-width: 560px) { .ord-kv { grid-template-columns: 1fr; } }

/* Small phones: the form card's 32px inline padding + container padding could
   push the card past the viewport on narrow screens (labels clipped at the
   right edge). Tighten padding and guarantee the card never overflows. */
@media (max-width: 480px) {
  /* inline style="padding: var(--sp-6)" on the form wins over a class, so
     override with !important to tighten inline padding on small phones */
  #order-form.lj-card { padding-inline: var(--sp-4) !important; }
  #order-form, .order-grid, .order-col { min-width: 0; max-width: 100%; }
  .order-grid { overflow-x: clip; }
}

/* ── Custom service picker (cards) ─────────────────────────────────────
   Replaces a noisy native <select> where name+tags+price collapsed into one
   text line. The native select stays in the DOM (hidden) for form submit. */
.svc-native-select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.svc-picker { position: relative; }
.svc-picker-trigger {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%;
  padding: var(--sp-3) var(--sp-4);
  font-family: inherit; font-size: 16px; color: var(--lj-ink); text-align: start;
  background: var(--lj-bg); border: 1px solid var(--lj-hairline); border-radius: var(--r-md);
  cursor: pointer; transition: border-color .2s var(--lj-ease), box-shadow .2s var(--lj-ease);
}
.svc-picker-trigger:disabled { color: var(--lj-muted); cursor: not-allowed; background: var(--lj-bg-alt); }
.svc-picker.is-open .svc-picker-trigger { border-color: var(--lj-primary); box-shadow: 0 0 0 3px var(--lj-primary-50); }
.svc-picker-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-picker-caret { width: 18px; height: 18px; flex: none; color: var(--lj-muted); transition: transform .2s var(--lj-ease); }
.svc-picker.is-open .svc-picker-caret { transform: rotate(180deg); color: var(--lj-primary); }

.svc-picker-panel {
  position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 40;
  max-height: 20rem; overflow-y: auto; padding: var(--sp-2);
  background: var(--lj-bg); border: 1px solid var(--lj-hairline);
  border-radius: var(--r-md); box-shadow: 0 12px 32px -12px rgba(15,10,30,.25);
  display: flex; flex-direction: column; gap: 4px;
}
.svc-picker-panel[hidden] { display: none; }

/* Picker list-row card. MUST stay scoped to .svc-picker-panel — an unscoped
   `.svc-card` here collides with the catalog/home GRID card (same class name,
   defined in likejo-theme.css) and collapses it into vertical text. */
.svc-picker-panel .svc-card {
  display: flex; flex-direction: row; align-items: center; gap: var(--sp-3); width: 100%;
  flex: none;                 /* don't let the flex column squish rows */
  padding: var(--sp-2) var(--sp-3);
  font-family: inherit; text-align: start; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: var(--r-sm);
  box-shadow: none;           /* cards are list rows — a stray global button
                                 shadow made them "jump" on hover; kill it */
  transition: background .12s var(--lj-ease), border-color .12s var(--lj-ease);
}
.svc-picker-panel .svc-card:hover, .svc-picker-panel .svc-card:focus-visible { background: var(--lj-bg-alt); box-shadow: none; }
.svc-picker-panel .svc-card:focus-visible { outline: 2px solid var(--lj-primary); outline-offset: -2px; }
.svc-picker-panel .svc-card.is-active { background: var(--lj-primary-50); border-color: var(--lj-primary-100); }
.svc-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.svc-card-name {
  font-size: var(--fs-sm); font-weight: 600; color: var(--lj-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.svc-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.svc-card-tag {
  font-size: 11px; font-weight: 500; line-height: 1.4;
  color: var(--lj-primary); background: var(--lj-primary-50);
  border: 1px solid var(--lj-primary-100);
  padding: 1px var(--sp-2); border-radius: var(--r-xs, 4px); white-space: nowrap;
}
.svc-card-price {
  flex: none; font-family: Estedad, 'Vazirmatn', inherit; font-weight: 700;
  font-size: var(--fs-sm); color: var(--lj-primary);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.svc-card-price small { font-weight: 400; color: var(--lj-muted); font-size: 10px; }

/* platform picker rendered as a dropdown panel (matches the service picker).
   The .plat-chip buttons now live inside .svc-picker-panel as full-width rows. */
.plat-trigger-value { display: inline-flex; align-items: center; gap: var(--sp-2); }
.plat-trigger-ic { display: inline-flex; width: 22px; height: 22px; flex: none; }
.plat-trigger-ic svg, .plat-trigger-ic .plat-svg { width: 20px; height: 20px; }
.plat-picker-panel .plat-chip {
  width: 100%; justify-content: flex-start; min-height: 44px;
  border: 1px solid transparent; border-radius: var(--r-sm); box-shadow: none;
}
.plat-picker-panel .plat-chip:hover { background: var(--lj-bg-alt); box-shadow: none; }
.plat-picker-panel .plat-chip.is-active {
  background: var(--lj-primary-50); border-color: var(--lj-primary-100); box-shadow: none;
}
.plat-picker-panel .plat-chip-name { flex: 1; }

/* Back-to-hub link under a category listing (hub-and-spoke internal link). */
.lj-cat-hublink {
  margin-top: var(--sp-6); padding-top: var(--sp-5);
  border-top: 1px solid var(--lj-hairline);
  font-size: var(--fs-sm); color: var(--lj-muted); text-align: center;
}
.lj-cat-hublink a { color: var(--lj-primary); font-weight: 600; }
.lj-cat-hublink a:hover { text-decoration: underline; }
