/* Mobile catalog and advert presentation. Desktop layout remains in index.html. */
@media(max-width:900px){
 #grid,#sim{gap:14px;grid-template-columns:minmax(0,1fr)}
 #grid .car,#sim .car{border-radius:14px;min-width:0}
 #grid .car:hover,#sim .car:hover{transform:none}
 #grid .car .ph,#sim .car .ph{width:100%;height:auto;min-height:0;aspect-ratio:4/3;background:var(--soft)}
 #grid .car .ph img.pi,#sim .car .ph img.pi{object-fit:cover;object-position:center}
 #grid .car .badge,#sim .car .badge{top:10px;left:10px;font-size:10px;padding:4px 9px;letter-spacing:.02em}
 #grid .car .heart,#sim .car .heart{width:40px;height:40px;right:10px;bottom:10px;font-size:22px}
 #grid .car .pn,#sim .car .pn{left:10px;bottom:10px;font-size:11px;padding:4px 8px}
 #grid .car .b,#sim .car .b{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 10px;padding:12px;align-content:start;min-width:0}
 #grid .car .b>.car-labels,#sim .car .b>.car-labels{grid-area:1/1/2/-1;display:flex;flex-wrap:wrap;gap:5px;margin:0}
 #grid .car .seller-source,#sim .car .seller-source{font-size:10px;padding:3px 6px;line-height:1.3}
 #grid .car .b>.car-title-row,#sim .car .b>.car-title-row{display:contents}
 #grid .car .b>h3,#grid .car-title-row h3,#sim .car .b>h3,#sim .car-title-row h3{grid-area:2/1/3/-1;font-size:18px;line-height:1.3;letter-spacing:-.02em;margin:0;overflow-wrap:anywhere}
 #grid .car .card-view-count,#sim .car .card-view-count{grid-area:3/2/4/3;align-self:center;justify-self:end;font-size:10px;min-width:0;line-height:1.4}
 #grid .car .car-location,#sim .car .car-location{grid-area:3/1/4/2;font-size:11px;line-height:1.4;color:var(--muted);margin:0;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 /* The four specs below already contain engine, fuel and transmission. */
 #grid .car .car-summary,#sim .car .car-summary{display:none}
 #grid .car .price,#sim .car .price{grid-area:4/1/5/2;font-size:25px;line-height:1.2;white-space:nowrap;margin:2px 0 0;color:#28bd70}
 #grid .car .uah-price,#sim .car .uah-price{grid-area:4/2/5/3;align-self:center;justify-self:end;font-size:11px;line-height:1.4;min-height:0;white-space:nowrap}
 #grid .car .uah-note,#sim .car .uah-note{display:none}
 #grid .car .price-history,#sim .car .price-history{grid-area:5/1/6/-1;margin:0;gap:6px;font-size:11px}
 #grid .car .spec,#sim .car .spec{grid-area:6/1/7/-1;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 10px;font-size:12px;line-height:1.4;margin:0;padding-top:2px}
 #grid .car .row,#sim .car .row{grid-area:7/1/8/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:2px 0 0}
 #grid .car .row .btn,#sim .car .row .btn{display:flex;align-items:center;justify-content:center;min-width:0;min-height:44px;padding:9px 6px;font-size:12px;line-height:1.3;border-radius:9px;align-self:stretch}
 #grid .car .b:not(:has(.price-history))>.spec,#sim .car .b:not(:has(.price-history))>.spec{grid-row:5}
 #grid .car .b:not(:has(.price-history))>.row,#sim .car .b:not(:has(.price-history))>.row{grid-row:6}
 body:has(#dt:not([hidden]))>.sticky{display:none}
 #dt .dt{padding-top:12px}
 #dt .back{margin-bottom:10px;min-height:32px;align-items:center}
 #dt .seller-contact-bar{gap:8px;padding:10px;margin:0 0 12px;border-radius:12px;flex-wrap:nowrap}
 #dt .seller-contact-avatar,#dt .seller-contact-avatar.seller-company-logo{width:36px;height:36px;flex-basis:36px}
 #dt .seller-contact-info{gap:1px}
 #dt .seller-contact-info b{font-size:14px;line-height:1.3}
 #dt .seller-contact-info span,#dt .seller-contact-info small,#dt .seller-sale-counts{font-size:10px!important;line-height:1.4}
 #dt .seller-contact-button{flex:0 0 auto;width:auto;min-height:44px;padding:10px;font-size:11px}
 #dt .dg{gap:12px}
 #dt .stage{aspect-ratio:4/3;border-radius:12px;background:var(--soft)}
 #dt .stage img{object-fit:cover;object-position:center}
 #dt .th{gap:8px;padding-bottom:2px}
 #dt .thumb-photo,#dt .th img{width:76px;height:56px;border-radius:7px}
 #dt .th img{opacity:.85}
 #dt .th .on{opacity:1}
 #dt .pc{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;padding:14px;border-radius:12px}
 #dt .pc>*{grid-column:1/-1;min-width:0}
 #dt .pc h1{grid-row:1;font-size:22px;line-height:1.25;letter-spacing:-.025em;margin:0;overflow-wrap:anywhere}
 #dt .pc>.car-view-count{grid-row:2;min-height:16px;margin:0;font-size:11px;line-height:1.4}
 #dt .pc .big{grid-area:3/1/4/4;font-size:30px;line-height:1.15;margin:2px 0;white-space:nowrap}
 #dt .pc .uah-price{grid-area:3/4/4/7;align-self:center;justify-self:end;font-size:12px;line-height:1.4;min-height:0;white-space:nowrap}
 #dt .pc .uah-note{font-size:9px;line-height:1.4;min-height:0;margin-top:-3px;overflow-wrap:anywhere}
 #dt .pc>.seller-source{font-size:10px;line-height:1.3;color:var(--muted);margin:2px 0 -4px}
 #dt .pc>p[data-no-i18n]{font-size:13px;line-height:1.4;margin:0}
 #dt .pc>a[href^="tel:"]{display:flex;align-items:center;justify-content:center;min-height:48px;font-size:15px;padding:11px 8px;margin-top:3px}
 #dt .pc .row2{display:contents}
 #dt .pc .row2>.btn,#dt .pc>.compare-add{grid-column:span 2;display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 3px;font-size:11px;line-height:1.3;border-radius:9px;align-self:stretch;text-align:center}
 #dt .pc>.sub{font-size:11px;line-height:1.45;margin:0;color:var(--muted)}
 #dt .pc>a[href="/contacts"],#dt .pc>.buyer-watch-price{grid-column:span 3;display:flex;align-items:center;justify-content:center;min-height:44px;width:auto;margin:0;font-size:11px;line-height:1.35;padding:8px 6px;text-align:center;border-radius:9px}
 #dt .detail-section{padding:13px}
 #dt .detail-section h3{font-size:17px;margin:0 0 10px}
 #dt .sp{gap:6px}
 #dt .sp>div{padding:9px 10px}
 #dt .sp small{font-size:11px;margin-bottom:3px}
 #dt .sp b{font-size:13px;overflow-wrap:anywhere}
 #dt .sp>div:last-child:nth-child(odd){grid-column:1/-1}
 #dt .detail-description p{font-size:14px;line-height:1.65}
}
@media(max-width:360px){
 #grid .car-title-row h3,#sim .car-title-row h3{font-size:17px}
 #grid .car .price,#sim .car .price{font-size:23px}
 #grid .car .uah-price,#sim .car .uah-price{font-size:10px}
 #dt .pc .big{font-size:27px}
 #dt .pc .uah-price{font-size:11px}
 #dt .pc .row2>.btn,#dt .pc>.compare-add{font-size:10px}
}
