
/* Nested catalogue and category cards — 2026-09-27 */
.tb-category-branch {margin:0;border:0}
.tb-category-branch > summary {display:flex;align-items:center;gap:12px;padding:8px 10px;min-height:56px;cursor:pointer;list-style:none;border-radius:10px;color:#132a4c}
.tb-category-branch > summary::-webkit-details-marker {display:none}
.tb-category-branch > summary:hover,.tb-category-branch[open] > summary {background:#edf4ff}
.tb-category-branch > summary strong {font-size:14px;line-height:1.3;flex:1}
.tb-category-branch > summary .tb-category-symbol {display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:12px;background:#edf4ff;color:#2166cb}
.tb-category-branch > summary .tb-category-symbol svg {width:24px;height:24px}
.tb-branch-chevron {width:8px;height:8px;border-right:2px solid;border-bottom:2px solid;transform:rotate(-45deg);margin:0 8px}
.tb-category-branch[open] .tb-branch-chevron {transform:rotate(45deg)}
.tb-categories-panel .tb-category-children {display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:8px;background:#f7f9fd;border-radius:12px}
.tb-categories-panel .tb-category-children a {font-size:14px;line-height:1.4;min-height:44px;padding:10px!important;align-items:center}
.tb-categories-panel .tb-category-children .tb-category-view-all {grid-column:1/-1;color:#1760cb!important;font-weight:700;border-bottom:1px solid #dce7f6;border-radius:0}
.tb-categories-panel:has(.tb-category-branch[open]) {width:min(650px,calc(100vw - 40px))!important}
.tb-category-branch > summary:focus-visible,.tb-category-children a:focus-visible {outline:3px solid #2166db;outline-offset:1px}
.tax-product_cat .hero-section {background:#f5f8fd!important;min-height:0!important;--min-height:0;padding:34px 0!important}
.tax-product_cat .hero-section .entry-header {padding:0!important;min-height:0!important}
.tax-product_cat .hero-section .page-title {margin:0!important}
.tax-product_cat .hero-section .page-description {margin-top:10px}
.tb-subcategory-section {margin:0 0 32px;width:100%}
.tb-subcategory-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.tb-subcategory-card {display:flex;flex-direction:column;align-items:flex-start;gap:16px;padding:24px;border:1px solid #dfe7f2;border-radius:18px;background:#fff;color:#132a4c!important;text-decoration:none!important;min-width:0;transition:border-color .15s,box-shadow .15s}
.tb-subcategory-card:hover {border-color:#80b1ef;box-shadow:0 8px 24px #193c7012}
.tb-subcategory-card:focus-visible {outline:3px solid #2166db;outline-offset:3px}
.tb-subcategory-icon {display:grid;place-items:center;width:56px;height:56px;border-radius:16px;background:#edf4ff;font-size:30px}
.tb-subcategory-card:nth-child(3n+2) .tb-subcategory-icon {background:#fff4df}
.tb-subcategory-card:nth-child(3n) .tb-subcategory-icon {background:#e9f7ef}
.tb-subcategory-card strong {font-size:17px;line-height:1.35;overflow-wrap:anywhere}
.tb-subcategory-cta {display:flex;justify-content:space-between;align-items:center;width:100%;margin-top:auto;color:#1760cb;font-size:14px;font-weight:650}
@media(max-width:1000px){.tb-subcategory-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){
.tb-categories-panel:has(.tb-category-branch[open]){width:min(370px,calc(100vw - 24px))!important}
.tb-categories-panel .tb-category-children{grid-template-columns:1fr}
.tb-subcategory-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.tb-subcategory-card{padding:16px;gap:12px;border-radius:14px}
.tb-subcategory-card strong{font-size:15px}
.tb-subcategory-icon{width:46px;height:46px;font-size:26px}
.tax-product_cat .hero-section{padding:24px 0!important}
}
@media(prefers-reduced-motion:reduce){.tb-subcategory-card{transition:none}}



/* Compact category directory and desktop flyout */
.tax-product_cat .hero-section{padding:16px 0!important}
.tax-product_cat .hero-section .page-title{font-size:30px!important;line-height:1.2!important}
.tax-product_cat .hero-section .page-description{margin-top:6px!important;font-size:14px}
.tax-product_cat [data-vertical-spacing]{--content-vertical-spacing:20px}
.tb-subcategory-section{margin:0 0 20px}
.tb-subcategory-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.tb-subcategory-card{flex-direction:row;align-items:center;justify-content:space-between;padding:12px 14px;gap:10px;min-height:68px;border-radius:9px}
.tb-subcategory-card strong{font-size:14px;line-height:1.35;overflow-wrap:normal}
.tb-subcategory-card .tb-subcategory-cta{width:auto;flex:0 0 auto;margin:0;font-size:20px;font-weight:400}
@media(min-width:1101px){
 .tb-categories-panel,.tb-categories-panel:has(.tb-category-branch[open]){width:290px!important;max-height:none!important;overflow:visible!important;padding:6px!important;gap:0!important}
 .tb-categories-panel>a,.tb-category-branch>summary{min-height:46px!important;padding:6px 8px!important;gap:10px!important}
 .tb-categories-panel>a strong,.tb-category-branch>summary strong{font-size:13px!important}
 .tb-categories-panel>a .tb-category-symbol,.tb-category-branch>summary .tb-category-symbol{width:32px!important;height:32px!important;flex-basis:32px!important}
 .tb-category-branch{position:static}
 .tb-categories-panel .tb-category-children{position:absolute;left:100%;top:0;width:min(850px,calc(100vw - 620px));max-height:calc(100dvh - 240px);overflow-y:auto;grid-template-columns:repeat(3,minmax(0,1fr));padding:18px;gap:6px 12px;background:#fff;border:1px solid #e0e7f0;border-radius:0 12px 12px 12px;box-shadow:12px 15px 30px #163b7018}
 .tb-categories-panel .tb-category-children a{font-weight:600;min-height:44px;padding:10px!important;border-bottom:1px solid #eef2f7;border-radius:4px}
 .tb-categories-panel .tb-category-children .tb-category-view-all{font-size:16px}
 .tb-category-branch[open] .tb-branch-chevron{transform:rotate(-45deg)}
}
@media(min-width:761px) and (max-width:1100px){.tb-subcategory-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){.tb-subcategory-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.tb-subcategory-card{padding:12px;min-height:64px}.tb-subcategory-card strong{font-size:14px}}
.tax-product_cat #main-container > .ct-container[data-vertical-spacing]{padding-top:20px!important;padding-bottom:24px!important}
@media(min-width:1101px){.tax-product_cat .hero-section{padding:12px 0!important}.tb-subcategory-grid{gap:8px}.tb-subcategory-card{min-height:64px}}

/* Line icons and subtle Top Bazar colour accents */
.tax-product_cat .hero-section{background:linear-gradient(110deg,#edf5ff 0%,#f4f7ff 55%,#eef9f5 100%)!important;border-bottom:1px solid #e5edf8}
.tb-subcategory-card{display:grid;grid-template-columns:30px minmax(0,1fr) 8px;gap:8px;padding:8px 10px;--tb-icon-ink:#2166cb;--tb-icon-bg:#edf4ff;transition:border-color .18s,background-color .18s,box-shadow .18s}
.tb-subcategory-card:nth-child(4n+2){--tb-icon-ink:#138153;--tb-icon-bg:#e9f7ef}
.tb-subcategory-card:nth-child(4n+3){--tb-icon-ink:#ae6b08;--tb-icon-bg:#fff3df}
.tb-subcategory-card:nth-child(4n){--tb-icon-ink:#7352c9;--tb-icon-bg:#f1edff}
.tb-category-line-icon{display:grid;place-items:center;width:30px;height:34px;border-radius:9px;color:var(--tb-icon-ink);background:var(--tb-icon-bg)}
.tb-category-line-icon svg{display:block;width:22px;height:22px}
.tb-subcategory-card strong{font-size:13px;line-height:1.3}
.tb-subcategory-card:hover,.tb-subcategory-card:focus-visible{border-color:#81b0ed;background:#f5f9ff;box-shadow:0 4px 12px #2166cb12}
.tb-subcategory-card .tb-subcategory-cta{font-size:20px;line-height:1;color:#2166cb}
@media(max-width:760px){.tb-subcategory-card{grid-template-columns:26px minmax(0,1fr) 7px;gap:7px;padding:10px 8px}.tb-category-line-icon{width:26px;height:32px}.tb-category-line-icon svg{width:20px;height:20px}.tb-subcategory-card strong{font-size:13px}}
@media(prefers-reduced-motion:reduce){.tb-subcategory-card{transition:none}}

/* Keep long category names within narrow mobile cards. */
.tb-subcategory-card strong{min-width:0;overflow-wrap:anywhere}

/* Compact shop heading and persistent complete header. */
.woocommerce-shop .hero-section{min-height:0!important;--min-height:0;padding:16px 0!important;background:linear-gradient(110deg,#edf5ff,#f4f7ff 55%,#eef9f5)!important}
.woocommerce-shop .hero-section .entry-header{min-height:0!important;padding:0!important}
.woocommerce-shop .hero-section .page-title{font-size:30px!important;line-height:1.2!important;margin:0!important}
.woocommerce-shop #main-container>.ct-container[data-vertical-spacing]{padding-top:20px!important}
.tb-site-header{position:sticky!important;top:var(--tb-admin-offset,0px)!important;z-index:1000;background:#fff;box-shadow:0 2px 8px #132a4c08}
body.admin-bar{--tb-admin-offset:32px}
@media(max-width:782px){body.admin-bar{--tb-admin-offset:46px}}
.tb-categories-panel{max-height:calc(100dvh - var(--tb-header-height,150px) - var(--tb-admin-offset,0px) - 16px)!important;overflow-y:auto!important}
@media(min-width:1101px){.tb-categories-panel,.tb-categories-panel:has(.tb-category-branch[open]){max-height:none!important;overflow:visible!important}.tb-categories-panel .tb-category-children{max-height:calc(100dvh - var(--tb-header-height,150px) - var(--tb-admin-offset,0px) - 16px)}}

/* Catalogue orientation: back action and full ancestry. */
.tb-catalog-location{display:flex;align-items:center;gap:18px;margin:0 0 16px;min-width:0}
.tb-catalog-back{display:inline-flex;align-items:center;gap:7px;flex-shrink:0;min-height:40px;padding:7px 12px;border:1px solid #dce7f6;border-radius:8px;background:#fff;color:#175cc4;font-size:14px;font-weight:650;text-decoration:none}
.tb-catalog-back:hover{background:#edf4ff;border-color:#81b0ed}
.tb-catalog-breadcrumbs{min-width:0;font-size:13px;line-height:1.6;color:#526783}
.tb-catalog-breadcrumbs ol{display:flex;flex-wrap:wrap;align-items:center;gap:4px 0;list-style:none;margin:0;padding:0}
.tb-catalog-breadcrumbs li{display:inline;min-width:0;overflow-wrap:anywhere}
.tb-catalog-breadcrumbs li+li:before{content:"›";display:inline-block;padding:0 9px;color:#8091a8}
.tb-catalog-breadcrumbs a{color:#175cc4;text-decoration:none}
.tb-catalog-breadcrumbs a:hover{text-decoration:underline}
.tb-catalog-breadcrumbs [aria-current="page"]{font-weight:650;color:#132a4c}
.tb-catalog-location a:focus-visible{outline:3px solid #2166db;outline-offset:3px}
@media(max-width:760px){.tb-catalog-location{align-items:flex-start;flex-direction:column;gap:9px;margin-bottom:14px}.tb-catalog-back{min-height:40px}.tb-catalog-breadcrumbs{font-size:13px}}
