/* Scoped homepage composition; PHP should render the same section/filter metadata. */
.hhm-home-section { margin-top: 36px; scroll-margin-top: 110px; }
.hhm-home-section > img.banner_sec { display: block; width: 100%; height: auto; border-radius: 20px; margin: 0 0 24px; box-shadow: 0 5px 18px #5635180b; }
.hhm-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; padding: 0; }
.hhm-section-heading h2 { display: flex; align-items: center; gap: 11px; margin: 0; color: #262626; font: 700 26px/1.4 "Segoe UI",Arial,sans-serif; text-transform: none; }
.hhm-section-heading h2::before { content: ""; width: 5px; height: 26px; flex-shrink: 0; border-radius: 5px; background: #f66b15; }
.hhm-section-all { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 9px 14px; border-radius: 24px; background: #fff1e7; color: #b94608; font: 600 13px/1.5 "Segoe UI",Arial,sans-serif; text-decoration: none; }
.hhm-section-all:hover { color: #fff; background: #f66b15; text-decoration: none; }
.hhm-subcategory-rail { position: relative; margin: 0 0 20px; }
.hhm-subcategory-track { display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 4px 2px; scroll-behavior: smooth; }
.hhm-subcategory-track::-webkit-scrollbar { display: none; }
.hhm-subcategory { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 10px; min-height: 62px; max-width: 280px; padding: 10px 15px; border: 1px solid #e9e3de; border-radius: 12px; background: #fff; color: #4e4945; font: 500 14px/1.4 "Segoe UI",Arial,sans-serif; cursor: pointer; }
.hhm-subcategory img { width: 46px; height: 40px; object-fit: contain; flex-shrink: 0; }
.hhm-subcategory span { white-space: nowrap; }
.hhm-subcategory:hover, .hhm-subcategory[aria-pressed="true"] { border-color: #f5a471; background: #fff4ec; color: #b94608; }
.hhm-subcategory.hhm-brand-logo { min-width: 122px; }
.hhm-brand-logo img { width: 82px; height: 27px; }
.hhm-brand-logo span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.hhm-subcategory-rail::before, .hhm-subcategory-rail::after { content: ""; position: absolute; top: 0; bottom: 0; z-index: 1; width: 52px; pointer-events: none; opacity: 0; transition: opacity 180ms ease; }
.hhm-subcategory-rail::before { left: 0; background: linear-gradient(90deg,#fff, #fff0); }
.hhm-subcategory-rail::after { right: 0; background: linear-gradient(270deg,#fff,#fff0); }
.hhm-subcategory-rail.can-prev::before, .hhm-subcategory-rail.can-next::after { opacity: 1; }
.hhm-rail-prev, .hhm-rail-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 30px; height: 36px; border: 1px solid #f1d9c8; border-radius: 10px; background: #fff; color: #bf4b0c; font-size: 23px; cursor: pointer; box-shadow: 0 3px 10px #62360c10; }
.hhm-rail-prev { left: -5px; }.hhm-rail-next { right: -5px; }
.hhm-home-section [hidden], #hhm-demo-search-results[hidden], #hhm-search-section[hidden] { display: none !important; }
.hhm-category-empty { padding: 36px 18px; margin-bottom: 18px; border: 1px dashed #e7d5c7; border-radius: 14px; background: #fffaf6; text-align: center; color: #777; }
.hhm-category-empty a { color: #bd490a; }
.hhm-news-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.hhm-news-card { min-width: 0; padding: 0 0 16px; border: 1px solid #eee6df; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 4px 16px #59331506; }
.hhm-news-card > a { display: block; }
.hhm-news-card > a img { display: block; width: 100%; aspect-ratio: 16/10; height: auto; object-fit: cover; border: 0; border-radius: 0; padding: 0; }
.hhm-news-card .blog_title { margin: 16px 15px 10px; font-size: 16px; font-weight: 600; line-height: 1.5; }
.hhm-news-card .news-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: #292929; text-decoration: none; }
.hhm-news-card .des_news { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0 15px; color: #8b837c; font-size: 13px; line-height: 1.6; max-height: 63px; }
.hhm-news-card .des_news p, .hhm-news-card .des_news b { margin: 0; font-weight: 400; }
#hhm-demo-search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 8; max-height: 380px; overflow-y: auto; padding: 8px; background: #fff; color: #292929; border: 1px solid #efdccf; border-radius: 12px; box-shadow: 0 10px 30px #0002; }
.hhm-search-result { display: flex; align-items: center; gap: 12px; padding: 10px; color: #292929; text-decoration: none; border-radius: 8px; }
.hhm-search-result:hover { background: #fff4ec; color: #b94608; }
.hhm-search-result img { width: 42px; height: 48px; object-fit: contain; }
.hhm-search-result span { min-width: 0; font: 13px/1.5 "Segoe UI",Arial,sans-serif; }
.hhm-search-result strong { display: block; color: #dd570f; font-size: 14px; margin-top: 4px; }
.hhm-search-summary { padding: 10px; font: 13px/1.5 "Segoe UI",Arial,sans-serif; color: #8b6a51; }
.hhm-search-summary-button { border: 0; background: #fff1e7; width: 100%; color: #b94608; border-radius: 8px; padding: 10px; cursor: pointer; }
.hhm-search-results-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.hhm-search-results-grid .hhm-search-result { border: 1px solid #eee3db; background: #fff; }
#hhm-search-section { padding-top: 20px; padding-bottom: 24px; scroll-margin-top: 110px; }
.hhm-subcategory:focus-visible, .hhm-subcategory-rail button:focus-visible, .hhm-section-all:focus-visible { outline: 2px solid #bb490b; outline-offset: 2px; }
@media(max-width:850px) { .hhm-news-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.hhm-search-results-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
    .hhm-home-section { margin-top: 26px; }.hhm-section-heading { gap: 8px; margin-bottom: 16px; }
    .hhm-section-heading h2 { font-size: 20px; gap: 8px; }.hhm-section-heading h2::before { height: 21px; width: 4px; }
    .hhm-section-all { padding: 8px 10px; font-size: 11px; }.hhm-home-section > img.banner_sec { border-radius: 14px; margin-bottom: 20px; }
    .hhm-subcategory { padding: 8px 12px; min-height: 56px; font-size: 13px; }.hhm-subcategory img { width: 38px; height: 34px; }
    .hhm-brand-logo img { width: 76px; height: 25px; }.hhm-subcategory.hhm-brand-logo { min-width: 112px; }
    .hhm-news-grid { gap: 10px; }.hhm-news-card .blog_title { margin: 12px 10px 8px; font-size: 13px; }.hhm-news-card .des_news { margin: 0 10px; font-size: 11px; max-height: 53px; }
    .hhm-search-results-grid { grid-template-columns: 1fr; }
}
@media(max-width:1100px) { #hhm-demo-search-results { position: static; max-height: 220px; margin: 8px 0; box-shadow: none; } }
@media(prefers-reduced-motion:reduce) { .hhm-subcategory-track { scroll-behavior: auto; }.hhm-subcategory-rail::before,.hhm-subcategory-rail::after { transition: none; } }
