/* Modern Kitchen V5.2 — Sitewide Mobile Usability & Responsive Pass.
   Additive, reversible. No WooCommerce PHP, prices, or workflow changes.
   Precedence: intentionally loaded after all theme/MU styles. */
@media (max-width: 600px) {
 body.mk-luxury-v4 {--mk52-side:clamp(11px,3.2vw,17px)}
 /* Restore tappable premium mobile header without overlapping centered logo */
 body.mk-luxury-v4 .brando-header-inner {
  width:calc(100% - (var(--mk52-side) * 2))!important;
  max-width:none!important;min-width:0!important;
  height:72px!important;min-height:72px!important;
  display:block!important;position:relative!important;
  padding:0!important;margin-inline:auto!important;
 }
 body.mk-luxury-v4 .brando-header{
  min-height:72px!important;height:72px!important;
 }
 body.mk-luxury-v4 .brando-header-inner .brando-mobile-menu-toggle{
  width:44px!important;height:44px!important;min-width:44px!important;
  top:50%!important;right:0!important;left:auto!important;
  padding:10px!important;border-radius:11px!important;
  transform:translateY(-50%)!important;z-index:8!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
 }
 body.mk-luxury-v4 .brando-header-inner .brando-actions{
  position:absolute!important;left:0!important;right:auto!important;top:50%!important;
  transform:translateY(-50%)!important;display:flex!important;align-items:center!important;
  width:auto!important;min-width:0!important;margin:0!important;padding:0!important;
  gap:5px!important;direction:ltr!important;z-index:7!important;
 }
 /* Account/favorites keep their working destinations in the expanded mobile nav. */
 body.mk-luxury-v4 .brando-header-inner .brando-actions>a[aria-label="الحساب"],
 body.mk-luxury-v4 .brando-header-inner .brando-actions>a.header-wishlist-link{
  display:none!important;
 }
 body.mk-luxury-v4 .brando-header-inner .brando-actions>.header-icon{
  flex:0 0 42px!important;min-width:42px!important;width:42px!important;
  min-height:44px!important;height:44px!important;
  display:grid!important;place-items:center!important;
  padding:8px!important;border-radius:11px!important;
 }
 body.mk-luxury-v4 .brando-header-inner .brando-actions>.header-icon svg{
  width:21px!important;height:21px!important;
 }
 body.mk-luxury-v4 .brando-header-inner .brando-logo{
  position:absolute!important;left:calc(50% + 8px)!important;right:auto!important;
  top:50%!important;transform:translate(-50%,-50%)!important;
  z-index:6!important;max-width:calc(100% - 148px)!important;
  min-width:0!important;width:auto!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:0!important;margin:0!important;white-space:nowrap!important;
 }
 body.mk-luxury-v4 .brando-header-inner .brando-logo-main{
  gap:5px!important;justify-content:center!important;align-items:center!important;
  width:max-content!important;max-width:100%!important;white-space:nowrap!important;
 }
 body.mk-luxury-v4 .brando-header-inner .brando-logo-icon-img{
  flex:0 0 39px!important;width:39px!important;height:39px!important;
 }
 body.mk-luxury-v4 .brando-header-inner .modern-kitchen-brand{
  min-width:0!important;text-align:right!important;
 }
 body.mk-luxury-v4 .brando-header-inner .modern-kitchen-name{
  font-size:.97rem!important;line-height:1.35!important;gap:3px!important;
  font-weight:800!important;white-space:nowrap!important;
 }
 body.mk-luxury-v4 .brando-header-inner .modern-kitchen-tagline{
  font-size:.48rem!important;line-height:1.5!important;white-space:nowrap!important;
 }
 body.mk-luxury-v4 .brando-mobile-menu{
  width:min(340px,calc(100vw - 42px))!important;max-width:calc(100vw - 42px)!important;
  overscroll-behavior:contain;overflow-y:auto;
  padding-bottom:calc(24px + env(safe-area-inset-bottom))!important;
  background:linear-gradient(150deg,#23211d,#111611)!important;
  border-inline-start:1px solid rgba(242,170,106,.35)!important;
 }
 body.mk-luxury-v4 .brando-mobile-menu-head{
  min-height:68px!important;padding-block:14px!important;
  border-bottom:1px solid rgba(250,194,139,.19)!important;
 }
 body.mk-luxury-v4 .brando-mobile-menu-head strong{color:#ffdaae!important}
 body.mk-luxury-v4 .brando-mobile-menu-close{
  min-width:44px!important;min-height:44px!important;
  display:grid!important;place-items:center!important;
  color:#ffd0a5!important;
 }
 body.mk-luxury-v4 .brando-mobile-nav{
  display:flex!important;flex-direction:column!important;
  gap:5px!important;padding:13px 17px!important;
 }
 body.mk-luxury-v4 .brando-mobile-nav>a{
  min-height:47px!important;display:flex!important;align-items:center!important;
  padding:11px 15px!important;line-height:1.6!important;
  color:#f9e9da!important;background:rgba(255,255,255,.035);
  border:1px solid rgba(234,187,142,.14)!important;border-radius:11px!important;
  font-size:.87rem!important;text-decoration:none!important;
 }
 body.mk-luxury-v4 .brando-mobile-nav>a.active{
  background:rgba(240,166,96,.18)!important;border-color:#bd885c!important;color:#ffca8e!important;
 }
 body.mk-luxury-v4 .brando-mobile-nav>a.mk52-mobile-menu-link{
  color:#ffd1a6!important;border-color:rgba(241,174,117,.4)!important;
  background:rgba(194,111,55,.11);
 }
 body.mk-luxury-v4 .brando-mobile-nav>a.mk52-mobile-menu-link svg{
  width:21px;height:21px;flex:0 0 21px;margin-inline-end:10px;
  fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
 }
 body.mk-luxury-v4 .brando-search-overlay-inner{
  width:min(540px,calc(100vw - 28px))!important;
  max-width:calc(100vw - 28px)!important;margin-inline:auto!important;
 }
 body.mk-luxury-v4 .brando-search-overlay .brando-header-search-form{
  width:100%!important;min-width:0!important;
 }
 body.mk-luxury-v4 .brando-search-overlay .brando-header-search-form input[type=search]{
  min-width:0!important;max-width:100%!important;font-size:16px!important;
  min-height:48px!important;
 }
 body.mk-luxury-v4 .brando-search-overlay .brando-header-search-form button{
  min-height:46px!important;
 }
 /* Forms use iOS-friendly font size; preserve native validation/checkout logic. */
 body.mk-luxury-v4 :is(.woocommerce-checkout,.woocommerce-cart,.woocommerce-MyAccount-content,
   .woocommerce-account,.mk410-contact,.brando-shop-page,.brando-single-product,
   .brando-search-overlay,.brando-newsletter,.newsletter-inner)
   :is(input[type=text],input[type=email],input[type=search],input[type=tel],
       input[type=number],input[type=password],select,textarea){
  font-size:16px!important;max-width:100%;box-sizing:border-box;
 }
 body.mk-luxury-v4 .woocommerce-checkout :is(input,select,textarea),
 body.mk-luxury-v4 .woocommerce-cart :is(input,select,textarea){
  min-height:44px;
 }
 body.mk-luxury-v4 .woocommerce-checkout :is(#customer_details,.woocommerce-checkout-review-order){
  min-width:0!important;max-width:100%!important;
 }
 body.mk-luxury-v4 .woocommerce-checkout :is(.form-row-first,.form-row-last){
  float:none!important;width:100%!important;
 }
 /* Tables scroll inside their own area instead of expanding the viewport. */
 body.mk-luxury-v4 .woocommerce-cart-form{
  max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch;
 }
 body.mk-luxury-v4 .woocommerce-cart .cart-collaterals,
 body.mk-luxury-v4 .woocommerce-cart .cart_totals{
  max-width:100%!important;min-width:0!important;
 }
 body.mk-luxury-v4 .woocommerce :is(.woocommerce-message,.woocommerce-error,.woocommerce-info){
  box-sizing:border-box;max-width:100%!important;overflow-wrap:anywhere;
 }
 body.mk-luxury-v4 .woocommerce a.button,
 body.mk-luxury-v4 .woocommerce button.button,
 body.mk-luxury-v4 .woocommerce input.button{min-height:44px}
 /* On compact mobile, chat launchers remain separate and reachable, but don't dominate CTA/cards. */
 body.mk-luxury-v4{--mka-stack-right:12px;--mka-wa-bottom:max(12px,calc(env(safe-area-inset-bottom) + 11px));--mka-avatar-bottom:calc(var(--mka-wa-bottom) + 62px)}
 body.mk-luxury-v4 #mka-launch{
  width:54px!important;height:54px!important;right:10px!important;
  bottom:var(--mka-avatar-bottom)!important;border-width:2px!important;
 }
 body.mk-luxury-v4 #mka-launch .mka-status-dot{
  width:13px!important;height:13px!important;border-width:2px!important;
 }
 body.mk-luxury-v4 a.mkv4-whatsapp-float{
  width:50px!important;height:50px!important;right:12px!important;
  bottom:var(--mka-wa-bottom)!important;border-width:2px!important;
 }
 body.mk-luxury-v4 a.mkv4-whatsapp-float svg{width:28px!important;height:28px!important}
 body.mk-luxury-v4 .mka-avatar-welcome{
  right:72px!important;bottom:calc(var(--mka-avatar-bottom) + 2px)!important;
  max-width:calc(100vw - 89px)!important;
 }
 body.mk-luxury-v4 #mka-panel.mka-panel{
  right:10px!important;width:calc(100vw - 20px)!important;
  bottom:calc(var(--mka-avatar-bottom) + 62px)!important;
  max-height:calc(100dvh - (var(--mka-avatar-bottom) + 76px))!important;
 }
 /* The nav or search overlay must be unobstructed by floating widgets. */
 body.mk-luxury-v4:has(.brando-mobile-menu.active) :is(#mka-launch,#mka-panel,.mkv4-whatsapp-float,.mka-avatar-welcome),
 body.mk-luxury-v4:has(.brando-search-overlay.active) :is(#mka-launch,#mka-panel,.mkv4-whatsapp-float,.mka-avatar-welcome){
  visibility:hidden!important;opacity:0!important;pointer-events:none!important;
 }
}
@media (max-width:359px){
 body.mk-luxury-v4 .brando-header-inner .modern-kitchen-name{font-size:.83rem!important}
 body.mk-luxury-v4 .brando-header-inner .modern-kitchen-tagline{font-size:.44rem!important}
 body.mk-luxury-v4 .brando-header-inner .brando-logo-icon-img{
  flex-basis:37px!important;width:37px!important;height:37px!important;
 }
 body.mk-luxury-v4 .brando-header-inner .brando-logo{left:calc(50% + 11px)!important}
 body.mk-luxury-v4 .brando-header-inner .brando-actions>.header-icon{width:40px!important;min-width:40px!important;flex-basis:40px!important}
}
/* Responsive readable hero CTAs and scroll snap product galleries. */
@media (max-width:767px){
 body.mk-luxury-v4 .brando-home .home-categories-grid,
 body.mk-luxury-v4 .brando-home .home-products-grid,
 body.mk-luxury-v4 .brando-related-grid,
 body.mk-luxury-v4 .shop-products-area ul.products{
  min-width:0!important;
 }
 body.mk-luxury-v4 .brando-home .home-product-cart :is(button,a),
 body.mk-luxury-v4 .shop-products-area li.product a.button,
 body.mk-luxury-v4 .brando-single-product .single_add_to_cart_button{
  min-height:44px!important;
 }
 body.mk-luxury-v4 .brando-shop-page .shop-sort select{min-height:44px!important}
 body.mk-luxury-v4 .brando-related-grid>*,body.mk-luxury-v4 .home-products-grid>*{
  min-width:0!important;
 }
 body.mk-luxury-v4 .brando-footer :is(a,button){touch-action:manipulation}
}
@media (prefers-reduced-motion:reduce){
 body.mk-luxury-v4 .brando-header-inner *,body.mk-luxury-v4 .brando-mobile-nav>a{
  transition:none!important;animation:none!important;
 }
}

/* Extend overlay protection to tablet/mobile-menu breakpoint. */
@media (min-width:601px) and (max-width:1279px){
 body.mk-luxury-v4:has(.brando-mobile-menu.active) :is(#mka-launch,#mka-panel,.mkv4-whatsapp-float,.mka-avatar-welcome),
 body.mk-luxury-v4:has(.brando-search-overlay.active) :is(#mka-launch,#mka-panel,.mkv4-whatsapp-float,.mka-avatar-welcome){
  visibility:hidden!important;opacity:0!important;pointer-events:none!important;
 }
}

/* Prevent Safari's automatic input-focus zoom everywhere on compact phones. */
@media(max-width:600px){
 body.mk-luxury-v4 input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=range]):not([type=color]),
 body.mk-luxury-v4 select,
 body.mk-luxury-v4 textarea{
  font-size:16px!important;
 }
 body.mk-luxury-v4 .brando-topbar-inner .mk-reference-topbar-feature:first-child{
  min-width:0!important;flex:1 1 auto!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
 }
 body.mk-luxury-v4 .brando-topbar-inner .mk-reference-offer-pill{flex:0 0 auto!important}
}
