/* Responsive platform header layout. Loaded after the legacy theme overrides. */
.platform-header{width:100%;max-width:100%;overflow:clip}
.alforod-utility{background:linear-gradient(100deg,#063a78,#075db2);color:#eaf3ff;font-size:11px}
.alforod-utility .topbar-inner{display:flex;min-height:34px;align-items:center;justify-content:center;gap:20px}
.alforod-utility nav{display:flex;min-width:0;align-items:center;gap:clamp(12px,2.4vw,28px);overflow-x:auto;scrollbar-width:none}
.alforod-utility nav::-webkit-scrollbar{display:none}
.alforod-utility nav a{flex:none;white-space:nowrap;color:#eaf3ff}
.alforod-utility nav a:hover{color:#ffe28a}
.header-main{
  display:grid;
  grid-template-columns:minmax(138px,auto) minmax(180px,1fr) max-content max-content;
  grid-template-areas:"brand search all install";
  align-items:center;
  width:min(1240px,calc(100% - 40px));
  min-width:0;
  min-height:clamp(68px,7vw,90px);
  gap:clamp(10px,1.8vw,22px);
  padding-block:clamp(8px,1.5vw,14px);
}
.header-main>.brand{grid-area:brand;display:flex;min-width:0;max-width:100%;align-items:center}
.header-main .brand-logo{display:block;width:clamp(138px,17vw,210px);max-width:100%;height:auto;max-height:68px;object-fit:contain}
.header-main>.platform-search{grid-area:search;width:100%;min-width:0;max-width:500px;margin:0;justify-self:stretch}
.header-main .platform-search input{width:100%;min-width:0}
.header-main>.header-link{grid-area:all;justify-self:end;max-width:100%;white-space:nowrap}
.header-main>.pwa-install{grid-area:install;justify-self:end;max-width:100%;white-space:nowrap}
.nav-wrap{width:100%;max-width:100%}
.nav-inner{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;width:min(1240px,calc(100% - 40px));min-width:0;min-height:0;gap:clamp(3px,1.1vw,14px);padding-block:4px}
.nav-inner a{display:inline-flex;min-width:0;min-height:42px;align-items:center;justify-content:center;padding:6px clamp(7px,1.2vw,14px);text-align:center;white-space:normal;line-height:1.5}

@media(max-width:1000px){
  .header-main{grid-template-columns:minmax(0,1fr) max-content max-content;grid-template-areas:"brand all install" "search search search";width:calc(100% - 32px);gap:10px 14px;padding-block:10px}
  .header-main .brand-logo{width:clamp(132px,19vw,180px);max-height:60px}
  .header-main>.platform-search{max-width:none}
  .nav-inner{width:calc(100% - 32px);justify-content:center;gap:4px}
}

@media(max-width:760px){
  .alforod-utility .topbar-inner{width:100%;min-height:34px;justify-content:flex-start;gap:12px;padding-inline:12px}
  .alforod-utility nav{gap:17px}
  .header-main{grid-template-columns:minmax(0,1fr) max-content max-content;width:calc(100% - 24px);gap:9px;padding-block:9px}
  .header-main .brand-logo{width:clamp(116px,31vw,150px);max-height:52px}
  .header-main>.header-link{padding:7px 9px;font-size:11px}
  .header-main>.pwa-install{min-height:36px;padding:6px 9px;font-size:10px}
  .header-main>.platform-search{min-height:42px}
  .nav-inner{width:calc(100% - 20px);justify-content:flex-start;gap:3px;padding-block:5px}
  .nav-inner a{min-height:36px;padding:5px 8px;font-size:11px}
  .search-only-page .nav-wrap{display:block!important}
  .search-only-page .nav-inner{flex-wrap:wrap;overflow:visible}
}

@media(max-width:420px){
  .alforod-utility{font-size:10px}
  .alforod-utility nav{gap:14px}
  .header-main{grid-template-columns:minmax(0,1fr) max-content max-content;width:calc(100% - 20px);gap:7px}
  .header-main .brand-logo{width:clamp(108px,34vw,132px);max-height:48px}
  .header-main>.header-link{padding:6px 7px;font-size:10px}
  .header-main>.header-link span{display:none}
  .header-main>.pwa-install{min-height:34px;padding:5px 7px;font-size:9px}
  .search-only-page .nav-inner{width:calc(100% - 16px);justify-content:center;gap:2px}
  .search-only-page .nav-inner a{padding-inline:6px;font-size:10px}
}

@media(max-width:340px){
  .header-main{grid-template-columns:minmax(0,1fr) max-content;grid-template-areas:"brand install" "all all" "search search";gap:7px}
  .header-main>.header-link{justify-self:start}
  .header-main>.pwa-install{justify-self:end}
}

/* Compact mobile header: menu, brand and search icon on one line. */
.mobile-menu-toggle,.mobile-search-toggle{display:none}
.mobile-menu-toggle svg,.mobile-search-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:760px){
  .platform-header .alforod-utility,.platform-header .nav-wrap{display:none!important}
  .platform-header .header-main{grid-template-columns:42px minmax(0,1fr) 42px;grid-template-areas:"menu brand searchbtn" "form form form";width:100%;min-height:68px;gap:0;padding:8px 12px;background:#fff}
  .header-main>.mobile-menu-toggle{grid-area:menu;display:inline-flex;width:40px;height:40px;align-items:center;justify-content:center;justify-self:start;padding:0;border:1px solid #e3e8ee;border-radius:12px;background:#fff;color:#173747;cursor:pointer}
  .header-main>.brand{grid-area:brand;justify-self:center;justify-content:center}
  .header-main .brand-logo{width:clamp(122px,38vw,154px);max-height:48px}
  .header-main>.mobile-search-toggle{grid-area:searchbtn;display:inline-flex;width:40px;height:40px;align-items:center;justify-content:center;justify-self:end;padding:0;border:1px solid #e3e8ee;border-radius:12px;background:#fff;color:#173747;cursor:pointer}
  .header-main>.platform-search{display:none!important;grid-area:form;width:100%;max-width:none;margin:8px 0 2px;min-height:44px}
  .platform-header.search-open .header-main>.platform-search{display:flex!important}
  .header-main>.header-link,.header-main>.pwa-install{display:none!important}
  .mobile-menu-toggle:focus-visible,.mobile-search-toggle:focus-visible{outline:3px solid #b8a165;outline-offset:2px}
}

.mobile-drawer-backdrop,.mobile-category-drawer{display:none}
@media(max-width:760px){
  .mobile-drawer-backdrop{position:fixed;z-index:1000;inset:0;display:block;width:100%;height:100%;border:0;background:rgba(8,22,36,.48);opacity:0;transition:opacity .22s ease}
  .mobile-drawer-backdrop[hidden]{display:none}
  .mobile-category-drawer{position:fixed;z-index:1001;inset-block:0;inset-inline-start:0;display:flex;width:min(360px,88vw);flex-direction:column;overflow:hidden;background:#fff;box-shadow:0 0 38px rgba(8,22,36,.22);transform:translateX(105%);transition:transform .24s ease;visibility:hidden}
  .platform-header.menu-open~.mobile-category-drawer{visibility:visible;transform:translateX(0)}
  .mobile-drawer-head{display:flex;min-height:64px;flex:none;align-items:center;justify-content:space-between;padding:10px 17px;border-bottom:1px solid #e8edf2;background:#f8fafc}
  .mobile-drawer-head h2{margin:0;color:#173747;font-size:17px}
  .mobile-drawer-close{display:inline-flex;width:38px;height:38px;align-items:center;justify-content:center;border:1px solid #e0e7ef;border-radius:11px;background:#fff;color:#173747;font-size:26px;line-height:1;cursor:pointer}
  .mobile-drawer-content{flex:1;overflow-y:auto;padding:14px}
  .mobile-drawer-install{display:flex;width:calc(100% - 28px);flex:none;min-height:46px;margin:0 14px calc(14px + env(safe-area-inset-bottom));border-color:#d7c58f;background:#f8f5e9;color:#173747;font-size:13px}
  .mobile-category-drawer .site-sidebar{display:block!important;width:100%;max-width:none;margin:0;padding:0;border:0;background:transparent;box-shadow:none}
  .mobile-category-drawer .sidebar-intro{margin-bottom:12px}
  .mobile-category-drawer .sidebar-group{margin-top:13px}
  body.mobile-drawer-visible{overflow:hidden}
}
