/* ══════════════════════════════════════
   TOP BAR — Logo row
   ══════════════════════════════════════ */
.cr-page .cr-top-stack{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:var(--cr-top-stack-gap,10px);
  width:100%;
  min-width:0;
  max-width:100%;
  padding:4px var(--cr-page-gutter,18px) 0;
  box-sizing:border-box;
}

.cr-page .cr-topbar{
  position:relative;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:10px;
  width:100%;
  max-width:var(--cr-page-max,1140px);
  margin:0 auto;
  padding:10px 0;
  box-sizing:border-box;
}

.cr-page .cr-topbar-logo{
  display:flex;
  align-items:center;
  justify-content:center;
  grid-column:2;
  justify-self:center;
}
.cr-page .cr-topbar-logo img{display:block;height:52px;width:auto}

.cr-page .cr-topbar-back{
  justify-self:start;
  text-decoration:none;
  color:var(--cr-muted);
  font:500 20px/1 var(--cr-font-family);
  opacity:.84;
  transition:opacity .2s;
}
.cr-page .cr-topbar-back:hover{opacity:1}

.cr-page .cr-topbar-badge{
  justify-self:end;
  border:none;
  background:var(--cr-surface-muted);
  padding:5px 14px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  color:var(--cr-body);
}

/* ══════════════════════════════════════
   SHOP BAR — Top navigation
   ══════════════════════════════════════ */
.cr-page .cr-shopbar{
  width:100%;
  max-width:var(--cr-page-max,1140px);
  min-width:0;
  margin:0 auto;
  background:var(--cr-surface);
  border-radius:20px;
  box-shadow:var(--cr-shadow-topbar);
  overflow:visible;
  font-family:var(--cr-font-family);
}

.cr-page .cr-shopbar-bottom{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  max-width:100%;
  padding:10px 20px;
}

@media (max-width:760px), ((max-height:480px) and (orientation:landscape)){
  .cr-page .cr-top-stack,
  .cr-page .cr-shopbar,
  .cr-page .cr-shopbar-bottom{
    width:100%;
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
  }
  .cr-page .cr-shopbar{
    overflow:hidden;
  }
  .cr-page .cr-shopbar-bottom{
    overflow-x:auto;
    scrollbar-width:none;
  }
  .cr-page .cr-shopbar-bottom::-webkit-scrollbar{
    display:none;
  }
}

@media (max-width:760px){
  .cr-page .cr-shopbar{
    overflow:visible;
  }
  .cr-page .cr-shopbar-bottom{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:stretch;
    gap:0;
    overflow:visible;
    padding:6px 8px;
  }
  .cr-page .cr-shopbar-link{
    display:none !important;
  }
  .cr-page .cr-shopbar-search{
    grid-column:1;
    width:100%;
    min-width:0;
    min-height:44px;
  }
  .cr-page .cr-shopbar-input{
    height:44px;
    min-height:44px;
    min-width:0;
  }
  .cr-page .cr-shopbar-suggest-item{
    min-height:44px;
  }

  .cr-page.cr-product-page .cr-top-stack{
    gap:6px;
    padding:var(--cr-mobile-fixed-topbar-reserve, 102px) 10px 0;
  }

  .cr-page.cr-product-page .cr-header{
    min-height:52px;
    padding:4px 14px 4px;
  }

  .cr-page.cr-product-page .cr-logo{
    width:147px;
    height:46px;
    aspect-ratio:147 / 46;
    object-fit:contain;
    top:0;
  }

  .cr-page.cr-product-page .cr-shopbar{
    border-radius:16px;
  }

}

.cr-page .cr-shopbar-link{
  text-decoration:none;
  font-size:13px;
  font-weight:600;
  color:var(--cr-body);
  padding:6px 14px;
  border-radius:999px;
  background:var(--cr-surface-soft);
  transition:all .2s;
  white-space:nowrap;
}

.cr-page .cr-shopbar-link:hover,
.cr-page .cr-shopbar-link-active{
  background:var(--cr-accent);
  color:var(--cr-detail-text);
}

.cr-page .cr-shopbar-search{
  flex:1;
  position:relative;
  display:flex;
  align-items:center;
  gap:6px;
}

.cr-page .cr-shopbar-search-ico{
  position:absolute;
  left:12px;
  width:15px;
  height:15px;
  color:var(--cr-detail-muted);
  pointer-events:auto;
}

.cr-page .cr-shopbar-input{
  flex:1 1 auto;
  min-width:0;
  width:100%;
  padding:7px 14px 7px 34px;
  border:1.5px solid var(--cr-detail-line);
  border-radius:999px;
  font:400 13px/1.4 var(--cr-font-family);
  color:var(--cr-ink-soft);
  background:var(--cr-surface-soft);
  outline:none;
  transition:border-color .2s,box-shadow .2s;
}

.cr-page .cr-shopbar-input::placeholder{color:var(--cr-detail-muted)}
.cr-page .cr-shopbar-input:focus{
  border-color:var(--cr-accent);
  box-shadow:0 0 0 3px var(--cr-accent-focus);
  background:var(--cr-surface);
}

.cr-page .cr-shopbar-search-submit{
  flex:0 0 auto;
  min-width:64px;
  height:34px;
  min-height:34px;
  padding:0 14px;
  border:0;
  border-radius:999px;
  background:var(--cr-accent);
  color:var(--cr-detail-text);
  font:800 12px/1 var(--cr-font-family);
  cursor:pointer;
  box-shadow:none;
  transition:filter .15s ease,transform .15s ease,box-shadow .15s ease;
}

.cr-page .cr-shopbar-search-submit:hover{
  filter:brightness(.97);
}

.cr-page .cr-shopbar-search-submit:focus-visible{
  outline:0;
  box-shadow:0 0 0 3px var(--cr-accent-focus);
}

.cr-page .cr-shopbar-suggest{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 6px);
  background:var(--cr-surface);
  border:1px solid var(--cr-border);
  border-radius:16px;
  box-shadow:var(--cr-shadow-lift);
  padding:6px;
  z-index:30;
  max-height:min(360px, calc(100vh - 160px));
  overflow:auto;
  overscroll-behavior:contain;
}

.cr-page .cr-shopbar-suggest-empty{
  font:500 12px/1.4 var(--cr-font-family);
  color:var(--cr-subtle);
  padding:10px 12px;
}

.cr-page .cr-shopbar-suggest-item{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:10px 12px;
  border-radius:12px;
  text-decoration:none;
  color:var(--cr-detail-text);
  transition:background .15s ease,color .15s ease;
}

.cr-page .cr-shopbar-suggest-item:hover,
.cr-page .cr-shopbar-suggest-item-active{
  background:var(--cr-accent-soft);
  color:var(--cr-detail-text);
}

.cr-page .cr-shopbar-suggest-title{
  font:700 13px/1.25 var(--cr-font-family);
}

.cr-page .cr-shopbar-suggest-meta{
  font:500 11px/1.35 var(--cr-font-family);
  color:var(--cr-subtle);
}

@media (max-width:760px), ((max-height:480px) and (orientation:landscape)){
  .cr-page.cr-home-page .cr-shopbar,
  .cr-page.cr-catalog-page .cr-shopbar,
  .cr-page.cr-product-page .cr-shopbar{
    overflow:visible;
  }

  .cr-page.cr-home-page .cr-shopbar-bottom,
  .cr-page.cr-catalog-page .cr-shopbar-bottom,
  .cr-page.cr-product-page .cr-shopbar-bottom{
    overflow:visible;
  }

  .cr-page.cr-home-page .cr-shopbar-search,
  .cr-page.cr-catalog-page .cr-shopbar-search,
  .cr-page.cr-product-page .cr-shopbar-search{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(68px,max-content);
    align-items:stretch;
    gap:8px;
  }

  .cr-page.cr-home-page .cr-shopbar-search-ico,
  .cr-page.cr-catalog-page .cr-shopbar-search-ico,
  .cr-page.cr-product-page .cr-shopbar-search-ico{
    left:14px;
    top:50%;
    transform:translateY(-50%);
    pointer-events:none;
  }

  .cr-page.cr-home-page .cr-shopbar-input,
  .cr-page.cr-catalog-page .cr-shopbar-input,
  .cr-page.cr-product-page .cr-shopbar-input{
    min-height:44px;
    height:44px;
    padding-left:38px;
  }

  .cr-page.cr-home-page .cr-shopbar-search-submit,
  .cr-page.cr-catalog-page .cr-shopbar-search-submit,
  .cr-page.cr-product-page .cr-shopbar-search-submit{
    min-width:68px;
    min-height:44px;
    height:44px;
    padding:0 12px;
    font-size:13px;
  }

  .cr-page.cr-home-page .cr-shopbar-suggest,
  .cr-page.cr-catalog-page .cr-shopbar-suggest,
  .cr-page.cr-product-page .cr-shopbar-suggest{
    left:0;
    right:0;
    top:calc(100% + 8px);
    width:100%;
    max-width:calc(100vw - 24px);
    max-height:min(52vh, 420px);
    overflow:auto;
    overscroll-behavior:contain;
  }
}

@media (max-width:760px), ((max-height:480px) and (orientation:landscape)){
  .cr-page .cr-top-stack,
  .cr-page.cr-product-page .cr-top-stack{
    --cr-mobile-fixed-header-height:52px;
    --cr-mobile-fixed-shopbar-height:44px;
    --cr-mobile-fixed-topbar-gap:6px;
    --cr-mobile-fixed-inline-gutter:18px;
    --cr-mobile-fixed-topbar-reserve:calc(var(--cr-mobile-fixed-header-height) + env(safe-area-inset-top, 0px));
    position:relative;
    padding-top:var(--cr-mobile-fixed-topbar-reserve) !important;
  }

  .cr-page .cr-top-stack:has(.cr-shopbar),
  .cr-page.cr-product-page .cr-top-stack:has(.cr-shopbar){
    --cr-mobile-fixed-topbar-reserve:calc(var(--cr-mobile-fixed-header-height) + var(--cr-mobile-fixed-topbar-gap) + var(--cr-mobile-fixed-shopbar-height) + env(safe-area-inset-top, 0px));
  }

  .cr-page .cr-top-stack::before,
  .cr-page.cr-product-page .cr-top-stack::before{
    content:"";
    position:fixed;
    top:0;
    left:0;
    right:0;
    height:100dvh;
    pointer-events:none;
    z-index:128;
    background:var(--cr-bg);
    background-image:repeating-conic-gradient(from 0deg at 50% -10%,color-mix(in srgb,var(--cr-yellow),transparent 78%) 0 4deg,transparent 4deg 8deg);
    background-position:top center;
    -webkit-clip-path:inset(0 0 calc(100% - var(--cr-mobile-fixed-topbar-reserve) - 8px) 0);
    clip-path:inset(0 0 calc(100% - var(--cr-mobile-fixed-topbar-reserve) - 8px) 0);
  }

  .cr-page .cr-top-stack > .cr-header,
  .cr-page.cr-product-page .cr-top-stack > .cr-header{
    position:fixed;
    top:0;
    left:0;
    right:0;
    width:auto;
    max-width:none;
    min-height:calc(var(--cr-mobile-fixed-header-height) + env(safe-area-inset-top, 0px));
    height:calc(var(--cr-mobile-fixed-header-height) + env(safe-area-inset-top, 0px));
    margin:0;
    padding:max(4px, env(safe-area-inset-top, 0px)) 14px 4px;
    z-index:130;
    background:transparent;
    background-image:none;
    box-shadow:none;
  }

  .cr-page .cr-top-stack > .cr-header .cr-logo,
  .cr-page.cr-product-page .cr-top-stack > .cr-header .cr-logo{
    width:147px;
    height:46px;
    aspect-ratio:147 / 46;
    object-fit:contain;
    top:0;
  }

  .cr-page .cr-top-stack > .cr-header .cr-logo-link,
  .cr-page.cr-product-page .cr-top-stack > .cr-header .cr-logo-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:147px;
    height:46px;
    line-height:0;
    text-decoration:none;
  }

  .cr-page .cr-top-stack > .cr-shopbar,
  .cr-page.cr-home-page .cr-top-stack > .cr-shopbar,
  .cr-page.cr-catalog-page .cr-top-stack > .cr-shopbar,
  .cr-page.cr-product-page .cr-top-stack > .cr-shopbar{
    position:fixed;
    top:calc(var(--cr-mobile-fixed-header-height) + var(--cr-mobile-fixed-topbar-gap) + env(safe-area-inset-top, 0px));
    left:var(--cr-mobile-fixed-inline-gutter);
    right:auto;
    width:calc(100vw - var(--cr-mobile-fixed-inline-gutter) - var(--cr-mobile-fixed-inline-gutter));
    max-width:calc(100vw - var(--cr-mobile-fixed-inline-gutter) - var(--cr-mobile-fixed-inline-gutter));
    min-height:var(--cr-mobile-fixed-shopbar-height);
    height:var(--cr-mobile-fixed-shopbar-height);
    margin:0;
    background:transparent;
    border-radius:0;
    box-shadow:none;
    z-index:129;
  }

  .cr-page .cr-top-stack > .cr-shopbar .cr-shopbar-bottom{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:stretch;
    min-height:var(--cr-mobile-fixed-shopbar-height);
    height:var(--cr-mobile-fixed-shopbar-height);
    padding:0;
    gap:0;
    overflow:visible;
  }

  .cr-page .cr-top-stack > .cr-shopbar .cr-shopbar-search{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(66px,max-content);
    align-items:stretch;
    gap:8px;
    width:100%;
    min-width:0;
    min-height:var(--cr-mobile-fixed-shopbar-height);
    height:var(--cr-mobile-fixed-shopbar-height);
  }

  .cr-page .cr-top-stack > .cr-shopbar .cr-shopbar-search-ico{
    left:14px;
    top:50%;
    transform:translateY(-50%);
    pointer-events:none;
  }

  .cr-page .cr-top-stack > .cr-shopbar .cr-shopbar-input{
    min-height:var(--cr-mobile-fixed-shopbar-height);
    height:var(--cr-mobile-fixed-shopbar-height);
    padding-left:38px;
    background:var(--cr-surface);
  }

  .cr-page .cr-top-stack > .cr-shopbar .cr-shopbar-search-submit{
    min-width:66px;
    min-height:var(--cr-mobile-fixed-shopbar-height);
    height:var(--cr-mobile-fixed-shopbar-height);
    padding:0 12px;
    font-size:13px;
  }

  .cr-page .cr-shopbar-suggest{
    z-index:132;
  }
}
