/* ═══════════════════════════════════════════════════════════════════
   ASBEK Marketplace — компоненти маркетплейсу
   (вибір міста, мова, модалки, пошук, міста, каталог, реклама)
   ═══════════════════════════════════════════════════════════════════ */

[hidden] { display: none !important; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.link-accent { color: var(--accent); font-weight: 700; }
.link-accent:hover { text-decoration: underline; }
.section-title--sm { font-size: 24px; margin-bottom: 20px; }
.subsection-title { font-size: 18px; font-weight: 800; margin: 36px 0 16px; color: var(--text-dark); }

/* ─── Lang switch ────────────────────────────────────────────────── */
.lang-switch { display: inline-flex; gap: 2px; background: rgba(255,255,255,0.06); border-radius: 6px; padding: 2px; }
.lang-switch a { font-size: 12px; font-weight: 700; color: #9ca3af; padding: 3px 9px; border-radius: 4px; }
.lang-switch a:hover { color: #fff; }
.lang-switch a.active { background: var(--accent); color: #fff; }
.lang-switch--mobile { display: flex; margin: 18px 0 0; background: rgba(255,255,255,0.05); }
.lang-switch--mobile a { flex: 1; text-align: center; padding: 10px; font-size: 14px; }

/* ─── City picker button ─────────────────────────────────────────── */
.city-picker-btn {
    display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
    padding: 9px 14px; border-radius: 30px; border: 1.5px solid var(--border-light);
    background: var(--bg-light); color: var(--text-dark); font-size: 14px; font-weight: 600;
    cursor: pointer; transition: var(--transition); max-width: 220px;
}
.city-picker-btn:hover { border-color: var(--accent); color: var(--accent); }
.city-picker-btn svg:first-child { color: var(--accent); }
.city-picker-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-picker-btn--mobile {
    width: 100%; max-width: none; justify-content: flex-start; margin-bottom: 14px;
    background: rgba(255,255,255,0.06); border-color: var(--border-dark); color: #fff; border-radius: var(--radius-sm);
}
.city-picker-btn--mobile .city-picker-label { flex: 1; text-align: left; }

.mega-categories-grid--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: 62vh; overflow-y: auto; }
.mega-categories-grid--wide .mega-cat-link { padding: 7px 10px; }
.mega-categories-grid--wide .mega-cat-name { font-size: 13px; }

/* ─── Modal ──────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 3000; display: none; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.modal.active { display: flex; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(8,9,11,0.72); backdrop-filter: blur(3px); }
.modal-dialog {
    position: relative; width: 100%; max-width: 680px; background: var(--bg-dark-card);
    border: 1px solid var(--border-dark); border-radius: var(--radius-lg); padding: 36px;
    box-shadow: var(--shadow-dark); animation: modalIn .25s cubic-bezier(0.16,1,0.3,1);
}
.modal-dialog--city { max-width: 560px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.modal-close {
    position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06);
    color: #d1d5db; cursor: pointer; border: 0;
}
.modal-close:hover { background: var(--accent); color: #fff; }
.modal-title { font-size: 24px; font-weight: 800; color: #fff; margin: 0 40px 6px 0; }
.modal-sub { font-size: 14px; color: var(--text-dark-muted); margin-bottom: 22px; }

/* City list */
.city-search { margin: 14px 0 12px; }
.city-results { max-height: 52vh; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.city-item {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
    padding: 9px 12px; border-radius: var(--radius-sm); background: transparent; border: 0; cursor: pointer;
    color: #fff; font-size: 15px; font-weight: 600;
}
.city-item small { font-size: 11px; font-weight: 500; color: var(--text-dark-muted); }
.city-item:hover { background: var(--bg-dark-hover); color: var(--accent); }
.city-item--all { grid-column: 1 / -1; background: var(--accent-soft); color: var(--accent); flex-direction: row; }
.city-group-title { grid-column: 1 / -1; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dark-muted); margin: 10px 0 2px; padding: 0 12px; }
.city-empty { grid-column: 1 / -1; color: var(--text-dark-muted); padding: 16px 12px; }

/* ─── Request form ───────────────────────────────────────────────── */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.request-form select.form-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #9ca3af 50%), linear-gradient(135deg, #9ca3af 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.pref-options { display: flex; gap: 8px; flex-wrap: wrap; }
.pref-option { cursor: pointer; }
.pref-option input { position: absolute; opacity: 0; pointer-events: none; }
.pref-option span { display: inline-block; padding: 8px 16px; border-radius: 30px; border: 1px solid var(--border-dark); font-size: 14px; font-weight: 600; color: #d1d5db; transition: var(--transition); }
.pref-option input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.pref-option input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.form-checks { gap: 10px; }
.checkbox-label { align-items: flex-start; line-height: 1.45; }
.checkbox-label input { flex-shrink: 0; margin-top: 1px; }
.form-note { font-size: 12px; color: var(--text-dark-muted); text-align: center; margin: 0; }
.is-invalid { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,0.15) !important; }

/* світлі контексти форми */
.sidebar-card .form-label, .contacts-form-card .form-label { color: var(--text-dark); }
.sidebar-card .checkbox-label, .contacts-form-card .checkbox-label,
.sidebar-card .form-note, .contacts-form-card .form-note { color: var(--text-muted); }
.contacts-form-card .form-input, .contacts-form-card .form-textarea { background: var(--bg-white); border-color: var(--border-light); color: var(--text-dark); }
.sidebar-card .pref-option span, .contacts-form-card .pref-option span { color: var(--text-dark); border-color: var(--border-light); }
.sidebar-card .form-row { grid-template-columns: 1fr; gap: 12px; }
.sidebar-card .lead-form { gap: 12px; }

/* ─── Hero search ────────────────────────────────────────────────── */
.hero-search {
    position: relative; display: flex; align-items: center; gap: 8px; margin: 26px 0 16px; max-width: 620px;
    background: #fff; border: 2px solid var(--border-light); border-radius: var(--radius-md); padding: 6px 6px 6px 48px;
    box-shadow: var(--shadow-md);
}
.hero-search:focus-within { border-color: var(--accent); }
.hero-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-muted); }
.hero-search-input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 16px; padding: 10px 0; background: transparent; color: var(--text-dark); }
.hero-search .btn { padding: 12px 22px; }
.hero-search--dark { margin-top: 22px; border-color: transparent; }
.search-suggest {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50; background: #fff;
    border: 1px solid var(--border-light); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); overflow: hidden;
}
.suggest-item { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; color: var(--text-dark); font-size: 15px; border-bottom: 1px solid #f3f4f6; }
.suggest-item small { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.suggest-item:hover, .suggest-item.active { background: var(--accent-soft); color: var(--accent); }
.suggest-empty { padding: 14px 16px; color: var(--text-muted); font-size: 14px; }

.search-box-wrap--hero { margin: 24px 0 0; }

/* ─── Chips ──────────────────────────────────────────────────────── */
.hero-city-chips, .cat-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chip {
    display: inline-flex; align-items: center; padding: 6px 13px; border-radius: 30px; font-size: 13px; font-weight: 600;
    background: var(--bg-white); border: 1px solid var(--border-light); color: #374151; transition: var(--transition);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip--accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.cat-jump { margin-bottom: 32px; }

.city-chips-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.city-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: var(--radius-sm);
    background: var(--bg-white); border: 1.5px solid var(--border-light); font-size: 14px; font-weight: 600; color: var(--text-dark);
    transition: var(--transition);
}
.city-chip svg { color: var(--accent); }
.city-chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.city-chip--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.city-chip--accent:hover { color: #fff; }

/* ─── Cities / regions ───────────────────────────────────────────── */
.cities-section { padding: 88px 0; background: var(--bg-light); }
.regions-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; align-items: start; }
.region-block { background: var(--bg-white); border: 1.5px solid var(--border-light); border-radius: var(--radius-md); }
.region-block summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 13px 16px; font-weight: 700; font-size: 14px; color: var(--text-dark);
}
.region-block summary::-webkit-details-marker { display: none; }
.region-block summary::after { content: '+'; font-size: 18px; color: var(--accent); margin-left: 4px; }
.region-block[open] summary::after { content: '−'; }
.region-block summary span:first-child { flex: 1; }
.region-count { display: inline-block; min-width: 26px; text-align: center; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 20px; padding: 2px 8px; }
.region-cities { list-style: none; margin: 0; padding: 0 16px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.region-cities a { font-size: 13px; color: #4b5563; }
.region-cities a:hover { color: var(--accent); }

.regions-full { columns: 3; column-gap: 28px; margin-top: 12px; }
.region-full { break-inside: avoid; margin-bottom: 28px; }
.region-full-title { font-size: 17px; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.region-cities--open { padding: 0; }

/* ─── How it works ───────────────────────────────────────────────── */
.how-section { padding: 80px 0; background: var(--bg-white); }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.how-step { position: relative; background: var(--bg-light); border: 1.5px solid var(--border-light); border-radius: var(--radius-lg); padding: 30px 26px; }
.how-num { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 20px; font-weight: 900; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.how-title { font-size: 19px; font-weight: 800; margin-bottom: 8px; color: var(--text-dark); }
.how-text { font-size: 15px; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* ─── Categories (51 cards) ──────────────────────────────────────── */
.categories-grid--market { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.categories-grid--market .category-card { min-height: 0; padding: 22px; }
.categories-grid--market .category-desc { font-size: 13px; }

/* ─── Masters teaser ─────────────────────────────────────────────── */
.masters-teaser { padding: 0 0 72px; background: var(--bg-white); }
.masters-teaser-box {
    display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
    background: var(--bg-dark); border-radius: var(--radius-lg); padding: 40px 44px;
    background-image: radial-gradient(circle at 90% 10%, rgba(255,106,0,0.25), transparent 45%);
}
.masters-teaser-box .section-title { margin-bottom: 8px; }
.masters-teaser-box .section-subtitle { margin: 0; max-width: 620px; }
.masters-teaser-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

/* ─── Category services list ─────────────────────────────────────── */
.list-filter { max-width: 340px; background: var(--bg-white); color: var(--text-dark); border-color: var(--border-light); padding: 10px 14px; }
.svc-link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.svc-link-card {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg-white);
    border: 1.5px solid var(--border-light); border-radius: var(--radius-md); transition: var(--transition); color: var(--text-dark);
}
.svc-link-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.svc-link-icon { flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.svc-link-icon svg { width: 17px; height: 17px; }
.svc-link-name { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.35; }
.svc-link-arrow { width: 16px; height: 16px; color: #cbd5e1; flex-shrink: 0; }
.svc-link-card:hover .svc-link-arrow { color: var(--accent); }

/* ─── Service page ───────────────────────────────────────────────── */
.svc-hero-cat a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.page-hero .svc-hero-cat { color: rgba(255,255,255,0.7); display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.page-hero .svc-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.pricing-factors-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0 28px; }
.factor-card { background: #f9fafb; border: 1px solid #e5e7eb; padding: 16px; border-radius: 10px; }
.factor-title { font-size: 14px; font-weight: 700; color: var(--bg-dark); margin-bottom: 4px; }
.factor-text { font-size: 13px; color: #6b7280; }
.related-link--all { color: var(--accent) !important; font-weight: 700; }

/* ─── Catalog ────────────────────────────────────────────────────── */
.catalog { columns: 3; column-gap: 28px; }
.catalog-cat { break-inside: avoid; margin-bottom: 30px; }
.catalog-cat-title { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; margin-bottom: 12px; }
.catalog-cat-title a:hover { color: var(--accent); }
.catalog-cat-title .seo-col-icon { width: 34px; height: 34px; flex-shrink: 0; }
.catalog-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.catalog-list a { font-size: 14px; color: #4b5563; }
.catalog-list a:hover { color: var(--accent); }
.catalog-empty { text-align: center; padding: 24px; color: var(--text-muted); display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.catalog .ad-wrap { column-span: all; }

.request-page-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: start; }

/* ─── Footer tweaks ──────────────────────────────────────────────── */
.footer-links-list--2col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.footer-links-list--2col li:last-child { grid-column: 1 / -1; }
.footer-contacts .btn { margin-bottom: 14px; }
.footer-bottom-right { max-width: 560px; text-align: right; font-size: 12px; }

/* ─── Ads (горизонтальний блок AdSense) ──────────────────────────── */
.ad-wrap { width: 100%; min-height: 100px; margin: 32px auto; text-align: center; overflow: hidden; }
.ad-wrap--inline { margin: 28px 0; }
.ad-wrap--footer { margin: 40px auto; }
.ad-wrap--dev {
    display: flex; align-items: center; justify-content: center; min-height: 90px;
    border: 2px dashed #d1d5db; border-radius: var(--radius-md); color: #9ca3af; font-size: 13px; font-weight: 600; letter-spacing: .05em;
}

/* ─── Mobile floating CTA ────────────────────────────────────────── */
.mobile-fab { display: none; }
@media (max-width: 1100px) {
    .mobile-fab {
        display: inline-flex; align-items: center; gap: 8px; position: fixed; right: 16px; bottom: 16px; z-index: 900;
        padding: 14px 20px; border-radius: 40px; border: 0; background: var(--accent); color: #fff;
        font-size: 15px; font-weight: 700; box-shadow: 0 8px 24px rgba(255,106,0,0.45); cursor: pointer;
    }
    .site-footer { padding-bottom: 72px; }
}

/* ─── Reveal ─────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .45s ease, transform .45s ease; }
.reveal.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1280px) {
    .header-cta-btn { padding: 12px 16px; }
}
@media (max-width: 1100px) {
    .categories-grid--market { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .regions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .svc-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .catalog, .regions-full { columns: 2; }
    .site-header .city-picker-btn:not(.city-picker-btn--mobile) { margin-left: auto; margin-right: 8px; }
}
@media (max-width: 768px) {
    .categories-grid--market { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .categories-grid--market .category-card { padding: 16px; }
    .categories-grid--market .category-desc { display: none; }
    .how-grid, .two-col, .request-page-grid { grid-template-columns: 1fr; }
    .how-section, .cities-section { padding: 56px 0; }
    .regions-grid, .svc-link-grid { grid-template-columns: 1fr; }
    .catalog, .regions-full { columns: 1; }
    .pricing-factors-grid { grid-template-columns: 1fr; }
    .masters-teaser-box { padding: 28px 22px; }
    .modal { padding: 0; }
    .modal-dialog { border-radius: 0; min-height: 100%; padding: 28px 18px; }
    .city-results { grid-template-columns: 1fr; max-height: none; }
    .form-row { grid-template-columns: 1fr; }
    .hero-search { padding-left: 42px; }
    .hero-search .btn { padding: 12px 14px; }
    .subcategories-header { flex-direction: column; align-items: stretch; gap: 12px; }
    .list-filter { max-width: none; }
    .footer-bottom-right { text-align: left; }
    .site-header .city-picker-btn:not(.city-picker-btn--mobile) { padding: 7px 10px; font-size: 13px; max-width: 150px; }
    .site-header .city-picker-btn:not(.city-picker-btn--mobile) svg:last-child { display: none; }
    .logo-tagline { display: none; }
}
@media (max-width: 420px) {
    .categories-grid--market { grid-template-columns: 1fr; }
    .site-header .city-picker-btn:not(.city-picker-btn--mobile) { max-width: 120px; }
}
