.site-topbar{
  background:rgba(11,38,50,0.95);
  color:#fff;
  font-size:0.9rem;
}
.site-topbar {
  width: 100%;
  left: 0;
  top: 0;
}
:root{
  --layout-max-width:1400px;
  --layout-gutter:clamp(1rem,3vw,2.5rem);
}
.site-topbar .topbar-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0.35rem var(--layout-gutter);
  width:100%;
  max-width:var(--layout-max-width);
  margin:0 auto;
  box-sizing:border-box;
}
.topbar-left,
.topbar-right{
  display:flex;
  align-items:center;
  gap:0.75rem;
  flex-wrap:wrap;
}

/* Hide the theme's original header that follows the topbar */
.site-topbar + header,
.site-topbar + .site-header,
.site-topbar + div.header-main {
  display: none !important;
}
.site-topbar .topbar-link{
  color:rgba(255,255,255,0.9);
  margin-right:1rem;
  text-decoration:none;
}
.site-topbar .topbar-link:hover{text-decoration:underline}
.topnav{
  background:var(--color-surface);
  border-bottom:1px solid #e9e9e9;
}
.topnav{position:relative;z-index:999}
.topnav-inner{
  display:flex;
  align-items:center;
  gap:1rem;
  padding:0.8rem var(--layout-gutter);
  width:100%;
  max-width:var(--layout-max-width);
  margin:0 auto;
  box-sizing:border-box;
}
.site-brand{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:0.75rem;
  text-decoration:none;
  color:var(--color-text);
}
.site-logo-link{
  display:flex;
  align-items:center;
}
.site-logo-link img{
  max-height:48px; /* reduced: match the smaller logo size */
  display:block;
  width:auto;
}
.site-brand img,
.custom-logo,
.custom-logo img,
.custom-logo-link img {
  max-height:48px !important;
  height:auto !important;
  width:auto !important;
}
.site-title{
  font-size:1.15rem;
  font-weight:700;
  line-height:1;
}
.site-text{display:flex;flex-direction:column}
.site-subtitle{
  font-size:0.95rem;
  color:var(--color-muted);
  margin-top:0.05rem;
}
.topnav-center{
  flex:1 1 60%;
  display:flex;
  justify-content:center;
}
.topnav-cats ul{
  display:flex;
  flex-wrap:wrap;
  gap:0.75rem;
  list-style:none;
  margin:0;
  padding:0;
}
.topnav-cats ul{
  justify-content:center;
}
.topnav-cats a{
  color:var(--color-text);
  text-decoration:none;
  font-weight:600;
  padding:0.4rem 0.75rem;
  border-radius:999px;
  border:1px solid transparent;
  display:inline-flex;
  align-items:center;
  gap:0.25rem;
  line-height:1;
}
.topnav-cats .topnav-store-link{
  position:relative;
  padding:0.4rem 1.2rem;
  background:linear-gradient(135deg,#fff9ec,#f1d9a5);
  color:#4a2f11;
  border-color:rgba(199,167,94,0.4);
  font-weight:700;
  border-radius:18px;
  box-shadow:0 6px 14px rgba(112,78,20,0.18);
  display:inline-flex;
  align-items:center;
  gap:0.45rem;
  transition:transform 0.2s ease, box-shadow 0.2s ease;
}

.topnav-cats .topnav-store-link:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(112,78,20,0.25);
  background:linear-gradient(135deg,#fff2cc,#edc679);
}
.topnav-cats a:hover{
  border-color:var(--color-gold);
  background:rgba(230,184,76,0.08);
}
.topnav-right{display:flex;gap:0.75rem;align-items:center}
.topnav-right .icon-link{color:var(--color-text);text-decoration:none;padding:0.4rem 0.6rem;border-radius:6px}
.topnav-right .icon-link:hover{background:#faf6f2}
.topnav-toggle{
  display:none;
  align-items:center;
  gap:0.5rem;
  padding:0.35rem 0.85rem;
  border:1px solid rgba(0,0,0,0.08);
  border-radius:12px;
  background:#fff;
  color:var(--color-text);
  font-weight:600;
  cursor:pointer;
  transition:background 0.2s ease, border-color 0.2s ease;
}
.topnav-toggle:hover{
  background:#faf6f2;
  border-color:rgba(0,0,0,0.12);
}
.topnav-toggle-box{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.topnav-toggle-line{
  width:20px;
  height:2px;
  background:currentColor;
  transition:transform 0.2s ease, opacity 0.2s ease;
}
.topnav-toggle-label{
  font-size:0.85rem;
}
.topnav-toggle[aria-expanded="true"] .topnav-toggle-line:nth-child(1){
  transform:translateY(6px) rotate(45deg);
}
.topnav-toggle[aria-expanded="true"] .topnav-toggle-line:nth-child(2){
  opacity:0;
}
.topnav-toggle[aria-expanded="true"] .topnav-toggle-line:nth-child(3){
  transform:translateY(-6px) rotate(-45deg);
}
.cart-icon{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:999px;
  color:var(--color-text);
  background:rgba(0,0,0,0.04);
  text-decoration:none;
  transition:background 0.2s ease, transform 0.2s ease;
}
.site-topbar .cart-icon{
  background:rgba(255,255,255,0.08);
  color:#fff;
}
.cart-icon:hover{
  background:rgba(255,255,255,0.15);
  transform:translateY(-1px);
}
.cart-count{
  position:absolute;
  top:2px;
  right:2px;
  min-width:18px;
  height:18px;
  padding:0 4px;
  border-radius:999px;
  background:#d32f2f;
  color:#fff;
  font-size:0.65rem;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
}
.cart-count[data-empty="true"]{
  display:none;
}
.mobile-menu-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.45);
  opacity:0;
  visibility:hidden;
  transition:opacity 0.25s ease;
  z-index:999;
}
.mobile-menu-panel{
  position:fixed;
  top:0;
  right:0;
  width:min(340px,85vw);
  height:100vh;
  background:#fff;
  box-shadow:-6px 0 24px rgba(0,0,0,0.15);
  transform:translateX(100%);
  transition:transform 0.3s ease;
  z-index:1000;
  display:flex;
  flex-direction:column;
  padding:1.5rem;
  gap:1rem;
  pointer-events:none;
}
.mobile-menu-panel:focus{
  outline:none;
}
.mobile-menu-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
}
.mobile-menu-title{
  font-size:1.25rem;
  font-weight:700;
  color:var(--color-text);
}
.mobile-menu-close{
  border:0;
  background:rgba(0,0,0,0.05);
  width:36px;
  height:36px;
  border-radius:999px;
  font-size:1.4rem;
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.mobile-menu-body{
  flex:1;
  overflow-y:auto;
}
.mobile-menu-nav ul,
.mobile-menu-extra ul{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:0.35rem;
}
.mobile-menu-nav a,
.mobile-menu-extra a{
  text-decoration:none;
  color:var(--color-text);
  font-weight:600;
  padding:0.4rem 0;
  display:block;
}
.mobile-menu-store-link{
  color:#4a2f11;
}
.mobile-menu-extra{
  border-top:1px solid #eee;
  margin-top:1rem;
  padding-top:1rem;
}
.mobile-menu-extra p{
  margin:0 0 0.45rem;
  font-weight:600;
  font-size:0.9rem;
  color:var(--color-muted);
}
body.mobile-menu-open{
  overflow:hidden;
}
body.mobile-menu-open .mobile-menu-overlay{
  opacity:1;
  visibility:visible;
}
body.mobile-menu-open .mobile-menu-panel{
  transform:translateX(0);
  pointer-events:auto;
}
@media (max-width:900px){
  .topnav-inner{flex-direction:column;align-items:stretch;gap:0.5rem}
  .topnav-center{order:2;display:none}
  .topnav-right{order:3;justify-content:flex-end}
  .topnav-left{order:1}
  .site-topbar .topbar-inner{padding:0.4rem 0.8rem}
  .topnav-toggle{display:inline-flex}
}

@media (max-width:700px){
  .site-topbar .topbar-inner{
    flex-direction:column;
    align-items:flex-start;
    gap:0.25rem;
  }
  .topbar-left,
  .topbar-right{
    width:100%;
    justify-content:space-between;
  }
  .topnav-inner{
    padding:0.8rem 1.25rem;
  }
  .topnav-left,
  .topnav-right{
    width:100%;
    justify-content:space-between;
  }
  .topnav-center{
    order:3;
    width:100%;
  }
  .topnav-cats ul{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:0.35rem;
    margin-bottom:-0.35rem;
    scrollbar-width:none;
    gap:0.5rem;
  }
  .topnav-cats ul::-webkit-scrollbar{display:none}
  .topnav-cats li{
    flex:0 0 auto;
  }
  .topnav-cats a{
    scroll-snap-align:start;
  }
  .topnav-cats ul{
    scroll-snap-type:x proximity;
  }
}

@media (max-width:540px){
  .site-brand{
    width:100%;
    justify-content:space-between;
    gap:0.5rem;
  }
  .site-logo-link{
    flex-shrink:0;
  }
  .site-text{
    flex:1;
    min-width:0;
  }
  .site-subtitle{
    display:none;
  }
  .topnav-right{
    justify-content:flex-end;
  }
}
