/* ATIIE 2026-11-19. Scope: reference single product page only.
 * Restore gallery (right) + product information (middle) + buy panel (left).
 * Tabs and product descriptions keep their original WooCommerce functionality. */

body.single-product.mk-shell .mk-reference-page {
  width:min(100% - 24px, 1560px)!important;
  max-width:1560px!important;
  margin:14px auto 28px!important;
  padding:clamp(12px,1.3vw,19px)!important;
  box-sizing:border-box!important;
  overflow:visible!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp.mk-reference-pdp {
  min-width:0!important;
  max-width:100%!important;
  overflow:visible!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp.mk-reference-pdp > .mk-pdp-top {
  display:grid!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  align-items:start!important;
  justify-items:stretch!important;
  gap:clamp(13px,1.35vw,22px)!important;
  padding:clamp(15px,1.6vw,25px)!important;
  margin:0!important;
  border-radius:18px!important;
  overflow:visible!important;
  box-sizing:border-box!important;
  grid-auto-flow:row!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-top > :is(.mk-pdp-gallery,.mk-pdp-info,.mk-pdp-purchase) {
  display:block!important;
  align-self:start!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  box-sizing:border-box!important;
}

/* Even at 125% browser zoom on a laptop, retain all three original columns. */
@media(min-width:1080px) {
  body.single-product.mk-shell .mk-reference-page .mk-pdp.mk-reference-pdp > .mk-pdp-top {
    grid-template-columns:minmax(0,1.02fr) minmax(0,1.22fr) minmax(0,.88fr)!important;
    grid-template-rows:auto!important;
  }
  body.single-product.mk-shell .mk-reference-page .mk-pdp-top > .mk-pdp-gallery {
    grid-column:1!important;grid-row:1!important;position:relative!important;top:auto!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;
    position:sticky!important;
    top:calc(var(--mk-toolbar-offset,0px) + 18px)!important;
  }
}

/* Tablet: keep gallery alongside information; buy panel remains usable below.
 * Desktop above retains the left buy panel. */
@media (min-width:720px) and (max-width:1079px) {
  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.12fr)!important;
    grid-template-rows:auto auto!important;
  }
  body.single-product.mk-shell .mk-reference-page .mk-pdp-top > .mk-pdp-gallery {
    grid-column:1!important;grid-row:1 / 3!important;position:static!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;position:static!important;
  }
}
@media(max-width:719px) {
  body.single-product.mk-shell .mk-reference-page {
    width:calc(100% - 14px)!important;padding:9px!important;margin:8px auto 16px!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:17px!important;padding:13px!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;position:static!important;
  }
}

/* Photos are never stretched or cropped and the gallery cannot steal other columns. */
body.single-product.mk-shell .mk-reference-page .mk-pdp-gallery,
body.single-product.mk-shell .mk-reference-page .mk-gallery,
body.single-product.mk-shell .mk-reference-page .mk-gallery-stage {
  min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
}
body.single-product.mk-shell .mk-reference-page .mk-gallery {
  grid-template-columns:clamp(53px,5vw,66px) minmax(0,1fr)!important;
  gap:10px!important;
  direction:rtl!important;
}
body.single-product.mk-shell .mk-reference-page .mk-gallery-stage {
  grid-column:2!important;grid-row:1!important;
  width:100%!important;
  height:clamp(300px,34vw,535px)!important;
  padding:14px 8px!important;
  border:1px solid #e4eeeb!important;
  border-radius:15px!important;
  overflow:hidden!important;
}
body.single-product.mk-shell .mk-reference-page .mk-gallery-thumbs {
  grid-column:1!important;grid-row:1!important;
  max-width:100%!important;width:100%!important;
  max-height:535px!important;
  margin:0!important;padding:0!important;gap:9px!important;
}
body.single-product.mk-shell .mk-reference-page .mk-gallery-thumb {
  display:grid!important;place-items:center!important;
  width:100%!important;height:73px!important;min-width:0!important;
  padding:5px!important;border-radius:10px!important;
}
body.single-product.mk-shell .mk-reference-page .mk-gallery-stage .mk-gallery-main {
  width:100%!important;height:100%!important;
  max-width:100%!important;max-height:100%!important;
  object-fit:contain!important;object-position:center!important;
}
body.single-product.mk-shell .mk-reference-page .mk-gallery-thumb.is-active {border-color:#0c8c92!important;}
@media(max-width:719px) {
  body.single-product.mk-shell .mk-reference-page .mk-gallery {grid-template-columns:minmax(0,1fr)!important;}
  body.single-product.mk-shell .mk-reference-page .mk-gallery-stage {grid-column:1!important;grid-row:1!important;height:clamp(290px,88vw,450px)!important;}
  body.single-product.mk-shell .mk-reference-page .mk-gallery-thumbs {
    grid-column:1!important;grid-row:2!important;flex-direction:row!important;
    max-height:none!important;justify-content:center!important;
  }
  body.single-product.mk-shell .mk-reference-page .mk-gallery-thumb {width:62px!important;max-width:62px!important;height:67px!important;}
}

/* Information and seller panels have breathing space and readable headings. */
body.single-product.mk-shell .mk-reference-page .mk-pdp-info,
body.single-product.mk-shell .mk-reference-page .mk-pdp-purchase {
  min-width:0!important;overflow-wrap:break-word!important;
  text-align:start!important;line-height:1.75!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-info > :is(h1,h2,h3),
body.single-product.mk-shell .mk-reference-page .mk-pdp-info :is(.mk-pdp-title,.mk-reference-overview>h2,.mk-reference-delivery>h2,.mk-pdp-spec-heading h2),
body.single-product.mk-shell .mk-reference-page .mk-buybox-heading strong {
  display:block!important;visibility:visible!important;opacity:1!important;
  position:relative!important;height:auto!important;min-height:0!important;
  max-height:none!important;line-height:1.5!important;
  white-space:normal!important;overflow:visible!important;
  color:#16464c!important;text-align:start!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-info .mk-pdp-title {
  font-size:clamp(23px,2.2vw,35px)!important;font-weight:900!important;
  margin:4px 0 15px!important;padding:0 0 6px!important;
}
body.single-product.mk-shell .mk-reference-page :is(.mk-reference-delivery,.mk-reference-overview,.mk-pdp-quick-specs) {
  box-sizing:border-box!important;max-width:100%!important;
  padding:16px!important;margin-block:13px!important;
  border:1px solid #e0eae9!important;
  border-radius:14px!important;
  background:#fff!important;
}
body.single-product.mk-shell .mk-reference-page :is(.mk-reference-overview,.mk-reference-delivery)>h2,
body.single-product.mk-shell .mk-reference-page .mk-pdp-spec-heading h2 {
  display:block!important;font-size:17px!important;font-weight:850!important;
  margin:0 0 12px!important;color:#175359!important;
}
body.single-product.mk-shell .mk-reference-page .mk-reference-delivery-card {
  margin:0!important;padding:14px!important;min-width:0!important;border-radius:12px!important;
  align-items:flex-start!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-purchase {
  box-sizing:border-box!important;
  overflow:visible!important;border-radius:16px!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-purchase :is(.mk-reference-seller,.mk-reference-policies,.mk-buybox) {
  padding:clamp(12px,1.2vw,17px)!important;
  min-width:0!important;max-width:100%!important;overflow:visible!important;
}
body.single-product.mk-shell .mk-reference-page .mk-buybox-form,
body.single-product.mk-shell .mk-reference-page .mk-buybox form.cart {
  max-width:100%!important;min-width:0!important;
}
body.single-product.mk-shell .mk-reference-page .mk-buybox button.single_add_to_cart_button {
  min-height:46px!important;min-width:0!important;width:100%!important;
  background:#07858a!important;color:#fff!important;
  text-align:center!important;font-weight:850!important;
}

/* Restore Arabic RTL for specification labels and WooCommerce detail text. */
html[dir="rtl"] body.single-product.mk-shell .mk-reference-page :is(.mk-pdp-highlights,.mk-pdp-details,.mk-detail-panel,.woocommerce-product-attributes,.woocommerce-product-attributes-item) {
  direction:rtl!important;text-align:right!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-highlights {
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  gap:9px!important;margin:0!important;padding:0!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-highlights > div {
  display:grid!important;grid-template-columns:minmax(80px,34%) minmax(0,1fr)!important;
  gap:12px!important;align-items:start!important;
  min-width:0!important;padding:11px 13px!important;
  background:#f5faf9!important;border:1px solid #e0efec!important;
  border-radius:10px!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-highlights :is(dt,dd) {
  display:block!important;float:none!important;
  width:auto!important;max-width:100%!important;margin:0!important;padding:0!important;
  min-width:0!important;overflow-wrap:break-word!important;white-space:normal!important;
  line-height:1.75!important;text-align:start!important;
}
body.single-product.mk-shell .mk-reference-page .mk-pdp-highlights dt {color:#53777b!important;font-weight:700!important;}
body.single-product.mk-shell .mk-reference-page .mk-pdp-highlights dd {color:#173b44!important;font-weight:750!important;}

/* One native set of product tabs, no blank label or horizontal whitespace gap. */
body.single-product.mk-shell .mk-reference-page .mk-pdp-details {
  width:100%!important;max-width:100%!important;
  box-sizing:border-box!important;padding:19px!important;
  margin-top:20px!important;min-width:0!important;
  overflow:visible!important;background:#fff!important;
}
body.single-product.mk-shell .mk-reference-page .mk-detail-tablist {
  display:flex!important;flex-wrap:wrap!important;
  flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;
  gap:9px!important;margin:0 0 15px!important;padding:0 0 13px!important;
  border-bottom:1px solid #e4eeeb!important;
  height:auto!important;min-height:0!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;
  visibility:visible!important;opacity:1!important;
  width:auto!important;min-width:110px!important;min-height:43px!important;
  padding:10px 16px!important;margin:0!important;
  border:1px solid #d6e8e5!important;border-radius:11px!important;
  background:#f4faf8!important;color:#175257!important;
  font-size:13px!important;font-weight:800!important;
  line-height:1.6!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:#0c8489!important;border-color:#0c8489!important;
}
body.single-product.mk-shell .mk-reference-page .mk-detail-panel {
  box-sizing:border-box!important;display:block;
  width:100%!important;max-width:none!important;min-width:0!important;
  margin:0!important;padding:18px!important;
  overflow:visible!important;color:#304d56!important;
  font-size:14px!important;line-height:1.95!important;
  text-align:start!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,ul,ol,table){width:auto;max-width:100%!important;text-align:start!important;}
body.single-product.mk-shell .mk-reference-page .mk-detail-panel table {width:100%!important;direction:inherit!important;border-collapse:collapse!important;}
body.single-product.mk-shell .mk-reference-page .mk-detail-panel table :is(th,td) {text-align:start!important;line-height:1.85!important;}
@media(max-width:719px){
  body.single-product.mk-shell .mk-reference-page .mk-detail-panel{padding:9px!important;}
  body.single-product.mk-shell .mk-reference-page .mk-detail-tablist [data-mk-tab] {flex:1 1 130px!important;min-width:0!important;padding:9px!important;}
}
