/* --- TOPBAR --- */
.reis-topbar { background-color: var(--reis-pink); padding: 9px 0; font-size: 12px; color: #fff; overflow: hidden; }
.reis-topbar-inner { display: flex; align-items: center; width: 100%; overflow: hidden; }
.reis-topbar-track {
    display: flex; align-items: center; white-space: nowrap;
    /* two identical halves — animation shifts by exactly 50% so it loops perfectly */
    animation: reis-marquee 120s linear infinite;
    will-change: transform;
}
.reis-topbar-track:hover { animation-play-state: paused; }
.reis-topbar-segment { display: inline-flex; align-items: center; gap: 10px; padding: 0 16px; font-weight: 500; letter-spacing: 0.2px; }
.reis-topbar-segment a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; transition: opacity 0.2s; }
.reis-topbar-segment a:hover { opacity: 0.75; color: #fff; }
.reis-topbar-dot { color: rgba(255,255,255,0.5); font-size: 18px; line-height: 1; flex-shrink: 0; }
@keyframes reis-marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }


/* --- ROW 1: Logo | Search | Icons --- */
.reis-main-header {
    background: #fff;
    padding: 16px 40px;
    display: flex;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* Logo — fixed left, does not grow */
.reis-logo { flex: 0 0 auto; text-decoration: none; display: flex; align-items: center; }
.site-logo { max-height: 60px; width: auto; object-fit: contain; }

/* Spacer pushes search bar toward the right content */
.reis-header-spacer { flex: 1; }

/* Inline search bar — sits close to the right content */
.reis-header-search { flex: 0 0 420px; position: relative; }
.reis-inline-search-form {
    display: flex !important; align-items: center !important;
    background: #f4f4f4 !important; border-radius: 10px !important;
    border: none !important; padding: 0 !important; margin: 0 !important;
    box-shadow: none !important; overflow: hidden !important;
    transition: background 0.2s;
}
.reis-inline-search-form:focus-within { background: #ececec !important; }
.reis-inline-search-input {
    flex: 1 !important; border: none !important; background: transparent !important;
    box-shadow: none !important; outline: none !important;
    font-size: 14px !important; font-weight: 400 !important; color: var(--text-dark) !important;
    font-family: var(--font-primary) !important;
    min-width: 0 !important; padding: 12px 4px 12px 18px !important;
    border-radius: 0 !important; margin: 0 !important;
}
.reis-inline-search-input::placeholder { color: #999 !important; }
.reis-inline-search-icon {
    flex-shrink: 0 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    background: transparent !important; color: #777 !important;
    width: 46px !important; height: 46px !important;
    min-width: 46px !important;
    padding: 0 !important; margin: 0 !important;
    border: none !important; border-radius: 0 !important;
    cursor: pointer !important; transition: color 0.2s !important;
    box-shadow: none !important; outline: none !important;
    line-height: 1 !important; text-indent: 0 !important;
}
.reis-inline-search-icon:hover { color: var(--reis-pink) !important; }
.reis-inline-search-icon svg { display: block !important; }

/* Autocomplete dropdown */
.reis-inline-results {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 500;
    background: #fff; border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
    border: 1px solid rgba(0,0,0,0.07);
    overflow: hidden; display: none;
}
.reis-inline-results.is-open { display: block; }
.rir-list { list-style: none; margin: 0; padding: 6px 0; }
.rir-item { border-bottom: 1px solid #fafafa; }
.rir-item:last-child { border-bottom: none; }
.rir-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; text-decoration: none; color: inherit;
    transition: background 0.12s;
}
.rir-link:hover, .rir-item.is-active .rir-link { background: #fdf4f5; }
.rir-img {
    width: 44px; height: 44px; flex-shrink: 0;
    border-radius: 8px; background: #f5f5f5; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.rir-img img { width: 100%; height: 100%; object-fit: cover; }
.rir-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rir-name { font-size: 13px; font-weight: 600; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rir-name mark { background: none; color: var(--reis-pink-dark); font-weight: 700; }
.rir-cat { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.rir-price { font-size: 13px; font-weight: 700; color: #333; white-space: nowrap; }
.rir-footer { padding: 10px 16px; border-top: 1px solid #f0f0f0; background: #fafafa; display: flex; justify-content: flex-end; }
.rir-view-all { font-size: 12px; font-weight: 600; color: var(--reis-pink-dark); text-decoration: none; display: flex; align-items: center; gap: 4px; }
.rir-view-all:hover { opacity: 0.75; color: var(--reis-pink-dark); }
.rir-empty { padding: 20px 16px; font-size: 14px; color: var(--text-muted); }
.rir-loading { display: flex; align-items: center; gap: 5px; padding: 20px 16px; }
.rir-loading span { width: 6px; height: 6px; border-radius: 50%; background: var(--reis-pink); animation: rso-pulse 1.2s infinite ease-in-out; }
.rir-loading span:nth-child(2) { animation-delay: 0.2s; }
.rir-loading span:nth-child(3) { animation-delay: 0.4s; }

/* Support block */
.reis-support { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.4; }
.reis-support-label { font-size: 13px; color: #888; font-weight: 400; }
.reis-support-number { font-size: 17px; font-weight: 800; color: var(--text-dark); text-decoration: none; white-space: nowrap; }
.reis-support-number:hover { color: var(--reis-pink-dark); }

/* Icons — right */
.reis-actions { display: flex; gap: 20px; align-items: center; flex-shrink: 0; }
.header-icon-link { position: relative; text-decoration: none; display: flex; align-items: center; cursor: pointer; }
.header-action-icon { height: 22px; width: auto; transition: all 0.2s; }
.header-icon-link:hover .header-action-icon { transform: scale(1.1); opacity: 0.7; }

/* Account dropdown */
.reis-account-wrap { position: relative; display: flex; align-items: center; }
.reis-account-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: -8px;
    min-width: 220px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.10);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 9999;
}
.reis-account-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 14px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid #eee;
    border-top: 1px solid #eee;
    transform: rotate(45deg);
}
.reis-account-wrap:hover .reis-account-menu,
.reis-account-wrap:focus-within .reis-account-menu,
.reis-account-wrap.is-open .reis-account-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.reis-account-menu-header {
    padding: 10px 12px 8px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.reis-account-menu-hello { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.reis-account-menu-name { font-size: 14px; color: var(--text-dark); font-weight: 700; word-break: break-word; }
.reis-account-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.reis-account-menu-item:hover { background: #f7f7f7; color: var(--reis-pink-dark); }
.reis-account-menu-item svg { flex-shrink: 0; opacity: 0.75; }
.reis-account-menu-logout { color: #c2362f; }
.reis-account-menu-logout:hover { background: #fdf2f2; color: #a61b1b; }
.cart-count { position: absolute; top: -7px; right: -9px; background: var(--reis-pink-dark); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 50%; line-height: 1; display: flex; justify-content: center; align-items: center; min-width: 18px; }
.wishlist-count { background: var(--reis-pink); }

/* ── Cart button — icon only ───────────────────────────────────────────── */
.reis-cart-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.reis-cart-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    color: #6b2737;
    transition: opacity 0.2s;
}
.reis-cart-btn:hover .reis-cart-icon-wrap { opacity: 0.72; }

/* Pink badge */
.reis-cart-badge {
    position: absolute;
    top: -8px;
    right: -9px;
    background: var(--reis-pink, #ff6e80);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    box-sizing: border-box;
    border: 2px solid #fff;
    transition: transform 0.2s;
}
.reis-cart-badge.is-visible { display: flex; }
.reis-cart-badge.bump { transform: scale(1.4); }

/* Remove leftover text-block rules */
.reis-cart-block,
.reis-cart-label,
.reis-cart-total { display: none !important; }

/* Toast system moved to assets/css/toast.css (sitewide) */

/* --- ROW 2: Categories + Nav --- */
.reis-nav-bar { background: #fff; width: 100%; border-bottom: 1px solid rgba(0,0,0,0.06); }
.reis-nav-bar-inner { display: flex; align-items: center; padding: 0 40px; gap: 32px; }

/* Shop by Categories trigger — kill Storefront default button bg/border */
.reis-cat-dropdown { position: relative; flex-shrink: 0; }
.reis-cat-btn {
    display: flex !important; align-items: center !important; gap: 8px !important;
    background: none !important; border: none !important; box-shadow: none !important;
    cursor: pointer !important; outline: none !important;
    font-family: var(--font-primary) !important; font-size: 14px !important; font-weight: 700 !important;
    color: var(--text-dark) !important; padding: 13px 0 !important; white-space: nowrap !important;
    transition: color 0.2s !important; border-radius: 0 !important;
    text-shadow: none !important; letter-spacing: 0 !important;
}
.reis-cat-btn:hover,
.reis-cat-btn[aria-expanded="true"] { color: var(--reis-pink-dark) !important; background: none !important; }
.reis-cat-chevron { transition: transform 0.25s; }
.reis-cat-btn[aria-expanded="true"] .reis-cat-chevron { transform: rotate(180deg); }

/* ── Mega Menu ─────────────────────────────────────────────────── */
.reis-mega-menu {
    position: fixed; left: 0; right: 0;
    z-index: 900; background: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    border-top: 1px solid #e5e5e5;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    max-height: calc(100vh - var(--reis-header-h, 140px)); overflow-y: auto;
}
.reis-mega-menu.is-open { opacity: 1; transform: translateY(0); pointer-events: all; }
.reis-mega-inner { max-width: 1400px; margin: 0 auto; padding: 24px 40px 32px; }

/* Header row */
.reis-mega-header { display: flex; align-items: center; margin-bottom: 20px; gap: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 14px; }
.reis-mega-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: #bbb; flex: 1; }
.reis-mega-view-all { font-size: 13px; font-weight: 600; color: var(--reis-pink-dark); text-decoration: none; white-space: nowrap; }
.reis-mega-view-all:hover { opacity: 0.7; color: var(--reis-pink-dark); }
.reis-mega-close {
    background: none !important; border: none !important; box-shadow: none !important;
    cursor: pointer; width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #aaa; transition: color 0.15s; flex-shrink: 0; padding: 0 !important;
}
.reis-mega-close:hover { color: #333 !important; background: none !important; }

/* Category grid — horizontal pill-style rows */
.reis-mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px;
}
.reis-mega-card {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 8px;
    text-decoration: none; color: inherit;
    transition: background 0.15s;
    background: transparent;
}
.reis-mega-card:hover { background: #fdf4f5; }

/* Small icon circle */
.reis-mega-card-icon {
    width: 36px; height: 36px; border-radius: 8px;
    background: rgba(255, 110, 128, 0.10);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.reis-mega-card-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.reis-mega-card-name { font-size: 13px; font-weight: 600; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reis-mega-card-count { font-size: 11px; color: #aaa; }
.reis-mega-card-subs { display: none; }
.reis-mega-more { display: none; }

/* Backdrop */
.reis-mega-backdrop {
    position: fixed; inset: 0; z-index: 899;
    background: rgba(0,0,0,0.35);
    opacity: 0; pointer-events: none;
    transition: opacity 0.22s ease;
}
.reis-mega-backdrop.is-open { opacity: 1; pointer-events: all; }

@media (max-width: 768px) { .reis-mega-menu, .reis-mega-backdrop { display: none !important; } }

/* Nav links */
.main-navigation.reis-primary-nav { float: none !important; display: flex !important; justify-content: flex-start !important; padding: 0 !important; margin: 0 !important; max-width: 100% !important; }
.reis-primary-nav ul,
.reis-primary-nav .nav-menu { list-style: none !important; padding: 0 !important; margin: 0 !important; display: flex !important; justify-content: flex-start !important; gap: 32px; }
.reis-primary-nav li { float: none !important; display: inline-flex !important; margin: 0 !important; padding: 0 !important; }
.reis-primary-nav a { text-decoration: none; color: #333; font-weight: 500; font-size: 14px; letter-spacing: 0; text-transform: none; font-family: var(--font-primary); transition: color 0.2s; padding: 13px 0; display: block; white-space: nowrap; }
.reis-primary-nav a:hover { color: var(--reis-pink-dark); }

/* --- HAMBURGER MENU --- */
button.menu-toggle { display: none !important; }
.reis-menu-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; flex-direction: column; gap: 5px; z-index: 1001; }
.hamburger-bar { display: block; width: 22px; height: 2px; background-color: #5E222A; transition: all 0.3s ease; }

.mobile-only-menu-items, .mobile-only-header-actions { display: none; }

/* Drawer search */
.drawer-search { position: relative; padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }
.drawer-search .drawer-search-form {
    display: flex !important;
    align-items: center !important;
    background: #f5f5f5 !important;
    border-radius: 999px !important;
    padding: 0 18px !important;
    height: 42px !important;
    gap: 10px !important;
}
.drawer-search-icon {
    color: #888;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
}
.drawer-search-icon svg { width: 18px; height: 18px; display: block; }
.drawer-search-input,
.drawer-search .reis-inline-search-input {
    flex: 1 !important;
    border: 0 !important;
    background: transparent !important;
    outline: none !important;
    font-size: 14px !important;
    color: var(--text-dark) !important;
    height: 100% !important;
    padding: 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
}
.drawer-search-input::placeholder { color: #999; }
.drawer-search-results {
    position: absolute;
    top: calc(100% - 1px);
    left: 16px;
    right: 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    max-height: 60vh;
    overflow-y: auto;
    display: none;
    z-index: 10;
}
.drawer-search-results.is-open { display: block; }

.drawer-item-logout { color: #c2362f !important; }
.drawer-item-logout:hover,
.drawer-item-logout:active { background: #fdf2f2; color: #a61b1b !important; }

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .reis-topbar { display: none !important; }

    .reis-main-header { padding: 12px 20px; gap: 12px; }
    .site-logo { max-height: 44px; }
    .reis-menu-toggle { display: flex; }
    .reis-actions { gap: 14px; margin-left: auto; }
    .reis-cart-btn { display: none !important; }

    /* Nav bar hidden on mobile — drawer handles navigation */
    .reis-nav-bar { display: none !important; }

    /* Hamburger animation */
    .reis-menu-toggle.is-active .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .reis-menu-toggle.is-active .hamburger-bar:nth-child(2) { opacity: 0; }
    .reis-menu-toggle.is-active .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* --- SEARCH OVERLAY: OPTION B — FULL-SCREEN COMMAND PALETTE --- */
.reis-search-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(10,4,4,0.7);
    backdrop-filter: blur(4px) saturate(0.8);
    display: flex; align-items: center; justify-content: center;
    padding: 0 20px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.22s ease;
}
.reis-search-overlay.is-open { opacity: 1; pointer-events: all; }

/* Floating card */
.rso-card {
    width: 100%; max-width: 640px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.35);
    overflow: hidden;
    transform: scale(0.96) translateY(10px);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1), opacity 0.22s ease;
}
.reis-search-overlay.is-open .rso-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Input row */
.rso-input-row {
    display: flex; align-items: center; gap: 14px;
    padding: 20px 20px 18px 24px;
    border-bottom: 1px solid #f0ede5;
    color: #aaa;
}
.rso-form { flex: 1; display: flex; }
.reis-search-input {
    flex: 1;
    border: none !important; background: transparent !important;
    font-size: 1.15rem; font-weight: 500;
    color: var(--text-dark); font-family: var(--font-primary);
    outline: none !important; box-shadow: none !important;
    -webkit-appearance: none; appearance: none;
    padding: 0; margin: 0; border-radius: 0;
}
.reis-search-input::-webkit-search-decoration,
.reis-search-input::-webkit-search-cancel-button,
.reis-search-input::-webkit-search-results-button,
.reis-search-input::-webkit-search-results-decoration { display: none; }
.reis-search-input::placeholder { color: #bbb; font-weight: 400; }

.rso-close {
    flex-shrink: 0; background: #f5f0ea; border: none; cursor: pointer;
    color: #999; width: 28px; height: 28px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s; font-size: 11px;
}
.rso-close:hover { background: #ede5db; color: var(--text-dark); }

/* Results area */
.rso-results { max-height: 420px; overflow-y: auto; }

/* Default state: trending pills shown via JS */
.rso-trending {
    padding: 18px 20px 20px 24px;
}
.rso-trending-label {
    font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
    text-transform: uppercase; color: #bbb; margin-bottom: 12px;
}
.rso-trending-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.rso-trending-pill {
    padding: 6px 14px; border-radius: var(--btn-radius);
    background: #f5f0ea; color: var(--text-dark);
    font-size: 13px; font-weight: 500;
    text-decoration: none; border: none; cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: var(--font-primary);
}
.rso-trending-pill:hover { background: #5E222A; color: #fff; }

/* Results list */
.rso-list { list-style: none; margin: 0; padding: 0; }
.rso-item { border-bottom: 1px solid #faf7f3; }
.rso-item:last-child { border-bottom: none; }
.rso-item-link {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 20px 11px 24px;
    text-decoration: none; color: inherit;
    transition: background 0.12s;
}
.rso-item-link:hover,
.rso-item.is-active .rso-item-link { background: #fdf7f2; }
.rso-item-img {
    width: 48px; height: 48px; flex-shrink: 0;
    border-radius: 8px; background: #f0ece6;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.rso-item-img img { width: 100%; height: 100%; object-fit: cover; }
.rso-item-info { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rso-item-name { font-size: 14px; font-weight: 600; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rso-item-name mark { background: none; color: var(--reis-pink-dark); font-weight: 700; }
.rso-item-cat { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.rso-item-price { font-size: 13px; font-weight: 700; color: #5E222A; }
.rso-item-arrow { color: #e0dad2; flex-shrink: 0; transition: color 0.12s; }
.rso-item-link:hover .rso-item-arrow,
.rso-item.is-active .rso-item-arrow { color: #5E222A; }

/* Footer bar */
.rso-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px 12px 24px;
    border-top: 1px solid #f5f2ee;
    background: #faf8f5;
}
.rso-footer-hint { font-size: 11px; color: #ccc; display: flex; gap: 10px; align-items: center; }
.rso-footer-hint kbd {
    background: #eee; border-radius: 4px;
    padding: 2px 6px; font-size: 10px;
    font-family: var(--font-primary); color: #888;
    border: 1px solid #e0dbd5;
}
.rso-view-all-link {
    font-size: 12px; font-weight: 600; color: #5E222A;
    text-decoration: none; display: flex; align-items: center; gap: 5px;
    transition: opacity 0.15s;
}
.rso-view-all-link:hover { opacity: 0.65; color: #5E222A; }

/* Empty / loading */
.rso-empty { padding: 28px 24px; color: var(--text-muted); font-size: 14px; }
.rso-empty strong { color: var(--text-dark); }
.rso-loading { display: flex; align-items: center; gap: 6px; padding: 28px 24px; }
.rso-loading span { width: 7px; height: 7px; border-radius: 50%; background: #5E222A; animation: rso-pulse 1.2s infinite ease-in-out; }
.rso-loading span:nth-child(2) { animation-delay: 0.2s; }
.rso-loading span:nth-child(3) { animation-delay: 0.4s; }
@keyframes rso-pulse { 0%,80%,100%{ opacity:0.2; transform:scale(0.8); } 40%{ opacity:1; transform:scale(1); } }

/* No layout shift */
body.search-open { overflow: hidden; padding-right: var(--scrollbar-w, 0px); }
.search-open .reis-main-header { padding-right: calc(40px + var(--scrollbar-w, 0px)); }
.search-open .reis-topbar-inner { padding-right: calc(40px + var(--scrollbar-w, 0px)); }

@media (max-width: 768px) {
    .reis-search-overlay { align-items: flex-start; padding-top: 60px; }
    .rso-card { border-radius: 12px; }
    .reis-search-input { font-size: 1rem; }
    .rso-footer-hint { display: none; }
}

/* ── Mobile Side Drawer — mobile only ───────────────────────────── */
.reis-drawer,
.reis-drawer-backdrop { display: none; }

@media (max-width: 768px) {
    .reis-drawer {
        display: flex; flex-direction: column;
        position: fixed; top: 0; right: 0; bottom: 0;
        width: 300px; max-width: 90vw;
        background: #fff; z-index: 1100;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        overflow: hidden;
    }
    .reis-drawer.is-open { transform: translateX(0); }
    .reis-drawer-backdrop {
        display: block;
        position: fixed; inset: 0; z-index: 1099;
        background: rgba(0,0,0,0.4);
        opacity: 0; pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .reis-drawer-backdrop.is-open { opacity: 1; pointer-events: all; }
}

@media (max-width: 768px) {
    /* User header */
    .drawer-user {
        display: flex; align-items: center; gap: 14px;
        padding: 24px 20px 20px;
        border-bottom: 1px solid #f0f0f0;
        position: relative; flex-shrink: 0;
    }
    .drawer-avatar {
        width: 48px; height: 48px; border-radius: 50%;
        object-fit: cover; flex-shrink: 0;
        border: 2px solid #e8f3fb;
    }
    .drawer-avatar-guest {
        background: #e8f3fb; display: flex;
        align-items: center; justify-content: center;
        color: #398fc3;
    }
    .drawer-user-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
    .drawer-greeting { font-size: 15px; font-weight: 500; color: var(--text-dark); }
    .drawer-user-link { font-size: 12px; color: #398fc3; text-decoration: none; }
    .drawer-close {
        position: absolute; top: 20px; right: 16px;
        background: none; border: none; cursor: pointer;
        color: #999; padding: 4px;
    }
    .drawer-close:hover { color: var(--text-dark); }

    /* Sections */
    .drawer-sections { flex: 1; padding: 8px 0; overflow-y: auto; min-height: 0; }
    .drawer-section { padding: 12px 0 8px; }
    .drawer-section + .drawer-section { border-top: 1px solid #f5f5f5; }
    .drawer-section-label { display: block; font-size: 11px; font-weight: 600; color: #bbb; padding: 0 20px 8px; }
    .drawer-item {
        display: flex; align-items: center; gap: 14px;
        padding: 11px 20px; font-size: 15px; font-weight: 400;
        color: var(--text-dark); text-decoration: none;
        transition: background 0.15s; width: 100%; background: none; border: none; cursor: pointer; text-align: left;
    }
    .drawer-item:hover { background: #f8f9fa; color: var(--text-dark); }
    .drawer-item svg { flex-shrink: 0; color: #888; }

    /* Footer — pinned at bottom */
    .drawer-footer { border-top: 1px solid #f0f0f0; padding: 8px 0; flex-shrink: 0; }
    .drawer-logout { color: #c0392b; }
    .drawer-logout svg { color: #c0392b; }
    .drawer-logout:hover { background: #fff5f5; color: #a93226; }

    /* Categories accordion */
    .drawer-cat-toggle .drawer-cat-chevron { margin-left: auto; color: #bbb; transition: transform 0.25s; }
    .drawer-cat-toggle[aria-expanded="true"] .drawer-cat-chevron { transform: rotate(180deg); }
    .drawer-cat-list { display: none; padding: 4px 0 4px 52px; }
    .drawer-cat-list.is-open { display: block; max-height: 35vh; overflow-y: auto; }
    .drawer-cat-item {
        display: flex; align-items: center; justify-content: space-between;
        padding: 9px 20px 9px 0; font-size: 14px; color: #555;
        text-decoration: none; border-bottom: 1px solid #f5f5f5; transition: color 0.15s;
    }
    .drawer-cat-item:last-child { border-bottom: none; }
    .drawer-cat-item:hover { color: var(--reis-pink); }
    .drawer-cat-count { font-size: 11px; color: #bbb; background: #f4f4f4; border-radius: 20px; padding: 1px 8px; }
}

/* ── Compact header on scroll (desktop only) ─────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    transition: box-shadow 0.3s;
}
.reis-topbar { transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.3s ease; max-height: 60px; overflow: hidden; }
.reis-main-header { transition: padding 0.3s ease; }
.site-logo { transition: max-height 0.3s ease; }
.reis-support { transition: opacity 0.25s ease, max-width 0.3s ease; }

@media (min-width: 769px) {
    body.is-scrolled .reis-topbar {
        max-height: 0;
        padding: 0;
        opacity: 0;
        pointer-events: none;
    }
    body.is-scrolled .reis-main-header {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    body.is-scrolled .site-logo {
        max-height: 44px;
    }
    body.is-scrolled .reis-support {
        opacity: 0;
        max-width: 0;
        overflow: hidden;
        pointer-events: none;
    }
    body.is-scrolled .site-header {
        box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    }
}
