/* 2026-10-12 mobile single-ad (oglas) redesign. Loaded only with media="(max-width:768px)" from top.php.
   Order: gallery, title+price+chips, Za vozilo, 4 banners, description, AdSense, phone, seller, adresar, similar ads. */
#singleadwrap{display:flex;flex-direction:column;padding:0 12px;box-sizing:border-box;width:100%;float:none}
#singleadwrap > article.post,#singleadwrap .col_8_50_of_12,#singleadwrap .col_9_50_of_12,#singleadwrap article.post article.post,
#singleadwrap .fwImage,#singleadwrap .functions-options,#singleadwrap .bottom_wrapper,#singleadwrap .col_3_50_of_12{display:contents}
#singleadwrap > *,#singleadwrap .fwImage > *,#singleadwrap .bottom_wrapper > *{order:20}

/* 1 gallery */
#singleadwrap #gallery-1{order:1;margin:0 -12px 12px;width:auto;background:#fff;position:relative}
/* thumbnails strip kept (v3) */
#singleadwrap #gallery-1 .rsFullscreenBtn{right:10px;top:10px}
#singleadwrap #gallery-1 .rsFullscreenIcn{border-radius:6px;background-color:rgba(0,0,0,.55)}
.mad-counter{position:absolute;right:12px;bottom:12px;z-index:30;background:rgba(0,0,0,.6);color:#fff;font:500 13px/1 Poppins,system-ui,sans-serif;padding:5px 10px;border-radius:6px;pointer-events:none}

/* 2 title + price + chips */
#singleadwrap .head_title{order:2;display:block;background:#fff;border-radius:6px;box-shadow:0 6px 20px rgba(20,30,50,.07);padding:16px;margin:0 0 12px;height:auto;float:none;width:auto}
#singleadwrap .head_title h1{font:600 20px/1.3 Poppins,system-ui,sans-serif;margin:0 0 10px;padding:0;color:#222;white-space:normal;text-align:left}
#singleadwrap .head_title .price{display:inline-block;float:none;width:auto;position:static;margin:0;background:#FFC107;color:#111;font:700 20px/1.2 Poppins,system-ui,sans-serif;padding:8px 20px;border-radius:6px;text-align:left}
.mad-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.mad-chip{display:inline-flex;align-items:center;gap:5px;font:400 13px Poppins,system-ui,sans-serif;background:#f3f4f6;border-radius:6px;padding:5px 12px;color:#444}
.mad-chip svg{color:#777;flex:0 0 auto}

/* cards */
.mad-card,#singleadwrap .bottom_wrapper .col_8_of_12,#singleadwrap .bottom_wrapper .col_4_of_12{background:#fff;border-radius:6px;box-shadow:0 6px 20px rgba(20,30,50,.07);padding:16px;margin:0 0 12px;float:none;width:auto;box-sizing:border-box}
.mad-card h3,#singleadwrap .bottom_wrapper .col_8_of_12 .head_title h2{font:600 16px Poppins,system-ui,sans-serif;margin:0 0 10px;padding:0;color:#222}
/* 3 Za vozilo */
.mad-vehicle{order:3}
.mad-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.mad-grid div{background:#f6f7f9;border-radius:6px;padding:8px 12px;min-width:0}
.mad-grid small{display:block;color:#888;font-size:11px;line-height:1.4}
.mad-grid b{display:block;font:600 14px/1.35 Poppins,system-ui,sans-serif;color:#222;overflow-wrap:anywhere}
/* 4 banners 2x2 */
#singleadwrap .mad-banners{order:4;display:grid;grid-template-columns:125px 125px;gap:10px;justify-content:center;margin:0 0 12px;padding:0;float:none;width:auto}
#singleadwrap .mad-banners a{display:block;width:125px;height:125px;margin:0;border-radius:6px;overflow:hidden;background:#fff}
#singleadwrap .mad-banners img{display:block;width:125px;height:125px;border-radius:6px}
/* 5 description */
#singleadwrap .bottom_wrapper .col_8_of_12{order:5}
#singleadwrap .bottom_wrapper .col_8_of_12 .table_orange{display:none}
#singleadwrap .bottom_wrapper .col_8_of_12 .head_title{order:0;display:block;background:none;box-shadow:none;padding:0;margin:0}
#singleadwrap .bottom_wrapper .col_8_of_12 p{font:400 14px/1.6 Poppins,system-ui,sans-serif !important;color:#444;margin:0;overflow-wrap:anywhere}
/* 6 AdSense */
#singleadwrap .ad-under-img{order:6;float:none;width:auto;margin:0 0 12px;padding:0;text-align:center}
/* 7 phone */
#singleadwrap .call-button{order:7;float:none;width:auto;margin:0 0 12px;padding:0}
#singleadwrap .call-button a{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:52px;box-sizing:border-box;border-radius:6px;background:#3cb54a;color:#fff;font:600 16px Poppins,system-ui,sans-serif;box-shadow:0 6px 16px rgba(60,181,74,.3);text-decoration:none;margin:0}
/* 8 seller + adresar */
#singleadwrap .bottom_wrapper .col_4_of_12{order:8;margin-top:0}
#singleadwrap .col_4_of_12 .widget{margin:0;padding:0;background:none;box-shadow:none;border:0}
#singleadwrap .users_card{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:0;padding:0;background:none;box-shadow:none;border:0;text-align:left}
#singleadwrap .users_card .logo_img{flex:0 0 56px;width:56px;height:56px;margin:0;border-radius:50%;overflow:hidden;background:#f3f4f6;display:flex;align-items:center;justify-content:center}
#singleadwrap .users_card .logo_img img{width:56px;height:56px;object-fit:contain;border-radius:50%}
#singleadwrap .users_card .text-center{display:contents;text-align:left}
#singleadwrap .users_card .text-center > a{flex:1 1 0;min-width:0;text-decoration:none}
#singleadwrap .users_card .owner-name{font:600 16px/1.3 Poppins,system-ui,sans-serif;margin:0;color:#222;text-align:left}
#singleadwrap .users_card .owner-location{display:none}
#singleadwrap .users_card .ad_btn_action{flex:0 0 100%;margin:4px 0 0;padding:0;list-style:none}
#singleadwrap .users_card .ad_btn_action li{margin:0 0 6px;padding:0;width:100%;list-style:none}
#singleadwrap .users_card .ad_btn_action a.add-to-contacts{display:flex;align-items:center;justify-content:center;width:100%;height:48px;box-sizing:border-box;border:1.5px solid #ddd;border-radius:6px;background:#fff;color:#222;font:600 15px Poppins,system-ui,sans-serif;text-decoration:none}
#singleadwrap .users_card .ad_btn_action .success-content,#singleadwrap .users_card .ad_btn_action .info-content{display:block;width:100%;box-sizing:border-box;border-radius:6px;margin:0;text-align:center}
#singleadwrap .users_card .ad_btn_action .remove-from-contacts{display:block;text-align:center;font-size:13px}
/* 9 similar ads (horizontal scroll), then the other sidebar widgets */
#singleadwrap .col_3_50_of_12 > .widget{order:10;float:none;width:auto;margin:0 0 12px}
#singleadwrap .col_3_50_of_12 > .widget:has(.sideads){order:9}
#singleadwrap .col_3_50_of_12 > .ad-widget{order:11}
#singleadwrap .col_3_50_of_12 > .widget:has(.hot_post){order:12}
#singleadwrap .sideads{display:flex;gap:10px;overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0;padding:0 0 6px;scroll-snap-type:x mandatory}
#singleadwrap .sideads li.ad{flex:0 0 150px;width:150px;margin:0;padding:0;float:none;background:#fff;border-radius:6px;box-shadow:0 4px 14px rgba(20,30,50,.07);overflow:hidden;scroll-snap-align:start;list-style:none}
#singleadwrap .sideads li.ad .item_thumb{margin:0;padding:0;width:auto;float:none}
#singleadwrap .sideads li.ad .thumb_hover img{display:block;width:150px;height:112px;object-fit:cover;border-radius:0}
#singleadwrap .sideads li.ad .onsale{display:none}
#singleadwrap .sideads li.ad h3{margin:0;padding:8px 10px;font:500 12px/1.35 Poppins,system-ui,sans-serif;height:auto}
#singleadwrap .sideads li.ad h3 a{color:#222;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:normal}
#singleadwrap .entry_tags{display:none}

/* 2026-10-12: related ads ("Povezani oglasi") = results-mobile list cards. Rules below are copied from
   results-mobile.css (.mrt .mrc...) and re-scoped to #singleadwrap .mad-rel; results-mobile.css itself is untouched. */
#singleadwrap .col_3_50_of_12 > .widget:has(.sideads){display:none}
#singleadwrap .mad-rel{order:9;margin:0 0 12px}
#singleadwrap .mad-rel h3{font:600 16px Poppins,system-ui,sans-serif;margin:4px 2px 10px;color:#222;text-align:left}
#singleadwrap .mad-rel .mrt-list{display:flex;flex-direction:column;gap:10px;margin:0;padding:0}
  #singleadwrap .mad-rel .mrt-list > li{list-style:none;margin:0}
  #singleadwrap .mad-rel .mrc{position:relative;display:flex;gap:12px;width:auto;margin:0;padding:8px;background:#fff;border:1px solid #eceef1;border-radius:5px;box-shadow:0 2px 10px rgba(20,30,50,.06);font-family:Poppins,system-ui,sans-serif;text-align:left}
  #singleadwrap .mad-rel .mrc-thumb{position:relative;display:block;flex:0 0 40%;max-width:190px;min-height:140px;align-self:stretch;border-radius:4px;overflow:hidden;background:#f3f4f6}
  #singleadwrap .mad-rel .mrc-thumb img{position:absolute;top:0;left:0;width:100%;height:100%;max-width:none;object-fit:cover;display:block;margin:0;border:0}
  #singleadwrap .mad-rel .mrc-photos{position:absolute;left:6px;bottom:6px;display:flex;align-items:center;gap:4px;padding:4px 7px;border-radius:7px;background:rgba(17,17,17,.78);color:#fff;font:600 12px/1 Poppins,sans-serif}
  #singleadwrap .mad-rel .mrc-photos svg{display:block}
  #singleadwrap .mad-rel .mrc-body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;padding:2px 2px 0 0}
  #singleadwrap .mad-rel .mrc-head{display:flex;align-items:flex-start;gap:6px}
  #singleadwrap .mad-rel .mrc .mrc-title{flex:1 1 auto;min-width:0;margin:0;padding:0;border:0;background:none;font:700 15px/1.3 Poppins,system-ui,sans-serif;letter-spacing:0;text-transform:none;color:#111;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}
  #singleadwrap .mad-rel .mrc .mrc-title a{color:#111;text-decoration:none;font:inherit}
  #singleadwrap .mad-rel .mrc-fav{flex:0 0 32px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;margin:-2px -2px 0 0;border:1px solid #e5e7eb;border-radius:50%;background:#fff;color:#6b7280;text-decoration:none}
  #singleadwrap .mad-rel .mrc-fav svg{display:block}
  #singleadwrap .mad-rel .mrc-fav.is-on{color:#e0a800;border-color:#FFC107}
  #singleadwrap .mad-rel .mrc-fav.is-on svg{fill:#FFC107}
  #singleadwrap .mad-rel .mrc-fav.is-busy{opacity:.5;pointer-events:none}
  #singleadwrap .mad-rel .mrc .mrc-desc{margin:4px 0 8px;padding:0;font:13px/1.4 Poppins,system-ui,sans-serif;color:#6b7280;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}
  #singleadwrap .mad-rel .mrc-foot{margin-top:auto;display:flex;align-items:flex-end;justify-content:space-between;gap:8px}
  #singleadwrap .mad-rel .mrc-meta{display:flex;flex-direction:column;gap:4px;min-width:0;font:12px/1.2 Poppins,system-ui,sans-serif;color:#6b7280}
  #singleadwrap .mad-rel .mrc-meta span{display:flex;align-items:center;gap:4px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #singleadwrap .mad-rel .mrc-meta svg{flex:0 0 auto;display:block;color:#6b7280}
  #singleadwrap .mad-rel .mrc-price{flex:0 0 auto;display:inline-flex;align-items:center;gap:2px;max-width:60%;padding:9px 8px 9px 12px;border-radius:4px;background:#FFC107;color:#111;font:700 13px/1.1 Poppins,system-ui,sans-serif;text-decoration:none;white-space:nowrap;overflow:hidden}
  #singleadwrap .mad-rel .mrc-price:hover{background:#ffb300;color:#111}
  #singleadwrap .mad-rel .mrc-price svg{flex:0 0 auto;display:block}

/* 2026-10-12 fix: banners exactly 125x125 (own markup, no .tb_widget_banner_125 rules) */
#singleadwrap .mad-banners a{flex:none;width:125px!important;height:125px;max-width:none;margin:0!important;padding:0}
#singleadwrap .mad-banners img{width:125px!important;height:125px!important;max-width:none;margin:0!important;object-fit:cover}

/* 2026-10-12: related ads as 2x2 grid (rules copied from results-mobile.css .mrt-grid, re-scoped) */
  .mrt-grid .mrt .mrt-list{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  #singleadwrap .mad-rel .mrt-list > li.ad-infeed,#singleadwrap .mad-rel .mrt-list > li.mrt-empty{grid-column:1/-1}
  #singleadwrap .mad-rel .mrc{flex-direction:column;gap:8px;padding:6px}
  #singleadwrap .mad-rel .mrc-thumb{flex:none;max-width:none;width:100%;min-height:0;height:auto;aspect-ratio:4/3}
  #singleadwrap .mad-rel .mrc .mrc-title{font-size:14px}
  #singleadwrap .mad-rel .mrc-fav{flex-basis:28px;width:28px;height:28px}
  #singleadwrap .mad-rel .mrc .mrc-desc{-webkit-line-clamp:2;font-size:12px;margin:4px 0 6px}
  #singleadwrap .mad-rel .mrc-foot{flex-direction:column;align-items:stretch;gap:8px}
  #singleadwrap .mad-rel .mrc-price{max-width:none;justify-content:center}
#singleadwrap .mad-rel .mrt-list{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#singleadwrap .mad-rel .mrc .mrc-desc{display:none}
#singleadwrap .mad-rel .mrc-thumb{aspect-ratio:1/1}
#singleadwrap .mad-rel .mrc .mrc-title{font-size:13px;line-height:1.3}
#singleadwrap .mad-rel-head{display:flex;align-items:center;justify-content:space-between;margin:4px 2px 10px}
#singleadwrap .mad-rel-head h3{margin:0}
#singleadwrap .mad-more-top{font:600 13px Poppins,system-ui,sans-serif;color:#b38600;text-decoration:none}
#singleadwrap .mad-more-btn{display:flex;align-items:center;justify-content:center;height:46px;margin:12px 0 0;border:1.5px solid #ddd;border-radius:6px;background:#fff;color:#222;font:600 15px Poppins,system-ui,sans-serif;text-decoration:none}

/* 2026-10-12 v3: seller card = logo left, name/location/adresar right */
#singleadwrap .users_card{display:flex;flex-wrap:nowrap;align-items:flex-start;gap:14px}
#singleadwrap .users_card .logo_img{flex:0 0 72px;width:72px;height:72px}
#singleadwrap .users_card .logo_img img{width:72px;height:72px}
#singleadwrap .users_card .text-center{display:flex;flex-direction:column;align-items:stretch;flex:1 1 auto;min-width:0;text-align:left}
#singleadwrap .users_card .text-center > a{flex:none}
#singleadwrap .users_card .owner-location{display:block;font:400 13px Poppins,system-ui,sans-serif;color:#777;margin:2px 0 8px;text-align:left}
#singleadwrap .users_card .ad_btn_action{flex:none;margin:0;width:100%;display:block}
#singleadwrap .users_card .ad_btn_action li{display:block}
#singleadwrap .users_card .ad_btn_action a.add-to-contacts,#singleadwrap .users_card a.mad-contact-login{display:flex;align-items:center;justify-content:center;width:100%;height:44px;box-sizing:border-box;border:1.5px solid #ddd;border-radius:6px;background:#fff;color:#222;font:600 14px Poppins,system-ui,sans-serif;text-decoration:none}
#singleadwrap .users_card .ad_btn_action .info-content{display:none}
#singleadwrap .users_card .ad_btn_action .success-content{display:block;width:100%;padding:10px;font-size:14px}
#singleadwrap #gallery-1 .mad-counter{top:12px;left:12px;right:auto;bottom:auto}
