/* TrendishShop v191 — MOBILE ONLY corrective layer.
   Goals:
   - home: keep v190 layout and move the logo further inward/right
   - non-home/shop: rebuild the mobile header + menu as a clean compact layout
   Desktop > 900px remains untouched. */

@media (max-width:900px){
  /* HOME ONLY: owner asked the left logo to move further to the right. */
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-logo{
    transform:translateX(14px)!important;
  }

  /* NON-HOME PAGES (shop, categories, product lists, etc.).
     Keep one compact header row: logo | search | actions. */
  body:not(.home-overlay-layout) .site-header{
    position:relative!important;
    z-index:45!important;
    width:100%!important;
    background:#fff!important;
    color:#242124!important;
    border-bottom:1px solid #eee7eb!important;
    box-shadow:0 2px 10px rgba(36,23,30,.035)!important;
  }
  body:not(.home-overlay-layout) .site-header .header-main.header-standard-layout{
    display:grid!important;
    direction:ltr!important;
    grid-template-columns:76px minmax(0,1fr) 102px!important;
    grid-template-areas:"logo search actions"!important;
    align-items:center!important;
    width:calc(100% - 18px)!important;
    max-width:none!important;
    min-height:54px!important;
    margin:0 auto!important;
    padding:7px 0!important;
    column-gap:6px!important;
    row-gap:0!important;
  }
  body:not(.home-overlay-layout) .site-header .header-standard-logo{
    grid-area:logo!important;
    justify-self:start!important;
    align-self:center!important;
    width:auto!important;
    min-width:0!important;
    margin:0!important;
    transform:translateX(8px)!important;
  }
  body:not(.home-overlay-layout) .site-header .header-standard-logo .site-logo-visual,
  body:not(.home-overlay-layout) .site-header .header-standard-logo .site-logo-visual img{
    display:block!important;
    width:auto!important;
    max-width:66px!important;
  }
  body:not(.home-overlay-layout) .site-header .header-standard-logo .site-logo-visual img{
    height:28px!important;
    max-height:28px!important;
    object-fit:contain!important;
    filter:none!important;
    opacity:1!important;
  }

  body:not(.home-overlay-layout) .site-header .header-standard-search{
    grid-area:search!important;
    direction:rtl!important;
    justify-self:center!important;
    align-self:center!important;
    width:100%!important;
    max-width:170px!important;
    min-width:0!important;
    min-height:34px!important;
    margin:0!important;
    border-radius:9px!important;
    overflow:hidden!important;
  }
  body:not(.home-overlay-layout) .site-header .header-standard-search input{
    width:100%!important;
    min-width:0!important;
    height:34px!important;
    min-height:34px!important;
    padding:6px 7px!important;
    font-size:10.5px!important;
    line-height:1.3!important;
  }
  body:not(.home-overlay-layout) .site-header .header-standard-search button{
    width:30px!important;
    min-width:30px!important;
    height:34px!important;
    min-height:34px!important;
    padding:0!important;
    font-size:15px!important;
  }

  body:not(.home-overlay-layout) .site-header .header-standard-actions{
    grid-area:actions!important;
    direction:rtl!important;
    justify-self:end!important;
    justify-content:flex-start!important;
    align-items:center!important;
    gap:3px!important;
    min-width:0!important;
    width:auto!important;
    margin:0!important;
  }
  body:not(.home-overlay-layout) .site-header .profile-login-link,
  body:not(.home-overlay-layout) .site-header .profile-menu-trigger,
  body:not(.home-overlay-layout) .site-header .contact-menu-trigger,
  body:not(.home-overlay-layout) .site-header .cart-link-minimal{
    width:30px!important;
    min-width:30px!important;
    height:30px!important;
    min-height:30px!important;
    padding:0!important;
  }
  body:not(.home-overlay-layout) .site-header .profile-menu-chevron,
  body:not(.home-overlay-layout) .site-header .contact-menu-chevron{
    display:none!important;
  }
  body:not(.home-overlay-layout) .site-header .header-cart-preview-v175{
    position:relative!important;
    flex:0 0 auto!important;
    margin-left:5px!important;
  }
  body:not(.home-overlay-layout) .site-header .cart-link-count{
    top:-4px!important;
    right:-4px!important;
  }

  /* No hamburger on normal mobile pages: menu is always visible below header. */
  body:not(.home-overlay-layout) .site-header .mobile-nav-toggle{
    display:none!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav{
    display:block!important;
    position:relative!important;
    z-index:42!important;
    width:100%!important;
    margin:0!important;
    background:#fff!important;
    border-top:1px solid #f2edf0!important;
    border-bottom:1px solid #eee7eb!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .nav-container{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:6px 6px 7px!important;
    overflow:visible!important;
    white-space:normal!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .menu-root{
    display:grid!important;
    direction:rtl!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    grid-auto-rows:minmax(39px,auto)!important;
    gap:4px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    list-style:none!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .menu-root>.menu-item{
    position:relative!important;
    display:flex!important;
    align-items:stretch!important;
    justify-content:center!important;
    flex-wrap:nowrap!important;
    width:100%!important;
    min-width:0!important;
    min-height:39px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:8px!important;
    background:#fff!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .menu-root>.menu-item>a{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:1 1 auto!important;
    width:100%!important;
    min-width:0!important;
    min-height:39px!important;
    margin:0!important;
    padding:4px 3px!important;
    border:1px solid #f0e9ed!important;
    border-radius:8px!important;
    background:#fff!important;
    color:#2b2729!important;
    font-size:clamp(9px,2.65vw,11px)!important;
    font-weight:700!important;
    line-height:1.35!important;
    text-align:center!important;
    white-space:normal!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    text-decoration:none!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .menu-root>.menu-item>.submenu-toggle{
    position:absolute!important;
    left:1px!important;
    bottom:1px!important;
    z-index:3!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:15px!important;
    min-width:15px!important;
    height:15px!important;
    min-height:15px!important;
    padding:0!important;
    border:0!important;
    color:#777!important;
    background:transparent!important;
    font-size:9px!important;
    line-height:1!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .menu-root>.menu-item>.submenu{
    position:fixed!important;
    z-index:160!important;
    top:118px!important;
    right:10px!important;
    left:10px!important;
    width:auto!important;
    max-height:65dvh!important;
    overflow:auto!important;
    margin:0!important;
    padding:8px!important;
    border:1px solid #ece5e9!important;
    border-radius:14px!important;
    background:#fff!important;
    box-shadow:0 18px 45px rgba(35,20,28,.15)!important;
    opacity:0!important;
    visibility:hidden!important;
    transform:translateY(5px)!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .menu-root>.menu-item.open>.submenu{
    display:block!important;
    opacity:1!important;
    visibility:visible!important;
    transform:none!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .submenu .menu-item{
    display:flex!important;
    flex-wrap:wrap!important;
    width:100%!important;
    min-height:0!important;
    border:0!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .submenu .menu-item>a{
    min-width:calc(100% - 34px)!important;
    padding:9px 10px!important;
    color:#2b2729!important;
    font-size:12px!important;
    text-align:right!important;
  }

  /* Top announcement bar: compact and centered, no horizontal spill. */
  body:not(.home-overlay-layout) .topbar{
    overflow:hidden!important;
    font-size:9px!important;
    line-height:1.4!important;
  }
  body:not(.home-overlay-layout) .topbar .container{
    width:100%!important;
    max-width:none!important;
    min-height:24px!important;
    justify-content:center!important;
    padding:4px 8px!important;
    text-align:center!important;
    white-space:normal!important;
  }
}

@media (max-width:480px){
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-logo{
    transform:translateX(13px)!important;
  }
  body:not(.home-overlay-layout) .site-header .header-main.header-standard-layout{
    grid-template-columns:66px minmax(0,1fr) 98px!important;
    width:calc(100% - 12px)!important;
    column-gap:4px!important;
    min-height:52px!important;
    padding:6px 0!important;
  }
  body:not(.home-overlay-layout) .site-header .header-standard-logo{
    transform:translateX(7px)!important;
  }
  body:not(.home-overlay-layout) .site-header .header-standard-logo .site-logo-visual,
  body:not(.home-overlay-layout) .site-header .header-standard-logo .site-logo-visual img{
    max-width:59px!important;
  }
  body:not(.home-overlay-layout) .site-header .header-standard-logo .site-logo-visual img{
    height:26px!important;
    max-height:26px!important;
  }
  body:not(.home-overlay-layout) .site-header .header-standard-search{
    max-width:150px!important;
  }
  body:not(.home-overlay-layout) .site-header .header-standard-search input{
    font-size:9.7px!important;
    padding-inline:6px!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .nav-container{
    padding:5px 4px 6px!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .menu-root{
    gap:3px!important;
    grid-auto-rows:minmax(40px,auto)!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .menu-root>.menu-item,
  body:not(.home-overlay-layout) .site-header .main-nav .menu-root>.menu-item>a{
    min-height:40px!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .menu-root>.menu-item>a{
    padding:3px 2px!important;
    font-size:clamp(8.6px,2.75vw,10.3px)!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .menu-root>.menu-item>.submenu{
    top:108px!important;
  }
}

@media (max-width:340px){
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-logo{
    transform:translateX(10px)!important;
  }
  body:not(.home-overlay-layout) .site-header .header-main.header-standard-layout{
    grid-template-columns:56px minmax(0,1fr) 92px!important;
    width:calc(100% - 8px)!important;
    column-gap:3px!important;
  }
  body:not(.home-overlay-layout) .site-header .header-standard-logo .site-logo-visual,
  body:not(.home-overlay-layout) .site-header .header-standard-logo .site-logo-visual img{
    max-width:52px!important;
  }
  body:not(.home-overlay-layout) .site-header .header-standard-search input{
    font-size:9px!important;
  }
  body:not(.home-overlay-layout) .site-header .main-nav .menu-root>.menu-item>a{
    font-size:8.2px!important;
  }
}
