/* Saltfah Mobile Layout Controller - Frontend */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active {
    overflow-x: hidden;
  }

  body.sorfah-mobile-layout-active img {
    max-width: 100%;
    height: auto;
  }

  body.sorfah-mobile-layout-active .site,
  body.sorfah-mobile-layout-active #page,
  body.sorfah-mobile-layout-active .site-content,
  body.sorfah-mobile-layout-active .content-area,
  body.sorfah-mobile-layout-active main,
  body.sorfah-mobile-layout-active .elementor-section-wrap {
    max-width: 100%;
    overflow-x: hidden;
  }

  body.sorfah-mobile-layout-active .container,
  body.sorfah-mobile-layout-active .site-container,
  body.sorfah-mobile-layout-active .ast-container,
  body.sorfah-mobile-layout-active .woocommerce .content-area,
  body.sorfah-mobile-layout-active .elementor-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: var(--sf-ml-padding, 12px) !important;
    padding-right: var(--sf-ml-padding, 12px) !important;
    box-sizing: border-box !important;
  }

  body.sorfah-mobile-layout-active .elementor-section,
  body.sorfah-mobile-layout-active section,
  body.sorfah-mobile-layout-active .wp-block-group {
    margin-bottom: var(--sf-ml-gap, 18px);
  }

  body.sorfah-mobile-layout-active.sf-ml-hide-topbar .top-bar,
  body.sorfah-mobile-layout-active.sf-ml-hide-topbar .site-topbar,
  body.sorfah-mobile-layout-active.sf-ml-hide-topbar .ast-above-header-wrap,
  body.sorfah-mobile-layout-active.sf-ml-hide-topbar .header-top,
  body.sorfah-mobile-layout-active.sf-ml-hide-topbar [class*="topbar"],
  body.sorfah-mobile-layout-active.sf-ml-hide-topbar [class*="top-bar"] {
    display: none !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-compact-header header,
  body.sorfah-mobile-layout-active.sf-ml-compact-header .site-header,
  body.sorfah-mobile-layout-active.sf-ml-compact-header .main-header-bar {
    min-height: auto !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-compact-header .site-branding img,
  body.sorfah-mobile-layout-active.sf-ml-compact-header .custom-logo {
    max-height: 58px !important;
    width: auto !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home img[src*="banner"],
  body.sorfah-mobile-layout-active.sf-ml-home [class*="banner"] img,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="hero"] img,
  body.sorfah-mobile-layout-active.sf-ml-home .swiper-slide img,
  body.sorfah-mobile-layout-active.sf-ml-home .slick-slide img {
    border-radius: var(--sf-ml-banner-radius, 18px) !important;
    object-fit: cover;
  }

  body.sorfah-mobile-layout-active.sf-ml-home [class*="hero"],
  body.sorfah-mobile-layout-active.sf-ml-home [class*="banner"],
  body.sorfah-mobile-layout-active.sf-ml-home .swiper,
  body.sorfah-mobile-layout-active.sf-ml-home .slick-slider {
    overflow: hidden;
    border-radius: var(--sf-ml-banner-radius, 18px);
  }

  /* Saltfah real hero/banner: keep mobile frame exactly to image ratio (no blank bottom). */
  body.sorfah-mobile-layout-active.sf-ml-home .sfcb-hero-banner,
  body.sorfah-mobile-layout-active.sf-ml-home .sfcb-hero-slider,
  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-hero-main,
  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-slider {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 922 / 530 !important;
    background: transparent !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home .sfcb-hero-banner img,
  body.sorfah-mobile-layout-active.sf-ml-home .sfcb-hero-slider img,
  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-slide img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: transparent !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home [class*="category"] ul,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="categories"] ul,
  body.sorfah-mobile-layout-active.sf-ml-home .product-categories,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-product-categories-list {
    display: grid !important;
    grid-template-columns: repeat(var(--sf-ml-cat-cols, 2), minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home .products,
  body.sorfah-mobile-layout-active.sf-ml-home ul.products,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__products {
    display: grid !important;
    grid-template-columns: repeat(var(--sf-ml-product-cols, 2), minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__product {
    width: 100% !important;
    margin: 0 !important;
    border-radius: var(--sf-ml-radius, 16px) !important;
    overflow: hidden;
  }

  body.sorfah-mobile-layout-active.sf-ml-hide-extra-banners [class*="banner"]:nth-of-type(n+4) {
    display: none !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-shop .products,
  body.sorfah-mobile-layout-active.sf-ml-shop ul.products,
  body.sorfah-mobile-layout-active.sf-ml-shop .wc-block-grid__products {
    display: grid !important;
    grid-template-columns: repeat(var(--sf-ml-shop-cols, 2), minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-shop ul.products li.product,
  body.sorfah-mobile-layout-active.sf-ml-shop .wc-block-grid__product {
    width: 100% !important;
    margin: 0 !important;
    border-radius: var(--sf-ml-radius, 16px) !important;
    overflow: hidden;
  }

  body.sorfah-mobile-layout-active.sf-ml-shop-hide-sidebar aside,
  body.sorfah-mobile-layout-active.sf-ml-shop-hide-sidebar .sidebar,
  body.sorfah-mobile-layout-active.sf-ml-shop-hide-sidebar #secondary {
    display: none !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-shop-filter .woocommerce-result-count,
  body.sorfah-mobile-layout-active.sf-ml-shop-filter .woocommerce-ordering {
    width: 100% !important;
    float: none !important;
    margin: 0 0 10px !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-shop-filter .woocommerce-ordering select {
    width: 100% !important;
    min-height: 42px;
    border-radius: 12px;
  }

  body.sorfah-mobile-layout-active.sf-ml-shop-compact ul.products li.product .woocommerce-loop-product__title,
  body.sorfah-mobile-layout-active.sf-ml-shop-compact .wc-block-grid__product-title {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-shop-compact ul.products li.product .price {
    font-size: 14px !important;
    font-weight: 800 !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-single-product .woocommerce-product-gallery,
  body.sorfah-mobile-layout-active.sf-ml-single-product .woocommerce-product-gallery__wrapper {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-single-product .woocommerce-product-gallery img {
    max-height: var(--sf-ml-gallery-height, 360px);
    object-fit: contain;
    border-radius: var(--sf-ml-radius, 16px);
  }

  body.sorfah-mobile-layout-active.sf-ml-single-product .summary,
  body.sorfah-mobile-layout-active.sf-ml-single-product .entry-summary {
    width: 100% !important;
    padding: 0 !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-single-compact .product_title {
    font-size: 22px !important;
    line-height: 1.25 !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-single-compact .price {
    font-size: 20px !important;
    font-weight: 900 !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-single-sticky-cart form.cart,
  body.sorfah-mobile-layout-active.sf-ml-single-sticky-cart .single_add_to_cart_button {
    z-index: 9998;
  }

  body.sorfah-mobile-layout-active.sf-ml-single-sticky-cart .single_add_to_cart_button {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    width: calc(100% - 24px) !important;
    min-height: 52px !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 30px rgba(0,0,0,.28) !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-single-sticky-cart {
    padding-bottom: 78px;
  }

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 9997;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(10, 12, 18, .94);
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: 0 18px 40px rgba(0,0,0,.40);
    backdrop-filter: blur(12px);
  }

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav a {
    text-align: center;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
    padding: 7px 4px;
    border-radius: 12px;
  }

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav button.sf-ml-mobile-menu-button {
    border:0; cursor:pointer; font:inherit; text-align:center; color:#fff; background:linear-gradient(135deg,#f22f3b,#ff5b43); border-radius:12px; font-size:11px; font-weight:800; padding:7px 4px; transform:translateY(-5px); box-shadow:0 6px 16px rgba(242,47,59,.32);
  }

  .sf-ml-mobile-controller-panel{position:fixed;z-index:10001;left:10px;right:10px;top:74px;max-height:calc(100dvh - 160px);overflow:auto;padding:16px;background:#09182b;border:1px solid #268cff;border-radius:16px;box-shadow:0 16px 40px rgba(0,0,0,.6)}
  .sf-ml-mobile-controller-panel[hidden],.sf-ml-contact-sheet[hidden]{display:none!important}
  .sf-ml-mobile-controller-panel__head{display:flex;align-items:center;justify-content:space-between}.sf-ml-mobile-controller-panel h2,.sf-ml-mobile-controller-panel h3{color:#fff;margin:0 0 12px}.sf-ml-mobile-controller-panel__head button{border:0;background:transparent;color:#fff;font-size:28px;cursor:pointer}.sf-ml-mobile-controller-panel__main,.sf-ml-mobile-controller-panel__categories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.sf-ml-mobile-controller-panel a{display:flex;align-items:center;gap:8px;min-height:46px;padding:10px;border:1px solid rgba(120,160,210,.3);border-radius:10px;background:#122238;color:#fff!important;text-decoration:none!important}.sf-ml-mobile-controller-panel h3{border-top:1px solid #31506e;padding-top:14px;margin-top:16px}.sf-ml-contact-sheet{position:fixed;z-index:10002;inset:0;display:grid;place-items:center;padding:20px;background:rgba(0,0,0,.7)}.sf-ml-contact-sheet__dialog{position:relative;width:min(360px,100%);padding:22px;background:#0b1728;border:1px solid #268cff;border-radius:16px}.sf-ml-contact-sheet__dialog h2{color:#fff}.sf-ml-contact-sheet__dialog button{position:absolute;right:10px;top:4px;border:0;background:transparent;color:#fff;font-size:28px}.sf-ml-contact-sheet__dialog a{display:block;margin-top:10px;padding:13px;background:#152840;border-radius:10px;color:#fff!important;text-align:center;text-decoration:none!important}.sf-ml-mobile-controller-panel a:focus-visible,.sf-ml-contact-sheet a:focus-visible{outline:3px solid #f8d35b;outline-offset:2px}
  html.sf-ml-mobile-panel-open{overflow:hidden}
  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav a,
  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav button.sf-ml-mobile-menu-button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;min-height:54px}
  .sorfah-ml-bottom-nav .sf-ml-icon{width:21px;height:21px;display:block}.sorfah-ml-bottom-nav strong{display:block;white-space:nowrap;font-size:11px;line-height:1.15}
  .sf-ml-mobile-controller-panel a{gap:9px}.sf-ml-mobile-controller-panel a .sf-ml-icon{flex:0 0 21px;width:21px;height:21px}.sf-ml-mobile-controller-panel a>span{min-width:0;line-height:1.3}

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav a:hover,
  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav a.is-active {
    background: linear-gradient(135deg, #ff3b2f, #ff6a3d);
  }

  body.sorfah-mobile-layout-active.sf-ml-bottom-nav-on {
    padding-bottom: 78px;
  }
}

/* v6.4.8: mobile menu mockup details; scoped to the controller panel */
@media (max-width: 768px) {
  .sf-ml-mobile-controller-panel {
    background: linear-gradient(155deg, #071b35 0%, #071326 100%);
    border: 1px solid #168dff;
    border-radius: 20px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .58);
  }

  .sf-ml-mobile-controller-panel__head h2,
  .sf-ml-mobile-controller-panel > h3 {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 34px;
  }

  .sf-ml-mobile-controller-panel__head h2::before,
  .sf-ml-mobile-controller-panel > h3::before {
    content: '';
    display: block;
    width: 8px;
    height: 34px;
    flex: 0 0 8px;
    border-radius: 3px;
    background: #159dff;
  }

  .sf-ml-mobile-controller-panel > h3::before {
    background: #aa3cff;
  }

  .sf-ml-mobile-controller-panel__head button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
  }

  .sf-ml-mobile-controller-panel__main a {
    min-height: 58px;
    max-height: 58px;
    padding: 10px 12px;
    border-color: rgba(53, 111, 198, .58);
    background: linear-gradient(155deg, rgba(16, 36, 70, .95), rgba(10, 27, 52, .95));
  }

  .sf-ml-mobile-controller-panel__main a:last-child {
    grid-column: 1 / -1;
    border-color: #159dff;
    box-shadow: 0 0 10px rgba(21, 157, 255, .2);
  }

  .sf-ml-mobile-controller-panel__main a:nth-child(4n+1) .sf-ml-icon { color: #159dff; }
  .sf-ml-mobile-controller-panel__main a:nth-child(4n+2) .sf-ml-icon { color: #a64cff; }
  .sf-ml-mobile-controller-panel__main a:nth-child(4n+3) .sf-ml-icon { color: #ff4c7d; }
  .sf-ml-mobile-controller-panel__main a:nth-child(4n+4) .sf-ml-icon { color: #159dff; }

  .sf-ml-mobile-controller-panel__categories a {
    position: relative;
    min-height: 52px;
    height: 52px;
    padding: 10px 12px;
    justify-content: space-between;
    gap: 8px;
  }

  .sf-ml-mobile-controller-panel__categories .sf-ml-category-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .sf-ml-mobile-controller-panel__categories .sf-ml-category-count {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid rgba(113, 158, 225, .28);
    border-radius: 999px;
    background: rgba(69, 107, 164, .22);
    color: #bad6ff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
  }

  .sf-ml-mobile-controller-panel__categories .sf-ml-category-item--featured {
    border-color: #159dff;
    box-shadow: 0 0 10px rgba(21, 157, 255, .2);
  }

  .sf-ml-mobile-controller-panel__categories .sf-ml-category-badge {
    position: static;
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff3d68, #d92768);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
  }

  .sf-ml-mobile-controller-panel a,
  .sf-ml-mobile-controller-panel__head button,
  .sorfah-ml-bottom-nav a,
  .sorfah-ml-bottom-nav button {
    transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  }

  .sf-ml-mobile-controller-panel a:active,
  .sf-ml-mobile-controller-panel__head button:active,
  .sorfah-ml-bottom-nav a:active,
  .sorfah-ml-bottom-nav button:active {
    transform: scale(.97);
    filter: brightness(1.12);
  }

  .sf-ml-mobile-controller-panel a:focus-visible,
  .sf-ml-mobile-controller-panel__head button:focus-visible,
  .sorfah-ml-bottom-nav a:focus-visible,
  .sorfah-ml-bottom-nav button:focus-visible {
    outline: 2px solid #7ac7ff;
    outline-offset: 2px;
  }

  @media (max-width: 340px) {
    .sf-ml-mobile-controller-panel__categories .sf-ml-category-count { padding-inline: 7px; font-size: 11px; }
    .sf-ml-mobile-controller-panel__categories .sf-ml-category-badge { padding-inline: 5px; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .sf-ml-mobile-controller-panel a,
  .sf-ml-mobile-controller-panel__head button,
  .sorfah-ml-bottom-nav a,
  .sorfah-ml-bottom-nav button { transition: none; }
}

/* v6.5: reference-aligned mobile menu, scoped to the generated controller. */
@media (max-width: 768px) {
  html.sf-ml-mobile-panel-open,
  html.sf-ml-mobile-panel-open body {
    overflow: hidden !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10001 !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #181b20 !important;
    box-shadow: none !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel[hidden] {
    display: none !important;
  }

  body.admin-bar.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel {
    inset: 46px 0 0 !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head {
    flex: 0 0 auto;
    min-height: 128px;
    padding: 28px 20px 22px;
    gap: 16px;
    background: #171b20;
    color: #ffffff;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(28px, 8.2vw, 38px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.025em;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, .76);
    font-size: clamp(14px, 4.2vw, 18px);
    line-height: 1.35;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head button {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .13);
    color: #ffffff;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head button .sf-ml-icon {
    width: 30px;
    height: 30px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px 16px calc(116px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
    scrollbar-width: thin;
    scrollbar-color: #cbd1d9 transparent;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a {
    min-width: 0;
    min-height: 76px;
    padding: 12px 10px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 9px;
    border: 1px solid #e4e7eb !important;
    border-radius: 15px !important;
    background: #f7f8fa !important;
    color: #181b20 !important;
    box-shadow: 0 2px 6px rgba(20, 29, 40, .04) !important;
    font-size: clamp(15px, 4.25vw, 18px);
    font-weight: 800;
    line-height: 1.25;
    text-align: left;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a.sf-ml-main-menu-item--contact {
    grid-column: 1 / -1;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a .sf-ml-icon {
    width: 38px;
    height: 38px;
    justify-self: center;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a .sf-ml-icon:last-child {
    width: 21px;
    height: 21px;
    justify-self: end;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 22px 0 12px;
    padding-top: 15px;
    border-top: 1px solid #dfe3e8;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__section-head h3 {
    min-width: 0;
    margin: 0;
    padding: 0 0 0 14px;
    position: relative;
    color: #181b20;
    font-size: clamp(22px, 6.5vw, 30px);
    font-weight: 800;
    line-height: 1.2;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__section-head h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1px;
    bottom: 1px;
    width: 7px;
    border-radius: 5px;
    background: #ee3158;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__section-head > a {
    flex: 0 0 auto;
    min-height: 0;
    padding: 4px 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #4d5967 !important;
    box-shadow: none !important;
    font-size: clamp(12px, 3.4vw, 15px);
    font-weight: 700;
    white-space: nowrap;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__section-head > a .sf-ml-icon {
    width: 17px;
    height: 17px;
    vertical-align: middle;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories > a {
    min-width: 0;
    min-height: 78px;
    padding: 7px 10px 7px 7px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto 20px;
    align-items: center;
    gap: 9px;
    border: 1px solid #e4e7eb !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    color: #181b20 !important;
    box-shadow: 0 2px 8px rgba(20, 29, 40, .035) !important;
    text-decoration: none !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories > a.sf-ml-category-item--featured {
    border-color: #f1cbd5 !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-image {
    width: 64px;
    height: 64px;
    display: block;
    object-fit: contain;
    border-radius: 50%;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-name {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #181b20;
    font-size: clamp(14px, 4.25vw, 17px);
    font-weight: 800;
    line-height: 1.3;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-count,
  body.sorfah-mobile-layout-active .sf-ml-category-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    white-space: nowrap;
    font-size: clamp(11px, 3.2vw, 13px);
    font-weight: 800;
    line-height: 1.1;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-count {
    background: #eef0f4;
    color: #34445b;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-badge {
    background: #ec3157;
    color: #ffffff;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories > a > .sf-ml-icon {
    width: 20px;
    height: 20px;
    justify-self: end;
  }

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    gap: 0;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: #171b20;
    box-shadow: 0 -8px 20px rgba(13, 19, 27, .16);
    backdrop-filter: none;
  }

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav a,
  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav button.sf-ml-mobile-menu-button {
    min-height: 72px;
    padding: 8px 4px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #ffffff;
    box-shadow: none;
    transform: none;
    font-size: 12px;
    font-weight: 800;
  }

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav .sf-ml-icon {
    width: 28px;
    height: 28px;
  }

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav button.sf-ml-mobile-menu-button[aria-expanded="true"] {
    background: #ed3157;
    box-shadow: 0 7px 16px rgba(237, 49, 87, .28);
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel a:focus-visible,
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel button:focus-visible,
  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav a:focus-visible,
  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav button:focus-visible {
    outline: 3px solid #168bff;
    outline-offset: 2px;
  }
}

@media (max-width: 380px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__body {
    padding-left: 12px;
    padding-right: 12px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main {
    gap: 9px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a {
    grid-template-columns: 34px minmax(0, 1fr) 17px;
    min-height: 70px;
    padding-left: 8px;
    padding-right: 8px;
    gap: 6px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a .sf-ml-icon {
    width: 32px;
    height: 32px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories > a {
    grid-template-columns: 58px minmax(0, 1fr) auto 18px;
    gap: 7px;
    padding-right: 7px;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-image {
    width: 58px;
    height: 58px;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-count,
  body.sorfah-mobile-layout-active .sf-ml-category-badge {
    padding-left: 7px;
    padding-right: 7px;
  }
}

/* v7.2: keep a comfortable close-button touch target while reducing the visible circle. */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo > button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 clamp(44px, 12vw, 50px) !important;
    width: clamp(44px, 12vw, 50px) !important;
    height: clamp(44px, 12vw, 50px) !important;
    min-width: clamp(44px, 12vw, 50px) !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50%;
    background: transparent !important;
    color: #fff;
    overflow: visible;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo > button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(34px, 9.2vw, 36px);
    height: clamp(34px, 9.2vw, 36px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
    transform: translate(-50%, -50%);
    pointer-events: none;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo > button > .sf-ml-icon {
    position: relative;
    z-index: 1;
    display: block;
    flex: 0 0 auto;
    width: clamp(16px, 4.6vw, 18px) !important;
    height: clamp(16px, 4.6vw, 18px) !important;
    margin: 0 !important;
  }
}

@media (max-width: 768px) {
  .sf-ml-mobile-controller-panel{max-height:calc(100dvh - 190px);overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none;padding-bottom:22px}
  .sf-ml-mobile-controller-panel::-webkit-scrollbar{width:0;height:0;display:none}
  .sf-ml-mobile-controller-panel__categories{grid-template-columns:minmax(0,1fr);gap:8px}
  .sf-ml-mobile-controller-panel__categories a{min-height:48px;height:48px;justify-content:flex-start;overflow:hidden;white-space:normal;word-break:break-word}
  .sf-ml-mobile-controller-panel__categories a>span{display:block;min-width:0;line-height:1.25}
  .sf-ml-mobile-controller-panel__main{grid-auto-rows:minmax(54px,1fr);align-items:stretch}
  .sf-ml-mobile-controller-panel__main a{min-height:54px;max-height:58px;overflow:hidden}
  .sf-ml-mobile-controller-panel__main a>span{min-width:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
}

/* v6.4.6 Homepage mobile product cards: remove nested frame and make cover image flush */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-product-card,
  html.saltfah-light-mode body.sorfah-mobile-layout-active.sf-ml-home .sfbp-product-card {
    padding: 0 0 12px !important;
    border-radius: 17px !important;
    overflow: hidden !important;
    background-clip: padding-box !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-product-card > a,
  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-product-card-link {
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-product-img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 16px 16px 0 0 !important;
    background: transparent !important;
    overflow: hidden !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-product-img img,
  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-product-card img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: center center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-product-info {
    padding: 10px 12px 0 !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-product-info h3 {
    padding: 0 !important;
    margin: 0 0 8px !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-price {
    padding: 0 !important;
    margin: 0 !important;
  }
}

/* v6.4.7 Homepage mobile product card typography/alignment */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-product-card > a,
  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-product-card-link {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-product-info {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    padding: 11px 12px 0 !important;
    min-height: 92px !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-product-info h3 {
    margin: 0 !important;
    min-height: 48px !important;
    font-size: 13px !important;
    line-height: 1.28 !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-price,
  body.sorfah-mobile-layout-active.sf-ml-home .sfbp-price * {
    margin-top: auto !important;
    padding-top: 8px !important;
    font-size: 14px !important;
    line-height: 1.15 !important;
    letter-spacing: -.01em !important;
  }
}


/* v4: Mobile vertical menu visibility */
@media (max-width: 900px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-vertical-menu-target {
    transition: opacity .18s ease, transform .18s ease;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-vertical-menu-target:not(.sf-ml-mobile-menu-visible) {
    display: none !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-vertical-menu-target.sf-ml-mobile-menu-visible {
    display: block !important;
  }

  body.sorfah-mobile-layout-active [data-sf-nav-toggle],
  body.sorfah-mobile-layout-active .sf-mobile-toggle {
    position: relative !important;
    z-index: 10050 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }

  body.sorfah-mobile-layout-active [data-sf-nav].is-open,
  body.sorfah-mobile-layout-active .sf-nav.is-open {
    display: block !important;
    position: relative;
    z-index: 1004;
  }

  body.sorfah-mobile-layout-active [data-sf-nav].is-open .sf-menu,
  body.sorfah-mobile-layout-active [data-sf-nav].is-open .sf-ml-mobile-vertical-menu-target,
  body.sorfah-mobile-layout-active .sf-nav.is-open .sf-menu,
  body.sorfah-mobile-layout-active .sf-nav.is-open .sf-ml-mobile-vertical-menu-target {
    display: flex !important;
  }

  body.sorfah-mobile-layout-active .saltfah-mobile-menu-panel {
    position: fixed !important;
    left: 14px !important;
    right: 14px !important;
    z-index: 10040 !important;
    display: none !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 14px !important;
    max-height: min(70vh, 520px) !important;
    overflow-y: auto !important;
    border: 1px solid rgba(255, 91, 66, .42) !important;
    border-radius: 18px !important;
    background: linear-gradient(145deg, rgba(18, 19, 25, .98), rgba(45, 24, 24, .98)) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .04) inset !important;
  }

  body.sorfah-mobile-layout-active .saltfah-mobile-menu-panel.is-open {
    display: flex !important;
  }

  body.sorfah-mobile-layout-active .saltfah-mobile-menu-panel a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 46px !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, .08) !important;
    background: rgba(255, 255, 255, .045) !important;
    color: #fff7e8 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
  }

  body.sorfah-mobile-layout-active .saltfah-mobile-menu-panel a:after {
    content: "›";
    color: #ffb25b;
    font-size: 22px;
    line-height: 1;
  }
}


/* v5: Mobile heading and product card controls */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active.sf-ml-home h1,
  body.sorfah-mobile-layout-active.sf-ml-home h2,
  body.sorfah-mobile-layout-active.sf-ml-shop h1,
  body.sorfah-mobile-layout-active.sf-ml-shop h2,
  body.sorfah-mobile-layout-active [class*="section-title"],
  body.sorfah-mobile-layout-active [class*="heading"] h2,
  body.sorfah-mobile-layout-active .elementor-heading-title {
    font-size: var(--sf-ml-heading-size, 28px) !important;
    line-height: var(--sf-ml-heading-line, 1.15) !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-heading-single_line .elementor-heading-title,
  body.sorfah-mobile-layout-active.sf-ml-heading-single_line [class*="section-title"],
  body.sorfah-mobile-layout-active.sf-ml-heading-single_line h2 {
    white-space: nowrap;
    font-size: min(var(--sf-ml-heading-size, 28px), 24px) !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-heading-compact .elementor-heading-title,
  body.sorfah-mobile-layout-active.sf-ml-heading-compact [class*="section-title"],
  body.sorfah-mobile-layout-active.sf-ml-heading-compact h2 {
    font-size: min(var(--sf-ml-heading-size, 28px), 22px) !important;
    line-height: 1.05 !important;
    margin-bottom: 10px !important;
  }

  body.sorfah-mobile-layout-active ul.products li.product,
  body.sorfah-mobile-layout-active .wc-block-grid__product {
    border-radius: var(--sf-ml-radius, 16px) !important;
  }

  body.sorfah-mobile-layout-active ul.products li.product img,
  body.sorfah-mobile-layout-active .wc-block-grid__product img {
    height: var(--sf-ml-product-image-height, 190px) !important;
    object-fit: cover !important;
    width: 100% !important;
  }

  body.sorfah-mobile-layout-active ul.products li.product .woocommerce-loop-product__title,
  body.sorfah-mobile-layout-active .wc-block-grid__product-title,
  body.sorfah-mobile-layout-active ul.products li.product h2,
  body.sorfah-mobile-layout-active ul.products li.product h3 {
    font-size: var(--sf-ml-product-title-size, 14px) !important;
    line-height: 1.35 !important;
  }

  body.sorfah-mobile-layout-active ul.products li.product .price,
  body.sorfah-mobile-layout-active .wc-block-grid__product-price {
    font-size: var(--sf-ml-product-price-size, 15px) !important;
    line-height: 1.25 !important;
  }

  body.sorfah-mobile-layout-active ul.products li.product .button,
  body.sorfah-mobile-layout-active ul.products li.product .add_to_cart_button,
  body.sorfah-mobile-layout-active .wc-block-grid__product .wp-block-button__link {
    min-height: var(--sf-ml-product-button-height, 46px) !important;
    font-size: var(--sf-ml-product-button-size, 15px) !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-product-style-large_1col .products,
  body.sorfah-mobile-layout-active.sf-ml-product-style-large_1col ul.products,
  body.sorfah-mobile-layout-active.sf-ml-product-style-large_1col .wc-block-grid__products {
    grid-template-columns: 1fr !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-product-style-large_1col {
    --sf-ml-product-image-height: 300px;
    --sf-ml-product-title-size: 18px;
    --sf-ml-product-price-size: 18px;
    --sf-ml-product-button-height: 52px;
  }

  body.sorfah-mobile-layout-active.sf-ml-product-style-compact_2col .products,
  body.sorfah-mobile-layout-active.sf-ml-product-style-compact_2col ul.products,
  body.sorfah-mobile-layout-active.sf-ml-product-style-compact_2col .wc-block-grid__products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-product-style-mini_2col .products,
  body.sorfah-mobile-layout-active.sf-ml-product-style-mini_2col ul.products,
  body.sorfah-mobile-layout-active.sf-ml-product-style-mini_2col .wc-block-grid__products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-product-style-mini_2col {
    --sf-ml-product-image-height: 150px;
    --sf-ml-product-title-size: 12px;
    --sf-ml-product-price-size: 13px;
    --sf-ml-product-button-height: 38px;
    --sf-ml-product-button-size: 12px;
  }

  body.sorfah-mobile-layout-active.sf-ml-product-style-premium_card ul.products li.product,
  body.sorfah-mobile-layout-active.sf-ml-product-style-premium_card .wc-block-grid__product {
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,59,47,.10)) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    box-shadow: 0 14px 30px rgba(0,0,0,.22) !important;
    padding: 10px !important;
  }
}


/* v6: Home page product grid and image controls */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active.sf-ml-home .products,
  body.sorfah-mobile-layout-active.sf-ml-home ul.products,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__products,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="products"] ul,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="product-grid"] {
    display: grid !important;
    grid-template-columns: repeat(var(--sf-ml-home-product-cols-override, 2), minmax(0, 1fr)) !important;
    gap: var(--sf-ml-home-product-gap, 12px) !important;
    align-items: stretch !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product,
  body.sorfah-mobile-layout-active.sf-ml-home .products li.product,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__product,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="product-card"],
  body.sorfah-mobile-layout-active.sf-ml-home [class*="product-item"] {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: var(--sf-ml-home-product-card-padding, 8px) !important;
    box-sizing: border-box !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product img,
  body.sorfah-mobile-layout-active.sf-ml-home .products li.product img,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__product img,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="product-card"] img,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="product-item"] img {
    height: var(--sf-ml-home-product-image-height, 170px) !important;
    width: 100% !important;
    object-fit: var(--sf-ml-home-product-image-fit, cover) !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product .woocommerce-loop-product__title,
  body.sorfah-mobile-layout-active.sf-ml-home .products li.product .woocommerce-loop-product__title,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__product-title {
    min-height: auto !important;
  }

  /* Make 3-4 columns tighter automatically */
  body.sorfah-mobile-layout-active.sf-ml-home {
    --sf-ml-auto-small-title: clamp(10px, 3vw, var(--sf-ml-product-title-size, 14px));
  }

  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product .woocommerce-loop-product__title,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__product-title {
    font-size: var(--sf-ml-auto-small-title) !important;
  }
}


/* v6.1: Home page product font size controls */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product .woocommerce-loop-product__title,
  body.sorfah-mobile-layout-active.sf-ml-home .products li.product .woocommerce-loop-product__title,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__product-title,
  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product h2,
  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product h3 {
    font-size: var(--sf-ml-home-product-title-size, 12px) !important;
    line-height: 1.32 !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product .price,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__product-price,
  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product .price *,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__product-price * {
    font-size: var(--sf-ml-home-product-price-size, 13px) !important;
    line-height: 1.25 !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product .price del,
  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product .price del *,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__product-price del,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__product-price del * {
    font-size: calc(var(--sf-ml-home-product-price-size, 13px) - 1px) !important;
    opacity: .9 !important;
  }
}


/* v6.2: Force home product font size for custom Saltfah product cards */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active.sf-ml-home {
    --sf-ml-auto-small-title: var(--sf-ml-home-product-title-size, 12px) !important;
  }

  /* Product title: WooCommerce + common custom theme cards */
  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product .woocommerce-loop-product__title,
  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product .woocommerce-loop-product__title *,
  body.sorfah-mobile-layout-active.sf-ml-home .products li.product .woocommerce-loop-product__title,
  body.sorfah-mobile-layout-active.sf-ml-home .products li.product .woocommerce-loop-product__title *,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__product-title,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__product-title *,
  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product h2,
  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product h2 *,
  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product h3,
  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product h3 *,
  body.sorfah-mobile-layout-active.sf-ml-home .products li.product h2,
  body.sorfah-mobile-layout-active.sf-ml-home .products li.product h2 *,
  body.sorfah-mobile-layout-active.sf-ml-home .products li.product h3,
  body.sorfah-mobile-layout-active.sf-ml-home .products li.product h3 *,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="product"] [class*="title"],
  body.sorfah-mobile-layout-active.sf-ml-home [class*="product"] [class*="title"] *,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="product"] .name,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="product"] .name *,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="product-card"] a:not(.button):not(.add_to_cart_button),
  body.sorfah-mobile-layout-active.sf-ml-home [class*="product-item"] a:not(.button):not(.add_to_cart_button) {
    font-size: var(--sf-ml-home-product-title-size, 12px) !important;
    line-height: 1.25 !important;
  }

  /* Price: WooCommerce + common custom theme cards */
  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product .price,
  body.sorfah-mobile-layout-active.sf-ml-home ul.products li.product .price *,
  body.sorfah-mobile-layout-active.sf-ml-home .products li.product .price,
  body.sorfah-mobile-layout-active.sf-ml-home .products li.product .price *,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__product-price,
  body.sorfah-mobile-layout-active.sf-ml-home .wc-block-grid__product-price *,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="product"] [class*="price"],
  body.sorfah-mobile-layout-active.sf-ml-home [class*="product"] [class*="price"] *,
  body.sorfah-mobile-layout-active.sf-ml-home .amount,
  body.sorfah-mobile-layout-active.sf-ml-home .amount *,
  body.sorfah-mobile-layout-active.sf-ml-home bdi {
    font-size: var(--sf-ml-home-product-price-size, 13px) !important;
    line-height: 1.2 !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-home del,
  body.sorfah-mobile-layout-active.sf-ml-home del *,
  body.sorfah-mobile-layout-active.sf-ml-home .price del,
  body.sorfah-mobile-layout-active.sf-ml-home .price del *,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="price"] del,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="price"] del * {
    font-size: calc(var(--sf-ml-home-product-price-size, 13px) - 1px) !important;
    line-height: 1.2 !important;
  }

  /* Keep sale badge readable but configurable by price size */
  body.sorfah-mobile-layout-active.sf-ml-home .onsale,
  body.sorfah-mobile-layout-active.sf-ml-home .sale,
  body.sorfah-mobile-layout-active.sf-ml-home [class*="sale"] {
    font-size: max(9px, calc(var(--sf-ml-home-product-title-size, 12px) - 1px)) !important;
  }
}


/* v6.3: Mobile only section title / view all visibility controls */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active .sfcb-section-head h2,
  body.sorfah-mobile-layout-active .sfcb-section-title,
  body.sorfah-mobile-layout-active .sfbp-section-head h2,
  body.sorfah-mobile-layout-active .sfbp-section-title,
  body.sorfah-mobile-layout-active [class*="section-head"] h2,
  body.sorfah-mobile-layout-active [class*="section-title"] {
    display: var(--sf-ml-mobile-hide-section-heading, block) !important;
  }

  body.sorfah-mobile-layout-active .sfcb-section-head > a,
  body.sorfah-mobile-layout-active .sfcb-section-link,
  body.sorfah-mobile-layout-active .sfbp-section-head > a,
  body.sorfah-mobile-layout-active .sfbp-section-link,
  body.sorfah-mobile-layout-active [class*="section-head"] > a,
  body.sorfah-mobile-layout-active [class*="view-all"],
  body.sorfah-mobile-layout-active [class*="see-all"] {
    display: var(--sf-ml-mobile-hide-section-view-all, inline-flex) !important;
  }

  /* ถ้าซ่อนทั้งหัวข้อและปุ่ม ให้ลดช่องว่างหัวแบนเนอร์ */
  body.sorfah-mobile-layout-active .sfcb-section-head,
  body.sorfah-mobile-layout-active .sfbp-section-head,
  body.sorfah-mobile-layout-active [class*="section-head"] {
    min-height: 0 !important;
  }
}

/* v6.4.4: clean mobile menu panel opened by the red Menu button only */
@media (max-width: 900px) {
  body.sorfah-mobile-layout-active [data-sf-nav].is-open,
  body.sorfah-mobile-layout-active .sf-nav.is-open {
    display: none !important;
  }

  body.sorfah-mobile-layout-active .saltfah-mobile-menu-panel {
    position: fixed !important;
    left: 14px !important;
    right: 14px !important;
    z-index: 10040 !important;
    display: none !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 12px !important;
    max-height: min(70vh, 520px) !important;
    overflow-y: auto !important;
    border: 1px solid rgba(255, 91, 66, .42) !important;
    border-radius: 20px !important;
    background: linear-gradient(145deg, rgba(13, 14, 19, .98), rgba(35, 19, 21, .98)) !important;
    backdrop-filter: blur(14px) !important;
    box-shadow: 0 22px 54px rgba(0, 0, 0, .60), 0 0 0 1px rgba(255, 255, 255, .045) inset !important;
  }

  body.sorfah-mobile-layout-active .saltfah-mobile-menu-panel.is-open {
    display: grid !important;
  }

  body.sorfah-mobile-layout-active .saltfah-mobile-menu-panel a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    padding: 12px 10px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, .085) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .035)) !important;
    color: #fff7e8 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08) !important;
  }

  body.sorfah-mobile-layout-active .saltfah-mobile-menu-panel a::after {
    content: none !important;
  }

  body.sorfah-mobile-layout-active .saltfah-mobile-menu-panel a:hover,
  body.sorfah-mobile-layout-active .saltfah-mobile-menu-panel a:focus {
    border-color: rgba(255, 91, 66, .55) !important;
    background: linear-gradient(135deg, rgba(255, 91, 66, .28), rgba(255, 178, 91, .13)) !important;
    outline: none !important;
  }

  html.saltfah-light-mode body.sorfah-mobile-layout-active .saltfah-mobile-menu-panel {
    border-color: rgba(201, 129, 54, .28) !important;
    background: linear-gradient(145deg, rgba(255, 252, 246, .98), rgba(255, 243, 224, .98)) !important;
    box-shadow: 0 22px 54px rgba(92, 57, 24, .18), 0 0 0 1px rgba(255, 255, 255, .72) inset !important;
  }

  html.saltfah-light-mode body.sorfah-mobile-layout-active .saltfah-mobile-menu-panel a {
    color: #2b2018 !important;
    border-color: rgba(201, 129, 54, .22) !important;
    background: rgba(255, 255, 255, .68) !important;
  }
}

/* v6.4.5: make mobile product cards match brand/flavor archive cards */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active .products,
  body.sorfah-mobile-layout-active ul.products,
  body.sorfah-mobile-layout-active .wc-block-grid__products,
  body.sorfah-mobile-layout-active .sfcb-product-grid,
  body.sorfah-mobile-layout-active .sfbp-product-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    align-items: stretch !important;
  }

  body.sorfah-mobile-layout-active ul.products li.product,
  body.sorfah-mobile-layout-active .products li.product,
  body.sorfah-mobile-layout-active .wc-block-grid__product,
  body.sorfah-mobile-layout-active .sfcb-product-card,
  body.sorfah-mobile-layout-active .sfbp-product-card,
  body.sorfah-mobile-layout-active [class*="product-card"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 0 14px !important;
    overflow: hidden !important;
    border-radius: 17px !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    background: #11141d !important;
    box-shadow: 0 12px 26px rgba(0,0,0,.24) !important;
  }

  body.sorfah-mobile-layout-active ul.products li.product .woocommerce-LoopProduct-link,
  body.sorfah-mobile-layout-active .products li.product .woocommerce-LoopProduct-link,
  body.sorfah-mobile-layout-active .sfcb-product-card > a,
  body.sorfah-mobile-layout-active .sfbp-product-card > a {
    display: block !important;
    color: inherit !important;
    text-decoration: none !important;
  }

  body.sorfah-mobile-layout-active ul.products li.product img,
  body.sorfah-mobile-layout-active .products li.product img,
  body.sorfah-mobile-layout-active .wc-block-grid__product img,
  body.sorfah-mobile-layout-active .sfcb-product-card img,
  body.sorfah-mobile-layout-active .sfbp-product-card img,
  body.sorfah-mobile-layout-active [class*="product-card"] img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #f6f4ee !important;
    border-radius: 16px 16px 0 0 !important;
    margin: 0 !important;
  }

  body.sorfah-mobile-layout-active ul.products li.product .woocommerce-loop-product__title,
  body.sorfah-mobile-layout-active .products li.product .woocommerce-loop-product__title,
  body.sorfah-mobile-layout-active .wc-block-grid__product-title,
  body.sorfah-mobile-layout-active .sfcb-product-title,
  body.sorfah-mobile-layout-active .sfbp-product-title,
  body.sorfah-mobile-layout-active [class*="product-card"] h2,
  body.sorfah-mobile-layout-active [class*="product-card"] h3,
  body.sorfah-mobile-layout-active [class*="product-card"] [class*="title"] {
    display: block !important;
    padding: 12px 12px 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    line-height: 1.34 !important;
    letter-spacing: -.01em !important;
    text-align: left !important;
  }

  body.sorfah-mobile-layout-active ul.products li.product .price,
  body.sorfah-mobile-layout-active .products li.product .price,
  body.sorfah-mobile-layout-active .wc-block-grid__product-price,
  body.sorfah-mobile-layout-active .sfcb-product-price,
  body.sorfah-mobile-layout-active .sfbp-product-price,
  body.sorfah-mobile-layout-active [class*="product-card"] [class*="price"] {
    display: block !important;
    padding: 9px 12px 0 !important;
    margin: 0 !important;
    color: #ffd783 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-align: left !important;
  }

  body.sorfah-mobile-layout-active ul.products li.product .button,
  body.sorfah-mobile-layout-active ul.products li.product .add_to_cart_button,
  body.sorfah-mobile-layout-active .sfcb-product-card .button,
  body.sorfah-mobile-layout-active .sfbp-product-card .button,
  body.sorfah-mobile-layout-active [class*="product-card"] .button,
  body.sorfah-mobile-layout-active [class*="product-card"] .add_to_cart_button {
    display: none !important;
  }

  html.saltfah-light-mode body.sorfah-mobile-layout-active ul.products li.product,
  html.saltfah-light-mode body.sorfah-mobile-layout-active .products li.product,
  html.saltfah-light-mode body.sorfah-mobile-layout-active .wc-block-grid__product,
  html.saltfah-light-mode body.sorfah-mobile-layout-active .sfcb-product-card,
  html.saltfah-light-mode body.sorfah-mobile-layout-active .sfbp-product-card,
  html.saltfah-light-mode body.sorfah-mobile-layout-active [class*="product-card"] {
    background: #fffaf1 !important;
    border-color: rgba(201,129,54,.24) !important;
    box-shadow: 0 12px 26px rgba(92,57,24,.12) !important;
  }

  html.saltfah-light-mode body.sorfah-mobile-layout-active ul.products li.product .woocommerce-loop-product__title,
  html.saltfah-light-mode body.sorfah-mobile-layout-active .products li.product .woocommerce-loop-product__title,
  html.saltfah-light-mode body.sorfah-mobile-layout-active .wc-block-grid__product-title,
  html.saltfah-light-mode body.sorfah-mobile-layout-active .sfcb-product-title,
  html.saltfah-light-mode body.sorfah-mobile-layout-active .sfbp-product-title,
  html.saltfah-light-mode body.sorfah-mobile-layout-active [class*="product-card"] h2,
  html.saltfah-light-mode body.sorfah-mobile-layout-active [class*="product-card"] h3,
  html.saltfah-light-mode body.sorfah-mobile-layout-active [class*="product-card"] [class*="title"] {
    color: #18120d !important;
  }

  html.saltfah-light-mode body.sorfah-mobile-layout-active ul.products li.product .price,
  html.saltfah-light-mode body.sorfah-mobile-layout-active .products li.product .price,
  html.saltfah-light-mode body.sorfah-mobile-layout-active .wc-block-grid__product-price,
  html.saltfah-light-mode body.sorfah-mobile-layout-active .sfcb-product-price,
  html.saltfah-light-mode body.sorfah-mobile-layout-active .sfbp-product-price,
  html.saltfah-light-mode body.sorfah-mobile-layout-active [class*="product-card"] [class*="price"] {
    color: #b36b12 !important;
  }
}

/* v6.4.8 final cascade guard for the mobile controller panel */
@media (max-width: 768px) {
  .sf-ml-mobile-controller-panel {
    background: linear-gradient(155deg, #071b35 0%, #071326 100%);
    border-color: #168dff;
    border-radius: 20px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .58);
  }
  .sf-ml-mobile-controller-panel__main a {
    min-height: 58px;
    max-height: 58px;
  }
  .sf-ml-mobile-controller-panel__main a:last-child { grid-column: 1 / -1; }
  .sf-ml-mobile-controller-panel__categories a {
    min-height: 52px;
    height: 52px;
    max-height: 52px;
    overflow: hidden;
    justify-content: space-between;
  }
  .sf-ml-mobile-controller-panel__categories .sf-ml-category-badge {
    position: static;
    flex: 0 0 auto;
  }
}

/* v6.6: floating white menu frame and gold menu toggle, Local 10022 only. */
@media (max-width: 768px) {
  html.sf-ml-mobile-panel-open::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(8, 12, 18, .56);
    pointer-events: none;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel {
    inset: 12px 12px calc(94px + env(safe-area-inset-bottom)) !important;
    max-height: none !important;
    overflow: hidden !important;
    border: 1px solid #dfe3e8 !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 48px rgba(10, 15, 23, .35), 0 0 0 1px rgba(255,255,255,.8) inset !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel[hidden] {
    display: none !important;
  }

  body.admin-bar.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel {
    inset: 58px 12px calc(94px + env(safe-area-inset-bottom)) !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__body {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav button.sf-ml-mobile-menu-button {
    color: #171b20 !important;
    background: linear-gradient(180deg, #e2c18e 0%, #cda875 100%) !important;
    border: 1px solid rgba(255, 255, 255, .28) !important;
    border-radius: 14px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 7px 16px rgba(80, 54, 25, .24) !important;
    height: 54px !important;
    min-height: 54px !important;
    align-self: center;
    margin: 0 2px;
    transform: none !important;
  }

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav button.sf-ml-mobile-menu-button[aria-expanded="true"] {
    color: #171b20 !important;
    background: linear-gradient(180deg, #d8b37d 0%, #bd955f 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 7px 16px rgba(80, 54, 25, .30) !important;
  }

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav button.sf-ml-mobile-menu-button strong {
    color: #171b20 !important;
  }

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav button.sf-ml-mobile-menu-button img.sf-ml-icon {
    filter: brightness(0) saturate(100%);
  }
}

@media (max-width: 768px) and (max-height: 620px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel {
    inset: 8px 10px calc(88px + env(safe-area-inset-bottom)) !important;
    border-radius: 18px !important;
  }

  body.admin-bar.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel {
    inset: 54px 10px calc(88px + env(safe-area-inset-bottom)) !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head {
    min-height: 112px;
    padding: 22px 16px 16px;
  }
}

/* v6.7: original Saltfah logo in menu header and clean category heading rule. */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo {
    display: grid !important;
    grid-template-columns: minmax(0, auto) 1px minmax(0, 1fr) 50px;
    align-items: center;
    column-gap: 10px;
    min-height: 128px;
    padding: 22px 16px 18px;
    border-bottom: 2px solid #d8b36f;
    background: #171b20;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__brand {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__brand img {
    display: block;
    width: clamp(104px, 32vw, 150px);
    height: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
    filter: none !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__divider {
    display: block;
    width: 1px;
    height: 72px;
    background: linear-gradient(180deg, rgba(216,179,111,.18), #d8b36f 18%, #d8b36f 82%, rgba(216,179,111,.18));
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head-copy {
    min-width: 0;
    align-self: center;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo .sf-ml-mobile-controller-panel__head-copy h2 {
    display: block;
    min-height: 0;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo .sf-ml-mobile-controller-panel__head-copy h2::before {
    content: none !important;
    display: none !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo > button {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    min-width: 50px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__section-head h3 {
    border: 0 !important;
    border-top: 0 !important;
    text-decoration: none !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__section-head h3::after {
    content: none !important;
    display: none !important;
  }
}

@media (max-width: 380px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo {
    grid-template-columns: minmax(0, auto) 1px minmax(0, 1fr) 46px;
    column-gap: 7px;
    padding-left: 12px;
    padding-right: 12px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__brand img {
    width: 104px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__divider {
    height: 62px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo > button {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    min-width: 46px;
  }
}

/* v7.0: roomier category rows and lighter menu typography. */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo .sf-ml-mobile-controller-panel__head-copy h2 {
    font-weight: 700;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a {
    font-weight: 600;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__section-head h3 {
    font-weight: 700;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__section-head > a {
    font-weight: 600;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories > a {
    min-height: 62px;
    height: 62px;
    max-height: 62px;
    grid-template-columns: 48px minmax(0, 1fr) auto 15px;
    align-items: center;
    gap: 5px;
    padding: 6px 6px 6px 5px;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    object-position: center;
    justify-self: center;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-name {
    min-width: 0;
    overflow: visible;
    white-space: nowrap;
    text-overflow: clip;
    overflow-wrap: normal;
    word-break: keep-all;
    font-size: clamp(11px, 3.4vw, 15px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.02em;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-meta {
    align-items: center;
    gap: 4px;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-count,
  body.sorfah-mobile-layout-active .sf-ml-category-badge {
    min-height: 28px;
    padding: 3px 5px;
    font-size: clamp(10px, 3vw, 12px);
    font-weight: 600;
    line-height: 1.05;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-badge {
    font-weight: 700;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories > a > .sf-ml-icon {
    width: 15px;
    height: 15px;
    justify-self: end;
  }

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav a,
  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav button.sf-ml-mobile-menu-button,
  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav button.sf-ml-mobile-menu-button strong {
    font-weight: 600;
  }
}

@media (max-width: 380px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories > a {
    min-height: 58px;
    height: 58px;
    max-height: 58px;
    grid-template-columns: 44px minmax(0, 1fr) auto 13px;
    gap: 4px;
    padding: 5px 5px 5px 4px;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-image {
    width: 46px;
    height: 46px;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-name {
    font-size: clamp(10px, 3.25vw, 13px);
  }

  body.sorfah-mobile-layout-active .sf-ml-category-count,
  body.sorfah-mobile-layout-active .sf-ml-category-badge {
    min-height: 26px;
    padding: 3px 4px;
    font-size: 10px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories > a > .sf-ml-icon {
    width: 13px;
    height: 13px;
  }
}

/* v7.3: align the floating panel with the compact bottom navigation without overlap. */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav {
    bottom: 0 !important;
    box-sizing: border-box;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom)) !important;
  }

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav a {
    box-sizing: border-box;
    min-height: 64px !important;
    height: 64px !important;
    padding: 4px !important;
  }

  body.sorfah-mobile-layout-active .sorfah-ml-bottom-nav button.sf-ml-mobile-menu-button {
    box-sizing: border-box;
    min-height: 54px !important;
    height: 54px !important;
    padding: 4px !important;
    align-self: center;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel {
    bottom: calc(62px + env(safe-area-inset-bottom)) !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__body {
    padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important;
  }

  body.sorfah-mobile-layout-active.sf-ml-bottom-nav-on {
    padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
  }
}

/* v7.4: override the higher-specificity admin-bar inset without changing panel top/side spacing. */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel {
    bottom: calc(62px + env(safe-area-inset-bottom)) !important;
  }

  body.admin-bar.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel {
    bottom: calc(62px + env(safe-area-inset-bottom)) !important;
  }
}

/* v7.5: the short-screen breakpoint owns the full inset shorthand, so close that cascade explicitly. */
@media (max-width: 380px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel {
    inset: 54px 8px calc(62px + env(safe-area-inset-bottom)) 8px !important;
  }

  body.admin-bar.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel {
    inset: 54px 8px calc(62px + env(safe-area-inset-bottom)) 8px !important;
  }
}

/* v6.8: responsive two-column menu cards; keep Thai labels on one line. */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a {
    min-width: 0;
    min-height: clamp(60px, 18vw, 76px);
    max-height: none;
    padding: clamp(7px, 2.2vw, 12px) clamp(6px, 2.3vw, 10px);
    grid-template-columns: clamp(24px, 8vw, 42px) minmax(0, 1fr) clamp(13px, 4.5vw, 18px);
    gap: clamp(4px, 1.6vw, 9px);
    font-size: clamp(11px, 3.5vw, 18px) !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a > span {
    min-width: 0;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: normal;
    word-break: keep-all;
    font-size: inherit;
    line-height: 1.2;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a .sf-ml-icon {
    width: clamp(24px, 8vw, 38px);
    height: clamp(24px, 8vw, 38px);
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a .sf-ml-icon:last-child {
    width: clamp(13px, 4.5vw, 21px);
    height: clamp(13px, 4.5vw, 21px);
  }
}

@media (max-width: 380px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel {
    inset: 8px 8px calc(88px + env(safe-area-inset-bottom)) !important;
  }

  body.admin-bar.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel {
    inset: 54px 8px calc(88px + env(safe-area-inset-bottom)) !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__body {
    padding-left: 8px;
    padding-right: 8px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main {
    gap: 8px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a {
    min-height: 60px;
    padding: 7px 5px;
    grid-template-columns: 24px minmax(0, 1fr) 13px;
    gap: 4px;
    font-size: clamp(10px, 3.45vw, 12.5px) !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a .sf-ml-icon {
    width: 24px;
    height: 24px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a .sf-ml-icon:last-child {
    width: 13px;
    height: 13px;
  }
}

/* v7.6: final short-screen panel inset; keep a stable 8px gap above the compact nav. */
@media (max-width: 380px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel,
  body.admin-bar.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel {
    inset: 54px 8px calc(62px + env(safe-area-inset-bottom)) !important;
  }
}

/* v6.9: compact single-row menu header and tighter menu/category rhythm. */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo {
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) clamp(44px, 12vw, 50px);
    column-gap: clamp(8px, 2.2vw, 12px);
    min-height: 78px;
    padding: 10px clamp(10px, 4.1vw, 16px) 9px;
    border-bottom: 1px solid rgba(216, 179, 111, .82);
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__brand img {
    width: clamp(96px, 28vw, 140px);
    height: auto;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head-copy {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 100%;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo .sf-ml-mobile-controller-panel__head-copy h2 {
    display: block;
    min-height: 0;
    margin: 0;
    font-size: clamp(18px, 5.6vw, 27px);
    line-height: 1.08;
    white-space: nowrap;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo > button {
    flex: 0 0 clamp(44px, 12vw, 50px);
    width: clamp(44px, 12vw, 50px);
    height: clamp(44px, 12vw, 50px);
    min-width: clamp(44px, 12vw, 50px);
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main {
    gap: clamp(7px, 2.05vw, 10px);
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a {
    min-height: clamp(52px, 14.5vw, 62px);
    padding-top: clamp(5px, 1.8vw, 8px);
    padding-bottom: clamp(5px, 1.8vw, 8px);
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a .sf-ml-icon {
    width: clamp(22px, 7vw, 32px);
    height: clamp(22px, 7vw, 32px);
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a .sf-ml-icon:last-child {
    width: clamp(12px, 4vw, 18px);
    height: clamp(12px, 4vw, 18px);
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__body {
    padding-top: 12px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__section-head {
    margin-top: 16px;
    margin-bottom: 8px;
    padding-top: 11px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories {
    gap: 6px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories > a {
    min-height: 48px;
    height: 48px;
    max-height: 48px;
    grid-template-columns: 48px minmax(0, 1fr) auto 16px;
    gap: 6px;
    padding: 5px 6px 5px 5px;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-image {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 380px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo {
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) 44px;
    column-gap: 7px;
    min-height: 70px;
    padding: 8px 10px 7px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__brand img {
    width: 96px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__head--with-logo > button {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main {
    gap: 7px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a {
    min-height: 52px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a .sf-ml-icon {
    width: 22px;
    height: 22px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__main > a .sf-ml-icon:last-child {
    width: 12px;
    height: 12px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__section-head {
    margin-top: 13px;
    padding-top: 9px;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories > a {
    grid-template-columns: 44px minmax(0, 1fr) auto 14px;
    gap: 5px;
    min-height: 46px;
    height: 46px;
    max-height: 46px;
    padding: 4px 5px 4px 4px;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-image {
    width: 44px;
    height: 44px;
  }
}

/* v7.1: final cascade for centered, full-size category rows. */
@media (max-width: 768px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories > a {
    min-height: 62px !important;
    height: 62px !important;
    max-height: 62px !important;
    grid-template-columns: 48px minmax(0, 1fr) auto 15px !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 6px 6px 6px 5px !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-image {
    width: 50px !important;
    height: 50px !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-name {
    min-width: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    font-size: clamp(11px, 3.4vw, 15px) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: -.02em !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-meta {
    align-items: center !important;
    gap: 4px !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-count,
  body.sorfah-mobile-layout-active .sf-ml-category-badge {
    min-height: 28px !important;
    padding: 3px 5px !important;
    font-size: clamp(10px, 3vw, 12px) !important;
    font-weight: 600 !important;
    line-height: 1.05 !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-badge {
    font-weight: 700 !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories > a > .sf-ml-icon {
    width: 15px !important;
    height: 15px !important;
  }
}

@media (max-width: 380px) {
  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories > a {
    min-height: 58px !important;
    height: 58px !important;
    max-height: 58px !important;
    grid-template-columns: 44px minmax(0, 1fr) auto 13px !important;
    gap: 4px !important;
    padding: 5px 5px 5px 4px !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-image {
    width: 46px !important;
    height: 46px !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-name {
    font-size: clamp(10px, 3.25vw, 13px) !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-category-count,
  body.sorfah-mobile-layout-active .sf-ml-category-badge {
    min-height: 26px !important;
    padding: 3px 4px !important;
    font-size: 10px !important;
  }

  body.sorfah-mobile-layout-active .sf-ml-mobile-controller-panel__categories > a > .sf-ml-icon {
    width: 13px !important;
    height: 13px !important;
  }
}
