/* Tech Bazar final storefront overrides. Loaded after legacy styles. */
:root{--tb-action:#171e2b;--tb-hover:#2563eb}
/* Desktop category navigation: readable text at every submenu depth */
body:not(.admin-app) #unified-category-nav .category-children .category-branch,
body:not(.admin-app) #unified-category-nav .category-children .category-parent{color:#172033!important}
body:not(.admin-app) #unified-category-nav .category-children .category-parent>a,
body:not(.admin-app) #unified-category-nav .category-children .category-parent>button{color:#172033!important;opacity:1!important;text-shadow:none!important}
body:not(.admin-app) #unified-category-nav .category-children .category-branch:is(:hover,:focus-within)>.category-parent{background:#2563eb!important;border-radius:5px!important}
body:not(.admin-app) #unified-category-nav .category-children .category-branch:is(:hover,:focus-within)>.category-parent>a,
body:not(.admin-app) #unified-category-nav .category-children .category-branch:is(:hover,:focus-within)>.category-parent>button{color:#fff!important;background:transparent!important;opacity:1!important;text-shadow:none!important}
body:not(.admin-app) #unified-category-nav .category-children .category-branch:is(:hover,:focus-within){background:transparent!important;box-shadow:none!important}
body:not(.admin-app) #unified-category-nav .category-children .category-parent>a:is(:hover,:focus-visible){background:#2563eb!important;color:#fff!important}
body:not(.admin-app) #unified-category-nav .category-children{border-top-color:#2563eb!important}
body:not(.admin-app) #unified-category-nav>.category-branch:is(:hover,:focus-within){background:#eef4ff!important;box-shadow:inset 0 -3px #2563eb!important}
body:not(.admin-app) #unified-category-nav>.category-branch:is(:hover,:focus-within)>.category-parent>a{color:#1d4ed8!important}
/* Cart dialog controls, including recommendations and empty-state glyph */
#home-cart-drawer .drawer-header button{border:1px solid #171e2b!important;background:#171e2b!important;color:#fff!important;border-radius:5px;padding:7px 11px!important;cursor:pointer;transition:background .18s,border-color .18s}
#home-cart-drawer .drawer-rec-heading button,
#home-cart-drawer .drawer-rec-card button,
#home-cart-drawer .drawer-checkout{background:#171e2b!important;background-image:none!important;color:#fff!important;border-color:#171e2b!important;cursor:pointer;transition:background .18s,border-color .18s,box-shadow .18s!important}
#home-cart-drawer .drawer-header button:is(:hover,:focus-visible),
#home-cart-drawer .drawer-rec-heading button:is(:hover,:focus-visible),
#home-cart-drawer .drawer-rec-card button:is(:hover,:focus-visible),
#home-cart-drawer .drawer-checkout:not([aria-disabled=true]):is(:hover,:focus-visible){background:#2563eb!important;border-color:#2563eb!important;color:#fff!important;box-shadow:0 4px 12px #2563eb33!important}
#home-cart-drawer .drawer-rec-heading h3::after{background:#2563eb!important}
#home-cart-drawer .drawer-empty>span{color:#171e2b!important}
#home-cart-drawer .drawer-continue{color:#171e2b!important;cursor:pointer}
#home-cart-drawer .drawer-continue:is(:hover,:focus-visible){color:#2563eb!important}
#home-cart-drawer .drawer-checkout[aria-disabled=true]{background:#171e2b!important;opacity:.45!important;cursor:not-allowed!important}
#home-cart-drawer .drawer-rec-card small{color:#e11919!important}
@media(prefers-reduced-motion:reduce){#home-cart-drawer button,#home-cart-drawer a{transition:none!important}}

/* Featured Categories: 10 per desktop row, subtle blue bounce on hover */
#featured-categories .category-strip {
  display: grid !important;
  grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: stretch;
}
#featured-categories .category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 12px 5px;
  background: #fff !important;
  border: 1px solid #e0e5ee !important;
  border-radius: 12px !important;
  color: #172033 !important;
  text-align: center;
  text-decoration: none;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease !important;
}
#featured-categories .category-card:hover,
#featured-categories .category-card:focus-visible {
  animation: tb-category-bounce .42s ease both;
  border-color: #2563eb !important;
  box-shadow: 0 8px 22px rgba(37,99,235,.16) !important;
  color: #172033 !important;
}
#featured-categories .category-image {
  width: 100%;
  height: 84px;
  background: transparent !important;
}
#featured-categories .category-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@keyframes tb-category-bounce {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  75% { transform: translateY(-3px); }
  100% { transform: translateY(-5px); }
}
@media (max-width: 1100px) {
  #featured-categories .category-strip {
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 760px) {
  #featured-categories .category-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  #featured-categories .category-image { height: 64px; }
  #featured-categories .category-card { padding: 8px 4px; }
}
@media (prefers-reduced-motion: reduce) {
  #featured-categories .category-card:hover,
  #featured-categories .category-card:focus-visible {
    animation: none !important;
    transform: none !important;
  }
}

/* v3: enforce ten cards in one row on desktop, including builder layout */
@media (min-width: 761px) {
  #featured-categories .category-strip,
  #featured-categories.builder-columns .category-strip {
    display: grid !important;
    grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
}

/* Reference-style featured categories: 8 cards per desktop row, auto next row */
#featured-categories .category-strip,
#featured-categories.builder-columns .category-strip,
.builder-columns #featured-categories .category-strip {
 display:grid!important;
 grid-template-columns:repeat(8,minmax(0,1fr))!important;
 gap:16px!important;
}
#featured-categories .category-card {min-height:122px!important;}
#featured-categories .category-image {height:76px!important;}
@media(max-width:1100px){
 #featured-categories .category-strip,#featured-categories.builder-columns .category-strip,.builder-columns #featured-categories .category-strip {grid-template-columns:repeat(6,minmax(0,1fr))!important;}
}
@media(max-width:760px){
 #featured-categories .category-strip,#featured-categories.builder-columns .category-strip,.builder-columns #featured-categories .category-strip {grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;}
 #featured-categories .category-card{min-height:105px!important;}
 #featured-categories .category-image{height:60px!important;}
}

/* v10: compact category cards and strictly single-row desktop navigation */
@media (min-width:761px){
 body:not(.admin-app) #unified-category-nav{
  display:flex!important;flex-flow:row nowrap!important;align-items:center!important;
  justify-content:space-between!important;gap:0!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  padding:0 clamp(6px,1.25vw,22px)!important;
  overflow:visible!important;white-space:nowrap!important;
  font-size:clamp(10px,.88vw,13px)!important;font-weight:750!important;
 }
 body:not(.admin-app) #unified-category-nav>.category-branch{
  flex:0 1 auto!important;min-width:0!important;white-space:nowrap!important;
 }
 body:not(.admin-app) #unified-category-nav>.category-branch>.category-parent{
  display:flex!important;flex-wrap:nowrap!important;min-width:0!important;min-height:42px!important;
 }
 body:not(.admin-app) #unified-category-nav>.category-branch>.category-parent>a{
  padding:12px clamp(2px,.55vw,9px)!important;
  font-size:inherit!important;font-weight:750!important;white-space:nowrap!important;
 }
 body:not(.admin-app) #unified-category-nav>.category-branch>.category-parent>button{
  min-width:10px!important;padding:7px 2px!important;font-size:11px!important;
 }
 body:not(.admin-app) #unified-category-nav .category-children{white-space:normal!important;font-size:12px!important;}
}
/* Compact TechLand-like category tiles, retain 8 across on desktop. */
@media(min-width:1101px){
 body:not(.admin-app) #featured-categories .category-strip,
 body:not(.admin-app) #featured-categories.builder-columns .category-strip,
 body:not(.admin-app) .builder-columns #featured-categories .category-strip{
  grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:10px!important;
 }
}
body:not(.admin-app) #featured-categories .category-card{
 min-height:100px!important;padding:8px 5px!important;border-radius:10px!important;
 transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease!important;
}
body:not(.admin-app) #featured-categories .category-image{height:58px!important;}
body:not(.admin-app) #featured-categories .category-card:is(:hover,:focus-visible){
 animation:none!important;transform:translateY(-4px) scale(1.025)!important;
 border-color:#2563eb!important;box-shadow:0 7px 18px #2563eb24!important;
}
@media(max-width:760px){
 body:not(.admin-app) #featured-categories .category-card{min-height:88px!important;padding:7px 4px!important;}
 body:not(.admin-app) #featured-categories .category-image{height:48px!important;}
}
@media(prefers-reduced-motion:reduce){body:not(.admin-app) #featured-categories .category-card:is(:hover,:focus-visible){transform:none!important;}}
