/* ===================================================================
   EGYSÉGES HEADER (Fázis 3.5) — minden tenant ezt használja.
   .uh- névtér (Unified Header), saját fájl → nem ütközik egyetlen
   tenant style.css-ével sem. Per-tenant CSAK a színek (CSS-tokenek)
   változnak (a header.php injektálja a --uh-accent-et). A struktúra
   + reszponzivitás KÖZÖS (egy igazság). Bluehome-arányokra hangolva.
   Breakpontok: desktop > 980px, tablet 769-980, mobil <= 768.
   =================================================================== */

:root {
    --uh-height: 68px;
    --uh-accent: var(--clr-accent, #0DA1CC);
    --uh-accent-dim: var(--clr-accent-dim, var(--uh-accent));
    --uh-text: var(--clr-text, #1f2937);
    --uh-muted: var(--clr-text-muted, #6b7280);
    --uh-border: var(--clr-border, #e5e7eb);
    --uh-surface: #eeeef0;
    --uh-white: #fff;
    --uh-ease: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Topbar (opcionális, per-tenant config) ---- */
.uh-topbar {
    background: var(--uh-topbar-bg, #2a2118);
    color: var(--uh-topbar-fg, #fff);
    font-size: 12.5px;
}
.uh-topbar-inner {
    max-width: var(--max-width, 1200px);
    margin: 0 auto;
    padding: 7px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.uh-topbar a { color: inherit; text-decoration: none; transition: color var(--uh-ease); }
.uh-topbar a:hover { color: rgba(255, 255, 255, 0.85); }
.uh-topbar i { color: var(--uh-accent); font-size: 11px; }
.uh-topbar-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.uh-topbar-left span, .uh-topbar-left a { display: inline-flex; align-items: center; gap: 5px; }
.uh-topbar-right { display: flex; align-items: center; gap: 16px; }
.uh-topbar-right a { white-space: nowrap; }
/* Kiemelt topbar-link (pill, pl. "Egyedi méret") */
.uh-topbar-hl {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.uh-topbar-hl:hover { background: rgba(255, 255, 255, 0.1); }
.uh-topbar-hl i { color: var(--uh-accent); }

/* ---- Header sáv ---- */
.uh-header {
    background: var(--uh-white);
    height: var(--uh-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.uh-bar {
    max-width: var(--max-width, 1200px);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
}
.uh-logo { display: flex; align-items: center; text-decoration: none; }
.uh-logo img { height: 40px; width: auto; display: block; }
.uh-logo-text { font-size: 1.2rem; font-weight: 700; color: var(--uh-accent); }

/* ---- Desktop nav: DEFAULT = sima linkek (a tenantek 99%-a ilyen) ---- */
.uh-nav {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 4px;
}
.uh-nav a,
.uh-nav-mega-trigger {
    color: var(--uh-text);
    font-size: 15px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 10px;
    transition: all var(--uh-ease);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.uh-nav a:hover,
.uh-nav-mega-trigger:hover { color: var(--uh-accent); }
.uh-nav a.active { color: var(--uh-accent); background: var(--clr-accent-light, rgba(0, 0, 0, 0.05)); }
.uh-nav a.featured { color: var(--uh-accent); font-weight: 700; }

/* ---- BlueHome-variáns: szürke pill-konténer (CSAK bluehome, $HEADER_NAV_STYLE=pill) ---- */
.uh-nav--pill { gap: 2px; background: var(--uh-surface); border-radius: 100px; padding: 5px; }
.uh-nav--pill a { font-size: 14px; font-weight: 500; padding: 7px 15px; border-radius: 100px; }
.uh-nav--pill a:hover { background: rgba(255, 255, 255, 0.8); color: var(--uh-text); }
.uh-nav--pill a.active { background: var(--uh-white); box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12); color: var(--uh-text); }

/* ---- Jobb oldali akciógombok (desktop) ---- */
.uh-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.uh-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--uh-btn-radius, 100px);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: background var(--uh-ease), border-color var(--uh-ease), color var(--uh-ease), transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    font-family: inherit;
}
.uh-btn-outline { color: var(--uh-text); border: 1.5px solid var(--uh-border); background: transparent; }
.uh-btn-outline:hover { border-color: var(--uh-accent); color: var(--uh-accent); }
.uh-btn-solid { color: var(--uh-white); background: var(--uh-accent); border: 1.5px solid var(--uh-accent); }
.uh-btn-solid:hover { background: var(--uh-accent-dim); border-color: var(--uh-accent-dim); color: var(--uh-white); }
.uh-btn:active { transform: scale(0.97); }

/* ---- Közép-slot (MOBIL): search | cart-pill ---- */
.uh-center { justify-self: stretch; min-width: 0; display: none; }
/* search */
.uh-search {
    display: flex;
    align-items: center;
    width: 100%;
    background: var(--uh-surface);
    border-radius: 100px;
    padding: 5px 5px 5px 16px;
}
.uh-search input {
    flex: 1; border: none; background: transparent; outline: none;
    font-size: 14px; min-width: 0; color: var(--uh-text); padding: 0 4px;
}
.uh-search input::placeholder { color: var(--uh-muted); }
.uh-search button {
    border: none; background: var(--uh-accent); color: #fff; border-radius: 50%;
    width: 34px; height: 34px; cursor: pointer; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}
/* kosár-pill (pill-gomb: db + érték + ikon) */
.uh-cart-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
    background: var(--uh-surface);
    border-radius: 100px;
    padding: 7px 8px 7px 18px;
    text-decoration: none;
    color: var(--uh-text);
    transition: all var(--uh-ease);
}
.uh-cart-pill:hover { background: #e6e6ea; }
.uh-cart-pill-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.uh-cart-pill-count { font-size: 12px; color: var(--uh-muted); font-weight: 600; white-space: nowrap; }
.uh-cart-pill-total { font-size: 15px; font-weight: 700; white-space: nowrap; }
.uh-cart-pill-icon {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--uh-accent); color: #fff; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
    position: relative;
}
.uh-cart-pill-badge {
    position: absolute; top: -4px; right: -4px;
    background: #e23b3b; color: #fff; border-radius: 999px;
    min-width: 18px; height: 18px; padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
}

/* ---- Hamburger (mobil) ---- */
.uh-hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; background: none; border: none; cursor: pointer; justify-self: end; }
.uh-hamburger span { display: block; width: 24px; height: 2px; background: var(--uh-text); border-radius: 2px; transition: all var(--uh-ease); }
.uh-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.uh-hamburger.active span:nth-child(2) { opacity: 0; }
.uh-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- Mobil slide-out menü ---- */
.uh-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 1099; }
.uh-overlay.active { display: block; }
.uh-mobile { display: none; position: fixed; top: 0; right: 0; width: 320px; max-width: 86vw; height: 100%; background: var(--uh-white); z-index: 1100; padding: 76px 24px 24px; overflow-y: auto; box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18); }
.uh-mobile.active { display: block; animation: uh-slidein 0.22s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes uh-slidein { from { transform: translateX(100%); } to { transform: translateX(0); } }
.uh-mobile a { display: block; padding: 14px 0; font-size: 17px; color: var(--uh-text); text-decoration: none; border-bottom: 1px solid var(--uh-border); }
.uh-mobile a:last-child { border-bottom: none; }
.uh-mobile-close { position: absolute; top: 18px; right: 18px; font-size: 24px; color: var(--uh-muted); background: none; border: none; cursor: pointer; }

/* ---- Tablet ---- */
@media (max-width: 980px) {
    .uh-nav a { padding: 7px 11px; font-size: 13px; }
    .uh-btn { padding: 8px 14px; font-size: 13px; }
}

/* ---- Mobil (<= 768px): nav + actions el, közép-slot + hamburger be ---- */
@media (max-width: 768px) {
    .uh-topbar { display: none; }
    .uh-nav, .uh-actions { display: none; }
    .uh-center { display: block; }
    .uh-hamburger { display: flex; }
}

/* ===================================================================
   EGYSÉGES FOOTER (.uh-footer) — a header.css-szel együtt töltődik.
   =================================================================== */
.uh-footer {
    /* Fallback (ha a böngésző nem tud color-mix-et): semleges sötét. */
    background: #14171c;
    /* Auto-deriváció: a footer háttere a tenant márka-színéből (--clr-accent) készül,
       ~16% márka egy közel-fekete alapba keverve → minden tenant footere a SAJÁT
       márka-árnyalatát kapja (hippogold meleg sötétbarna, 1x1media sötétzöld, stb.),
       egyetlen közös szabályból. Felülírható: $FOOTER_BG → --uh-footer-bg. */
    background: var(--uh-footer-bg, color-mix(in srgb, var(--clr-accent, #2a3f5f) 16%, #0e1014));
    color: var(--uh-footer-fg, rgba(255, 255, 255, 0.82));
    padding: 56px 0 28px;
    font-size: 14px;
}
.uh-footer-inner { max-width: var(--max-width, 1200px); margin: 0 auto; padding: 0 24px; }
.uh-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.uh-footer-brand img { height: 38px; width: auto; margin-bottom: 14px; filter: brightness(0) invert(1); opacity: 0.92; }
.uh-footer-brand p { color: rgba(255, 255, 255, 0.6); line-height: 1.6; margin: 0 0 16px; }
.uh-footer-social { display: flex; gap: 10px; }
.uh-footer-social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: #fff; display: inline-flex; align-items: center; justify-content: center; transition: background var(--uh-ease); }
.uh-footer-social a.hidden { display: none; }
.uh-footer-social a:hover { background: var(--uh-accent); }
.uh-footer-heading { font-weight: 700; color: #fff; margin-bottom: 14px; font-size: 14px; }
.uh-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.uh-footer-col a, .uh-footer-col li { color: rgba(255, 255, 255, 0.7); text-decoration: none; transition: color var(--uh-ease); }
.uh-footer-col a:hover { color: #fff; }
.uh-footer-col i { color: var(--uh-accent); margin-right: 7px; width: 15px; text-align: center; }
.uh-footer-bottom {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
    padding-top: 22px; font-size: 13px; color: rgba(255, 255, 255, 0.55);
}
.uh-footer-credit a { color: rgba(255, 255, 255, 0.8); text-decoration: none; font-weight: 600; }
.uh-footer-credit a:hover { color: #fff; }
.uh-footer-legal a { color: rgba(255, 255, 255, 0.7); text-decoration: none; }
.uh-footer-legal a:hover { color: #fff; }
.uh-footer-bottom .uh-footer-credit { margin-left: auto; }
@media (max-width: 880px) { .uh-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 520px) { .uh-footer-grid { grid-template-columns: 1fr; } }

/* ---- Ikon-gombok a desktop actions-ben (account, kosár) ---- */
.uh-icon-btn {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--uh-text); background: var(--uh-surface); text-decoration: none;
    position: relative; transition: all var(--uh-ease); flex-shrink: 0;
}
.uh-icon-btn:hover { background: #e6e6ea; color: var(--uh-accent); }
.uh-cart-badge {
    position: absolute; top: -3px; right: -3px;
    background: var(--uh-accent); color: #fff; border-radius: 999px;
    min-width: 18px; height: 18px; padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
}

/* ---- Sticky mobil CTA (opcionális, $HEADER_STICKY_CTA) ---- */
.uh-sticky-cta { display: none; }
@media (max-width: 768px) {
    .uh-sticky-cta {
        display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1500;
        background: var(--uh-accent); color: #fff; font-weight: 600;
        padding: 14px 20px; border-radius: 14px; text-decoration: none;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
        transform: translateY(160%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .uh-sticky-cta.visible { transform: translateY(0); }
}

/* ---- Mega-menü (dropdown több oszloppal + kártyákkal; $HEADER_NAV_ITEMS[].mega) ---- */
.uh-nav-mega { position: relative; display: inline-flex; }
.uh-nav-mega-trigger { background: none; border: none; cursor: pointer; }
.uh-nav-mega-chev { font-size: 10px; opacity: 0.6; transition: transform var(--uh-ease); }
.uh-nav-mega:hover .uh-nav-mega-chev,
.uh-nav-mega.open .uh-nav-mega-chev { transform: rotate(180deg); }
.uh-mega {
    position: absolute; top: calc(100% + 10px); left: 50%;
    transform: translateX(-50%) translateY(8px);
    transform-origin: top center;
    min-width: 540px; max-width: 92vw; background: var(--uh-white);
    border: 1px solid var(--uh-border); border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16); padding: 20px;
    opacity: 0; visibility: hidden; z-index: 1050;
    transition: opacity 0.18s cubic-bezier(0.23, 1, 0.32, 1), transform 0.18s cubic-bezier(0.23, 1, 0.32, 1);
}
.uh-nav-mega:hover .uh-mega,
.uh-nav-mega.open .uh-mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.uh-mega-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.uh-mega-col { display: flex; flex-direction: column; gap: 4px; }
.uh-mega-col-label { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--uh-muted); margin-bottom: 6px; }
.uh-mega-col-label i { color: var(--uh-accent); }
.uh-mega-card { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; text-decoration: none; color: var(--uh-text); transition: background var(--uh-ease); }
a.uh-mega-card:hover { background: var(--uh-surface); }
.uh-mega-card--soon { opacity: 0.6; cursor: default; }
.uh-mega-card-icon { flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--clr-accent-light, rgba(0, 0, 0, 0.05)); color: var(--uh-accent); font-size: 16px; }
.uh-mega-card-body { display: flex; flex-direction: column; gap: 2px; }
.uh-mega-card-title { font-weight: 600; font-size: 14px; }
.uh-mega-card-desc { font-size: 12px; color: var(--uh-muted); line-height: 1.4; }
.uh-mega-card-soon { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--uh-accent); background: var(--clr-accent-light, rgba(0, 0, 0, 0.06)); padding: 1px 6px; border-radius: 999px; vertical-align: middle; }
/* Mobil mega-csoport (a .uh-mobile-ban) */
.uh-mobile-group { display: block; padding: 16px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--uh-muted); }
.uh-mobile-soon { display: block; padding: 14px 0; font-size: 16px; color: var(--uh-muted); opacity: 0.7; border-bottom: 1px solid var(--uh-border); }

/* ====================================================================
   SÖTÉT HEADER-TÉMA ($HEADER_THEME='dark') — sötét márkájú tenanteknek (pl. unita)
   ==================================================================== */
.uh-header--dark { background: #0f1115; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07); }
.uh-header--dark .uh-nav a,
.uh-header--dark .uh-nav-mega-trigger { color: rgba(255, 255, 255, 0.82); }
.uh-header--dark .uh-nav a:hover,
.uh-header--dark .uh-nav-mega-trigger:hover { color: #fff; }
.uh-header--dark .uh-nav a.active { color: #fff; background: rgba(255, 255, 255, 0.10); }
.uh-header--dark .uh-logo-text { color: #fff; }
.uh-header--dark .uh-btn-outline { color: #fff; border-color: rgba(255, 255, 255, 0.24); }
.uh-header--dark .uh-btn-outline:hover { border-color: var(--uh-accent); color: var(--uh-accent); }
.uh-header--dark .uh-hamburger span { background: #fff; }
/* Mega-menü sötét panelen (a fehér-szövegű címek így láthatók) */
.uh-header--dark .uh-mega { background: #15181e; border-color: rgba(255, 255, 255, 0.10); box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55); }
.uh-header--dark .uh-mega-col-label { color: rgba(255, 255, 255, 0.5); }
.uh-header--dark .uh-mega-card { color: rgba(255, 255, 255, 0.92); }
.uh-header--dark a.uh-mega-card:hover { background: rgba(255, 255, 255, 0.06); }
.uh-header--dark .uh-mega-card-desc { color: rgba(255, 255, 255, 0.52); }
/* Sötét mobil-menü */
.uh-mobile--dark { background: #15181e; }
.uh-mobile--dark a { color: rgba(255, 255, 255, 0.86); border-bottom-color: rgba(255, 255, 255, 0.08); }
.uh-mobile--dark .uh-mobile-close { color: rgba(255, 255, 255, 0.6); }
.uh-mobile--dark .uh-mobile-group { color: rgba(255, 255, 255, 0.5); }
.uh-mobile--dark .uh-mobile-soon { color: rgba(255, 255, 255, 0.5); border-bottom-color: rgba(255, 255, 255, 0.08); }
