/* Shared category tree: source order and hierarchy, with independent expand controls. */
.thc-category-tree{list-style:none!important;margin:0!important;padding:0!important}
.thc-category-tree .thc-category-children{margin-left:12px!important;padding-left:12px!important;border-left:1px solid currentColor}
.thc-category-tree li{list-style:none;margin:0;min-width:0}
.thc-category-tree a{display:block;padding:10px 8px;overflow-wrap:anywhere;text-decoration:none;line-height:1.4}
.thc-category-tree a[aria-current=page]{font-weight:800;text-decoration:underline;text-underline-offset:3px}
.thc-category-tree summary{display:flex;align-items:center;justify-content:space-between;list-style:none;cursor:pointer}
.thc-category-tree summary::-webkit-details-marker{display:none}
.thc-category-tree summary a{flex:1;min-width:0}
.thc-category-toggle{display:flex;align-items:center;justify-content:center;width:40px;min-width:40px;min-height:44px;font-size:20px;font-weight:400}
.thc-category-tree details[open]>summary>.thc-category-toggle{font-size:0}
.thc-category-tree details[open]>summary>.thc-category-toggle:after{content:'−';font-size:20px}
.thc-category-tree a:focus-visible,.thc-category-tree summary:focus-visible{outline:2px solid #f6a122;outline-offset:-2px}
.th-cats .thc-category-tree summary{padding:0;background:transparent;color:inherit!important;min-height:44px;font-size:13px;font-weight:700;gap:0}
.th-cats .thc-category-tree summary:hover{background:#34343b}
.th-cats .thc-category-tree .thc-category-children{border-color:#555}
.th-cats .thc-category-tree a{color:inherit;padding:10px 8px}
.th-cats .thc-category-tree li+li{border-top:0}
.th-cats .thc-category-tree>li+li{border-top:1px solid #34343b}
.thc-category-index{max-width:1100px;margin:20px 0}
.thc-category-index>.thc-category-tree{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.thc-category-index>.thc-category-tree>li{border:1px solid #ddd;border-radius:8px;padding:8px;background:#fff;color:#222}
.thc-category-index>.thc-category-tree>li>details>summary a,.thc-category-index>.thc-category-tree>li>a{font-size:17px;font-weight:800}
.thc-category-browse{margin:16px 0 24px;border:1px solid #ddd;border-radius:8px;padding:12px 16px}
.thc-category-browse>summary{cursor:pointer;font-weight:700;min-height:32px}
.thc-category-browse>.thc-category-tree{max-height:60vh;overflow:auto}
.thc-subcategories{margin:24px 0 30px}
.thc-subcategory-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:16px;list-style:none;margin:0;padding:0}
.thc-subcategory-grid>li{list-style:none;margin:0;min-width:0}
.thc-subcategory-grid a{display:flex;flex-direction:column;align-items:center;height:100%;padding:16px 12px;border:1px solid #e0e2e7;border-radius:8px;background:#fff;color:#222;text-align:center;text-decoration:none;box-sizing:border-box;transition:border-color .15s,box-shadow .15s}
.thc-subcategory-grid a:hover{border-color:#ffa31a;box-shadow:0 3px 12px #00000012}
.thc-subcategory-grid a:focus-visible{outline:2px solid #ffa31a;outline-offset:3px}
.thc-subcategory-grid img{display:block;width:100%;max-width:190px;height:170px;object-fit:contain;margin:0 auto 12px}
.thc-subcategory-grid span{font-size:14px;font-weight:700;line-height:1.4;overflow-wrap:anywhere;margin-top:auto}
@media(max-width:600px){.thc-subcategory-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.thc-subcategory-grid a{padding:12px 8px}.thc-subcategory-grid img{height:130px}.thc-subcategory-grid span{font-size:13px}}
@media(max-width:900px){.thc-category-index>.thc-category-tree{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.thc-category-index>.thc-category-tree{grid-template-columns:minmax(0,1fr)}.thc-category-tree .thc-category-children{margin-left:6px!important;padding-left:8px!important}}
