/* Category pages reuse the home page header layout without changing index.html. */
.category-topbar{height:auto!important;min-height:42px;border-bottom:1px solid #ddd;background:#fff!important;color:#555!important}
.category-topbar .topbar-shell{min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.category-topbar .top-left,.category-topbar .top-menu{display:flex;align-items:center;gap:9px;white-space:nowrap}
.category-topbar .brand-mini{width:24px;height:24px;border-radius:50%;object-fit:cover}
.category-topbar button,.category-topbar a{font:inherit;font-weight:800}
.category-topbar .top-text-button,.category-topbar .top-menu button{border:0;background:transparent;color:#555;cursor:pointer;padding:5px 2px}
.category-topbar .top-menu a{color:#555}
.category-topbar .top-pill{padding:7px 11px;border-radius:3px;color:#fff!important;background:#ff7a1a}
.category-main-header.header{gap:12px}
.category-main-header .logo{display:flex;align-items:center;justify-content:center;flex:0 0 116px;min-width:0;height:100%}
.category-main-header .logo img{display:block;width:110px;height:94px;max-width:100%;object-fit:contain}
.category-main-header .search{min-width:0;margin-left:0}
.category-main-header .search button{display:flex;align-items:center;justify-content:center;flex:0 0 52px;height:100%;padding:0;cursor:pointer;line-height:1}
.category-main-header .search button svg{display:block;flex:none}
.category-main-header .category-return{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:132px;height:48px;padding:0 6px;color:#2878d4;text-decoration:none;font-size:16px;font-weight:900;white-space:nowrap}
.category-main-header .category-return:hover{text-decoration:underline}
.category-search-empty{padding:24px;text-align:center;color:#666}
@media(max-width:1000px){.category-topbar .topbar-shell{overflow-x:auto;justify-content:flex-start}.category-topbar .top-menu{margin-left:auto}.category-main-header.header{gap:9px}.category-main-header .logo{flex-basis:100px}.category-main-header .logo img{width:96px;height:88px}.category-main-header .category-return{min-width:112px;font-size:14px}}
@media(max-width:767px){
 .category-topbar .topbar-shell{align-items:flex-start;padding-block:7px}
 .category-topbar .top-left{width:100%;justify-content:space-between;min-width:0;gap:7px}
 .category-topbar .top-menu,.category-topbar .top-text-button{display:none}
 .category-main-header.header.shell{height:auto;min-height:128px;display:grid;grid-template-columns:62px 100px minmax(0,1fr);grid-template-rows:75px 46px;gap:6px 8px;padding-block:7px}
 .category-main-header .category-wrap{grid-row:1;grid-column:1;height:75px}
 .category-main-header .logo{grid-row:1;grid-column:2;width:auto;height:75px;justify-content:flex-start}
 .category-main-header .logo img{width:100px;height:74px;object-fit:contain;object-position:left center}
 .category-main-header .category-return{grid-row:1;grid-column:3;justify-self:end;min-width:0;height:75px;font-size:13px}
 .category-main-header .search{grid-column:1/-1;grid-row:2;width:100%;height:44px;margin:0}
 .category-main-header .search select{width:78px;padding:0 5px;font-size:12px}
 .category-main-header .search input{font-size:13px;padding-inline:8px}
 .category-main-header .search button{flex-basis:42px;width:42px}
 .category-main-header .search button svg{width:21px;height:21px}
}
@media(max-width:380px){.category-main-header.header.shell{grid-template-columns:62px 83px minmax(0,1fr)}.category-main-header .logo img{width:83px}.category-main-header .category-return{font-size:11px}}
.ranking-grid .site-card[hidden]{display:none!important}
@media(max-width:767px){
 .category-topbar .topbar-shell{flex-wrap:wrap;overflow:visible;gap:4px;padding-block:5px}
 .category-topbar .top-left{display:flex;width:100%;justify-content:flex-start;overflow-x:auto;gap:8px}
 .category-topbar .top-text-button{display:inline-flex;flex:0 0 auto;white-space:nowrap}
 .category-topbar .top-menu{display:flex;width:100%;overflow-x:auto;margin:0;gap:10px;white-space:nowrap}
 .category-topbar .top-menu>*{flex:0 0 auto}
}

/* Secondary pages: keep the complete utility menu on one swipeable line. */
@media(max-width:767px){
 .category-topbar .topbar-shell{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:12px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:thin;-webkit-overflow-scrolling:touch;padding-block:5px}
 .category-topbar .top-left{display:flex;flex:0 0 auto;width:auto;min-width:max-content;justify-content:flex-start;gap:8px;overflow:visible}
 .category-topbar .top-menu{display:flex;flex:0 0 auto;width:auto;min-width:max-content;margin:0;gap:10px;overflow:visible}
 .category-topbar .top-left>*,.category-topbar .top-menu>*{flex:0 0 auto}
}

/* The home category grid, repeated on category and detail pages. */
.secondary-directory-nav{position:relative!important;top:auto!important;height:auto!important;border:0;background:#fff;overflow:visible!important}
.secondary-directory-nav .nav-items{width:min(1200px,calc(100% - 28px));height:auto!important;display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;grid-template-rows:none!important;grid-auto-flow:row!important;grid-auto-columns:auto!important;overflow:visible!important;margin-inline:auto;border-top:1px solid #e6e8eb;border-left:1px solid #e6e8eb}
.secondary-directory-nav .nav-items a{display:flex;min-width:0!important;min-height:44px;align-items:center;justify-content:center;padding:6px 4px;border-right:1px solid #e6e8eb;border-bottom:1px solid #e6e8eb;color:#333;text-decoration:none;text-align:center;font-size:13px;font-weight:800;white-space:normal;word-break:keep-all;line-height:1.25}
.secondary-directory-nav .nav-items a:hover,.secondary-directory-nav .nav-items a[aria-current="page"]{background:#f4f8ff;color:#2878d4}
@media(max-width:767px){
 .secondary-directory-nav .nav-items{width:calc(100% - 24px)!important;max-width:100%;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:none!important;grid-auto-flow:row!important;grid-auto-columns:auto!important;overflow:visible!important}
 .secondary-directory-nav .nav-items a{min-width:0!important;min-height:40px;padding:5px 2px;font-size:11px!important}
}
