/* Hidra Katalógus – kategóriaoldal
   Színek / méretek felülírása a saját CSS-edben: .hcat { --hc-cta: …; } */

.hcat {
    --hc-accent: #20486c;      /* kiemelés: aktív szűrő, rendezés, linkek (Hidra sötétkék) */
    --hc-cta: #2c6f8c;         /* ajánlatkérő gomb (Hidra kék, a logó árnyalata AA kontraszttal) */
    --hc-cta-hover: #1f5a75;
    --hc-text: #14202e;
    --hc-muted: #66717f;
    --hc-line: #e1e5ea;
    --hc-soft: #f4f6f8;
    --hc-hover: #f7f9fb;
    --hc-top: 0px;             /* ragadós fejléc alatti eltolás – a JS automatikusan állítja */

    display: grid;
    width: 100%;
    min-width: 0;
    max-width: var(--hc-max, 1320px);   /* ha konténer nélküli helyre kerül, akkor se fusson ki a képernyő széléig */
    margin-inline: auto;
    grid-template-columns: clamp(220px, 23%, 272px) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    color: var(--hc-text);
    font-size: 15px;
    line-height: 1.45;
}
/* Oxygen: a szekció belső doboza flex-konténer, ami a gyermekeit tartalomszélességre zsugorítaná.
   A katalógust tartalmazó elemek mindig a teljes rendelkezésre álló szélességet kapják. */
:where(*):has(> .hcat),
:where(.ct-div-block, .ct-section-inner-wrap > *, .oxy-dynamic-list, .ct-inner-content):has(.hcat) {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    min-width: 0;
}

.hcat *, .hcat *::before, .hcat *::after { box-sizing: border-box; }
.hcat a { color: inherit; text-decoration: none; }
.hcat button { font: inherit; color: inherit; }
.hcat-list-plain { list-style: none; margin: 0; padding: 0; }
.hcat-list-plain li { margin: 0; padding: 0; }

/* =====================================================================
   Oldalsáv
   ===================================================================== */

.hcat-side {
    position: sticky;
    top: calc(var(--hc-top) + 16px);
    max-height: calc(100vh - var(--hc-top) - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--hc-line) transparent;
}
.hcat-side-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 36px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--hc-text);
}
.hcat-side-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.hcat-side-clear { margin-left: auto; font-size: 13px; color: var(--hc-accent) !important; }
.hcat-side-clear:hover { text-decoration: underline; }
.hcat-side-close, .hcat-side-apply { display: none; }

.hcat-group { border-bottom: 1px solid var(--hc-line); }
.hcat-head {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px 2px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.3;
    text-transform: uppercase;
    cursor: pointer;
}
.hcat-head::after {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .2s;
}
.hcat-head .hcat-badge { margin-left: auto; }
.hcat-head .hcat-badge + * { margin-left: 0; }
.hcat-head .hcat-badge ~ ::after { margin-left: 0; }
.hcat-group.is-open > .hcat-head::after { transform: translateY(2px) rotate(-135deg); }
.hcat-head:focus-visible { outline: 2px solid var(--hc-accent); outline-offset: 2px; }
.hcat-body { display: none; padding: 0 2px 14px; }
.hcat-group.is-open > .hcat-body { display: block; }

.hcat-opt, .hcat-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 30px;
    padding: 4px 0;
    line-height: 1.3;
    cursor: pointer;
}
.hcat-opt:hover .hcat-name, .hcat-cat:hover .hcat-name { color: var(--hc-accent); }
.hcat-box {
    position: relative;
    flex: none;
    width: 17px;
    height: 17px;
    border: 1.5px solid #9aa4b1;
    border-radius: 3px;
    background: #fff;
    transition: background .12s, border-color .12s;
}
.hcat-opt:hover .hcat-box { border-color: var(--hc-accent); }
.hcat-opt.is-on .hcat-box { background: var(--hc-accent); border-color: var(--hc-accent); }
.hcat-opt.is-on .hcat-box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1.5px;
    width: 4.5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.hcat-opt.is-on .hcat-name { font-weight: 700; }
.hcat-opt.is-disabled { opacity: .38; cursor: default; }
.hcat-opt.is-disabled:hover .hcat-name { color: inherit; }
.hcat-n {
    margin-left: auto;
    padding-left: 8px;
    font-size: 12px;
    color: var(--hc-muted);
    font-variant-numeric: tabular-nums;
}
.hcat-list-plain li.hcat-extra { display: none; }
.hcat-body.show-all li.hcat-extra { display: list-item; }
.hcat-more-btn {
    all: unset;
    margin-top: 6px;
    font-size: 13px;
    color: var(--hc-accent);
    cursor: pointer;
}
.hcat-more-btn:hover { text-decoration: underline; }

.hcat-back { display: inline-block; font-size: 13px; color: var(--hc-muted) !important; margin-bottom: 4px; }
.hcat-back:hover { color: var(--hc-accent) !important; }
.hcat-cat-current { font-weight: 700; padding: 2px 0 6px; line-height: 1.3; }
.hcat-cats { padding-left: 12px; border-left: 2px solid var(--hc-line); }

.hcat-badge {
    display: inline-block;
    min-width: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--hc-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    letter-spacing: 0;
}

/* =====================================================================
   Fő rész – a lista a SAJÁT szélességéhez igazodik (container query),
   így keskeny Oxygen-szekcióban és mobilon is helyes marad
   ===================================================================== */

.hcat-main { min-width: 0; container-type: inline-size; container-name: hcatm; }

.hcat-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.hcat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 4px 8px 4px 10px;
    border: 1px solid var(--hc-line);
    border-radius: 3px;
    background: #fff;
    font-size: 13px;
    transition: border-color .12s;
}
.hcat-chip-k { color: var(--hc-muted); }
.hcat-chip-v { font-weight: 700; }
.hcat-chip::after { content: "\00d7"; font-size: 16px; line-height: 1; color: var(--hc-muted); }
.hcat-chip:hover { border-color: var(--hc-accent); }
.hcat-chip:hover::after { color: var(--hc-accent); }
.hcat-chips-clear { font-size: 13px; color: var(--hc-accent) !important; margin-left: 4px; }
.hcat-chips-clear:hover { text-decoration: underline; }

/* Ragadós sáv: eszköztár + oszlopfejléc */
.hcat-stick {
    position: sticky;
    top: var(--hc-top);
    z-index: 20;
    background: #fff;
}
.hcat-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding: 10px 0;
    border-bottom: 1px solid var(--hc-line);
}
.hcat-count { font-size: 14px; color: var(--hc-muted); white-space: nowrap; }
.hcat-count strong { color: var(--hc-text); font-size: 15px; }
.hcat-bar-right { display: flex; align-items: center; gap: 16px; margin-left: auto; min-width: 0; }
.hcat-select { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--hc-muted); white-space: nowrap; min-width: 0; }
.hcat-select select {
    appearance: none;
    -webkit-appearance: none;
    height: 36px;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 32px 0 12px;
    border: 1px solid var(--hc-line);
    border-radius: 3px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2314202e' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--hc-text);
    font: inherit;
    font-size: 14px;
    line-height: 34px;
    cursor: pointer;
}
.hcat-select select:hover, .hcat-select select:focus { border-color: var(--hc-accent); outline: none; }
.hcat-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--hc-text);
    border-radius: 3px;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.hcat-filter-btn:hover { border-color: var(--hc-accent); color: var(--hc-accent); }

/* ---------- Táblázat (széles lista) ---------- */

.hcat-thead, .hcat-list { --hc-tpl: 64px minmax(200px, 3fr) repeat(var(--hc-cols), minmax(62px, .9fr)) 150px; }
.hcat-thead.hcat-nocols, .hcat-list.hcat-nocols { --hc-tpl: 64px minmax(170px, 1fr) 150px; }

.hcat-thead, .hcat-row {
    display: grid;
    grid-template-columns: var(--hc-tpl);
    column-gap: 16px;
    align-items: center;
    padding-inline: 10px;
}
.hcat-thead {
    min-height: 42px;
    padding-block: 8px;
    border-bottom: 2px solid var(--hc-text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--hc-muted);
    box-shadow: 0 8px 12px -10px rgba(20, 32, 46, .22);
}
.hcat-th-product { grid-column: span 2; }
.hcat-sort { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.hcat-sort:hover, .hcat-sort.is-active { color: var(--hc-text); }
.hcat-sort.is-filtered { color: var(--hc-accent); }
.hcat-arrow {
    flex: none;
    width: 8px;
    height: 10px;
    opacity: .35;
    background: no-repeat center/8px 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='10'%3E%3Cpath d='M1 4l3-3 3 3M1 6l3 3 3-3' fill='none' stroke='%2314202e' stroke-width='1.4'/%3E%3C/svg%3E");
}
.hcat-sort:hover .hcat-arrow { opacity: .8; }
.hcat-sort.is-asc .hcat-arrow { opacity: 1; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='10'%3E%3Cpath d='M1 5l3-3 3 3' fill='none' stroke='%2320486c' stroke-width='1.6'/%3E%3C/svg%3E"); }
.hcat-sort.is-desc .hcat-arrow { opacity: 1; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='10'%3E%3Cpath d='M1 5l3 3 3-3' fill='none' stroke='%2320486c' stroke-width='1.6'/%3E%3C/svg%3E"); }

.hcat-row {
    position: relative;
    padding-block: 12px;
    border-bottom: 1px solid var(--hc-line);
    transition: background-color .12s;
}
.hcat-row::before { /* bal oldali kiemelő csík hoverkor – nem tolja el a tartalmat */
    content: "";
    position: absolute;
    left: 0;
    top: -1px;
    bottom: -1px;
    width: 3px;
    background: var(--hc-cta);
    opacity: 0;
    transition: opacity .12s;
}
.hcat-row:hover { background-color: var(--hc-hover); }
.hcat-row:hover::before { opacity: 1; }

.hcat-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 56px;
    overflow: hidden;
}
.hcat-img img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 100%;
    margin: 0 !important;
    object-fit: contain;
    mix-blend-mode: multiply; /* a fehér hátterű termékfotó beleolvad a hover-háttérbe */
}

.hcat-info { min-width: 0; }
.hcat-title { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.hcat-title:hover { color: var(--hc-accent); text-decoration: underline; text-underline-offset: 2px; }
.hcat-sku { margin-top: 3px; font-size: 12px; color: var(--hc-muted); }
.hcat-sku span { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

.hcat-attrs { display: contents; }
.hcat-v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcat-v.is-filtered { color: var(--hc-accent); }
.hcat-v.is-empty { color: var(--hc-muted); font-weight: 400; }

.hcat-act { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; }
.hcat-act > * { min-width: 0; }
.hcat-act .button, .hcat-act a.button, .hcat-act button.button, .hcat-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    margin: 0 !important;
    padding: 8px 12px !important;
    border: 0 !important;
    border-radius: 3px !important;
    background: var(--hc-cta) !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: .06em;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: none !important;
    transition: background-color .12s;
}
.hcat-act .button:hover, .hcat-btn:hover { background: var(--hc-cta-hover) !important; }
.hcat-act .button:focus-visible, .hcat-btn:focus-visible { outline: 2px solid var(--hc-accent); outline-offset: 2px; }
.hcat-act .added_to_cart { font-size: 12px; text-align: center; }
.hcat-more { font-size: 13px; color: var(--hc-accent) !important; text-align: center; padding: 2px 0; }
.hcat-more:hover { text-decoration: underline; }

/* Lapozás */
.hcat-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 32px 0 8px; }
.hcat-pages .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border: 1px solid var(--hc-line);
    border-radius: 3px;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.hcat-pages a.page-numbers:hover { border-color: var(--hc-accent); color: var(--hc-accent); }
.hcat-pages .current { background: var(--hc-accent); border-color: var(--hc-accent); color: #fff; font-weight: 700; }
.hcat-pages .dots { border: 0; min-width: 20px; }

.hcat-empty { padding: 56px 0; text-align: center; color: var(--hc-muted); }
.hcat-empty .hcat-btn { display: inline-flex !important; width: auto; padding-inline: 20px !important; }

.hcat.is-busy .hcat-main { opacity: .45; pointer-events: none; transition: opacity .15s; }

/* ---------- Közepes lista: az attribútumok a cím alá kerülnek ---------- */
@container hcatm (max-width: 819px) {
    .hcat-thead { display: none; }
    .hcat-row,
    .hcat-list.hcat-nocols .hcat-row {
        grid-template-columns: 64px minmax(0, 1fr) 150px;
        grid-template-areas:
            "img info  act"
            "img specs act";
        row-gap: 8px;
        align-items: start;
    }
    .hcat-img { grid-area: img; align-self: start; }
    .hcat-info { grid-area: info; }
    .hcat-act { grid-area: act; align-self: center; }
    .hcat-attrs {
        grid-area: specs;
        display: flex;
        flex-wrap: wrap;
        gap: 4px 6px;
    }
    .hcat-v {
        padding: 3px 8px;
        border-radius: 3px;
        background: var(--hc-soft);
        font-size: 13px;
        line-height: 1.35;
        white-space: normal;
    }
    .hcat-v::before { content: attr(data-label) " "; color: var(--hc-muted); font-weight: 400; }
    .hcat-row:hover .hcat-v { background: #fff; }
}

/* ---------- Keskeny lista (mobil): kártya ---------- */
@container hcatm (max-width: 520px) {
    .hcat-bar-right { width: 100%; margin-left: 0; }
    .hcat-select { flex: 1; }
    .hcat-select > span { display: none; }
    .hcat-select select { width: 100%; }
    .hcat-select--pp { flex: 0 0 auto; }

    .hcat-row,
    .hcat-list.hcat-nocols .hcat-row {
        grid-template-columns: 56px minmax(0, 1fr);
        grid-template-areas:
            "img   info"
            "specs specs"
            "act   act";
        column-gap: 12px;
        row-gap: 10px;
        padding-inline: 4px;
    }
    .hcat-row::before { display: none; }
    .hcat-row:hover { background-color: transparent; }
    .hcat-row:hover .hcat-v { background: var(--hc-soft); }
    .hcat-img { width: 56px; height: 48px; }
    .hcat-act { flex-direction: row; align-items: center; gap: 12px; }
    .hcat-act > :first-child { flex: 1; }
    .hcat-act .button, .hcat-act a.button { flex: 1; min-height: 42px; }
    .hcat-more { flex: none; padding: 8px 4px; }
}

/* =====================================================================
   Oldalelrendezés: keskenyebb kijelzőn a szűrő kihúzható panel
   ===================================================================== */
@media (max-width: 960px) {
    .hcat { grid-template-columns: minmax(0, 1fr); gap: 0; }

    .hcat-side {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 100000;
        max-height: none;
        padding: 16px 20px 96px;
        background: #fff;
    }
    .hcat.is-filters-open .hcat-side { display: block; }
    .hcat-side-head { position: sticky; top: -16px; z-index: 2; background: #fff; padding-top: 4px; }
    .hcat .hcat-side-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: none;
        width: 40px;
        height: 40px;
        margin-left: auto;
        border: 0;
        border-radius: 50%;
        background: var(--hc-soft);
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }
    .hcat-side-clear + .hcat-side-close { margin-left: 8px; }
    .hcat-side-apply {
        display: block;
        position: fixed;
        left: 20px;
        right: 20px;
        bottom: max(16px, env(safe-area-inset-bottom));
        height: 50px;
        border: 0;
        border-radius: 3px;
        background: var(--hc-accent);
        color: #fff !important;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 -12px 20px 6px #fff;
    }
    .hcat-opt, .hcat-cat { min-height: 38px; } /* nagyobb érintési felület */
    .hcat-filter-btn { display: inline-flex; }
}

body.hcat-lock { overflow: hidden; }

/* Tartalék, ha nem az Oxygen feltételt használod: ezt az osztályt kapó elem katalógus-oldalon eltűnik */
.hcat-page .hcat-hide-on-catalog { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    .hcat *, .hcat *::before, .hcat *::after { transition: none !important; }
}
