
/* ============================================================
   HEADER STYLE 5 — Webshop (3 soros, live search)
   FIGYELEM: ezt a fájlt a rendszer generálja (header-custom.css),
   kézzel ne szerkeszd — a config css_template kulcsát módosítsd!
   ============================================================ */

.header-style-5 {
    z-index: 1000;
    background-color: #ffffff;
}

/* --- Görgetési viselkedés --- */

/* Statikus: az oldallal együtt görög felfelé */
.header-style-5[data-scroll="static"] {
    position: relative;
}

/* Mindig látható */
.header-style-5[data-scroll="sticky"] {
    position: sticky;
    top: 0;
}

/* Elrejtés lefelé görgetve — a helykitöltőt a JS kezeli */
.header-style-5[data-scroll="hide-down"] {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transition: transform 0.3s ease;
}

.header-style-5[data-scroll="hide-down"].is-hidden {
    transform: translateY(-100%);
}

/* A fix fejléc alatti helykitöltő, hogy ne ugorjon a tartalom */
.hs5-header-spacer {
    display: none;
}

.hs5-header-spacer.is-active {
    display: block;
}

/* Árnyék görgetés után */
.header-style-5.is-scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Hirdetősáv összecsukása rögzített módban */
.header-style-5[data-scroll="sticky"] .hs5-toprow {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease;
    max-height: 120px;
    opacity: 1;
}

.header-style-5[data-scroll="sticky"].is-compact .hs5-toprow {
    max-height: 0;
    opacity: 0;
}

/* Közös, középre igazított konténer */
.header-style-5 .hs5-container {
    max-width: 1320px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================================
   1. SOR — HIRDETŐSÁV
   ============================================================ */
.header-style-5 .hs5-toprow {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.header-style-5 .hs5-toprow-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    color: #333333;
    line-height: 1.4;
}

/* Bal oldali forgó szövegek — egymásra rétegezve, csak az aktív látszik */
.header-style-5 .hs5-toprow-left {
    position: relative;
    flex: 1 1 auto;
    min-height: 1.4em;
    text-align: left;
}

.header-style-5 .hs5-rotate-text {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-style-5 .hs5-rotate-text.is-active {
    opacity: 1;
    visibility: visible;
}

/* Ha csak 1 szöveg van, ne legyen abszolút pozicionálva (CLS) */
.header-style-5 .hs5-toprow-left.is-single .hs5-rotate-text {
    position: static;
    opacity: 1;
    visibility: visible;
}

/* Jobb oldali elérhetőség */
.header-style-5 .hs5-toprow-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.header-style-5 .hs5-toprow-phone {
    color: #fe4f00;
    text-decoration: none;
    font-weight: 700;
}

.header-style-5 .hs5-toprow-phone:hover {
    text-decoration: underline;
}

/* ============================================================
   2. SOR — FŐ HEADER (logó + kereső + akciók)
   ============================================================ */
.header-style-5 .hs5-mainrow {
    background-color: #ffffff;
}

.header-style-5 .hs5-mainrow-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding-left: 20px;
    padding-right: 20px;
}

/* --- Logó --- */
.header-style-5 .hs5-logo {
    flex: 0 0 auto;
    padding-top: 35px;
    padding-bottom: 35px;
}

.header-style-5 .hs5-logo img {
    display: block;
    width: 151px;
    height: 25px;
    object-fit: contain;
    max-width: 100%;
}

.header-style-5 .hs5-logo .site-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

/* --- Keresőmező --- */
.header-style-5 .hs5-search {
    position: relative;
    flex: 1 1 auto;
    max-width: 450px;
}

.header-style-5 .hs5-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.header-style-5 .hs5-search-input {
    width: 100%;
    padding: 11px 48px 11px 18px;
    font-size: 14px;
    font-family: inherit;
    color: #374151;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.2s ease;
}

.header-style-5 .hs5-search-input:focus {
    border-color: #fe4f00;
}

.header-style-5 .hs5-search-input::placeholder {
    color: #374151;
    opacity: 0.55;
}

/* A nagyító csak dekoráció — nem kattintható */
.header-style-5 .hs5-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    color: #fe4f00;
    pointer-events: none;
}

/* Live search találati lista */
.header-style-5 .hs5-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
    overflow: hidden;
    z-index: 1200;
    max-height: 460px;
    overflow-y: auto;
}

.header-style-5 .hs5-search-results[hidden] {
    display: none;
}

.header-style-5 .hs5-sr-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: #111827;
    border-bottom: 1px solid #f1f2f4;
    transition: background-color 0.15s ease;
}

.header-style-5 .hs5-sr-item:last-child {
    border-bottom: none;
}

.header-style-5 .hs5-sr-item:hover,
.header-style-5 .hs5-sr-item.is-highlighted {
    background-color: #f6f8f7;
}

.header-style-5 .hs5-sr-thumb {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    background-color: #f3f4f6;
}

.header-style-5 .hs5-sr-body {
    flex: 1 1 auto;
    min-width: 0;
}

.header-style-5 .hs5-sr-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-style-5 .hs5-sr-cat {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.header-style-5 .hs5-sr-meta {
    flex: 0 0 auto;
    text-align: right;
}

.header-style-5 .hs5-sr-price {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #fe4f00;
    white-space: nowrap;
}

.header-style-5 .hs5-sr-stock {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

.header-style-5 .hs5-sr-stock.is-out {
    color: #dc2626;
}

.header-style-5 .hs5-sr-state {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}

/* --- Jobb oldali akciók (kívánságlista / fiók / kosár) --- */
.header-style-5 .hs5-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-style-5 .hs5-action {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    white-space: nowrap;
}

.header-style-5 .hs5-action-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #f0f4f2;
    border-radius: 0%;
    color: #fe4f00;
    transition: transform 0.2s ease;
}

.header-style-5 .hs5-action-icon svg {
    width: 20px;
    height: 20px;
}

.header-style-5 .hs5-action:hover .hs5-action-icon {
    transform: translateY(-2px);
}

.header-style-5 .hs5-action-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.header-style-5 .hs5-action-title {
    font-size: 13px;
    font-weight: 400;
    color: #111827;
}

.header-style-5 .hs5-action-sub {
    font-size: 12px;
    color: #6b7280;
}

/* Kosár — a közös mini-cart komponens felülstílusozása */
.header-style-5 .hs5-action-cart .mini-cart-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: #f0f4f2;
    border: none;
    border-radius: 0%;
    color: #fe4f00;
    cursor: pointer;
}

.header-style-5 .hs5-action-cart .mini-cart-toggle svg {
    width: 20px;
    height: 20px;
}

.header-style-5 .hs5-action-cart .mini-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    background-color: #ff0000;
    color: #ffffff;
    border-radius: 999px;
}

.header-style-5 .hs5-cart-total {
    font-size: 12px;
    font-weight: 700;
    color: #fe4f00;
}

/* ============================================================
   3. SOR — NAVIGÁCIÓ
   ============================================================ */
.header-style-5 .hs5-navrow {
    background-color: #fe4f00;
}

.header-style-5 .hs5-navrow-inner {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding-left: 20px;
    padding-right: 20px;
    min-height: 52px;
}

/* --- Kategória dropdown --- */
.header-style-5 .hs5-catmenu {
    position: relative;
    flex: 0 0 280px;
    width: 280px;
}

.header-style-5 .hs5-catmenu-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    min-height: 52px;
    padding: 0 18px;
    background-color: #ff6924;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    text-align: left;
}

.header-style-5 .hs5-catmenu-toggle .hs5-catmenu-caret {
    margin-left: auto;
    display: flex;
    transition: transform 0.25s ease;
}

.header-style-5 .hs5-catmenu-toggle[aria-expanded="true"] .hs5-catmenu-caret {
    transform: rotate(180deg);
}

.header-style-5 .hs5-catmenu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 280px;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: #ff6924;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    z-index: 1100;
}

.header-style-5 .hs5-catmenu-panel[hidden] {
    display: none;
}

.header-style-5 .hs5-cat-item {
    position: relative;
    border-bottom: 1px solid #ff8c57;
}

.header-style-5 .hs5-cat-item:last-child {
    border-bottom: none;
}

.header-style-5 .hs5-cat-item > a,
.header-style-5 .hs5-cat-more-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 11px 18px;
    font-family: inherit;
    font-size: 14px;
    color: #ffffff;
    background: none;
    border: none;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.header-style-5 .hs5-cat-item > a:hover,
.header-style-5 .hs5-cat-more-btn:hover {
    background-color: #fe4f00;
    color: #ffffff;
}

/* Rejtett extra kategóriák (Összes kategória gomb bontja ki) */
.header-style-5 .hs5-cat-item.is-hidden {
    display: none;
}

.header-style-5 .hs5-catmenu-panel.is-expanded .hs5-cat-item.is-hidden {
    display: block;
}

/* Oldalra kicsúszó alkategória panel */
.header-style-5 .hs5-cat-sub {
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 240px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background-color: #ffffff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.header-style-5 .hs5-cat-item:hover > .hs5-cat-sub {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.header-style-5 .hs5-cat-sub a {
    display: block;
    padding: 9px 18px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
}

.header-style-5 .hs5-cat-sub a:hover {
    background-color: #f3f4f6;
    color: #fe4f00;
}

/* --- Fő navigációs menü --- */
.header-style-5 .hs5-nav {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    padding-left: 26px;
}

.header-style-5 .hs5-nav-menu {
    display: flex;
    align-items: center;
    gap: 27px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-style-5 .hs5-nav-item {
    position: relative;
}

.header-style-5 .hs5-nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-style-5 .hs5-nav-link:hover {
    color: #f9bd95;
}

.header-style-5 .hs5-nav-link.active {
    color: #ffffff;
}

.header-style-5 .hs5-nav-caret {
    display: flex;
    transition: transform 0.2s ease;
}

.header-style-5 .hs5-nav-item:hover .hs5-nav-caret {
    transform: rotate(180deg);
}

/* Legördülő almenü */
.header-style-5 .hs5-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background-color: #ffffff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    border-radius: 0 0 6px 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1100;
}

.header-style-5 .hs5-nav-item:hover > .hs5-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-style-5 .hs5-dropdown li {
    border-bottom: 1px solid #e5e7eb;
}

.header-style-5 .hs5-dropdown li:last-child {
    border-bottom: none;
}

.header-style-5 .hs5-dropdown a {
    display: block;
    padding: 9px 18px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.header-style-5 .hs5-dropdown a:hover,
.header-style-5 .hs5-dropdown a.active {
    background-color: #f3f4f6;
    color: #fe4f00;
}

/* --- Jobb oldali promó --- */
.header-style-5 .hs5-promo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 20px;
    text-decoration: none;
    white-space: nowrap;
}

.header-style-5 .hs5-promo-icon {
    display: flex;
    align-items: center;
    color: #ffffff;
}

.header-style-5 .hs5-promo-icon svg {
    width: 24px;
    height: 24px;
}

.header-style-5 .hs5-promo-text {
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    text-transform: uppercase;
}

/* ============================================================
   MOBIL HEADER SOR — alapból rejtve, csak breakpoint alatt látszik
   ============================================================ */
.header-style-5 .hs5-mobilerow {
    display: none;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.header-style-5 .hs5-mobilerow-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
}

.header-style-5 .hs5-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: #f3f4f6;
    border: none;
    border-radius: 12px;
    color: #111827;
    cursor: pointer;
}

.header-style-5 .hs5-mobile-toggle svg {
    width: 22px;
    height: 22px;
}

.header-style-5 .hs5-mobile-logo img {
    display: block;
    width: 150px;
    height: 44px;
    object-fit: contain;
    max-width: 100%;
}

.header-style-5 .hs5-mobile-logo .site-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

/* Mobil kosár — mini-cart felülstílusozás */
.header-style-5 .hs5-mobile-cart .mini-cart-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: #f3f4f6;
    border: none;
    border-radius: 12px;
    color: #111827;
    cursor: pointer;
}

.header-style-5 .hs5-mobile-cart .mini-cart-toggle svg {
    width: 22px;
    height: 22px;
}

.header-style-5 .hs5-mobile-cart .mini-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    background-color: #fe4f00;
    color: #ffffff;
    border-radius: 999px;
}

/* ============================================================
   MOBIL MENÜ PANEL (a <header> tagen KÍVÜL, JS vezérli)
   ============================================================ */
.hs5-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: #000000;
    opacity: 0;
    z-index: 1400;
    transition: opacity 0.3s ease;
}

.hs5-overlay.is-open {
    opacity: calc(50 / 100);
}

.hs5-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 88vw;
    background-color: #ffffff;
    z-index: 1500;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.hs5-panel.is-open {
    transform: translateX(0);
}

.hs5-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid #e5e7eb;
}

.hs5-panel-header img {
    display: block;
    width: 150px;
    height: 44px;
    object-fit: contain;
}

.hs5-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: none;
    border: none;
    color: #111827;
    cursor: pointer;
}

/* Kereső a panelben */
.hs5-panel-search {
    position: relative;
    padding: 18px;
}

.hs5-panel-search .hs5-search-input {
    width: 100%;
    padding: 11px 44px 11px 16px;
    font-size: 14px;
    font-family: inherit;
    color: #374151;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 25px;
    outline: none;
}

.hs5-panel-search .hs5-search-icon {
    position: absolute;
    right: calc(18px + 16px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    color: #fe4f00;
    pointer-events: none;
}

.hs5-panel-search .hs5-search-results {
    position: absolute;
    top: calc(100% - 6px);
    left: 18px;
    right: 18px;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
    max-height: 320px;
    overflow-y: auto;
    z-index: 10;
}

.hs5-panel-search .hs5-search-results[hidden] {
    display: none;
}

.hs5-panel-search .hs5-sr-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    text-decoration: none;
    color: #111827;
    border-bottom: 1px solid #f1f2f4;
}

.hs5-panel-search .hs5-sr-thumb {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.hs5-panel-search .hs5-sr-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.hs5-panel-search .hs5-sr-price {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #fe4f00;
    white-space: nowrap;
}

.hs5-panel-search .hs5-sr-state {
    padding: 14px;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}

/* Menüelemek a panelben */
.hs5-panel-nav {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hs5-panel-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
}

.hs5-panel-nav-row > a {
    flex: 1 1 auto;
    display: block;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 400;
    color: #111827;
    text-decoration: none;
}

.hs5-panel-nav-row > a:hover,
.hs5-panel-nav-row > a.active {
    color: #1a7f5a;
}

.hs5-submenu-toggle {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    align-self: stretch;
    background: none;
    border: none;
    color: #111827;
    cursor: pointer;
}

.hs5-submenu-toggle svg {
    transition: transform 0.25s ease;
}

.hs5-submenu-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* Almenü */
.hs5-panel-sub {
    display: none;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.hs5-panel-sub.is-open {
    display: block;
}

.hs5-panel-sub a {
    display: block;
    padding: 10px 18px 10px calc(18px + 16px);
    font-size: 14px;
    color: #4b5563;
    text-decoration: none;
}

.hs5-panel-sub a:hover {
    color: #1a7f5a;
}

/* Kategória blokk a panelben */
.hs5-panel-cats-label {
    padding: 18px 18px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9ca3af;
}

/* ============================================================
   RESPONSIVE — váltás a beállított breakpointon
   ============================================================ */
@media (max-width: 768px) {
    .header-style-5 .hs5-toprow,
    .header-style-5 .hs5-mainrow,
    .header-style-5 .hs5-navrow {
        display: none;
    }

    .header-style-5 .hs5-mobilerow {
        display: block;
    }
}
