.mobile-menu-toggle{display:none}
.mobile-menu{box-sizing:border-box;width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;border-radius:0;background:#fff;color:#252c29;overflow-y:auto;overscroll-behavior:contain;box-shadow:none}
.mobile-menu::backdrop{background:#fff}
body.mobile-menu-open{overflow:hidden}
.mobile-menu-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 5%;border-bottom:1px solid #e5eef0}
.mobile-menu-brand{min-width:0;flex:1}
.mobile-menu-brand .logo{display:block;margin:0}
.mobile-menu-brand .logo img{display:block;width:218px;max-width:100%;height:auto}
.mobile-menu-close{display:flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;padding:8px;background:#fff;color:var(--shop-accent,#31b5cf);border:0;border-radius:5px}
.mobile-menu-close svg,.mobile-menu-toggle svg{display:block;width:28px;height:28px}
.mobile-menu-body{padding:28px 5%}
.mobile-menu-title{font-size:12px;letter-spacing:1.3px;text-transform:uppercase;color:#7c8f93;margin:0 0 14px}
.mobile-menu-item{display:flex;align-items:center;gap:18px;width:100%;min-height:74px;padding:15px 12px;border:0;border-bottom:1px solid #e5eef0;background:#fff;color:#252c29;text-align:left;font:18px/1.4 Arial,sans-serif}
.mobile-menu-item>svg{display:block;flex:0 0 24px;width:24px;height:24px;color:var(--shop-accent,#31b5cf)}
.mobile-menu-item>span{flex:1;min-width:0}
.mobile-menu-item>b{display:grid;place-items:center;flex:0 0 auto;min-width:26px;height:26px;padding:0 6px;border-radius:20px;background:var(--shop-tint,#eaf6f8);color:#217b8d;font-size:12px;font-weight:400;line-height:1}
.mobile-menu-chevron{display:grid;place-items:center;width:26px;height:26px;flex:0 0 26px}
.mobile-menu-chevron::before{content:"";display:block;width:7px;height:7px;border-top:1.5px solid #8da4aa;border-right:1.5px solid #8da4aa;transform:rotate(45deg)}
.mobile-menu-item:hover{background:#f4fafb;filter:none}
.mobile-menu button:focus-visible,.mobile-menu-toggle:focus-visible{outline:2px solid var(--shop-accent,#31b5cf);outline-offset:3px}
@media(max-width:650px){
 body>header.mobile-menu-ready{grid-template-columns:minmax(0,1fr) 44px;column-gap:18px;padding:20px 5%}
 body>header.mobile-menu-ready>.header-action{display:none}
 body>header.mobile-menu-ready>.logo{grid-column:1;grid-row:1;align-self:center}
 body>header.mobile-menu-ready>.logo img{width:218px;max-width:100%;height:auto}
 body>header.mobile-menu-ready>.search{grid-column:1/-1;grid-row:2}
 body>header.mobile-menu-ready>.mobile-menu-toggle{display:flex;align-items:center;justify-content:center;grid-column:2;grid-row:1;width:44px;height:44px;padding:8px;border:0;border-radius:5px;background:#fff;color:var(--shop-accent,#31b5cf)}
}

/* Approved compact logo for the mobile header and menu. */
@media(max-width:650px){body>header.mobile-menu-ready>.logo img,.mobile-menu-brand .logo img{width:190px}}

/* One shared row and center for the mobile logo and menu control. */
@media(max-width:650px){
 body>header.mobile-menu-ready{grid-template-rows:48px auto;align-items:center}
 body>header.mobile-menu-ready>.logo{display:flex;align-items:center;align-self:center;line-height:0}
 body>header.mobile-menu-ready>.mobile-menu-toggle{align-self:center;justify-self:end;line-height:0}
 .mobile-menu-toggle svg,.mobile-menu-close svg{flex-shrink:0}
 .mobile-menu-heading{align-items:center}
 .mobile-menu-brand{display:flex;align-items:center;min-height:48px}
 .mobile-menu-close{align-self:center}
}

/* Mobile catalog control with a viewport-centered wordmark. */
@media(max-width:650px){
 body>header.mobile-menu-ready{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr) minmax(0,1fr);column-gap:8px;padding-inline:12px}
 body>header.mobile-menu-ready>.logo{grid-column:2;justify-self:center;width:100%;margin:0}
 body>header.mobile-menu-ready>.logo img{width:100%;max-width:165px}
 body>header.mobile-menu-ready>.mobile-menu-toggle{grid-column:3}
 body>header.mobile-menu-ready>.catalog-button{
  display:flex;align-items:center;justify-content:center;gap:6px;grid-column:1;grid-row:1;
  justify-self:start;min-height:42px;padding:8px;font-size:0;line-height:1;border-radius:5px;
 }
 body>header.mobile-menu-ready>.catalog-button::before{
  content:"";display:block;flex:none;width:18px;height:18px;background:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='2' y='2' width='8' height='8' rx='1'/%3E%3Crect x='14' y='2' width='8' height='8' rx='1'/%3E%3Crect x='2' y='14' width='8' height='8' rx='1'/%3E%3Crect x='14' y='14' width='8' height='8' rx='1'/%3E%3C/svg%3E") center/contain no-repeat;
 }
 body>header.mobile-menu-ready>.catalog-button::after{content:"Каталог";font:14px/1 Arial,sans-serif}
 body>nav#storefrontCatalogMenu.catalog-columns-menu.home-menu-open{
  display:block;position:fixed;top:var(--catalog-menu-top);bottom:0;left:0;right:0;z-index:95;
  margin:0;padding:12px 16px 28px;overflow:auto;overscroll-behavior:contain;
  white-space:normal;background:white;border-top:1px solid var(--shop-tint-border);
 }
 #storefrontCatalogMenu .catalog-menu-column h3{font-size:17px;margin:16px 0 10px}
 #storefrontCatalogMenu .catalog-menu-group{margin:6px 0}
 #storefrontCatalogMenu summary{padding:12px;background:var(--shop-tint);border-radius:5px}
 #storefrontCatalogMenu .catalog-menu-group>div{padding-left:12px}
 #storefrontCatalogMenu .catalog-menu-link,#storefrontCatalogMenu .catalog-menu-more,
 #storefrontCatalogMenu .catalog-menu-all-brands{display:block;padding:10px 12px}
 #storefrontCatalogMenu .catalog-menu-brand{display:flex;align-items:center;gap:12px}
 #storefrontCatalogMenu .catalog-menu-brand img{width:64px;height:36px;object-fit:contain}
 #storefrontCatalogMenu [hidden]{display:none!important}
}

/* Match desktop catalog grouping and compact nested lists on mobile. */
@media(max-width:650px){
 #storefrontCatalogMenu .catalog-menu-column{min-width:0}
 #storefrontCatalogMenu .catalog-menu-column h3{padding-bottom:10px;border-bottom:2px solid var(--shop-accent);line-height:1.4}
 #storefrontCatalogMenu .catalog-menu-group{width:100%;margin:0 0 10px}
 #storefrontCatalogMenu .catalog-menu-group>summary{
  display:block;list-style:none;padding:9px 8px;border-radius:5px;
  background:var(--shop-tint);font-size:15px;font-weight:600;line-height:1.4;
 }
 #storefrontCatalogMenu summary::-webkit-details-marker{display:none}
 #storefrontCatalogMenu summary::marker{content:""}
 #storefrontCatalogMenu summary::after{display:none}
 #storefrontCatalogMenu .catalog-menu-group>div{padding:4px 0 0}
 #storefrontCatalogMenu .catalog-menu-group .catalog-menu-group{margin:2px 0}
 #storefrontCatalogMenu .catalog-menu-group .catalog-menu-group>summary{
  padding:9px 10px;background:white;font-size:14px;font-weight:400;
 }
 #storefrontCatalogMenu .catalog-menu-group .catalog-menu-group[open]>summary{background:#f4fafb}
 #storefrontCatalogMenu .catalog-menu-group .catalog-menu-group>div{padding-left:9px}
 #storefrontCatalogMenu a.catalog-menu-link{padding:9px;color:#415256;font-size:14px;line-height:1.4}
 #storefrontCatalogMenu .catalog-menu-more{padding:8px 9px;color:var(--shop-accent-hover);font-size:14px;text-decoration:underline}
 #storefrontCatalogMenu a.catalog-menu-brand{min-height:54px;border-bottom:1px solid #edf3f4}
 #storefrontCatalogMenu a:focus-visible,#storefrontCatalogMenu summary:focus-visible{outline:2px solid var(--shop-accent);outline-offset:2px}
}

/* The existing catalog toggle also closes the mobile catalog. */
@media(max-width:650px){
 body>header.mobile-menu-ready>.catalog-button[aria-expanded="true"]::before{
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m5 5 14 14M19 5 5 19'/%3E%3C/svg%3E");
 }
}

/* Account actions remain available from the mobile bottom navigation. */
@media(max-width:650px){
 body>header.mobile-menu-ready>.mobile-menu-toggle{display:none}
}

/* Compact mobile header: wordmark, catalog, search. */
@media(max-width:650px){
 body>header.mobile-menu-ready{
  grid-template-columns:minmax(0,1fr) auto 42px;grid-template-rows:auto;
  gap:10px;padding:12px;
 }
 body>header.mobile-menu-ready>.logo{grid-column:1;grid-row:1;justify-self:start;width:100%;margin:0}
 body>header.mobile-menu-ready>.logo img{width:100%;max-width:150px;height:auto}
 body>header.mobile-menu-ready>.catalog-button{
  grid-column:2;grid-row:1;min-height:42px;padding:9px;white-space:nowrap;
 }
 body>header.mobile-menu-ready>#storefrontSearch{grid-column:3;grid-row:1}
 body>header.mobile-menu-ready>#storefrontSearch:not(.search-discovery-open){
  display:flex;align-items:center;justify-content:center;position:relative;
  width:42px;height:42px;min-width:0;margin:0;padding:0;gap:0;background:var(--shop-accent);
  border-radius:5px;box-shadow:none;
 }
 #storefrontSearch:not(.search-discovery-open) #search{
  position:absolute;width:1px;height:1px;margin:-1px;padding:0;
  clip-path:inset(50%);overflow:hidden;white-space:nowrap;
 }
 #storefrontSearch:not(.search-discovery-open) .smart-search-submit{
  display:grid;place-items:center;position:relative;width:42px;height:42px;flex:none;
  margin:0;padding:0;border:0;border-radius:5px;background:var(--shop-accent);color:white;font-size:0;
 }
 #storefrontSearch:not(.search-discovery-open) .smart-search-submit::before{
  content:"";position:absolute;inset:0;margin:auto;width:22px;height:22px;background:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cpath d='m15 15 6 6'/%3E%3C/svg%3E") center/contain no-repeat;
 }
}

@media(max-width:650px){
 #storefrontSearch.search-discovery-open .smart-search-submit,
 #storefrontSearch.search-discovery-open .smart-search-submit:hover,
 #storefrontSearch.search-discovery-open .smart-search-submit:focus,
 #storefrontSearch.search-discovery-open .smart-search-submit:focus-visible{
  background:var(--shop-accent,#2bb1c9);color:white;filter:none;
 }
}
