/* Hififutár homepage. The shared shop header and product card stay intact elsewhere. */
.hf-home {
    --hf-ink: #17232e;
    --hf-muted: #596777;
    --hf-paper: #f6f6f2;
    --hf-line: #dce2e3;
    --hf-accent: #cf4054;
    background: var(--hf-paper);
    color: var(--hf-ink);
}

.hf-home .content-wrapper { padding-bottom: 2rem; }
.hf-home .container { max-width: 1376px; }
.hf-home a:focus-visible,
.hf-home button:focus-visible { outline: 3px solid #d34a5d; outline-offset: 3px; }

.hf-skip-link {
    position: fixed;
    top: -4rem;
    left: 1rem;
    z-index: 1200;
    padding: .65rem 1rem;
    background: #fff;
    color: #17232e;
    border-radius: .35rem;
}
.hf-skip-link:focus { top: 1rem; }

.hf-topbar {
    background: #111b24;
    color: #e9ecee;
    border-bottom: 1px solid rgba(255, 255, 255, .13);
    font-size: .78rem;
    letter-spacing: .015em;
}
.hf-topbar__inner { display: flex; justify-content: space-between; gap: 1rem; padding-top: .5rem; padding-bottom: .5rem; }
.hf-topbar a { color: inherit; text-decoration: none; }
.hf-topbar a:hover { color: #fff; text-decoration: underline; }
.hf-topbar i { margin-right: .3rem; }

.hf-home header.navbar { background: #17232e !important; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.hf-home header.navbar > .container { padding-top: .7rem !important; padding-bottom: .7rem !important; }
.hf-home header .navbar-brand img { width: 170px; height: auto; }
.hf-home header .hififutar-instant-search input {
    border: 1px solid rgba(255, 255, 255, .25) !important;
    border-radius: .55rem !important;
    background: #f7f8f8;
    color: #17232e;
    font-size: 1rem;
}
.hf-home header .hififutar-instant-search i.ci-search { color: #566371 !important; }
.hf-feature {
    display: grid;
    grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
    padding-top: 1.25rem;
}
.hf-feature--no-banner { grid-template-columns: 1fr; }
.hf-categories,
.hf-hero { min-width: 0; border: 1px solid var(--hf-line); border-radius: .7rem; overflow: hidden; }
.hf-categories { background: #fff; }
.hf-categories__head { padding: 1.1rem 1.15rem .75rem; border-bottom: 1px solid #edf0ef; }
.hf-categories__head h2 { margin: 0 0 .25rem; font-size: 1.25rem; letter-spacing: -.025em; }
.hf-categories__head p { margin: 0; color: var(--hf-muted); font-size: .8rem; }
.hf-categories__list { margin: 0; padding: .4rem; list-style: none; }
.hf-categories__list a,
.hf-categories__fallback {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 2rem;
    padding: .2rem .7rem;
    border-radius: .3rem;
    color: var(--hf-ink);
    font-size: .82rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    touch-action: manipulation;
}
.hf-categories__list a:hover,
.hf-categories__list a:focus-visible,
.hf-categories__fallback:hover { background: #f5f5f2; color: #ac2339; }
.hf-categories__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hf-categories__list i { margin-left: auto; color: #8b969f; font-size: .7rem; }
.hf-categories__fallback { margin: .5rem; }

.hf-hero { position: relative; align-self: start; background: #17232e; }
.hf-hero__slide { display: block; }
.hf-hero__slide[hidden] { display: none; }
.hf-hero__media { display: block; width: 100%; aspect-ratio: 1902 / 827; }
.hf-hero__media picture { display: block; width: 100%; height: 100%; }
.hf-hero__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hf-hero__controls { position: absolute; right: .75rem; bottom: .75rem; display: flex; align-items: center; gap: .75rem; padding: .35rem; border-radius: .35rem; background: rgba(17, 27, 36, .82); }
.hf-hero__counter { padding-left: .5rem; color: #fff; font-size: .75rem; font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: .08em; }
.hf-hero__buttons { display: flex; gap: .4rem; }
.hf-hero__buttons button { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1px solid rgba(255, 255, 255, .55); border-radius: .3rem; background: rgba(255, 255, 255, .1); color: #fff; touch-action: manipulation; }
.hf-hero__buttons button:hover { background: #fff; border-color: #fff; color: #17232e; }

.hf-home .hf-products { padding-top: 3.4rem; }
.hf-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.3rem; padding-bottom: .9rem; border-bottom: 1px solid #cfd8d9; }
.hf-section-heading h2 { margin: .25rem 0 0; font-size: clamp(1.55rem, 2.1vw, 2.2rem); font-weight: 800; letter-spacing: -.04em; }
.hf-section-heading p { margin: 0 0 .18rem; color: var(--hf-muted); font-size: .86rem; }
.hf-section-heading a { color: var(--hf-ink); font-size: .85rem; font-weight: 750; text-decoration: none; }
.hf-section-heading a:hover { color: #ac2339; text-decoration: underline; }
.hf-section-heading a i { margin-left: .35rem; }
.hf-empty-products { padding: 1.5rem; border: 1px solid var(--hf-line); border-radius: .45rem; background: #fff; }

.hf-product-grid > .col { min-width: 0; }
.hf-product-grid .product-card { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--hf-line); border-radius: .45rem !important; box-shadow: none; }
.hf-product-grid .product-card > .position-relative > a { display: grid !important; place-items: center; height: 10.8rem; padding: 1.7rem .75rem .55rem !important; }
.hf-product-grid .product-card > .position-relative > a img { display: block; width: 100%; height: 8.2rem; object-fit: contain; }
.hf-product-grid .product-card > .w-100 { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; padding: .15rem .85rem .85rem !important; }
.hf-product-grid .product-card .fs-sm.text-muted { display: block; overflow: hidden; color: var(--hf-muted) !important; font-size: .68rem !important; text-overflow: ellipsis; white-space: nowrap; }
.hf-product-grid .product-card h3 { min-height: 2.5rem; margin: .3rem 0 .5rem !important; padding: 0 !important; }
.hf-product-grid .product-card h3 a { display: -webkit-box !important; overflow: hidden; color: var(--hf-ink); font-size: .82rem !important; font-weight: 700 !important; line-height: 1.35; white-space: normal !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.hf-product-grid .product-card > .w-100 > .d-flex:last-child { margin-top: auto; gap: .25rem; }
.hf-product-grid .product-card .h5 { color: var(--hf-ink); font-size: .96rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.25; }
.hf-product-grid .product-card .h5 span[style] { background: #b9273d !important; }
.hf-product-grid .product-card-button { flex: 0 0 auto; width: 2.4rem; height: 2.4rem; }
.hf-product-grid .badge { font-size: .61rem; }

.hf-notice { margin-top: 3.5rem; }
.hf-notice > h2 { margin: 0 0 1.25rem; font-size: clamp(1.55rem, 2.1vw, 2.2rem); font-weight: 800; letter-spacing: -.04em; color: var(--hf-ink); }
.hf-notice__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 1.25rem; }
.hf-notice__card { display: flex; align-items: stretch; gap: 1.25rem; min-width: 0; padding: 1.4rem 1.5rem; border: 1px solid var(--hf-line); border-radius: .75rem; background: #fff; box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04); transition: border-color .18s ease, box-shadow .18s ease; }
.hf-notice__card:hover { border-color: #cbd5e1; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); }
.hf-notice__body { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.hf-notice h3 { margin: 0 0 .5rem; font-size: 1.1rem; font-weight: 750; line-height: 1.35; color: var(--hf-ink); text-wrap: balance; }
.hf-notice p { margin: 0 0 .75rem; color: var(--hf-muted); font-size: .85rem; line-height: 1.55; }
.hf-notice a, .hf-notice__action { margin-top: auto; color: #b9273d; font-size: .84rem; font-weight: 700; display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; cursor: pointer; transition: color .15s ease; }
.hf-notice a:hover, .hf-notice__action:hover { color: #8c192a; text-decoration: underline; }
.hf-notice img:not(.hf-notice__full-notice) { flex: 0 0 110px; width: 110px; height: 110px; object-fit: contain; border-radius: 12px; }
.hf-notice__disclosure { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.hf-notice__summary { display: flex; align-items: stretch; justify-content: space-between; gap: 1.25rem; padding: 1.4rem 1.5rem; cursor: pointer; list-style: none; user-select: none; touch-action: manipulation; transition: background-color .18s ease; }
.hf-notice__summary::-webkit-details-marker { display: none; }
.hf-notice__summary:focus-visible { outline: 2px solid #b9273d; outline-offset: -2px; }
.hf-notice__summary:hover { background: #f8fafc; }
.hf-notice__action-close { display: none; }
.hf-notice__disclosure[open] .hf-notice__action-open { display: none; }
.hf-notice__disclosure[open] .hf-notice__action-close { display: inline-flex; align-items: center; gap: .35rem; }
.hf-notice__disclosure-content { padding: 1.25rem 1.5rem 1.5rem; border-top: 1px solid var(--hf-line); background: #f8fafc; }
.hf-notice__poster-wrapper { max-height: 520px; overflow-y: auto; overflow-x: hidden; border: 1px solid var(--hf-line); border-radius: 10px; background: #fff; padding: .75rem; margin-bottom: 1rem; box-shadow: inset 0 2px 6px rgba(0,0,0,0.03); scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.hf-notice .hf-notice__full-notice { display: block; width: 100%; height: auto; max-width: 32rem; margin: 0 auto; object-fit: contain; border-radius: 6px; }
.hf-notice__disclosure-meta { display: flex; flex-direction: column; gap: .4rem; }
.hf-notice__disclosure-meta p { margin: 0; font-size: .82rem; color: var(--hf-muted); }
.hf-notice__disclosure-meta a { margin-top: 0; }

.hf-home .hf-infos { padding-top: 2.4rem !important; margin-top: 0 !important; }
.hf-home .hf-infos .rounded-circle { padding: .85rem !important; }
.hf-home .hf-infos .fs-2 { font-size: 1.35rem !important; }
.hf-home .hf-infos p { font-size: .77rem !important; }

@media (min-width: 992px) {
    .hf-home .hififutar-nav-category-col { display: none; }
    .hf-home .hififutar-nav-links-col { flex: 0 0 100%; max-width: 100%; width: 100%; padding-left: .75rem !important; }
    .hf-home #stuckNav .hififutar-main-nav { gap: 1.5rem; }
    .hf-home #stuckNav .hififutar-main-nav > .nav-item > .hififutar-main-nav-link { min-height: 2.8rem; font-size: .86rem; }
}

@media (max-width: 991.98px) {
    .hf-feature { grid-template-columns: 1fr; }
    .hf-categories { order: 2; }
    .hf-hero { order: 1; }
    .hf-categories__head { padding-bottom: .45rem; }
    .hf-categories__list { display: flex; flex-direction: row; align-items: stretch; gap: .35rem; overflow-x: auto; overscroll-behavior-x: contain; padding: .65rem; }
    .hf-categories__list li { flex: 0 0 auto; }
    .hf-categories__list a { min-height: 2.75rem; border: 1px solid var(--hf-line); padding: .5rem .8rem; }
    .hf-categories__list i { display: none; }
    .hf-categories__name { max-width: 12rem; }
    .hf-home .hififutar-nav-category-col .navbar-nav { display: none; }
    .hf-home-category-link { display: flex; align-items: center; justify-content: space-between; min-height: 2.75rem; padding: .6rem .85rem; border-radius: .35rem; background: #f4f6f6; color: #17232e; font-weight: 750; text-decoration: none; }
    .hf-notice__grid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    .hf-topbar__inner { justify-content: center; }
    .hf-topbar__inner > span { display: none; }
    .hf-home header .navbar-brand .d-none.d-sm-flex { display: flex !important; }
    .hf-home header .navbar-brand img { width: 125px; }
    .hf-home header .navbar-toggler { margin-right: .7rem !important; }
    .hf-feature { padding-top: .75rem; }
    .hf-hero__media { aspect-ratio: 4 / 3; }
    .hf-hero__buttons button { width: 2.75rem; height: 2.75rem; }
    .hf-home .hf-products { padding-top: 2.5rem; }
    .hf-section-heading { align-items: flex-start; }
    .hf-section-heading p { display: none; }
    .hf-section-heading a { max-width: 9rem; text-align: right; }
    .hf-product-grid .product-card > .position-relative > a { height: 9rem; }
    .hf-product-grid .product-card > .position-relative > a img { height: 6.8rem; }
    .hf-product-grid .product-card > .w-100 { padding: .15rem .6rem .65rem !important; }
    .hf-product-grid .product-card .h5 { font-size: .84rem; }
    .hf-product-grid .product-card-button { width: 2.75rem; height: 2.75rem; }
    .hf-notice { margin-top: 2.5rem; }
    .hf-notice__card { padding: 1.15rem; gap: 1rem; }
    .hf-notice__disclosure { padding: 0; }
    .hf-notice__summary { padding: 1.15rem; gap: 1rem; }
    .hf-notice__disclosure-content { padding: 1rem 1.15rem 1.15rem; }
    .hf-notice img:not(.hf-notice__full-notice) { flex: 0 0 76px; width: 76px; height: 76px; }
}

@media (max-width: 390px) {
    .hf-home header .navbar-brand img { width: 108px; }
    .hf-home header .navbar-toggler { margin-right: .35rem !important; }
    .hf-notice img:not(.hf-notice__full-notice) { display: none; }
}

[data-bs-theme="dark"] .hf-home { --hf-ink: #edf1f3; --hf-muted: #b2bec5; --hf-paper: #121a21; --hf-line: #39444b; --hf-accent: #ff8797; }
[data-bs-theme="dark"] .hf-categories,
[data-bs-theme="dark"] .hf-product-grid .product-card,
[data-bs-theme="dark"] .hf-empty-products,
[data-bs-theme="dark"] .hf-notice__card { background: #1d2932 !important; border-color: #39444b; box-shadow: none; }
[data-bs-theme="dark"] .hf-notice__card:hover { border-color: #52636f; }
[data-bs-theme="dark"] .hf-hero { background: #26353c; }
[data-bs-theme="dark"] .hf-categories__head { border-color: #39444b; }
[data-bs-theme="dark"] .hf-categories__list a:hover,
[data-bs-theme="dark"] .hf-categories__list a:focus-visible { background: #34434b; color: #fff; }
[data-bs-theme="dark"] .hf-notice__summary:hover { background: #24333e; }
[data-bs-theme="dark"] .hf-notice__disclosure-content { background: #151e25; border-color: #39444b; }
[data-bs-theme="dark"] .hf-notice__poster-wrapper { background: #121a21; border-color: #39444b; }
[data-bs-theme="dark"] .hf-notice a,
[data-bs-theme="dark"] .hf-notice__action { color: var(--hf-accent, #ff8797); }
[data-bs-theme="dark"] .hf-notice a:hover,
[data-bs-theme="dark"] .hf-notice__action:hover { color: #ffb3bd; }

@media (prefers-reduced-motion: reduce) {
    .hf-home *, .hf-home *::before, .hf-home *::after { scroll-behavior: auto !important; }
    .hf-notice__disclosure-chevron { transition: none; }
}
