/* Focused final adjustments only: homepage hero distance, store header, desktop PDP.
 * No changes to WooCommerce cart/login logic or other widgets. */

/* Bring the image campaigns closer to the navigation bar, preserving room for focus outlines. */
body.home.mk-shell #mk-main .mk-home {
  padding-top:8px !important;
}
body.home.mk-shell #mk-main .mk-home > .atiie-hs.atiie-hs--raster,
body.home.mk-shell #mk-main .mk-home .atiie-hs.atiie-hs--raster {
  padding-top:0 !important;
  margin-top:0 !important;
  margin-bottom:18px !important;
}
@media(max-width:767px){
  body.home.mk-shell #mk-main .mk-home {padding-top:6px !important;}
}

/* Keep the three desktop columns, using less space on the buy panel and gallery;
   the middle product explanation gets the extra width. */
@media(min-width:1120px){
  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.62fr) minmax(250px,.80fr) !important;
    gap:clamp(12px,1.2vw,18px) !important;
    padding:clamp(12px,1.15vw,18px) !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;min-width:0 !important;
  }
  body.single-product.mk-shell .mk-reference-page .mk-pdp-top > .mk-pdp-info {
    grid-column:2 !important;grid-row:1 !important;min-width:0 !important;
  }
  body.single-product.mk-shell .mk-reference-page .mk-pdp-top > .mk-pdp-purchase {
    grid-column:3 !important;grid-row:1 !important;min-width:0 !important;
    position:sticky !important;
  }
  body.single-product.mk-shell .mk-reference-page .mk-pdp-info :is(.mk-reference-overview,.mk-reference-delivery,.mk-pdp-quick-specs) {
    min-width:0 !important;
    max-width:100% !important;
  }
}
/* Keep a 3-column layout on common laptop widths where it can fit.
   Below 980px, allow the established tablet layout to take over. */
@media(min-width:980px) and (max-width:1119px){
  body.single-product.mk-shell .mk-reference-page .mk-pdp.mk-reference-pdp > .mk-pdp-top {
    grid-template-columns:minmax(0,.95fr) minmax(0,1.40fr) minmax(218px,.72fr) !important;
    gap:12px !important;
    padding:12px !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;
  }
  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:static !important;
  }
}
/* Ensure Arabic headings, descriptions and specifications have breathing room. */
body.single-product.mk-shell .mk-reference-page .mk-pdp-info,
body.single-product.mk-shell .mk-reference-page .mk-pdp-info :is(p,h1,h2,h3,li,dt,dd,th,td) {
  direction:rtl;
  text-align:right;
  overflow-wrap:break-word;
  line-height:1.65;
}

/* Airier, reference-inspired header without repainting cart or site-wide widget cards. */
body.mk-shell .mk-header .mk-search {
  border-radius:12px !important;
  background:#f5f9fa !important;
  border:1px solid #e0ebec !important;
  overflow:hidden;
}
body.mk-shell .mk-header .mk-search > button {
  background:#087a82 !important;
  color:#fff !important;
  height:100% !important;
  min-width:51px !important;
  border-radius:0 !important;
}
body.mk-shell .mk-header .mk-search input[type="search"] {
  background:transparent !important;
  text-overflow:ellipsis;
}
body.mk-shell .mk-header .mk-nav .mk-nav-links > a,
body.mk-shell .mk-header .mk-nav .mk-nav-links > li > a {
  color:#17484f !important;
  font-weight:750 !important;
}
body.mk-shell .mk-header .mk-nav .mk-categories-button {
  background:#075d64 !important;
  border-color:#075d64 !important;
}

/* Matching lightweight outline icons in the dynamic category navigation. */
body.mk-shell .mk-header .mk-nav .mk-nav-links > a {
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  gap:7px;
  text-decoration:none;
}
body.mk-shell .mk-header .mk-nav .mk-nav-links > a > .mk-nav-cat-icon {
  display:block;
  flex:0 0 19px;
  width:19px;
  height:19px;
  min-width:19px;
  color:#08747d;
  stroke-width:1.75;
}


/* Category family icons: color-coded teal / amber / blue, scoped to the home header. */
body.mk-shell .mk-header .mk-nav .mk-nav-links > a.mk-nav-category-link{--mk-family-color:#087d84;--mk-family-bg:#e7f6f3;gap:6px;}
body.mk-shell .mk-header .mk-nav .mk-nav-links > a.mk-nav-category-link > .mk-nav-cat-icon{
  color:var(--mk-family-color)!important;
  background:var(--mk-family-bg)!important;
  border-radius:7px;padding:3px;box-sizing:content-box;
  width:17px;height:17px;flex:0 0 17px;min-width:17px;
  stroke:currentColor;stroke-width:1.85;transition:background .18s ease,color .18s ease;
}
body.mk-shell .mk-header .mk-nav .mk-nav-links > a.mk-nav-category-link:hover > .mk-nav-cat-icon{
  background:var(--mk-family-color)!important;color:#fff!important;
}
body.mk-shell .mk-header .mk-nav .mk-nav-family-phones,
body.mk-shell .mk-header .mk-nav .mk-nav-family-tablets{--mk-family-color:#089e9c;--mk-family-bg:#dff7f5}
body.mk-shell .mk-header .mk-nav .mk-nav-family-computers,
body.mk-shell .mk-header .mk-nav .mk-nav-family-electronics,
body.mk-shell .mk-header .mk-nav .mk-nav-family-network{--mk-family-color:#3569c8;--mk-family-bg:#eaf1ff}
body.mk-shell .mk-header .mk-nav .mk-nav-family-audio{--mk-family-color:#078eaf;--mk-family-bg:#e0f6fb}
body.mk-shell .mk-header .mk-nav .mk-nav-family-beauty,
body.mk-shell .mk-header .mk-nav .mk-nav-family-fashion,
body.mk-shell .mk-header .mk-nav .mk-nav-family-accessories{--mk-family-color:#b76a19;--mk-family-bg:#fff0d9}
body.mk-shell .mk-header .mk-nav .mk-nav-family-home,
body.mk-shell .mk-header .mk-nav .mk-nav-family-appliances,
body.mk-shell .mk-header .mk-nav .mk-nav-family-grocery{--mk-family-color:#21836d;--mk-family-bg:#e6f5ed}
body.mk-shell .mk-header .mk-nav .mk-nav-family-kids,
body.mk-shell .mk-header .mk-nav .mk-nav-family-gaming,
body.mk-shell .mk-header .mk-nav .mk-nav-family-sports{--mk-family-color:#a05bb5;--mk-family-bg:#f5eafb}
body.mk-shell .mk-header .mk-nav .mk-nav-family-wearables,
body.mk-shell .mk-header .mk-nav .mk-nav-family-watches{--mk-family-color:#ba6b24;--mk-family-bg:#fff1e1}
@media(max-width:767px){body.mk-shell .mk-header .mk-nav .mk-nav-links>a.mk-nav-category-link>.mk-nav-cat-icon{width:15px;height:15px;min-width:15px;flex-basis:15px;padding:2px}}

/* Dynamic navigation: each category gets a clearly distinct icon accent.
   Tone classes are added by the existing category renderer (no icon libraries). */
body.mk-shell .mk-header .mk-nav .mk-nav-links>a.mk-nav-category-link.mk-nav-tone-1{--mk-family-color:#d17a12;--mk-family-bg:#fff0d7}
body.mk-shell .mk-header .mk-nav .mk-nav-links>a.mk-nav-category-link.mk-nav-tone-2{--mk-family-color:#078e92;--mk-family-bg:#dff5f1}
body.mk-shell .mk-header .mk-nav .mk-nav-links>a.mk-nav-category-link.mk-nav-tone-3{--mk-family-color:#8355ba;--mk-family-bg:#f0e8fb}
body.mk-shell .mk-header .mk-nav .mk-nav-links>a.mk-nav-category-link.mk-nav-tone-4{--mk-family-color:#316cc4;--mk-family-bg:#e7effd}
body.mk-shell .mk-header .mk-nav .mk-nav-links>a.mk-nav-category-link.mk-nav-tone-5{--mk-family-color:#d05471;--mk-family-bg:#fdebf1}
body.mk-shell .mk-header .mk-nav .mk-nav-links>a.mk-nav-category-link.mk-nav-tone-6{--mk-family-color:#10875b;--mk-family-bg:#e0f5eb}
body.mk-shell .mk-header .mk-nav .mk-nav-links>a.mk-nav-category-link.mk-nav-tone-7{--mk-family-color:#b87319;--mk-family-bg:#fff2dd}
