/* MarketKit 1.4.6 — mobile-first finishing layer.
 * Loaded after the media, identity and journey assets. Scoped to the child
 * storefront so WoodMart's default pages and Elementor editing stay untouched.
 * Native WooCommerce interactions, real prices and variation data stay intact.
 */
@media (max-width: 768px) {
  :root { --mk-mobile-nav-height: 65px; --mk-mobile-gutter: clamp(12px, 3.65vw, 18px); }
  body.mk-shell { overflow-x: clip; background: #f7f8fb; -webkit-tap-highlight-color: transparent; }
  body.mk-shell :is(.mk-main, .mk-home, .mk-section, .mk-module, .mk-product-card, .mk-pdp, .mk-commerce-content, .mk-account-layout) { min-width: 0; }
  body.mk-shell .mk-container { padding-inline: var(--mk-mobile-gutter); }
  body.mk-shell .mk-main > .mk-container,
  body.mk-shell .mk-main > .mk-container.mk-home { padding-inline: var(--mk-mobile-gutter) !important; }
  body.mk-shell :is(img, video, iframe) { max-width: 100%; }
  body.mk-shell :is(.mk-main, .mk-module, .mk-section) { overflow-wrap: break-word; }

  /* Stable two-row compact header. Do not alter externally configured headers. */
  body.mk-shell:not(.mk49-app) > .mk-header { box-shadow: 0 2px 14px rgb(31 41 55 / 7%); }
  body.mk-shell:not(.mk49-app):not(.mk-identity) .mk-header-main { display: grid !important; grid-template-columns: minmax(0,1fr) auto !important; grid-template-rows: auto auto !important; align-items: center !important; gap: 10px 12px !important; min-height: 0 !important; height: auto !important; padding-block: 10px 12px !important; margin: 0 auto !important; }
  body.mk-shell:not(.mk49-app):not(.mk-identity) .mk-header-main > .mk-brand { grid-column: 1 !important; grid-row: 1 !important; max-width: min(44vw, 160px) !important; min-width: 0 !important; font-size: clamp(20px,5.6vw,27px) !important; overflow: visible; }
  body.mk-shell:not(.mk49-app) .mk-brand .mk-logo { display: block; width: auto; max-width: min(44vw,150px) !important; max-height: 38px !important; object-fit: contain; }
  body.mk-shell:not(.mk49-app):not(.mk-identity) .mk-header-main > .mk-header-actions { grid-column: 2 !important; grid-row: 1 !important; justify-self: end; gap: 12px !important; }
  body.mk-shell:not(.mk49-app) .mk-header-main .mk-header-action { width: 44px; height: 44px; min-height: 44px; display: grid; place-items: center; padding: 0 !important; background: rgb(255 255 255 / 44%); border: 1px solid rgb(0 0 0 / 8%) !important; border-radius: 13px; }
  body.mk-shell:not(.mk49-app) .mk-header-main .mk-header-action > .mk-icon { width: 21px; height: 21px; }
  body.mk-shell:not(.mk49-app) .mk-header-main .mk-header-action :is(.mk-cart-count,.mk-local-count) { inset-block-start: 0; inset-inline-end: -3px; min-width: 17px; height: 17px; padding: 2px 3px; }
  body.mk-shell:not(.mk49-app):not(.mk-identity) .mk-header-main > .mk-search { grid-column: 1 / -1 !important; grid-row: 2 !important; width: 100% !important; min-width: 0 !important; height: 45px !important; margin: 0 !important; border: 1px solid #e8eaf1 !important; border-radius: 13px !important; background: white !important; box-shadow: 0 2px 7px rgb(30 45 75 / 6%); }
  body.mk-shell:not(.mk49-app) .mk-header-main > .mk-search input[type=search] { font-size: 16px !important; min-width: 0; border: 0 !important; padding-inline: 14px !important; }
  body.mk-shell:not(.mk49-app) .mk-header-main > .mk-search button { min-width: 46px; min-height: 44px; border-radius: 13px; }
  body.mk-shell:not(.mk49-app) .mk-header-main > .mk-search .mk-search-results { border-radius: 13px; max-height: min(52dvh,420px); box-shadow: 0 16px 35px rgb(21 40 73 / 19%); }
  /* The mobile bottom tab opens the same categories panel; keep its host in
     layout (display:none would hide the whole panel), but remove duplicate nav. */
  body.mk-shell:not(.mk49-app) .mk-header > .mk-nav { display: block !important; height: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
  body.mk-shell:not(.mk49-app) .mk-header > .mk-nav > .mk-nav-inner { height: 0 !important; min-height: 0 !important; padding-block: 0 !important; }
  body.mk-shell:not(.mk49-app) .mk-header > .mk-nav .mk-nav-inner > :is(.mk-categories-button,.mk-nav-links,.mk-deals-link) { display: none !important; }
  body.mk-shell:not(.mk49-app) .mk-mega { inset: var(--mk-admin-offset,0px) auto 0 0 !important; width: min(92vw, 390px) !important; max-height: calc(100dvh - var(--mk-admin-offset,0px)) !important; height: calc(100dvh - var(--mk-admin-offset,0px)) !important; padding: 22px 18px calc(20px + env(safe-area-inset-bottom)) !important; overflow-y: auto; border-radius: 0 20px 20px 0 !important; box-shadow: 8px 0 45px rgb(25 38 66 / 21%); }
  body.mk-shell:not(.mk49-app) .mk-mega-heading { margin-bottom: 18px; }
  body.mk-shell:not(.mk49-app) .mk-mega-heading strong { font-size: 19px; }
  body.mk-shell:not(.mk49-app) .mk-mega-columns { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 12px; }
  body.mk-shell:not(.mk49-app) .mk-mega a { min-height: 37px; display: inline-flex; align-items: center; line-height: 1.55; }

  /* Deliberate, thumb-friendly five-tab bar with direct cart access. */
  body.mk-shell:not(.mk49-app) .mk-mobile-nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); align-items: stretch; gap: 3px; position: fixed; inset-inline: 0; bottom: 0; z-index: 85; min-height: var(--mk-mobile-nav-height); padding: 6px 7px calc(6px + env(safe-area-inset-bottom)); background: rgb(255 255 255 / 98%); border-top: 1px solid #e9edf5; box-shadow: 0 -6px 28px rgb(28 43 70 / 10%); backdrop-filter: blur(12px); }
  body.mk-shell:not(.mk49-app) .mk-mobile-nav > :is(a,button) { position: relative; display: flex; flex-direction: column; gap: 3px; align-items: center; justify-content: center; min-width: 0; min-height: 51px; padding: 4px 2px !important; margin: 0; border: 0 !important; border-radius: 12px; background: transparent !important; color: #78849b; font: 600 10px/1.25 var(--mk-font,Tajawal,sans-serif); text-decoration: none; cursor: pointer; }
  body.mk-shell:not(.mk49-app) .mk-mobile-nav > :is(a,button) .mk-icon { width: 22px; height: 22px; min-width: 22px; }
  body.mk-shell:not(.mk49-app) .mk-mobile-nav > :is(a,button)[aria-current=page],
  body.mk-shell:not(.mk49-app) .mk-mobile-nav > :is(a,button)[aria-expanded=true] { background: #e6f5f3 !important; color: #087e82 !important; font-weight: 800; }
  body.mk-shell:not(.mk49-app) .mk-mobile-nav > .mk-mobile-cart { color: #18365d !important; }
  body.mk-shell:not(.mk49-app) .mk-mobile-nav > .mk-mobile-cart .mk-mobile-cart-icon { width: 38px; height: 31px; display: grid; place-items: center; background: #fff5b8; border: 1px solid #efdf72; border-radius: 12px; }
  body.mk-shell:not(.mk49-app) .mk-mobile-nav > .mk-mobile-cart .mk-icon { width: 21px; height: 21px; min-width: 21px; }
  body.mk-shell:not(.mk49-app) .mk-mobile-nav .mk-cart-count { position: absolute; inset-block-start: 0; inset-inline-end: max(5px,18%); min-width: 18px; height: 18px; background: #087e82; font-size: 10px; border: 2px solid #fff; }
  body.mk-panel-open.mk-shell:not(.mk49-app) .mk-mobile-nav { pointer-events: none; }
  body.mk-shell .mk-main { padding-bottom: 4px; }
  body.mk-shell:not(.mk49-app) :is(.mk-footer,.mk-template-footer) { padding-bottom: calc(var(--mk-mobile-nav-height) + env(safe-area-inset-bottom)) !important; }
  body.mk-shell:not(.mk49-app) .mk-whatsapp { bottom: calc(var(--mk-mobile-nav-height) + 15px + env(safe-area-inset-bottom)) !important; inset-inline-end: 13px; width: 42px; height: 42px; }
  body.mk-shell:not(.mk49-app) .mk-toast { bottom: calc(var(--mk-mobile-nav-height) + 18px + env(safe-area-inset-bottom)) !important; }
  body.mk-shell :is(a,button,input,select,textarea):focus-visible { outline: 2px solid var(--mk-focus,#087f85); outline-offset: 2px; }

  /* Storefront visual rhythm. Keep artwork/banner intrinsic aspect ratios. */
  body.mk-shell .mk-home { padding-block: 13px 22px !important; gap: 17px !important; }
  body.mk-shell .mk-section { margin-bottom: 17px !important; }
  body.mk-shell .mk-section-heading { align-items: center; gap: 10px; margin-bottom: 12px !important; min-width: 0; }
  body.mk-shell .mk-section-heading > h2 { min-width: 0; font-size: clamp(17px,4.8vw,21px) !important; line-height: 1.45; font-weight: 800; }
  body.mk-shell .mk-section-heading .mk-view-all { flex: none; display: inline-flex; align-items: center; min-height: 38px; border-radius: 11px; padding: 7px 10px; font-size: 11px; background: #fff; }
  body.mk-shell .mk-module > .mk-section, body.mk-shell .mk-module .mk-products-section { min-width: 0; }
  body.mk-shell :is(.mk-hero-layout,.mk-hero-main,.mk-hero-side,.mk-context-artwork,.mk-campaign) { min-width: 0; max-width: 100%; }
  body.mk-shell :is(.mk-hero-slide,.mk-campaign,.mk-collection) { border-radius: 16px !important; }
  body.mk-shell .mk-hero-layout.mk-hero-visual-v70 { row-gap: 10px !important; margin-bottom: 24px !important; }
  body.mk-shell .mk-hero-visual-v70 > .mk-hero-pagination { min-height: 22px; }
  body.mk-shell .mk-hero-layout .mk-slider-controls :is(button,.mk-icon-button) { min-width: 34px; min-height: 34px; }
  body.mk-shell .mk-category-rail { gap: 12px !important; padding-block: 5px 8px; scroll-snap-type: x proximity; scroll-padding-inline: 9px; overscroll-behavior-inline: contain; scrollbar-width: none; }
  body.mk-shell .mk-category-rail > .mk-category { scroll-snap-align: start; }
  body.mk-shell .mk-category-image { border-radius: 15px !important; aspect-ratio: 1; }
  body.mk-shell .mk-category strong { font-size: 11px !important; line-height: 1.45; }

  /* Exactly two easy-to-scan product columns on a phone; a hint of the next
     item on horizontal rails. No forced widths on Elementor's custom banners. */
  body.mk-shell :is(.mk-products-grid:not(.mk-products-rail),.mk-catalog-grid),
  body.mk-shell .mk-module .mk-products-grid:not(.mk-products-rail) { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px !important; }
  body.mk-shell .mk-products-grid.mk-products-rail,
  body.mk-shell .mk-module .mk-products-grid.mk-products-rail { display: grid !important; grid-template-columns: none !important; grid-auto-flow: column !important; grid-auto-columns: calc((100% - 12px) / 2.13) !important; gap: 10px !important; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-padding-inline: 9px; padding: 3px 1px 9px; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  /* Override the legacy !important :not(...) rail sizing with enough
     specificity to reveal part of the next card on mobile. */
  body.mk-shell :is(.mk-section,.mk-module) .mk-products-grid.mk-products-rail:not(.mk-discovery-panel .mk-products-rail) { grid-template-columns: none !important; grid-auto-columns: calc((100% - 12px) / 2.13) !important; gap: 10px !important; }
  body.mk-shell .mk-products-rail::-webkit-scrollbar, body.mk-shell .mk-category-rail::-webkit-scrollbar { display: none; }
  body.mk-shell .mk-product-card, body.mk-shell .mk-module .mk-product-card { min-width: 0 !important; border: 1px solid #e8ecf3 !important; border-radius: 16px !important; background: #fff !important; box-shadow: 0 3px 13px rgb(33 53 86 / 5%); overflow: hidden; }
  body.mk-shell .mk-product-card .mk-product-image,
  body.mk-shell .mk-module .mk-product-card .mk-product-image { height: auto !important; min-height: 0 !important; aspect-ratio: 1 / 1 !important; padding: 12px !important; background: #fff; display: grid; place-items: center; }
  body.mk-shell .mk-product-card .mk-product-photo-link { display: block; height: 100%; width: 100%; min-width: 0; }
  body.mk-shell .mk-product-card .mk-product-photo-link img { width: 100%; height: 100% !important; max-height: 100% !important; object-fit: contain !important; }
  body.mk-shell .mk-product-card .mk-card-actions { top: 8px !important; inset-inline-end: 7px !important; gap: 5px !important; }
  body.mk-shell .mk-product-card .mk-card-actions .mk-card-action,
  body.mk-shell .mk-product-card .mk-card-action-cart a.mk-native-cart { width: 33px !important; height: 33px !important; min-width: 33px !important; min-height: 33px !important; padding: 7px !important; background: rgb(255 255 255 / 95%) !important; box-shadow: 0 2px 8px rgb(14 30 55 / 9%); }
  body.mk-shell .mk-product-card .mk-card-actions .mk-card-action-cart a.mk-native-cart { color: #3a3a3a !important; }
  body.mk-shell .mk-product-card .mk-sale-badge { top: 8px !important; inset-inline-start: 7px !important; max-width: calc(100% - 46px); font-size: 10px !important; border-radius: 7px !important; }
  body.mk-shell .mk-product-card .mk-product-copy,
  body.mk-shell .mk-module .mk-product-card .mk-product-copy { padding: 10px !important; gap: 4px; }
  body.mk-shell .mk-product-card .mk-product-copy > h3,
  body.mk-shell .mk-module .mk-product-card .mk-product-copy > h3 { font-size: 12px !important; font-weight: 600 !important; line-height: 1.55 !important; height: 39px !important; min-height: 39px !important; max-height: 39px !important; margin: 0 0 3px !important; }
  body.mk-shell .mk-product-card .mk-card-description { display: none !important; }
  body.mk-shell .mk-product-card .mk-product-rating { min-height: 15px; margin: 1px 0 0; }
  body.mk-shell .mk-product-card .mk-card-price-wrap { margin-top: auto !important; padding-top: 2px !important; }
  body.mk-shell .mk-product-card .mk-price,
  body.mk-shell .mk-module .mk-card-v6 .mk-price { font-size: clamp(15px,4.45vw,19px) !important; min-height: 0 !important; line-height: 1.45 !important; font-weight: 800 !important; }
  body.mk-shell .mk-product-card .mk-price del { font-size: 11px !important; }
  body.mk-shell .mk-product-card .mk-card-discount-note { display: flex; gap: 3px; flex-wrap: wrap; }
  body.mk-shell .mk-product-card .mk-card-discount-badge,
  body.mk-shell .mk-product-card .mk-card-saving-badge { font-size: 9px !important; }
  body.mk-shell .mk-product-card .mk-product-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px; margin: 3px 0 !important; }
  body.mk-shell .mk-product-card .mk-card-preview { min-height: 30px; display: inline-flex; align-items: center; font-size: 10px; }
  body.mk-shell .mk-product-card .mk-card-detail { min-height: 36px; padding-top: 7px; font-size: 11px; }

  /* Catalogue filters must remain a usable full-height drawer. */
  body.mk-shell .mk-catalog-heading { margin-block: 8px 13px; }
  body.mk-shell .mk-catalog-heading h1 { font-size: clamp(21px,6vw,27px) !important; line-height: 1.45; }
  body.mk-shell .mk-catalog-toolbar { gap: 9px !important; min-height: 50px; margin-bottom: 12px !important; padding-block: 7px 11px !important; }
  body.mk-shell .mk-catalog-toolbar .mk-result-count { flex: 1 1 70px; min-width: 0; }
  body.mk-shell .mk-catalog-sort { min-width: 0; max-width: 54%; }
  body.mk-shell .mk-catalog-sort select.orderby { width: 100% !important; height: 43px !important; min-height: 43px !important; padding: 8px 8px !important; font-size: 12px !important; border-radius: 11px !important; }
  body.mk-shell .mk-filter-toggle { min-height: 43px !important; border-radius: 11px; font-size: 12px !important; padding: 9px 12px !important; }
  body.mk-shell .mk-filters.is-open { width: min(90vw,390px) !important; max-width: 100vw !important; padding: 0 !important; border-radius: 0 18px 18px 0 !important; }
  body.mk-shell .mk-filter-heading { padding: 18px 16px !important; }
  body.mk-shell .mk-filters :is(input[type=number],input[type=text],select) { font-size: 16px !important; }
  body.mk-shell .mk-breadcrumbs { padding-block: 12px !important; font-size: 11px; }
  body.mk-shell .mk-breadcrumbs ol { gap: 6px; }

  /* PDP: no sticky image, no squeezed text; touch-friendly variation controls. */
  body.mk-shell:not(.mk49-app) .mk-pdp-page { padding-bottom: calc(26px + var(--mk-mobile-nav-height)) !important; }
  body.mk-shell .mk-pdp { max-width: 100%; min-width: 0; }
  body.mk-shell .mk-pdp .mk-pdp-top { grid-template-columns: minmax(0,1fr) !important; gap: 14px !important; padding: 0 0 16px !important; }
  body.mk-shell .mk-pdp .mk-pdp-gallery { position: static !important; top: auto !important; max-width: 100%; min-width: 0; }
  body.mk-shell .mk-pdp .mk-gallery { grid-template-columns: minmax(0,1fr) !important; gap: 8px; }
  body.mk-shell .mk-pdp .mk-gallery-stage { width: 100%; height: min(85vw,390px) !important; min-height: 235px !important; padding: 14px !important; border: 1px solid #edf0f5; border-radius: 17px; }
  body.mk-shell .mk-pdp .mk-gallery-stage > .mk-gallery-main { max-height: 100% !important; object-fit: contain !important; }
  body.mk-shell .mk-pdp .mk-gallery-thumbs { order: 2; flex-direction: row; align-items: center; justify-content: flex-start; max-width: 100%; max-height: none; overflow-x: auto; overflow-y: hidden; padding-block: 4px 7px; scrollbar-width: none; scroll-snap-type: x proximity; }
  body.mk-shell .mk-pdp .mk-gallery-thumb { min-width: 59px; width: 59px; height: 65px; border-radius: 11px; scroll-snap-align: start; }
  body.mk-shell .mk-pdp .mk-pdp-info { min-width: 0; padding-block: 4px; }
  body.mk-shell .mk-pdp .mk-pdp-title { font-size: clamp(19px,5.6vw,24px) !important; line-height: 1.55 !important; font-weight: 700 !important; }
  body.mk-shell .mk-pdp .mk-pdp-price { font-size: clamp(24px,7vw,30px) !important; }
  body.mk-shell .mk-pdp .mk-pdp-rating { flex-wrap: wrap; row-gap: 5px; margin-block: 8px 12px; }
  body.mk-shell .mk-pdp :is(.mk-pdp-short-description,.mk-pdp-description,.mk-reference-overview) { line-height: 1.8; overflow-wrap: anywhere; }
  body.mk-shell .mk-pdp .mk-pdp-purchase { position: static !important; min-width: 0 !important; width: 100% !important; padding: 0 !important; }
  body.mk-shell .mk-pdp .mk-buybox { width: 100%; min-width: 0; border-radius: 16px !important; padding: 15px !important; margin: 0 !important; border: 1px solid #e8edf5 !important; box-shadow: none !important; }
  body.mk-shell .mk-pdp .mk-buybox .variations { max-width: 100% !important; }
  body.mk-shell .mk-buybox :is(.mk-swatch-group,.mk-variation-chips) { gap: 8px !important; }
  body.mk-shell .mk-buybox :is(.mk-swatch-button,.mk-variation-chips button) { min-height: 44px !important; min-width: 44px !important; }
  body.mk-shell .mk-buybox :is(.single_add_to_cart_button,button[type=submit]) { min-height: 50px !important; border-radius: 12px !important; font-size: 14px !important; }
  body.mk-shell .mk-pdp .mk-reference-delivery-card { min-width: 0; flex-wrap: wrap; }
  body.mk-shell .mk-pdp .mk-pdp-highlights { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.mk-shell .mk-pdp-details { min-width: 0; padding-inline: 12px !important; border-radius: 15px !important; }
  body.mk-shell .mk-pdp-details .mk-detail-tablist { display: flex; flex-wrap: nowrap !important; overflow-x: auto !important; scroll-snap-type: x proximity; gap: 18px !important; scrollbar-width: none; }
  body.mk-shell .mk-detail-tablist > button { flex: none; min-height: 48px !important; scroll-snap-align: start; }
  body.mk-shell .mk-pdp-details .mk-detail-panel { padding-block: 17px; min-width: 0; overflow-wrap: anywhere; }
  body.mk-shell .mk-pdp-details .mk-detail-panel :is(table,pre) { max-width: 100%; }
  body.mk-shell .mk-pdp-details .mk-detail-panel table { display: block; overflow-x: auto; }
  body.mk-shell:not(.mk49-app) .mk-pdp-sticky-buy[hidden] { display: none !important; }
  body.mk-shell:not(.mk49-app) .mk-pdp-sticky-buy:not([hidden]) { bottom: calc(var(--mk-mobile-nav-height) + env(safe-area-inset-bottom)) !important; padding: 9px var(--mk-mobile-gutter) !important; display: grid !important; grid-template-columns: minmax(0,1fr) minmax(125px,auto) !important; align-items: center; gap: 6px 10px !important; z-index: 84 !important; box-shadow: 0 -7px 24px rgb(36 55 84 / 13%) !important; }
  body.mk-shell:not(.mk49-app) .mk-pdp-sticky-buy .mk-sticky-product { grid-column: 1; min-width: 0; }
  body.mk-shell:not(.mk49-app) .mk-pdp-sticky-buy .mk-sticky-product strong { max-width: 38vw; font-size: 11px; }
  body.mk-shell:not(.mk49-app) .mk-pdp-sticky-buy > .mk-price { grid-column: 1; font-size: 15px !important; line-height: 1.3; }
  body.mk-shell:not(.mk49-app) .mk-pdp-sticky-buy > .mk-button { grid-column: 2; grid-row: 1/3; min-width: 0 !important; width: 100%; min-height: 47px; padding: 9px 10px; border-radius: 11px; }

  /* Keep native product quick view centered; preserve its real WooCommerce form. */
  body.mk-shell .mk-quick-dialog[open], .mk-quick-dialog[open] {
    position:fixed!important;inset:0!important;top:0!important;bottom:0!important;
    left:0!important;right:0!important;margin:auto!important;
    width:min(92vw,520px)!important;max-width:92vw!important;
    height:max-content!important;max-height:84dvh!important;
    padding:48px 15px 20px!important;border:0!important;border-radius:18px!important;
    overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;background:#fff;box-sizing:border-box;
  }
  .mk-quick-dialog::before { display:none; }
  .mk-quick-dialog > .mk-dialog-close { top: 11px !important; inset-inline-end: 15px !important; width: 38px !important; height: 38px !important; z-index: 2; }
  .mk-quick-dialog [data-mk-quick-content] { min-width: 0; }
  .mk-quick-dialog .mk-quick-layout, .mk-quick-dialog .mk-quick-instant { display: grid !important; grid-template-columns: minmax(0,1fr) !important; gap: 13px !important; align-items: start; }
  .mk-quick-dialog .mk-quick-image { border-radius: 15px !important; padding: 12px !important; min-height: 180px !important; }
  .mk-quick-dialog .mk-quick-image img, .mk-quick-dialog .mk-quick-instant .mk-quick-image img { height: min(52vw,230px) !important; max-height: 230px !important; object-fit: contain !important; }
  .mk-quick-dialog .mk-quick-info { min-width: 0; gap: 9px; }
  .mk-quick-dialog .mk-quick-info h2 { font-size: 19px !important; line-height: 1.5; }
  .mk-quick-dialog .mk-buybox { width: 100%; min-width: 0; }
  .mk-quick-dialog .mk-buybox :is(select,input[type=text],input[type=number]) { font-size: 16px !important; }
  .mk-quick-dialog .mk-quick-details { min-height: 45px; width: 100%; border-radius: 11px; }

  /* Full-height side carts and addresses, with safe-area-aware footers. */
  body.mk-shell .mk-cart-drawer { width: min(100vw,430px) !important; max-width: 100vw !important; border-radius: 0 20px 20px 0; }
  body.mk-shell .mk-cart-heading { padding: 17px 16px; }
  body.mk-shell .mk-cart-heading h2 { font-size: 20px; }
  body.mk-shell .mk-cart-heading > .mk-icon-button { min-width: 43px; min-height: 43px; }
  body.mk-shell .mk-mini-cart-items { padding-inline: 15px !important; }
  body.mk-shell .mk-mini-cart-footer { padding: 14px 15px calc(16px + env(safe-area-inset-bottom)) !important; }
  body.mk-shell .mk-mini-cart-footer > .mk-button { min-height: 49px; border-radius: 12px; }
  body.mk-shell .mk-cart-item { grid-template-columns: 67px minmax(0,1fr) 27px !important; gap: 9px !important; }
  body.mk-shell .mk-cart-item-photo { width: 67px; height: 77px; }

  /* My Account and checkout: one clean column and iOS-friendly inputs. */
  body.mk-shell .mk-account-layout { grid-template-columns: minmax(0,1fr) !important; gap: 13px !important; }
  body.mk-shell .mk-account-sidebar { position: static !important; top: auto !important; border-radius: 15px !important; }
  body.mk-shell .mk-account-identity { padding: 15px !important; }
  body.mk-shell .mk-account-sidebar nav ul { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 6px !important; }
  body.mk-shell .mk-account-sidebar nav a { min-height: 44px !important; border-radius: 10px !important; padding: 8px 10px !important; font-size: 12px !important; }
  body.mk-shell .mk-account-content { min-width: 0; min-height: 0; border-radius: 15px !important; padding: 16px !important; }
  body.mk-shell .mk-account-cards { grid-template-columns: 1fr !important; gap: 9px; }
  body.mk-shell .mk-commerce-content :is(input:not([type=checkbox]):not([type=radio]),select,textarea),
  body.mk-shell .mk-auth-form :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { max-width: 100%; min-height: 44px; font-size: 16px !important; border-radius: 10px; }
  body.mk-shell .mk-commerce-content :is(.woocommerce-cart-form,.cart-collaterals .cart_totals,#customer_details,#order_review,.wc-block-cart__main,.wc-block-cart__sidebar,.wc-block-checkout__main,.wc-block-checkout__sidebar) { max-width: 100%; min-width: 0; border-radius: 16px !important; }
  body.mk-shell .mk-commerce-content :is(table,.woocommerce-table) { max-width: 100%; }
  body.mk-shell .mk-commerce-content .woocommerce-message,
  body.mk-shell .mk-commerce-content .woocommerce-error { border-radius: 12px; line-height: 1.7; }

  /* Compact footer; custom upload assets and merchant branding are preserved. */
  body.mk-shell .mk-footer-v4 .mk-footer-main { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 22px 13px !important; padding-block: 25px 20px !important; }
  body.mk-shell .mk-footer-v4 .mk-footer-identity { grid-column: 1 / -1; }
  body.mk-shell .mk-footer-v4 .mk-footer-main h3 { font-size: 13px !important; }
  body.mk-shell .mk-footer-v4 .mk-footer-category-links { grid-template-columns: 1fr !important; }
  body.mk-shell .mk-footer-v4 .mk-footer-payments-row { flex-wrap: wrap; gap: 12px; padding-block: 17px; }
  body.mk-shell .mk-footer-v4 .mk-payment-methods { flex-wrap: wrap; gap: 12px; }
  /* Checkout is intentionally distraction-free: no bottom tabs or ghost gap. */
  body.woocommerce-checkout.mk-shell .mk-mobile-nav { display: none !important; }
  body.woocommerce-checkout.mk-shell :is(.mk-footer,.mk-template-footer) { padding-bottom: env(safe-area-inset-bottom) !important; }
  body.woocommerce-checkout.mk-shell .mk-whatsapp { bottom: calc(18px + env(safe-area-inset-bottom)) !important; }

}

@media (max-width: 375px) {
  :root { --mk-mobile-gutter: 10px; }
  body.mk-shell .mk-products-grid.mk-products-rail, body.mk-shell .mk-module .mk-products-grid.mk-products-rail { grid-auto-columns: calc((100% - 8px) / 2.04) !important; gap: 8px !important; }
  body.mk-shell .mk-product-card .mk-product-copy, body.mk-shell .mk-module .mk-product-card .mk-product-copy { padding: 8px !important; }
  body.mk-shell .mk-product-card .mk-price { font-size: 15px !important; }
  body.mk-shell:not(.mk49-app) .mk-mobile-nav > :is(a,button) { font-size: 9px; }
  body.mk-shell:not(.mk49-app) .mk-pdp-sticky-buy .mk-sticky-product strong { max-width: 30vw; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* Improve tablet product density without changing the desktop design. */
  body.mk-shell .mk-products-grid:not(.mk-products-rail), body.mk-shell .mk-catalog-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 13px !important; }
  body.mk-shell .mk-product-card { border-radius: 15px !important; }
  body.mk-shell .mk-pdp-top { gap: 18px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .mk-shell :is(.mk-product-card,.mk-quick-dialog,.mk-mobile-nav,.mk-card-actions a,.mk-card-actions button) { transition: none !important; animation: none !important; }
}
