/* =========================================================
   FRONTEND HEADER - Autoplacevi
   Professional marketplace header + account drawer
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--front-border);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.front-brand {
    flex: 0 0 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    color: #0f172a;
    text-decoration: none;
}

.front-brand-text {
    min-width: 0;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
}

.front-brand-text strong,
.front-brand-text small {
    display: block;
}

.front-brand-text strong {
    color: #0f172a;
    font-size: 21px;
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.front-brand-text small {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
}

.front-brand-text img {
    display: block;
    max-width: 178px;
    max-height: 44px;
    object-fit: contain;
}

.front-nav {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin-left: 10px;
}

.front-nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid transparent;
    background: transparent;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.front-nav a svg,
.header-post-button svg,
.header-icon-button svg,
.header-gold-link svg,
.header-account-button svg,
.header-logout svg,
.account-drawer svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.front-nav a:hover,
.front-nav a.is-active {
    background: #f8fafc;
    color: #0f172a;
    border-color: #e2e8f0;
}

.header-post-button {
    flex: 0 0 auto;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    margin-left: 2px;
    border: 1px solid #0f172a;
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .12);
    font-size: 13px;
    font-weight: 950;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.header-post-button:hover {
    background: #1e293b;
    border-color: #1e293b;
    transform: translateY(-1px);
}

.header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

.header-link,
.header-cta,
.header-logout,
.header-icon-button,
.header-gold-link,
.header-account-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 950;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.header-link {
    padding: 0 13px;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.header-link:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.header-cta {
    padding: 0 14px;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid #0f172a;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .12);
}

.header-cta:hover {
    background: #1e293b;
    border-color: #1e293b;
    transform: translateY(-1px);
}

.header-icon-button {
    position: relative;
    width: 42px;
    padding: 0;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.header-icon-button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.header-message-button strong {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    border: 2px solid #ffffff;
    font-size: 10px;
    font-weight: 950;
}

.header-gold-link {
    gap: 7px;
    padding: 0 9px 0 10px;
    background: #fff7cc;
    color: #111827;
    border: 1px solid #facc15;
}

.header-gold-link svg {
    color: #854d0e;
}

.header-gold-link strong {
    min-width: 32px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    background: #ffffff;
    border-radius: 9px;
    color: #111827;
    font-size: 12px;
}

.header-account-button {
    gap: 9px;
    padding: 0 10px 0 5px;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid transparent;
    cursor: pointer;
}

.header-account-button:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.header-account-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #ffffff;
    font-size: 14px;
    font-weight: 950;
    text-transform: uppercase;
}

.header-account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-account-name {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-logout {
    gap: 7px;
    padding: 0 12px;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.header-logout:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.account-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9900;
    background: rgba(15, 23, 42, .58);
    opacity: 0;
    pointer-events: none;
    -webkit-backdrop-filter: blur(0) brightness(1);
    backdrop-filter: blur(0) brightness(1);
    transition: opacity .28s ease, backdrop-filter .28s ease;
}

.account-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
    -webkit-backdrop-filter: blur(12px) brightness(.72) saturate(.85);
    backdrop-filter: blur(12px) brightness(.72) saturate(.85);
}

.account-drawer[hidden],
.account-drawer-backdrop[hidden] {
    display: none !important;
}

.account-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 9910;
    width: min(410px, calc(100% - 24px));
    height: 100vh;
    overflow-y: auto;
    padding: 18px;
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    box-shadow: -22px 0 70px rgba(15, 23, 42, .22);
    opacity: .72;
    transform: translate3d(104%, 0, 0);
    transition: transform .34s cubic-bezier(.22, 1, .36, 1), opacity .24s ease;
    will-change: transform, opacity;
}

.account-drawer.is-open {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.account-drawer.is-closing {
    opacity: .55;
    transform: translate3d(104%, 0, 0);
}

body.account-drawer-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .account-drawer,
    .account-drawer-backdrop {
        transition: none;
    }
}

.account-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.account-drawer-head small {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.account-drawer-head strong {
    display: block;
    color: #0f172a;
    font-size: 22px;
    font-weight: 950;
    letter-spacing: -.04em;
}

.account-drawer-head button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    cursor: pointer;
}

.account-drawer-profile {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin: 16px 0;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}

.account-drawer-profile > span {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 15px;
    background: linear-gradient(135deg, #0f172a, #334155);
    color: #ffffff;
    font-size: 20px;
    font-weight: 950;
    text-transform: uppercase;
}

.account-drawer-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-drawer-profile strong,
.account-drawer-profile small,
.account-drawer-profile em {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-drawer-profile strong {
    color: #0f172a;
    font-size: 16px;
    font-weight: 950;
}

.account-drawer-profile small {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.account-drawer-profile em {
    margin-top: 7px;
    color: #92400e;
    font-size: 12px;
    font-style: normal;
    font-weight: 950;
}

.account-drawer-credit,
.account-drawer-promo,
.account-drawer-section a {
    text-decoration: none;
}

.account-drawer-credit {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #fff7cc;
    color: #0f172a;
    border: 1px solid #facc15;

}

.account-drawer-credit span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 950;
}

.account-drawer-credit strong {
    min-width: 42px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    background: #ffffff;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 950;
}

.account-drawer-promo {
    min-height: 66px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-top: 12px;
    padding: 12px;
    background: #0f172a;
    color: #ffffff;

}

.account-drawer-promo svg {
    width: 42px;
    height: 42px;
    padding: 10px;
    background: rgba(255, 255, 255, .12);
    border-radius: 13px;
}

.account-drawer-promo strong,
.account-drawer-promo small {
    display: block;
}

.account-drawer-promo strong {
    font-size: 14px;
    font-weight: 950;
}

.account-drawer-promo small {
    margin-top: 4px;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
}

.account-drawer-section {
    margin-top: 18px;
}

.account-drawer-section > span {
    display: block;
    margin: 0 0 9px 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.account-drawer-section a {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 0 12px;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    font-weight: 900;
}

.account-drawer-section a:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.account-drawer-section a em {
    min-width: 22px;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0 7px;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 11px;
    font-style: normal;
    font-weight: 950;
}

.account-drawer-section a.is-logout {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fff7f7;
}

/* =========================================================
   MOBILE HEADER MENU - drawer style
   ========================================================= */

.mobile-menu-toggle {
    width: 44px;
    height: 44px;
    display: none;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.mobile-menu-toggle span {
    width: 19px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: #0f172a;
    transition: transform .18s ease, opacity .18s ease;
}

body.mobile-menu-open .mobile-menu-toggle {
    background: #0f172a;
    border-color: #0f172a;
}

body.mobile-menu-open .mobile-menu-toggle span {
    background: #ffffff;
}

body.mobile-menu-open .mobile-menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.mobile-menu-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
body.mobile-menu-open .mobile-menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(9px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .24s ease;
}

.mobile-menu-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-backdrop[hidden],
.mobile-menu[hidden] {
    display: none !important;
}

.mobile-menu {
    position: fixed;
    top: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 1410;
    width: min(410px, calc(100% - 20px));
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 26px;
    box-shadow: 0 34px 90px rgba(15, 23, 42, .28);
    transform: translateX(calc(100% + 20px));
    opacity: .98;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .22s ease;
}

.mobile-menu.is-open {
    transform: translateX(0);
    opacity: 1;
}

.mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-menu-head small {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.mobile-menu-head strong {
    display: block;
    color: #0f172a;
    font-size: 21px;
    font-weight: 950;
    letter-spacing: -.045em;
}

.mobile-menu-head button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    cursor: pointer;
}

.mobile-menu svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.mobile-menu-profile {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
}

.mobile-menu-profile > span {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
    color: #ffffff;
    font-weight: 950;
    text-transform: uppercase;
}

.mobile-menu-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-menu-profile strong,
.mobile-menu-profile small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-menu-profile strong {
    color: #0f172a;
    font-size: 16px;
    font-weight: 950;
}

.mobile-menu-profile small {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.mobile-menu-section {
    display: grid;
    gap: 8px;
}

.mobile-menu-section > span {
    margin: 4px 0 2px 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.mobile-menu a {
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 13px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 950;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .035);
}

.mobile-menu a:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.mobile-menu a em {
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0 8px;
    border-radius: 999px;
    background: #fff7cc;
    color: #0f172a;
    border: 1px solid #facc15;
    font-size: 11px;
    font-style: normal;
    font-weight: 950;
}

.mobile-menu-cta {
    background: #0f172a !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .18) !important;
}

.mobile-menu-gold {
    background: #fff7cc !important;
    border-color: #facc15 !important;
}

.manufacturer-strip {
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
    background: #f8fafc;
}

.manufacturer-strip-inner {
    min-height: 56px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 8px;
}

.manufacturer-strip-track {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 8px 2px;
}

.manufacturer-strip-track::-webkit-scrollbar {
    display: none;
}

.manufacturer-chip {
    flex: 0 0 auto;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px 0 6px;
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.manufacturer-chip:hover {
    transform: translateY(-1px);
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.manufacturer-chip-logo {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 950;
}

.manufacturer-chip:hover .manufacturer-chip-logo {
    background: #ffffff;
    color: #0f172a;
    border-color: #ffffff;
}

.manufacturer-chip-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}

.manufacturer-chip-name {
    max-width: 130px;
    overflow: hidden;
    line-height: 1;
    text-overflow: ellipsis;
}

.manufacturer-strip-btn {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.manufacturer-strip-btn:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.frontend-toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    width: min(380px, calc(100% - 36px));
    display: grid;
    gap: 10px;
}

.frontend-toast {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .12);
}

.frontend-toast strong {
    display: block;
    margin-bottom: 4px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
}

.frontend-toast p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
}

.frontend-toast button {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.frontend-toast.is-success { border-left: 4px solid #16a34a; }
.frontend-toast.is-error { border-left: 4px solid #dc2626; }
.frontend-toast.is-warning { border-left: 4px solid #d97706; }
.frontend-toast.is-info { border-left: 4px solid #0f172a; }

body.account-drawer-open,
body.mobile-menu-open {
    overflow: hidden;
}

@media (max-width: 1240px) {
    .front-brand-text img { max-width: 158px; }
    .front-nav a { padding: 0 9px; }
    .header-account-name { display: none; }
    .header-logout-compact span { display: none; }
    .header-logout { width: 42px; padding: 0; }
}

@media (max-width: 1060px) {
    .header-inner { min-height: 64px; }
    .front-nav,
    .header-actions,
    .header-post-button { display: none; }
    .mobile-menu-toggle { display: flex; margin-left: auto; }
    .front-brand-text img { max-width: 165px; max-height: 42px; }
    .front-brand-text strong { font-size: 21px; }
}

@media (max-width: 760px) {
    .header-inner { min-height: 62px; gap: 14px; }
    .front-brand-text img { max-width: 150px; max-height: 40px; }
    .front-brand-text strong { font-size: 19px; }
    .front-brand-text small { display: none; }
    .manufacturer-strip-inner { grid-template-columns: minmax(0, 1fr); min-height: 50px; }
    .manufacturer-strip-btn { display: none; }
    .manufacturer-chip { min-height: 34px; gap: 7px; padding: 0 8px 0 5px; font-size: 12px; }
    .manufacturer-chip-logo { width: 24px; height: 24px; }
    .manufacturer-chip-name { max-width: 110px; }
    .account-drawer { width: min(390px, calc(100% - 12px)); padding: 14px; }
}


/* =========================================================
   MOBILE MENU - full page quiet backdrop
   ========================================================= */
body.mobile-menu-open .site-main,
body.mobile-menu-open .site-footer,
body.mobile-menu-open footer,
body.mobile-menu-open .manufacturer-strip {
    filter: blur(7px) brightness(.8) saturate(.9);
    transition: filter .28s ease;
    pointer-events: none;
    user-select: none;
}

body.mobile-menu-open .site-header,
body.mobile-menu-open .mobile-menu,
body.mobile-menu-open .mobile-menu-backdrop {
    filter: none !important;
}

@media (max-width: 520px) {
    .mobile-menu {
        top: 8px;
        right: 8px;
        bottom: 8px;
        width: calc(100% - 16px);
        border-radius: 22px;
        padding: 14px;
    }

    .mobile-menu a {
        min-height: 48px;
    }
}

/* =========================================================
   ACCOUNT DRAWER - FULL PAGE BLUR
   Blur the actual page content while account drawer is open.
   Drawer stays sharp because it is outside .site-main.
   ========================================================= */
body.account-drawer-open .site-main,
body.account-drawer-open .site-footer,
body.account-drawer-open footer {
    filter: blur(8px) brightness(.78) saturate(.9);
    transition: filter .28s ease;
    pointer-events: none;
    user-select: none;
}

.site-main,
.site-footer,
footer {
    transition: filter .28s ease;
}

body.account-drawer-open .account-drawer {
    filter: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .site-main,
    .site-footer,
    footer {
        transition: none;
    }
}

/* =========================================================
   HEADER MESSAGE ICON - slightly larger custom envelope
   ========================================================= */
.header-message-button {
    width: 44px;
    min-width: 44px;
}

.header-message-button svg {
    width: 21px;
    height: 21px;
}


/* =========================================================
   MOBILE MENU - viewport drawer fix
   ========================================================= */
.mobile-menu-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9980 !important;
    background: rgba(15, 23, 42, .58) !important;
    -webkit-backdrop-filter: blur(10px) brightness(.78) saturate(.9);
    backdrop-filter: blur(10px) brightness(.78) saturate(.9);
}

.mobile-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    z-index: 9990 !important;
    width: min(410px, calc(100vw - 22px)) !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 18px !important;
    border-radius: 24px 0 0 24px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    transform: translate3d(105%, 0, 0) !important;
    opacity: 1 !important;
    box-shadow: -28px 0 80px rgba(15, 23, 42, .28) !important;
}

.mobile-menu.is-open {
    transform: translate3d(0, 0, 0) !important;
}

body.mobile-menu-open .mobile-menu-toggle {
    position: relative;
    z-index: 9992;
}

body.mobile-menu-open .site-header {
    filter: none !important;
}

@media (max-width: 520px) {
    .mobile-menu {
        width: min(92vw, 390px) !important;
        padding: 16px !important;
        border-radius: 22px 0 0 22px !important;
    }

    .mobile-menu-head {
        position: sticky;
        top: -16px;
        z-index: 2;
        margin: -16px -16px 0;
        padding: 16px;
        background: rgba(255, 255, 255, .96);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }
}

/* =========================================================
   PATCH v1.1.2 - Android style mobile bottom navigation
   ========================================================= */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 1060px) {
    body {
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .mobile-menu-toggle {
        display: none !important;
    }

    .mobile-menu,
    .mobile-menu-backdrop {
        display: none !important;
    }

    body.mobile-menu-open {
        overflow: auto;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 9970;
        height: 68px;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: center;
        gap: 4px;
        padding: 7px;
        border: 1px solid rgba(226, 232, 240, .95);
        border-radius: 24px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 18px 46px rgba(15, 23, 42, .18);
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
    }

    .mobile-bottom-nav a {
        position: relative;
        min-width: 0;
        height: 54px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        border-radius: 18px;
        color: #64748b;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: background .16s ease, color .16s ease, transform .16s ease;
    }

    .mobile-bottom-nav a:active {
        transform: scale(.96);
    }

    .mobile-bottom-nav a.is-active {
        background: #0f172a;
        color: #ffffff;
    }

    .mobile-bottom-nav-icon {
        position: relative;
        width: 23px;
        height: 23px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-bottom-nav svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-bottom-nav strong {
        display: block;
        max-width: 100%;
        overflow: hidden;
        color: inherit;
        font-size: 10.5px;
        font-weight: 950;
        line-height: 1;
        letter-spacing: -.02em;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-bottom-nav em {
        position: absolute;
        top: -8px;
        right: -11px;
        min-width: 18px;
        height: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 5px;
        border-radius: 999px;
        border: 2px solid #ffffff;
        background: #dc2626;
        color: #ffffff;
        font-size: 9px;
        font-style: normal;
        font-weight: 950;
        line-height: 1;
    }
}

@media (max-width: 380px) {
    .mobile-bottom-nav {
        left: 6px;
        right: 6px;
        bottom: calc(6px + env(safe-area-inset-bottom));
        height: 64px;
        padding: 6px;
        border-radius: 20px;
    }

    .mobile-bottom-nav a {
        height: 50px;
        border-radius: 15px;
    }

    .mobile-bottom-nav svg {
        width: 20px;
        height: 20px;
    }

    .mobile-bottom-nav strong {
        font-size: 10px;
    }
}
