/* === Header === */

body {
    font-family: var(--font-sans);
    background: #EEE6D3;
    color: #1E1A14;
}

/* ── Topbar (pasek info nad menu — w normalnym flow, odjeżdża przy scrollu) ── */

.site-topbar {
    background: var(--rcm-ink, #1E1A14);
    color: rgba(247, 241, 229, 0.72);
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1;
    position: relative;
    z-index: 99;
}

.site-topbar__inner {
    max-width: 100%;
    width: 1480px;
    margin: 0 auto;
    padding: 10px clamp(16px, 4vw, 72px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-topbar__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.site-topbar__item > svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--rcm-ember, #FA4A01);
}

.site-topbar__map {
    color: rgba(247, 241, 229, 0.82);
    text-decoration: none;
    transition: color 0.2s ease;
    max-width: 62%;
    overflow: hidden;
}
.site-topbar__map .site-topbar__addr {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.site-topbar__map:hover { color: var(--rcm-ember-soft, #FF7A45); }
.site-topbar__map:hover > svg { color: var(--rcm-ember-soft, #FF7A45); }

.site-topbar__chev {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: transform 0.2s ease;
}
.site-topbar__map:hover .site-topbar__chev { transform: translateX(2px); }

/* warianty pełny / skrócony tekst (przełączane na mobile) */
.site-topbar__hours-short,
.site-topbar__map-short { display: none; }

/* ── Header base ── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #FFFDF8;
    border-bottom: 1px solid rgba(30, 26, 20, 0.08);
    transition: box-shadow 0.25s ease;
}

/* delikatny cień gdy strona przewinięta (klasa body.scrolled z scripts.js) */
body.scrolled .site-header {
    box-shadow: 0 8px 30px -16px rgba(30, 26, 20, 0.28);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 88px;
    max-width: 100%;
    width: 1480px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 72px);
}

/* ── Brand / Logo ── */

.site-header__brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.site-header__logo {
    display: block;
    height: 64px;
    width: auto;
    max-width: 100%;
}

/* ── Desktop nav ── */

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
}

.site-nav__item {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    color: #3B342A;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
    text-decoration: none;
    user-select: none;
}

.site-nav__item:hover {
    color: #1E1A14;
    background: rgba(30, 26, 20, 0.05);
}

.site-nav__item--active {
    color: #1E1A14;
    background: rgba(30, 26, 20, 0.07);
}

/* Dropdown arrow */
.site-nav__item--has-menu {
    gap: 6px;
}
.site-nav__item--has-menu::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: 0.5;
    flex-shrink: 0;
}

/* ── Dropdown ── */

.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: #FAF5EB;
    border: 1px solid rgba(30, 26, 20, 0.12);
    border-radius: var(--r-md);
    padding: 10px;
    padding-top: 20px;
    min-width: 270px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    box-shadow: 0 24px 50px -22px rgba(30, 26, 20, 0.22);
    z-index: 10;
}

.site-nav__item--has-menu:hover .dropdown {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown__item {
    display: block;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    font-size: 14px;
    color: #3B342A;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.dropdown__item:hover {
    background: rgba(74, 93, 63, 0.08);
    color: #2F3D2A;
}

.dropdown__item-title {
    display: block;
    font-weight: 500;
    color: #1E1A14;
    font-size: 14px;
}

.dropdown__item-sub {
    display: block;
    font-size: 12px;
    color: #645B4C;
    margin-top: 2px;
}

/* ── CTA area ── */

.site-header__cta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-header__phone {
    white-space: nowrap;
}

/* ── Hamburger button ── */

.site-header__menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(30, 26, 20, 0.14);
    background: #FAF5EB;
    color: #1E1A14;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}
.site-header__menu-btn:hover {
    background: rgba(30, 26, 20, 0.06);
}

.icon-close { display: none; }

.site-header--open .icon-hamburger { display: none; }
.site-header--open .icon-close     { display: block; }

/* ── Mobile off-canvas drawer (wysuwany z prawej) ── */

.site-header__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(20, 16, 10, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .35s ease, visibility .35s ease;
    z-index: 998;
}
.site-header--open .site-header__overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.site-header__mobile {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: min(380px, 88vw);
    background: linear-gradient(180deg, #FFFDF8 0%, #FAF3E7 100%);
    box-shadow: -18px 0 50px rgba(20, 16, 10, 0.22);
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.4, 0, .2, 1);
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.site-header--open .site-header__mobile {
    transform: translateX(0);
}

.site-header__mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(30, 26, 20, 0.08);
    flex-shrink: 0;
}
.site-header__mobile-brand img { display: block; height: 50px; width: auto; }

.site-header__mobile-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(30, 26, 20, 0.14);
    background: #FFFDF8;
    color: #1E1A14;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s, color .2s, transform .25s;
}
.site-header__mobile-close:hover {
    background: rgba(250, 74, 1, 0.10);
    color: var(--rcm-ember);
    transform: rotate(90deg);
}

.site-header__mobile-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    padding: 18px 16px;
    gap: 2px;
}

.site-header__mobile-item {
    display: block;
    padding: 14px 16px;
    font-size: 17px;
    font-weight: 500;
    color: #1E1A14;
    text-decoration: none;
    border-radius: 12px;
    transition: background .15s, color .15s, padding-left .15s;
}
.site-header__mobile-item:hover,
.site-header__mobile-item:focus {
    background: rgba(250, 74, 1, 0.08);
    color: var(--rcm-ember-deep);
    padding-left: 22px;
}

.site-header__mobile-sub {
    display: block;
    padding: 9px 16px 9px 34px;
    font-size: 14px;
    color: #645B4C;
    text-decoration: none;
    border-radius: 10px;
    transition: background .15s, color .15s;
}
.site-header__mobile-sub:hover {
    background: rgba(30, 26, 20, 0.04);
    color: var(--rcm-ember-deep);
}

.site-header__mobile-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px calc(18px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(30, 26, 20, 0.08);
    flex-shrink: 0;
}
.site-header__mobile-cta .abtn {
    width: 100%;
    justify-content: center;
    padding-top: 13px;
    padding-bottom: 13px;
}

/* stagger wejścia pozycji menu */
.site-header--open .site-header__mobile-nav > * { animation: rcmMenuIn .4s both; }
.site-header--open .site-header__mobile-nav > *:nth-child(1) { animation-delay: .08s; }
.site-header--open .site-header__mobile-nav > *:nth-child(2) { animation-delay: .13s; }
.site-header--open .site-header__mobile-nav > *:nth-child(3) { animation-delay: .18s; }
.site-header--open .site-header__mobile-nav > *:nth-child(4) { animation-delay: .23s; }
.site-header--open .site-header__mobile-nav > *:nth-child(5) { animation-delay: .28s; }
.site-header--open .site-header__mobile-nav > *:nth-child(6) { animation-delay: .33s; }
.site-header--open .site-header__mobile-nav > *:nth-child(n+7) { animation-delay: .38s; }
@keyframes rcmMenuIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

body.menu-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    .site-header__mobile { transition: none; }
    .site-header--open .site-header__mobile-nav > * { animation: none; }
}

/* ── Responsive ── */

@media (max-width: 1080px) {
    .site-nav { display: none; }
    .site-header__phone { display: none !important; }
    .site-header__menu-btn { display: inline-flex; }
}

/* Topbar — na mniejszych ekranach skróć teksty, by wszystko się zmieściło */
@media (max-width: 600px) {
    .site-topbar { font-size: 12px; }
    .site-topbar__inner { padding: 8px 16px; gap: 12px; }

    .site-topbar__hours-full,
    .site-topbar__addr { display: none; }
    .site-topbar__hours-short,
    .site-topbar__map-short { display: inline; }

    .site-topbar__map { max-width: none; }
}

@media (max-width: 480px) {
    .site-header__inner { height: 64px; }
    .site-header__logo { height: 46px; }
}
