/* =========================================================
   v2 features
   ========================================================= */
.mb-3 { margin-bottom: 1rem; } .mt-0 { margin-top: 0; } .small { font-size: .85rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.link-btn { color: #a77a00; font-weight: 700; text-decoration: underline; }
.badge-purple { background: #7c3aed; color: #fff; }
.badge-teal { background: #0d9488; color: #fff; }
.card-badges.bottom { top: auto; bottom: 10px; }
.old-price { font-size: .78rem; color: var(--muted); font-weight: 600; margin-inline-start: 6px; }
.card-specs span.ok { background: var(--green-soft); color: #106b33; }
.card.is-wanted .card-media { aspect-ratio: 16 / 7; }
.cmp-btn { position: absolute; top: 52px; inset-inline-end: 10px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; box-shadow: var(--shadow-sm); z-index: 2; opacity: 0; transition: .15s; }
.card:hover .cmp-btn, .cmp-btn.on { opacity: 1; }
.cmp-btn.on { background: var(--ink); color: var(--amber); }
@media (hover: none) { .cmp-btn { opacity: 1; } }
.compare-bar { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; padding: 8px 8px 8px 16px; border-radius: 16px; box-shadow: var(--shadow-lg); white-space: nowrap; }
[dir=rtl] .compare-bar { padding: 8px 16px 8px 8px; }
.compare-bar .icon-btn { background: var(--ink-3); border-color: transparent; color: #fff; }
.compare-table th { min-width: 120px; vertical-align: top; }
.cmp-head { display: grid; gap: 6px; }
.cmp-head img { width: 100%; max-width: 200px; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }
.nav-icon { position: relative; }
.dot-count { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 800; font-style: normal; display: grid; place-items: center; line-height: 1; }
.bottom-nav a { position: relative; }
.bottom-nav .dot-count { top: 0; inset-inline-end: 22%; }
.count-dot { font-style: normal; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.social-chip { padding: 6px 12px; border-radius: 10px; background: var(--ink-3); font-size: .85rem; font-weight: 700; }
.social-chip:hover { color: var(--amber); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.install-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--amber); font-weight: 700; }
.banner { position: relative; display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.banner img { width: 100%; max-height: 220px; object-fit: cover; }
.detail-side .banner img { max-height: none; }
.banner-tag { position: absolute; top: 8px; inset-inline-end: 8px; background: rgba(15,18,24,.6); color: #fff; font-size: .7rem; padding: 1px 8px; border-radius: 6px; }
.city-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.city-chips a { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 99px; background: var(--amber-soft); color: #6d4c00; font-size: .84rem; font-weight: 700; border: 1px solid transparent; }
.city-chips a small { opacity: .7; }
.city-chips a.active, .city-chips a:hover { border-color: var(--amber); background: #fff; }
.seg-wrap { flex-wrap: wrap; }
.seg-wrap label { flex: 1 1 45%; }
.deal-toggle.three { grid-template-columns: repeat(3, 1fr); }
.post-form.deal-wanted .not-wanted, .post-form:not(.deal-wanted) .wanted-only-inline, .post-form.deal-wanted .not-wanted-inline { display: none !important; }
.wanted-box { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; background: linear-gradient(135deg, #f5f0ff, #fff); border: 1px solid #e4dbff; border-radius: 22px; padding: 28px; }
.why-ic.purple { background: #7c3aed; color: #fff; }
.wanted-list { display: grid; gap: 8px; align-content: start; }
.wanted-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: #fff; border-radius: 14px; border: 1px solid var(--line); transition: .15s; }
.wanted-item:hover { border-color: #7c3aed; }
.wanted-item div { display: flex; flex-direction: column; min-width: 0; }
.wanted-item b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wanted-item small { color: var(--muted); display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.cat-ic.sm { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; background: var(--amber-soft); color: #8a6100; }
.cat-ic.sm .ic { width: 24px; height: 24px; }
.dealer-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.dealer-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 20px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: .15s; }
.dealer-card:hover { border-color: var(--amber); transform: translateY(-3px); }
.why.link:hover { border-color: var(--amber); }
img.avatar { object-fit: cover; padding: 0; background: #fff; }
.avatar-edit { display: flex; align-items: center; gap: 16px; }
.video-wrap { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; cursor: pointer; }
.video-wrap img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.video-play .ic { width: 32px; height: 32px; }
.history { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.history li { display: flex; gap: 10px; align-items: center; }
.insp-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.insp-head h2 { margin: 0; font-size: 1.15rem; display: flex; gap: 8px; align-items: center; }
.insp-score { width: 74px; height: 74px; border-radius: 50%; background: #0d9488; color: #fff; display: grid; place-content: center; text-align: center; flex-shrink: 0; }
.insp-score b { font-size: 1.8rem; line-height: 1; } .insp-score small { opacity: .8; }
.cal-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cal-title { font-weight: 800; margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow { font-size: .72rem; color: var(--muted); font-weight: 700; }
.cal-day { padding: 6px 0; border-radius: 8px; font-size: .85rem; font-weight: 600; background: var(--green-soft); color: #106b33; }
.cal-day.busy { background: var(--red-soft); color: var(--red); text-decoration: line-through; }
.cal-day.past { opacity: .35; }
.cal-day.today { outline: 2px solid var(--ink); }
.cal-legend { display: flex; gap: 16px; margin-top: 12px; font-size: .84rem; color: var(--muted); }
.cal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: middle; }
.cal-legend .free { background: var(--green-soft); border: 1px solid #9bd9b2; } .cal-legend .busy { background: var(--red-soft); border: 1px solid #f3b4b4; }
.block-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.block-form .field { flex: 1 1 140px; }
.block-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: .9rem; }
.chat-quick summary { list-style: none; cursor: pointer; }
.chat-quick summary::-webkit-details-marker { display: none; }
.promo-box { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--amber-soft); border: 1px solid #f6e0a0; }
.promo-box b { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.promo-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.svc-panel h4 { margin-bottom: 8px; }
.svc-panel a { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: .92rem; }
.svc-panel a:last-child { border: 0; }
.svc-panel a .ic:last-child { margin-inline-start: auto; color: var(--muted); }
.svc-panel a:hover { color: #a77a00; }
.stars, .stars-sm { color: var(--amber); letter-spacing: 1px; }
.stars .off { color: var(--line-2); }
.reviews-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.review-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.review p { margin: 0; color: #3b4354; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-input input { display: none; }
.star-input label { font-size: 2rem; color: var(--line-2); cursor: pointer; line-height: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--amber); }
.stat-row.four { grid-template-columns: repeat(4, 1fr); }
.legend { display: flex; gap: 12px; font-size: .82rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
.lg-v { background: var(--amber); } .lg-c { background: var(--ink); }
.bars.dual { height: 160px; }
.bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; gap: 2px; }
.bar-pair span { flex: 1; background: linear-gradient(var(--amber), #ffa000); border-radius: 4px 4px 1px 1px; min-height: 2px; }
.bar-pair span.c { background: var(--ink); }
.upsell { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: linear-gradient(120deg, var(--ink), var(--ink-3)); color: #fff; margin-bottom: 16px; }
.upsell > .ic:first-child { color: var(--amber); width: 28px; height: 28px; }
.upsell div { flex: 1; display: flex; flex-direction: column; }
.upsell small { color: #b8bfcc; }
.pay-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pay-row:last-child { border: 0; }
.note-list { display: grid; gap: 8px; }
.note { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.note.unread { border-color: var(--amber); background: var(--amber-soft); }
.note > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.note-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg); flex-shrink: 0; }
.t-message { background: var(--blue-soft); color: var(--blue); } .t-alert { background: var(--amber-soft); color: #8a6100; }
.t-price { background: var(--red-soft); color: var(--red); } .t-payment { background: var(--green-soft); color: var(--green); }
.t-review { background: var(--amber-soft); color: #8a6100; }
.inbox { display: grid; grid-template-columns: 340px 1fr; height: min(72vh, 720px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.conv-list { border-inline-end: 1px solid var(--line); overflow-y: auto; }
.conv { display: flex; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); align-items: center; }
.conv:hover { background: var(--bg); } .conv.active { background: var(--amber-soft); }
.conv-thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--bg); flex-shrink: 0; display: grid; place-items: center; color: var(--muted); }
.conv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.conv-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.conv-info > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-head .grow { display: flex; flex-direction: column; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.msg { max-width: 75%; align-self: flex-start; background: #fff; border: 1px solid var(--line); padding: 8px 12px; border-radius: 14px; border-start-start-radius: 4px; }
.msg.mine { align-self: flex-end; background: var(--ink); color: #fff; border-color: var(--ink); border-start-start-radius: 14px; border-start-end-radius: 4px; }
.msg p { margin: 0; white-space: pre-wrap; word-wrap: break-word; }
.msg small { display: block; font-size: .7rem; opacity: .6; margin-top: 2px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 46px; max-height: 140px; resize: none; }
.chat-empty { margin: auto; border: 0; }
.empty.sm { padding: 30px 16px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.plan input, .pay-method input { position: absolute; opacity: 0; }
.plan, .pay-method { position: relative; }
.plan span { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; height: 100%; transition: .15s; }
.plan em { font-style: normal; font-weight: 900; font-size: 1.15rem; margin-top: auto; padding-top: 6px; }
.plan-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--amber-soft); color: #8a6100; }
.plan input:checked + span, .pay-method input:checked + span { border-color: var(--amber); background: var(--amber-soft); }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.pay-method span { display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; }
.copyable { cursor: copy; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.svc-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.svc-tabs a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; background: #fff; border: 2px solid var(--line); border-radius: 14px; font-weight: 700; font-size: .88rem; text-align: center; }
.svc-tabs a .ic { width: 26px; height: 26px; color: #8a6100; }
.svc-tabs a.active { border-color: var(--amber); background: var(--amber-soft); }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.contact-cards .panel { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.contact-cards .ic { width: 28px; height: 28px; color: var(--wa); }
.prose { line-height: 2; font-size: 1.02rem; }
.prose h1 { font-size: 1.7rem; margin-bottom: 18px; }
.prose h2 { font-size: 1.12rem; font-weight: 800; margin: 26px 0 8px; }
.prose p { margin: 0 0 10px; }
.prose ul { margin: 0 0 12px; padding-inline-start: 22px; }
.prose li { margin-bottom: 4px; }
.otp-input { text-align: center !important; font-size: 1.8rem !important; letter-spacing: .5em; height: 64px !important; font-weight: 800; }
.forgot-link { justify-self: end; font-size: .88rem; color: #a77a00; font-weight: 700; margin-top: -6px; }
.auth-logo .why-ic { margin: 0; }
.settings-form h3 { margin-top: 10px; font-size: 1.02rem; }
.banner-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.banner-admin img { width: 100%; border-radius: 10px; max-height: 140px; object-fit: cover; }
.insp-admin { display: grid; gap: 12px; }
.code-box { display: block; padding: 12px; background: var(--ink); color: #9ef0a8; border-radius: 10px; font-size: .85rem; overflow-x: auto; white-space: nowrap; }
.admin-side nav a span { flex: 1; }
@media (max-width: 900px) {
  .wanted-box { grid-template-columns: 1fr; padding: 20px; }
  .reviews-layout { grid-template-columns: 1fr; }
  .stat-row.four { grid-template-columns: 1fr 1fr; }
  .inbox { grid-template-columns: 1fr; height: calc(100vh - var(--header-h) - 170px); }
  .inbox.has-current .conv-list { display: none; }
  .inbox:not(.has-current) .chat { display: none; }
  .cal-wrap { grid-template-columns: 1fr; }
  .compare-bar { bottom: 82px; }
  .top-nav .nav-icon { width: 36px; }
}
@media (max-width: 560px) {
  .hide-xs { display: none; }
  .svc-tabs { grid-template-columns: 1fr 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .deal-toggle.three span { font-size: .85rem; gap: 4px; }
}
.promo-box .btn-gold { background: var(--amber); color: var(--amber-ink); }
.spec b { unicode-bidi: plaintext; }
.otp-where { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 18px; }
.otp-where div { display: flex; flex-direction: column; }
.otp-where-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--ink); color: #fff; }
.otp-where-ic .ic { width: 24px; height: 24px; }
.ch-telegram { background: #e8f4fd; border-color: #b6dcf7; } .ch-telegram .otp-where-ic { background: #229ed9; }
.ch-whatsapp { background: #e7f8ee; border-color: #bce8cc; } .ch-whatsapp .otp-where-ic { background: var(--wa); }
.ch-sms .otp-where-ic { background: var(--amber); color: var(--amber-ink); }
.otp-resend { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: .9rem; }

/* Admin statistics */
.st-page .admin-grid { grid-template-columns: 1fr 1fr; }
.st-page .hbar { grid-template-columns: minmax(90px, 160px) 1fr auto; }
.st-page .hbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-page .hbar b { white-space: nowrap; }
.st-page .st-bars { gap: 3px; }
@media (max-width: 900px) { .st-page .admin-grid { grid-template-columns: 1fr; } }

/* Admin share (Facebook / TikTok) */
.share-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.share-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin: 10px 0; }
.share-photos a { display: block; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.share-photos img { width: 100%; height: 100%; object-fit: cover; }
.share-cap { margin-bottom: 14px; }
.share-cap-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.share-cap textarea { width: 100%; font: inherit; font-size: .9rem; line-height: 1.6; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: inherit; }
.share-steps { margin: 6px 0 12px; padding-inline-start: 20px; color: var(--muted); font-size: .9rem; line-height: 1.7; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 900px) { .share-wrap { grid-template-columns: 1fr; } }

/* ---------- Mobile fixes ---------- */
/* grids that must shrink to the screen (small phones overflowed sideways) */
.detail-main, .detail-side { min-width: 0; }
.wanted-item { min-width: 0; }
@media (max-width: 1080px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
  .wanted-box { grid-template-columns: minmax(0, 1fr); }
  /* 16px stops iPhone Safari from zooming in when a field is tapped */
  input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { font-size: 16px; }
  /* comfortable tap targets */
  .footer-links a { display: inline-block; padding: 7px 0; }
  .crumbs a { display: inline-block; padding: 6px 0; }
  .link-more { padding: 8px 0; }
  .link-btn.small { padding: 8px 6px; }
  details.report > summary { padding: 8px 0; }
  .share-cap .btn-xs, .admin-search .btn { min-height: 36px; }
  .hf select, .hf input, .sort-form select, .top-search input, .hero-search input { font-size: 16px; }
  .forgot-link { display: inline-block; padding: 8px 0; }
}
@media (max-width: 640px) {
  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec { min-width: 0; }
  .spec b { overflow-wrap: anywhere; }
  .cat-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .cat-pick span { padding: 10px 4px; font-size: .82rem; }
}
/* admin top tabs scroll inside the screen instead of pushing it wider */
.admin-toolbar { min-width: 0; }
.admin-toolbar > * { min-width: 0; max-width: 100%; }
.admin-toolbar .tabs { overflow-x: auto; scrollbar-width: none; }
/* phone fields are left-to-right inside right-to-left pages: keep text clear of the icon */
[dir=rtl] .input-ic input[dir=ltr] { padding-left: 14px; padding-right: 42px; }

/* Admin errors */
.err-list { display: grid; gap: 10px; }
.err-item { padding: 0; }
.err-item > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: grid; gap: 6px; }
.err-item > summary::-webkit-details-marker { display: none; }
.err-head { display: flex; gap: 10px; align-items: flex-start; }
.err-head .badge { flex: none; }
.err-msg { font-weight: 700; overflow-wrap: anywhere; }
.err-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.err-body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.err-body p { margin: 10px 0; overflow-wrap: anywhere; }
.err-trace { background: #0f1420; color: #d6dae3; padding: 12px; border-radius: 10px; font-size: .78rem; line-height: 1.6; overflow-x: auto; white-space: pre; max-height: 320px; }
