/* ALIVO — фирменная компактная шапка */
.alivo-tagline{
  color:#7258f6;
  font-size:13px;
  font-weight:700;
  letter-spacing:-.25px;
  white-space:nowrap;
}

@media(max-width:760px){

  body.market-home-view .market-header-inner{
    flex-wrap:nowrap!important;
    gap:12px!important;
    padding:14px 18px!important;
    min-height:0!important;
  }

  body.market-home-view .market-logo{
    flex-shrink:0!important;
  }

  body.market-home-view .alivo-tagline{
    display:block;
    width:auto;
    min-width:0;
    margin:0;
    font-size:clamp(10px,3vw,13px);
    line-height:1.2;
    color:#7258f6;
    font-weight:700;
  }

  /* Поиск близко к шапке */
  body.market-home-view .home-modern .home-hero{
    padding-top:8px!important;
    padding-bottom:4px!important;
  }

  /* Выразительный контур поиска */
  body.market-home-view .home-modern .home-search-shell{
    border:1.5px solid #c9bbff!important;
    border-radius:22px!important;
    box-shadow:0 5px 18px rgba(109,85,237,.10)!important;
  }

  /* Популярные запросы */
  body.market-home-view #smartSearchTags{
    margin-top:7px!important;
  }

  /* Категории ближе к поиску */
  body.market-home-view .home-modern .home-hero + .home-section{
    margin-top:12px!important;
  }
}

/* ALIVO — compact location and search */
@media(max-width:760px){

  body.market-home-view .home-modern{
    padding-top:0!important;
  }

  body.market-home-view .home-modern .home-hero{
    padding-top:4px!important;
    padding-bottom:4px!important;
  }

  body.market-home-view .home-modern .home-search-shell{
    margin-top:0!important;
  }

  body.market-home-view .alivo-location-compact{
    margin-top:10px!important;
    border-radius:18px!important;
  }

  body.market-home-view .alivo-location-compact > summary{
    display:flex;
    align-items:center;
    padding:12px 16px!important;
    cursor:pointer;
    list-style:none;
  }

  .alivo-location-compact > summary::-webkit-details-marker{
    display:none;
  }

  .alivo-location-compact .home-filter-title{
    font-size:15px;
  }

  .alivo-location-compact .home-filter-subtitle{
    font-size:11px;
  }

  .alivo-location-compact:not([open]) .home-filter-body{
    display:none;
  }

  .alivo-location-compact .home-filter-fields
  .home-filter-field:nth-child(n+2){
    display:none;
  }

  .alivo-location-compact:has(
    #homeRegion option:checked:not([value=""])
  ) .home-filter-field:nth-child(2){
    display:block;
  }

  .alivo-location-compact:has(
    #homeCity option:checked:not([value=""])
  ) .home-filter-field:nth-child(3){
    display:block;
  }
}

/* ALIVO — final compact home refinements */
@media(max-width:760px){

  /* Более заметный фирменный слоган */
  body.market-home-view .alivo-tagline{
    font-size:clamp(12px,3.25vw,15px)!important;
    font-weight:800!important;
    letter-spacing:-.35px!important;
  }

  /* Меньше пространства после местоположения */
  body.market-home-view .alivo-location-compact{
    margin-bottom:6px!important;
  }

  body.market-home-view .alivo-location-compact
  + .home-section{
    margin-top:6px!important;
  }

  /* Счётчик рядом с заголовком */
  body.market-home-view .home-listings-head-right{
    flex-shrink:0;
    margin:0!important;
  }

  body.market-home-view .home-section-head{
    display:flex!important;
    align-items:flex-start!important;
    justify-content:space-between!important;
    gap:8px!important;
  }

  body.market-home-view .home-count{
    display:inline-flex!important;
    white-space:nowrap;
    padding:6px 9px!important;
    font-size:11px!important;
    border-radius:12px!important;
  }

}

/* ALIVO — меньше расстояние после категорий */
@media(max-width:760px){

  body.market-home-view .home-modern
  .home-section:has(.home-category-grid){
    margin-bottom:0!important;
  }

  body.market-home-view .home-modern
  .home-section:has(.home-category-grid)
  ~ .home-section:has(.home-listings-grid){
    margin-top:8px!important;
  }

}

/* ALIVO — final header and listings polish */
@media(max-width:760px){

  /* Слоган крупнее */
  body.market-home-view .market-header-inner{
    gap:8px!important;
  }

  body.market-home-view .alivo-tagline{
    font-size:clamp(13px,3.6vw,16px)!important;
    font-weight:800!important;
    letter-spacing:-.45px!important;
    white-space:nowrap!important;
  }

  /* Заголовок и счётчик на одной строке */
  body.market-home-view .home-section:has(.home-listings-grid)
  .home-section-head{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:start!important;
    gap:8px!important;
  }

  body.market-home-view .home-section:has(.home-listings-grid)
  .home-section-title{
    font-size:clamp(18px,4.4vw,24px)!important;
    line-height:1.2!important;
  }

  body.market-home-view .home-section:has(.home-listings-grid)
  .home-listings-head-right{
    display:flex!important;
    align-items:flex-start!important;
    margin:0!important;
    width:auto!important;
  }

  body.market-home-view .home-section:has(.home-listings-grid)
  .home-count{
    display:inline-flex!important;
    width:auto!important;
    white-space:nowrap!important;
    font-size:10px!important;
    padding:6px 8px!important;
  }

}

/* ALIVO: optional manual category navigation */
.listing-editor .alivo-smart-category{margin:12px 0 6px;padding:12px 14px;border:1px solid #dcd4ff;border-radius:13px;background:#f8f6ff;color:#493b83;font-size:13px;font-weight:700;line-height:1.5}
.listing-editor .alivo-smart-category-toggle{margin:0 0 12px;padding:9px 13px;border:1px solid #dcd4ff;border-radius:10px;background:#fff;color:#694bdf;font-weight:750;cursor:pointer}
.listing-editor .category-engine-field.alivo-smart-manual-hidden .category-root-grid,
.listing-editor .category-engine-field.alivo-smart-manual-hidden .category-levels,
.listing-editor .category-engine-field.alivo-smart-manual-hidden .category-breadcrumb{display:none!important}

/* Smart listing form: title -> category -> description, compact header */
.listing-editor .category-engine-field{grid-column:1/-1!important}
.listing-editor .alivo-smart-category{margin:6px 0 8px}
@media(max-width:760px){
  .listing-editor{padding-top:0!important}
  .listing-editor-title{margin-top:2px!important;padding-top:15px!important}
  .listing-editor-subtitle{padding-bottom:13px!important;margin-bottom:10px!important}
  .listing-editor .category-engine-field{padding:13px 16px!important}
}

/* ALIVO smart category: clear status and suggestions, compact mobile editor */
.listing-editor .alivo-smart-category{font-size:13px!important;line-height:1.45!important;margin:8px 0!important}
.listing-editor .alivo-smart-suggestions{display:flex;flex-direction:column;gap:6px;margin:0 0 8px}
.listing-editor .alivo-smart-suggestion{width:100%;text-align:left;border:1px solid #dcd4ff;border-radius:10px;background:#fff;padding:10px 12px;color:#493b83;font-size:12px;font-weight:750}
.listing-editor .category-engine-field.alivo-smart-manual-hidden .category-engine-header{display:none!important}
.listing-editor .category-engine-field.alivo-smart-manual-hidden{padding:12px 14px!important}
.listing-editor .category-engine-field.alivo-smart-manual-hidden .alivo-smart-category-toggle{margin-bottom:0}
@media(max-width:760px){
 .listing-editor>button{margin-bottom:5px!important;min-height:38px!important}
 .listing-editor .listing-editor-title{margin-top:0!important;padding-top:12px!important}
 .listing-editor .listing-editor-subtitle{padding-bottom:11px!important;margin-bottom:8px!important}
 .listing-editor .listing-editor-form{gap:11px!important}
}
/* ALIVO listing detail readability — mobile and desktop */
.listing-page .listing-attribute-label {
  color: #626b7e !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  margin-bottom: 8px !important;
}
.listing-page .listing-attribute-value {
  color: #262b39 !important;
  font-size: 19px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
}
.listing-page .listing-attribute-card {
  padding: 15px 16px !important;
  min-width: 0;
}
.listing-page .listing-description {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 96px;
  padding: 19px 20px !important;
  border: 1px solid #ddd8f6 !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg, #ffffff, #f8f7ff) !important;
  box-shadow: 0 7px 22px rgba(74, 61, 138, .055);
  color: #303447 !important;
  font-size: 18px !important;
  line-height: 1.65 !important;
  text-align: left !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .listing-page .listing-attribute-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .listing-page .listing-attribute-label { font-size: 14px !important; }
  .listing-page .listing-attribute-value { font-size: 18px !important; }
  .listing-page .listing-attribute-card { padding: 14px 13px !important; }
  .listing-page .listing-description { padding: 17px 18px !important; font-size: 17px !important; }
}

/* ALIVO: compact listing readability */
@media (max-width: 760px) {
  .listing-attribute-card,
  .listing-attribute-item {
    padding: 14px !important;
  }

  .listing-attribute-card .label,
  .listing-attribute-item .label {
    font-size: 14px !important;
    line-height: 1.35 !important;
  }

  .listing-attribute-card .value,
  .listing-attribute-item .value {
    font-size: 17px !important;
    line-height: 1.4 !important;
  }

  .listing-description,
  .listing-description-text {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }
}

/* ALIVO listing compact typography v2 */
@media (max-width: 760px) {
  .listing-page .listing-attribute-card {
    padding: 12px 13px !important;
  }

  .listing-page .listing-attribute-label {
    font-size: 12px !important;
    line-height: 1.35 !important;
    margin-bottom: 6px !important;
  }

  .listing-page .listing-attribute-value {
    font-size: 16px !important;
    line-height: 1.35 !important;
    font-weight: 750 !important;
  }

  .listing-page .listing-section-title {
    font-size: 23px !important;
  }

  .listing-page .listing-description {
    font-size: 15px !important;
    line-height: 1.55 !important;
    padding: 15px 16px !important;
    min-height: 0 !important;
  }
}
/* ALIVO ACCOUNT CARDS COMPACT v1 — mobile only */
@media (max-width:760px) {
  .account-listings-grid .account-listing-card .account-listing-layout {
    gap:0!important;
    padding:0 0 9px!important;
  }
  .account-listings-grid .account-listing-card .account-listing-info,
  .account-listings-grid .account-listing-card .account-listing-layout > div:last-child {
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    padding:10px 11px 8px!important;
    margin:0!important;
  }
  .account-listings-grid .account-listing-card .account-listing-info > div:first-child {
    gap:4px!important;
    align-items:center!important;
  }
  .account-listings-grid .account-listing-card .account-listing-title {
    flex:1 1 auto!important;
    min-width:0!important;
    font-size:13px!important;
    line-height:1.25!important;
  }
  .account-listings-grid .account-listing-card .account-listing-status {
    flex:0 0 auto!important;
    padding:5px 6px!important;
    font-size:9px!important;
  }
  .account-listings-grid .account-listing-card .account-listing-price {
    margin-top:7px!important;
    font-size:19px!important;
    line-height:1.15!important;
  }
  .account-listings-grid .account-listing-card .account-listing-meta {
    margin-top:6px!important;
    gap:3px 6px!important;
    font-size:11px!important;
    line-height:1.35!important;
  }
  .account-listings-grid .account-listing-card .account-listing-stats {
    margin-top:8px!important;
    gap:5px!important;
  }
  .account-listings-grid .account-listing-card .account-listing-stats > div {
    min-height:28px!important;
    padding:0 7px!important;
    border-radius:9px!important;
    font-size:11px!important;
  }
  .account-listings-grid .account-listing-card .account-listing-actions {
    display:flex!important;
    justify-content:stretch!important;
    align-items:stretch!important;
    flex-wrap:nowrap!important;
    margin-top:8px!important;
    gap:0!important;
  }
  .account-listings-grid .account-listing-card .account-listing-actions .account-listing-promote {
    flex:1 1 100%!important;
    width:100%!important;
    min-height:35px!important;
    padding:0 5px!important;
    border-radius:11px!important;
    font-size:12px!important;
    white-space:nowrap!important;
  }
}

/* ALIVO: compact own listings in favorites */
@media (max-width: 760px) {
  .favorites-grid {
    align-items: start !important;
  }

  .favorites-grid > .market-card {
    height: auto !important;
    align-self: start !important;
  }

  .favorites-grid .market-card-body {
    min-height: 0 !important;
    height: auto !important;
    flex: none !important;
  }

  .favorites-grid .market-card-message {
    margin-top: 10px !important;
  }
}

/* ALIVO · Маркетинг и аналитика */
.alivo-marketing{padding-bottom:90px}
.alivo-marketing-heading{display:flex;gap:14px;align-items:flex-start;margin:20px 0}
.alivo-marketing-heading>button{border:1px solid #e5e7eb;background:white;border-radius:12px;padding:10px 14px;font-size:22px;cursor:pointer}
.alivo-marketing-heading h1{font-size:clamp(23px,4vw,30px);margin:4px 0 8px}
.alivo-marketing-heading p{color:#667085;margin:0}
.alivo-marketing-filters{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0}
.alivo-marketing-filters label{display:grid;gap:6px;font-size:13px;font-weight:600;color:#475467;flex:1;min-width:140px}
.alivo-marketing-filters select{width:100%;padding:11px;border:1px solid #ddd6fe;border-radius:12px;background:white;color:#241f35;font-size:14px}
.alivo-marketing-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.alivo-marketing-tile,.alivo-marketing-panel{background:white;border:1px solid #eae7f1;border-radius:18px;padding:18px;box-shadow:0 4px 18px #33215b08}
.alivo-marketing-tile{display:flex;flex-direction:column;gap:8px;min-width:0}
.alivo-marketing-tile>span{font-size:13px;color:#667085}
.alivo-marketing-tile>strong{font-size:25px;color:#44239c;overflow-wrap:anywhere}
.alivo-marketing-tile>small{font-size:11px;line-height:1.45;color:#667085}
.alivo-marketing-panel{margin-top:18px}
.alivo-marketing-panel h2{font-size:18px;margin:0 0 8px}
.alivo-marketing-chart{display:flex;gap:5px;align-items:flex-end;overflow-x:auto;padding:14px 0 8px;min-height:175px}
.alivo-marketing-column{min-width:22px;flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;font-size:10px;color:#667085}
.alivo-marketing-column>div{width:100%;max-width:28px;background:linear-gradient(180deg,#7c4de8,#b7a1f1);border-radius:6px 6px 2px 2px}
.alivo-marketing-column>small{font-size:9px;white-space:nowrap}
.alivo-marketing-sources>div{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid #eee}
.alivo-marketing-panel code{overflow-wrap:anywhere;font-size:12px}
@media(max-width:800px){.alivo-marketing-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.alivo-marketing-tile{padding:14px}.alivo-marketing-tile>strong{font-size:21px}}

/* Marketing v2: long campaign names stay readable on mobile. */
.alivo-marketing-sources>div{gap:12px;align-items:flex-start}
.alivo-marketing-sources>div>span{overflow-wrap:anywhere;min-width:0}
.alivo-marketing-sources>div>b{text-align:right;white-space:normal;flex-shrink:0;font-size:12px}
@media(max-width:600px){.alivo-marketing-sources>div{flex-direction:column;gap:4px}.alivo-marketing-sources>div>b{text-align:left}}

/* ALIVO v3: scoped promotion and marketing campaign controls */
.alivo-promotion-scope{display:grid;gap:8px;margin-top:18px;font-size:14px;font-weight:800;color:#292d38}
.alivo-promotion-scope select,.alivo-campaign-form input,.alivo-campaign-form select,.alivo-campaign-row input{width:100%;min-height:43px;border:1px solid #dfe2eb;border-radius:12px;padding:9px 12px;background:#fff;color:#202124;font:inherit}
.alivo-promotion-scope small{font-size:12px;font-weight:500;color:#747b88;line-height:1.5}
.alivo-campaign-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:16px 0}
.alivo-campaign-form button,.alivo-campaign-row button{min-height:42px;border:0;border-radius:11px;background:#6654d9;color:#fff;font-weight:750;padding:8px 12px}
.alivo-campaign-row{display:grid;gap:7px;border-top:1px solid #e9eaf1;padding:14px 0;font-size:13px}
.alivo-campaign-row small{color:#6b7280}
