/* MarketKit final legibility/layout patch.
   Product detail, native detail tabs, product-card titles, category titles only. */

/* Product cards: center complete Arabic titles; don't cut descenders via fixed 40px. */
body.mk-shell .mk-product-card.mk-card-v6 .mk-product-copy h3,
body.mk-shell .mk-products-grid .mk-product-card .mk-product-copy h3,
body.mk-shell .mk-products-rail .mk-product-card .mk-product-copy h3 {
  display:block!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:3.5em!important;
  max-height:none!important;
  margin:0 0 9px!important;
  padding:2px 0 5px!important;
  overflow:visible!important;
  -webkit-line-clamp:unset!important;
  -webkit-box-orient:unset!important;
  white-space:normal!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
  text-overflow:clip!important;
  text-align:center!important;
  font-size:clamp(12px,1.05vw,15px)!important;
  line-height:1.72!important;
  font-weight:800!important;
}
body.mk-shell .mk-product-card.mk-card-v6 .mk-product-copy h3 a,
body.mk-shell .mk-products-grid .mk-product-card .mk-product-copy h3 a {
  display:inline!important;
  white-space:normal!important;
  text-align:inherit!important;
  line-height:inherit!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  -webkit-line-clamp:unset!important;
}
/* Categories/taxonomy tiles: never sever Arabic descenders or long compound labels. */
body.mk-shell :is(.mk-home,.mk-catalog-page,.mk-module) :is(.mk-category,.mk-department,.mk34-category-name,.mk-category-tile,.mk15-category-item) :is(strong,h3,.mk-category-name,.mk-category-title,.mk-department-name),
body.mk-shell :is(.mk-home,.mk-catalog-page) .mk-category-rail .mk-category strong {
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  -webkit-line-clamp:unset!important;
  -webkit-box-orient:unset!important;
  padding-block:3px 6px!important;
  line-height:1.65!important;
  text-overflow:clip!important;
}

/* Labels rendered directly as spans/links (not inside category tiles). */
body.mk-shell :is(.mk-home,.mk-catalog-page,.mk-module) :is(.mk34-category-name,.mk15-category-name,.mk46-card-category,.mk-department-name,.mk-category-title) {
  display:block!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  white-space:normal!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
  -webkit-line-clamp:unset!important;
  padding-block:3px 6px!important;
  line-height:1.65!important;
  text-overflow:clip!important;
}

/* Product page: remove nested oversized margins and give copy room. */
body.single-product.mk-shell .mk-reference-page{
  width:min(100% - 28px,1500px)!important;
  max-width:1500px!important;
  margin:16px auto 28px!important;
  padding:clamp(14px,1.55vw,26px)!important;
  background:#fff!important;
  border:1px solid #e1eceb!important;
  border-radius:20px!important;
  box-sizing:border-box!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp.mk-reference-pdp>.mk-pdp-top{
  box-sizing:border-box!important;
  display:grid!important;
  padding:clamp(16px,1.8vw,29px)!important;
  margin:0!important;
  gap:clamp(18px,1.6vw,28px)!important;
  border:1px solid #e1eceb!important;
  border-radius:19px!important;
  background:#fff!important;
  overflow:visible!important;
  align-items:start!important;
  min-width:0!important;
  height:auto!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-top > :is(.mk-pdp-gallery,.mk-pdp-info,.mk-pdp-purchase){
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  padding:0!important;
  margin:0!important;
  overflow:visible!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-info :is(.mk-reference-delivery-card,.mk-reference-overview,.mk-pdp-quick-specs,.mk-pdp-service,.mk-pdp-shipping){
  padding:clamp(15px,1.6vw,22px)!important;
  margin-block:12px!important;
  border-radius:16px!important;
  overflow:visible!important;
  min-width:0!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-info :is(p,span,strong,h1,h2,h3,dd,dt){
  overflow-wrap:break-word;
  line-height:1.7;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-info .mk-pdp-title{
  font-size:clamp(24px,2.5vw,38px)!important;
  line-height:1.35!important;
  height:auto!important;max-height:none!important;overflow:visible!important;
  margin:0 0 15px!important;padding-block:3px 6px!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-info .mk-pdp-highlights :is(dd,dt){
  white-space:normal!important; overflow-wrap:break-word!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-purchase :is(.mk-reference-seller,.mk-reference-policies,.mk-buybox){
  box-sizing:border-box!important;
  min-width:0!important;
  padding:clamp(14px,1.5vw,23px)!important;
  border-radius:16px!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-purchase :is(.mk-seller-facts,.mk-reference-seller-top,.mk-buybox-form){min-width:0!important;}
body.single-product.mk-shell .mk-reference-page .mk-gallery-stage {box-sizing:border-box!important;overflow:hidden!important;}
body.single-product.mk-shell .mk-reference-page .mk-gallery-stage img.mk-gallery-main{
  max-width:100%!important;max-height:100%!important;object-fit:contain!important;
}

/* Keep the original three-column hierarchy only where it really fits. */
@media (min-width:1451px){
 body.single-product.mk-shell .mk-reference-page .mk-pdp.mk-reference-pdp>.mk-pdp-top{
  grid-template-columns:minmax(300px,.95fr) minmax(420px,1.34fr) minmax(300px,1.0fr)!important;
 }
 body.single-product.mk-shell .mk-reference-page .mk-pdp-top>.mk-pdp-gallery{grid-column:1!important;grid-row:1!important;}
 body.single-product.mk-shell .mk-reference-page .mk-pdp-top>.mk-pdp-info{grid-column:2!important;grid-row:1!important;}
 body.single-product.mk-shell .mk-reference-page .mk-pdp-top>.mk-pdp-purchase{grid-column:3!important;grid-row:1!important;}
}
/* On standard laptop/desktop widths, two columns give the central description
   real width; the buy panel follows the information without becoming tiny. */
@media (min-width:901px) and (max-width:1450px){
 body.single-product.mk-shell .mk-reference-page .mk-pdp.mk-reference-pdp>.mk-pdp-top{
  grid-template-columns:minmax(0,1fr) minmax(0,1.07fr)!important;
  grid-template-rows:auto auto!important;
  align-content:start!important;
 }
 body.single-product.mk-shell .mk-reference-page .mk-pdp-top>.mk-pdp-gallery{grid-column:1!important;grid-row:1 / 3!important;align-self:start!important;}
 body.single-product.mk-shell .mk-reference-page .mk-pdp-top>.mk-pdp-info{grid-column:2!important;grid-row:1!important;}
 body.single-product.mk-shell .mk-reference-page .mk-pdp-top>.mk-pdp-purchase{grid-column:2!important;grid-row:2!important;}
}
@media(max-width:900px){
 body.single-product.mk-shell .mk-reference-page{width:calc(100% - 20px)!important;padding:12px!important;}
 body.single-product.mk-shell .mk-reference-page .mk-pdp.mk-reference-pdp>.mk-pdp-top{
  grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto!important;gap:18px!important;
  padding:14px!important;
 }
 body.single-product.mk-shell .mk-reference-page .mk-pdp-top>:is(.mk-pdp-gallery,.mk-pdp-info,.mk-pdp-purchase){grid-column:1!important;grid-row:auto!important;}
}

/* Exactly ONE working tab strip (native real WooCommerce panels), no duplicate jumpbars. */
body.single-product.mk-shell .mk-pdp.mk-reference-pdp :is(.mk41-product-nav,.mk26-product-navigation){display:none!important;}
body.single-product.mk-shell .mk-reference-page .mk-pdp-details{
  box-sizing:border-box!important;
  width:100%!important;
  margin:21px 0 0!important;
  padding:clamp(16px,2vw,26px)!important;
  border:1px solid #dfeae8!important;
  border-radius:18px!important;
  overflow:visible!important;
  background:#fff!important;
}
body.single-product.mk-shell .mk-reference-page .mk-detail-tablist{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  flex-wrap:wrap!important;gap:8px!important;
  min-width:0!important;min-height:0!important;
  margin:0 0 17px!important;padding:0 0 13px!important;
  background:transparent!important;border-bottom:1px solid #e3eeeb!important;
  overflow:visible!important;
}
body.single-product.mk-shell .mk-reference-page .mk-detail-tablist [data-mk-tab]{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:auto!important;min-width:95px!important;min-height:40px!important;
  padding:9px 16px!important;margin:0!important;
  border:1px solid #d9e8e6!important;border-radius:11px!important;
  background:#f5faf9!important;color:#28565d!important;
  font-size:13px!important;line-height:1.55!important;font-weight:800!important;
  box-shadow:none!important;white-space:normal!important;text-align:center!important;
}
body.single-product.mk-shell .mk-reference-page .mk-detail-tablist [data-mk-tab][aria-selected="true"]{
  color:#fff!important;background:#087f85!important;border-color:#087f85!important;
}
body.single-product.mk-shell .mk-reference-page .mk-detail-panel{
  padding:clamp(8px,1.2vw,16px)!important;
  margin:0!important;width:100%!important;min-width:0!important;
  max-width:100%!important;box-sizing:border-box!important;
  color:#264950!important;line-height:1.85!important;
  overflow-wrap:break-word!important;
}
body.single-product.mk-shell .mk-reference-page .mk-detail-panel[hidden]{display:none!important;}
body.single-product.mk-shell .mk-reference-page .mk-detail-panel :is(p,h2,h3,table){max-width:100%!important;}
@media(max-width:600px){
 body.single-product.mk-shell .mk-reference-page .mk-detail-tablist [data-mk-tab]{flex:1 1 135px!important;min-width:0!important;font-size:12px!important;}
 body.mk-shell .mk-product-card.mk-card-v6 .mk-product-copy h3{font-size:12px!important;}
}
