/* ТАШЛА-Vоронка: новая ширина ленты и рекламных блоков (layout-w2).
   Подключается после основного CSS и только переопределяет размеры. Откат: убрать ссылку на этот файл из index.html. */

/* ---------- Верхние 10 рекламных мест: карусель, стрелки в отдельных колонках (не накрывают баннеры) ---------- */
html body .topBannerCarousel{display:grid;grid-template-columns:34px minmax(0,1fr) 34px;gap:8px;align-items:center;position:relative}
html body .topBannerCarousel>.carouselArrow{display:flex;align-items:center;justify-content:center;width:34px;min-width:34px;height:48px;min-height:48px;padding:0;border-radius:9px;z-index:1}
html body .topBannerCarousel>.carouselArrow:disabled{opacity:.35;cursor:default}
html body .topBannerViewport{overflow:hidden}
html body .topBannerCarousel .topAdGrid{display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:10px}
html body .topBannerCarousel .bottomAdCard{height:var(--tv-top-h)!important;aspect-ratio:auto;min-height:0}
html body .topBannerCarousel .bottomAdCard img{object-fit:contain!important;background:#0d1717}
html body .topBannerCarousel .bannerSlotPlaceholder{padding:8px 12px}
html body .topBannerCarousel .bannerSlotPlaceholder strong{font-size:clamp(11px,.85vw,14px)}
html body .topBannerCarousel .bannerSlotPlaceholder small{font-size:clamp(9px,.7vw,11px)}
html body .topBannerCounter{bottom:-15px}

/* ---------- Широкий экран: боковые колонки ~вдвое шире, лента уже ---------- */
@media (min-width:1560px){
  :root{--tv-rail:clamp(250px,16vw,310px);--tv-gap:clamp(12px,1vw,18px);--tv-top-h:clamp(125px,9vw,175px)}
  html body .site>main.wrap{width:min(calc(100% - 2 * var(--tv-rail) - 2 * var(--tv-gap) - 36px),1280px)!important;max-width:1280px!important}
}
@media (min-width:1181px) and (max-width:1559px){
  :root{--tv-rail:clamp(165px,14vw,215px);--tv-gap:clamp(10px,1vw,14px);--tv-top-h:clamp(105px,9vw,140px)}
  html body .site>main.wrap{width:calc(100% - 2 * var(--tv-rail) - 2 * var(--tv-gap) - 24px)!important;max-width:1280px!important}
}
@media (min-width:1181px){
  html body .desktopAdRail{top:calc(var(--tv-top-h) + 44px)!important;gap:10px!important}
  html body .desktopSideAd{aspect-ratio:2/1!important;padding:8px 12px!important;grid-auto-flow:column;grid-template-columns:auto minmax(0,1fr);justify-content:center;text-align:left}
  html body .desktopSideAd.filled{padding:0!important;display:block}
  html body .desktopSideAd.filled img{object-fit:contain!important;background:#0d1717}
  html body .desktopSideAd b{font-size:clamp(12px,.8vw,15px)}
  html body .desktopSideAd small{font-size:clamp(10px,.62vw,12px)}
}

/* ---------- Средний экран (примерно половина ПК): колонки уже, но рядом с лентой ---------- */
@media (min-width:900px) and (max-width:1180px){
  :root{--tv-rail:clamp(96px,11vw,130px);--tv-gap:clamp(8px,.9vw,10px);--tv-gutter:10px;--tv-top-h:clamp(80px,10vw,118px)}
  html body .site>main.wrap{width:calc(100% - 2 * var(--tv-rail) - 2 * var(--tv-gap) - 16px)!important;max-width:none!important}
  html body .desktopAdRail{top:calc(var(--tv-top-h) + 44px)!important;gap:8px!important}
  html body .desktopSideAd{aspect-ratio:1/1!important;padding:6px!important}
  html body .desktopSideAd .adIcon{display:grid}
  html body .desktopSideAd b{font-size:clamp(9px,.95vw,11px)!important}
  html body .desktopSideAd small{display:block!important;font-size:clamp(8px,.75vw,9px)!important}
  html body .desktopSideAd.filled img{object-fit:contain!important;background:#0d1717}
}

/* ---------- Узкий экран: боковые колонки не помещаются — рекламные места ниже ленты ---------- */
@media (max-width:899px){
  :root{--tv-top-h:clamp(64px,19vw,110px)}
  html body .site>main.wrap{width:calc(100% - 2 * var(--tv-gutter,8px))!important;max-width:none!important;overflow:visible}
  html body .site>main.wrap>.topPromoWrap{width:100%!important;margin-left:0!important;margin-right:0!important;max-width:100%!important}
  html body .desktopAdRail{position:static!important;order:4;display:grid!important;width:100%!important;grid-template-columns:repeat(auto-fill,minmax(min(100%,150px),1fr))!important;gap:8px!important;margin:12px 0 0!important;top:auto!important;left:auto!important;right:auto!important}
  html body .desktopAdRail.right{margin-top:8px!important}
  html body .desktopSideAd{aspect-ratio:2/1!important;padding:6px 10px!important}
  html body .desktopSideAd .adIcon{display:grid!important}
  html body .desktopSideAd b{font-size:12px!important}
  html body .desktopSideAd small{display:block!important;font-size:10px!important}
  html body .desktopSideAd.filled{padding:0!important}
  html body .desktopSideAd.filled img{object-fit:contain!important;background:#0d1717}
  html body .topBannerCarousel{grid-template-columns:28px minmax(0,1fr) 28px;gap:6px}
  html body .topBannerCarousel>.carouselArrow{width:28px;min-width:28px;height:44px;min-height:44px}
  html body .topBannerCarousel .topAdGrid{gap:8px}
}

/* Лента не короче боковых колонок — колонки не заходят на подвал, когда объявлений мало */
@media (min-width:1181px){ html body .site>main.wrap{min-height:calc(var(--tv-top-h) + 44px + 5 * var(--tv-rail) + 90px + 24px)} }
@media (min-width:900px) and (max-width:1180px){ html body .site>main.wrap{min-height:calc(var(--tv-top-h) + 44px + 10 * var(--tv-rail) + 72px + 24px)} }
