/* Fix: WooCommerce product gallery (flexslider) rendered off-screen (blank white area) on product pages with 2+ images. Root cause: the flexslider slide-track width (percentage based on an assumed slide count) does not match the actual number of gallery images, so the transform-based slide positioning breaks and the active slide renders off-screen - independent of the site's RTL direction. Fix: bypass the transform-based sliding entirely and show only the slide flexslider itself marks as active (.flex-active-slide), using plain display toggling. Thumbnail click-to-switch still works because flexslider's own click handler keeps applying/removing that class. */
.woocommerce-product-gallery__wrapper {
  transform: none !important;
  width: auto !important;
}
.woocommerce-product-gallery__image {
  display: none !important;
  float: none !important;
  width: 100% !important;
  position: static !important;
}
.woocommerce-product-gallery__image.flex-active-slide {
  display: block !important;
}
/* Fix 2026-09-22: products with a single image never get flexslider initialised, so no slide receives .flex-active-slide and the rule above hid the only photo. Always show a lone gallery image. */
.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:only-child {
  display: block !important;
}


/* TNT 2026-10-18: mobile horizontal scroll fix — footer social icons wrap instead of overflowing (13 icons = 500px) */
.tnt-ft .bb .sci{flex-wrap:wrap;justify-content:center;max-width:100%}
.tnt-ft .bb .row{flex-wrap:wrap;max-width:100%}

/* TNT 2026-10-18: RTL fix — theme makes product gallery full-bleed on mobile with LTR-only margins, pushing it off-screen in Arabic */
@media screen and (max-width:768px){
  .rtl .woocommerce .wp-block-woocommerce-product-image-gallery,
  body.rtl.woocommerce .wp-block-woocommerce-product-image-gallery{
    width:auto;
    margin-left:calc(calc(var(--wp--style--block-gap) / 1.5) * -1);
    margin-right:calc(calc(var(--wp--style--block-gap) / 1.5) * -1);
  }
}

/* TNT 2026-10-18: single-product top spacer is ~147px — too much empty space on phones */
@media screen and (max-width:768px){
  .single-product .wp-block-group.woocommerce.product > .wp-block-spacer:first-child{height:24px !important}
}

/* TNT 2026-10-23: mobile — "الأجهزة الأكثر طلبًا" as 2 compact columns instead of 1 long column */
@media screen and (max-width:600px){
  .tnt-home .th-grid.th-prods{grid-template-columns:1fr 1fr !important;gap:10px !important}
  .tnt-home .th-prods .th-prod{padding:8px !important;min-width:0}
  .tnt-home .th-prods .th-prod > a.img{height:auto !important;aspect-ratio:1/1;overflow:hidden;display:block}
  .tnt-home .th-prods .th-prod > a.img img{width:100%;height:100%;object-fit:contain}
  .tnt-home .th-prods .th-prod h3{font-size:14px !important;line-height:1.35 !important;margin:6px 0 4px !important}
  .tnt-home .th-prods .th-prod .th-price{font-size:15px !important}
  .tnt-home .th-prods .th-prod ul{display:none !important}
  .tnt-home .th-prods .th-prod .th-btns{flex-direction:column;gap:6px}
  .tnt-home .th-prods .th-prod .th-btns a,.tnt-home .th-prods .th-prod .th-btns button{width:100%;font-size:12.5px !important;padding:8px 6px !important;min-height:36px}
}
/* TNT 2026-10-23: remove floating AI chat bubble on mobile (keep WhatsApp button only) */
@media screen and (max-width:768px){
  #mwai-chatbot-default,.mwai-chat.mwai-window{display:none !important}
}
/* TNT 2026-10-23: footer phone numbers never break across lines */
.tnt-ft a[href^="tel:"],.tnt-ft a[href*="wa.me"]{white-space:nowrap;direction:ltr;unicode-bidi:isolate;display:inline-block}
/* TNT 2026-10-25: shop page (/shop/ only) — hide the long "جميع المنتجات" grid + filters and its jump bar; category pages unaffected */
body.woocommerce-shop .tnt-shop-list{display:none !important}
body.woocommerce-shop .st-sec:has(.sf-allbar),body.woocommerce-shop .sf-allbar{display:none !important}
/* TNT 2026-10-26: services page booking form — same width as the service cards, 2-column fields, shorter */
body.page-id-29 #booking.tnt-svc-form{max-width:960px !important;width:calc(100% - 32px);margin-left:auto !important;margin-right:auto !important;box-sizing:border-box;padding:28px 32px !important}
body.page-id-29 #booking .wp-block-jetpack-contact-form{gap:14px 20px !important}
body.page-id-29 #booking .wp-block-jetpack-contact-form > .grunion-field-name-wrap,
body.page-id-29 #booking .wp-block-jetpack-contact-form > .grunion-field-telephone-wrap,
body.page-id-29 #booking .wp-block-jetpack-contact-form > .grunion-field-select-wrap,
body.page-id-29 #booking .wp-block-jetpack-contact-form > .grunion-field-number-wrap,
body.page-id-29 #booking .wp-block-jetpack-contact-form > .grunion-field-text-wrap,
body.page-id-29 #booking .wp-block-jetpack-contact-form > .grunion-field-file-wrap{flex:1 1 calc(50% - 10px) !important;max-width:calc(50% - 10px) !important}
body.page-id-29 #booking textarea{height:96px !important;min-height:96px !important}
@media (max-width:700px){body.page-id-29 #booking .wp-block-jetpack-contact-form > .grunion-field-wrap{flex-basis:100% !important;max-width:100% !important}body.page-id-29 #booking.tnt-svc-form{padding:20px 16px !important}}
/* TNT 2026-10-26: articles archive — show the full featured image on every card (no cropping) */
body.archive .wp-block-post-template .wp-block-post-featured-image img,body.blog .wp-block-post-template .wp-block-post-featured-image img{aspect-ratio:4/5 !important;height:auto !important;width:100% !important;object-fit:contain !important;background:#EEF5F9}
.tnt-blog .bl-feat img{object-fit:contain !important;background:#EEF5F9}
/* TNT 2026-10-26: gallery page — all sections share the same 960px width */
body.page-id-917 .entry-content > .tnt-wc,body.page-id-917 .entry-content > .tnt-prt{max-width:960px !important;padding-left:0 !important;padding-right:0 !important;margin-left:auto !important;margin-right:auto !important}
/* TNT 2026-10-26: contact page — map (the newer one) beside the video; all blocks 960px wide */
body.page-id-11 .tc-map{display:grid !important;grid-template-columns:1fr 1fr;gap:12px 24px;align-items:start}
body.page-id-11 .tc-map > .tnt-map{grid-column:1;grid-row:1 / span 2;margin:0 !important;padding:0 !important;max-width:none !important;text-align:center}
body.page-id-11 .tc-map > .tnt-map > h2,body.page-id-11 .tc-map > .tnt-map > p:not(:has(a)){display:none}body.page-id-11 .tc-map > .tnt-map > p:has(a){margin:0 !important}
body.page-id-11 .tc-map > .tnt-map iframe{width:100% !important;height:520px !important;margin:0 0 12px !important}
body.page-id-11 .tc-map > p{grid-column:1;grid-row:3;margin:0}
body.page-id-11 .tc-map > h3{grid-column:2;grid-row:1;margin:0 !important}
body.page-id-11 .tc-map > .tnt-vp{grid-column:2;grid-row:2 / span 2;max-width:none !important;width:100% !important;margin:0 !important}
@media (max-width:800px){body.page-id-11 .tc-map{grid-template-columns:1fr}body.page-id-11 .tc-map > *{grid-column:1 !important;grid-row:auto !important}body.page-id-11 .tc-map > .tnt-map iframe{height:360px !important}}
body.page-id-11 .entry-content > .tnt-wechat-box,body.page-id-11 .entry-content > .tnt-contact-form,body.page-id-11 .entry-content > section,body.page-id-11 .entry-content > .tnt-wx{max-width:960px !important;box-sizing:border-box;margin-left:auto !important;margin-right:auto !important}
body.page-id-11 .entry-content > section.tnt-cfaq,body.page-id-11 .entry-content > .tnt-wx{padding-left:0 !important;padding-right:0 !important}
/* TNT 2026-10-26: contact page form — shorter (2 columns, inline radio options, smaller textarea) */
body.page-id-11 .tnt-contact-form{padding:24px 28px !important}
body.page-id-11 .tnt-contact-form .wp-block-jetpack-contact-form{gap:12px 20px !important}
body.page-id-11 .tnt-contact-form .wp-block-jetpack-contact-form > .grunion-field-name-wrap,body.page-id-11 .tnt-contact-form .wp-block-jetpack-contact-form > .grunion-field-telephone-wrap{flex:1 1 calc(50% - 10px) !important;max-width:calc(50% - 10px) !important}
body.page-id-11 .tnt-contact-form .grunion-field-radio-wrap .grunion-radio-options,body.page-id-11 .tnt-contact-form .grunion-field-radio-wrap fieldset > div{display:flex !important;flex-direction:row !important;flex-wrap:wrap !important;gap:6px 22px !important}body.page-id-11 .tnt-contact-form .grunion-radio-options > p{width:auto !important;flex:0 0 auto !important;margin:0 !important}body.page-id-11 .tnt-contact-form .grunion-field-radio-wrap legend{margin-bottom:6px !important}
body.page-id-11 .tnt-contact-form .grunion-field-radio-wrap label.grunion-radio-label,body.page-id-11 .tnt-contact-form .grunion-field-radio-wrap .contact-form-field{margin:0 !important}
body.page-id-11 .tnt-contact-form textarea{height:90px !important;min-height:90px !important}
@media (max-width:700px){body.page-id-11 .tnt-contact-form .wp-block-jetpack-contact-form > .grunion-field-wrap{flex-basis:100% !important;max-width:100% !important}body.page-id-11 .tnt-contact-form{padding:20px 16px !important}}
/* TNT 2026-10-26: services sub-nav strip shows only on the services hub + service pages */
.tnt-subnav{display:none !important}
body.page-id-29 .tnt-subnav,body.page-id-412 .tnt-subnav,body.page-id-413 .tnt-subnav,body.page-id-2263 .tnt-subnav,body.page-id-2310 .tnt-subnav,body.page-id-2311 .tnt-subnav,body.page-id-970 .tnt-subnav,body.page-id-1001 .tnt-subnav,body.page-id-435 .tnt-subnav{display:block !important}