/* Shared client-area and order-form navigation. */
.ph-header {
    --ph-ink: #203354;
    --ph-muted: #71809a;
    --ph-line: #e8edf5;
    --ph-soft: #f3f6fb;
    --ph-blue: #4165ed;
    --ph-surface: #fff;
    height: 72px;
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: var(--ph-surface);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--ph-line);
    box-shadow: var(--ph-shadow);
}
.ph-header::after {
    content: "";
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 180px;
    height: 2px;
    background: linear-gradient(to left, #4165ed, #7b98ff, transparent);
}
.ph-header .ph-nav {
    width: calc(100% - 64px);
    max-width: 1380px;
    height: 72px;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    gap: 28px;
    display: flex;
    align-items: center;
    direction: rtl;
}
.ph-icon { flex: 0 0 auto; display: block; width: 20px; height: 20px; }
.ph-header * { transition: color .18s, background-color .18s, border-color .18s, box-shadow .18s, transform .18s; }
.ph-header button, .ph-sidebar-close { cursor: pointer; font-size: 14px; }
.ph-header button, .ph-header a { -webkit-tap-highlight-color: transparent; }
.ph-header a:focus-visible, .ph-header button:focus-visible,
#phSidebar a:focus-visible, #phSidebar button:focus-visible {
    outline: 3px solid #92a8ff;
    outline-offset: 4px;
}
.ph-header [hidden] { display: none !important; }
#phSidebar [hidden] { display: none !important; }
.ph-brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; color: var(--ph-ink); }
.ph-brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid #e9edf5;
    border-radius: 15px;
    background: #fff;
}
.ph-brand-mark img { display: block; width: 40px; height: 40px; object-fit: contain; }
.ph-brand-copy { display: flex; flex-direction: column; gap: 4px; }
.ph-brand-copy > strong { font-size: 22px; line-height: 1.4; font-weight: 800; letter-spacing: -.8px; }
.ph-brand-copy > strong > span { color: var(--ph-blue); margin-inline-start: 4px; }
.ph-brand-copy small { font-size: 10px; color: var(--ph-muted); line-height: 1.5; white-space: nowrap; }
.ph-brand-copy small > span { margin: 0 5px; opacity: .45; }
.ph-brand-copy bdi { font-size: 9px; letter-spacing: 1.1px; font-weight: 500; }
.ph-nav-links { display: flex; align-items: center; gap: 4px; margin-inline-start: 6px; }
.ph-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 11px;
    color: #62718a;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
.ph-nav-link .ph-icon { width: 18px; height: 18px; opacity: .8; }
.ph-nav-link:hover { color: var(--ph-blue); background: var(--ph-soft); }
.ph-nav-link.is-active { color: var(--ph-blue); background: #edf2ff; font-weight: 700; }
.ph-nav-link.is-active .ph-icon { opacity: 1; }
.ph-nav-actions { display: flex; align-items: center; gap: 7px; margin-inline-start: auto; }
.ph-icon-button {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--ph-ink);
    flex-shrink: 0;
}
.ph-icon-button:hover, .ph-icon-button[aria-expanded="true"] { background: var(--ph-soft); border-color: var(--ph-line); color: var(--ph-blue); }
.ph-cart { background: var(--ph-soft); }
.ph-cart-disclosure .ph-dropdown { left: auto; right: 0; width: min(320px, calc(100vw - 32px)); }
.ph-cart-summary-body { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 24px 16px 18px; text-align: center; }
.ph-cart-summary-body > strong { font-size: 13px; font-weight: 600; }
.ph-cart-summary-body > span:not(.ph-cart-summary-icon) { color: var(--ph-muted); font-size: 11px; line-height: 1.9; }
.ph-cart-summary-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--ph-soft); color: var(--ph-blue); }
.ph-cart-summary-icon .ph-icon { width: 22px; height: 22px; }
.ph-cart-summary-link { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 40px; margin-top: 6px; border-radius: 10px; background: var(--ph-blue); color: #fff !important; font-size: 12px; font-weight: 600; }
.ph-cart-summary-link:hover { color: #fff !important; filter: brightness(.96); }
.ph-cart-summary-link span { font-size: 16px; line-height: 1; }
.ph-empty-cart { gap: 8px; }
.ph-empty-cart > .ph-icon { color: var(--ph-muted); }
.ph-cart-count {
    position: absolute;
    top: -5px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid var(--ph-surface);
    border-radius: 7px;
    background: var(--ph-blue);
    color: #fff;
    font-size: 9px;
    line-height: 14px;
    text-align: center;
    font-weight: 700;
}
.ph-notification-dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; background: #f28454; border: 2px solid var(--ph-surface); border-radius: 50%; }
.ph-action-divider { width: 1px; height: 26px; margin: 0 6px; background: var(--ph-line); }
.ph-login-button {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 43px;
    padding: 0 17px;
    border-radius: 11px;
    background: var(--ph-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(65, 101, 237, .15);
    white-space: nowrap;
}
.ph-login-button:hover { background: #3054dd; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(65, 101, 237, .23); }
.ph-login-separator { margin: 0 3px; opacity: .5; }
.ph-disclosure { position: relative; }
.ph-account-button { display: flex; align-items: center; gap: 9px; background: transparent; border: 1px solid var(--ph-line); border-radius: 12px; padding: 5px 9px 5px 14px; height: 48px; color: var(--ph-ink); }
.ph-account-button:hover, .ph-account-button[aria-expanded="true"] { border-color: #b7c6fa; background: var(--ph-soft); }
.ph-account-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #eaf0ff; color: var(--ph-blue); }
.ph-account-copy { display: flex; flex-direction: column; gap: 2px; min-width: 60px; max-width: 105px; text-align: start; }
.ph-account-copy small { color: var(--ph-muted); font-size: 10px; line-height: 1.4; }
.ph-account-copy strong { color: var(--ph-ink); font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ph-account-button > .ph-icon { width: 14px; height: 14px; color: var(--ph-muted); }
.ph-account-button[aria-expanded="true"] > .ph-icon { transform: rotate(180deg); }
.ph-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    width: 280px;
    max-height: min(480px, calc(100dvh - 115px));
    overflow-y: auto;
    background: var(--ph-surface);
    border: 1px solid var(--ph-line);
    border-radius: 17px;
    box-shadow: 0 14px 48px rgba(30, 52, 95, .14);
    padding: 8px;
    color: var(--ph-ink);
    text-align: start;
    animation: ph-dropdown-in .16s ease-out;
}
.ph-dropdown-heading { display: flex; align-items: center; justify-content: space-between; padding: 13px 12px 16px; border-bottom: 1px solid var(--ph-line); }
.ph-dropdown-heading strong { font-size: 13px; font-weight: 600; }
.ph-count-label { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 8px; font-size: 12px; background: var(--ph-soft); color: var(--ph-muted); }
.ph-alert-list { margin: 0; padding: 0; }
.ph-alert { display: flex; align-items: flex-start; gap: 10px; padding: 15px 12px; border-bottom: 1px solid var(--ph-line); font-size: 12px; line-height: 1.9; color: var(--ph-ink); }
.ph-alert:hover { background: var(--ph-soft); color: var(--ph-blue); border-radius: 10px; }
.ph-alert-list > li:last-child .ph-alert { border-bottom: 0; }
.ph-alert-dot { width: 7px; height: 7px; background: #3b9e85; border-radius: 50%; flex-shrink: 0; margin-top: 7px; }
.ph-alert--danger .ph-alert-dot { background: #e76464; }
.ph-alert--warning .ph-alert-dot { background: #e6a03c; }
.ph-alert--info .ph-alert-dot { background: var(--ph-blue); }
.ph-empty-notifications { padding: 28px 15px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ph-empty-notifications > .ph-icon { color: #3b9e85; width: 32px; height: 32px; margin-bottom: 7px; }
.ph-empty-notifications strong { font-size: 13px; font-weight: 500; }
.ph-empty-notifications > span { font-size: 11px; color: var(--ph-muted); }
.ph-account-summary { display: flex; flex-direction: column; gap: 5px; padding: 14px 12px 17px; border-bottom: 1px solid var(--ph-line); margin-bottom: 5px; }
.ph-account-summary strong { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.ph-account-summary span { color: var(--ph-muted); font-size: 11px; direction: ltr; text-align: right; overflow-wrap: anywhere; user-select: text; }
.ph-dropdown-link { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 9px; color: var(--ph-ink); font-size: 12px; }
.ph-dropdown-link .ph-icon { width: 18px; height: 18px; color: var(--ph-muted); }
.ph-dropdown-link:hover { color: var(--ph-blue); background: var(--ph-soft); }
.ph-logout-link { border-top: 1px solid var(--ph-line); margin-top: 5px; color: #d3525d; }
.ph-logout-link .ph-icon { color: inherit; }
.ph-logout-link:hover { background: #fff2f3; color: #c6404c; }
.ph-theme-sun { display: none; }
.ph-menu-toggle, .ph-sidebar-close { display: none; }
.ph-guest-avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #4165ed; background: #edf2ff; flex-shrink: 0; }
.ph-guest-avatar .ph-icon { width: 26px; height: 26px; }
#phSidebar .settings button.night { display: flex; align-items: center; justify-content: center; background: #ffc048; border-radius: 5px; width: 70px; height: 50px; color: #a66000; padding: 0; cursor: pointer; }
.backgroundMenu[data-ph-backdrop] { z-index: 40; opacity: 0; visibility: hidden; pointer-events: none; background: rgba(18, 32, 60, .3); backdrop-filter: blur(4px); transition: opacity .2s, visibility .2s; }
.showMenu .backgroundMenu[data-ph-backdrop] { opacity: 1; visibility: visible; pointer-events: auto; }
.nightMode .ph-header { --ph-ink: #e2e8fa; --ph-muted: #9aaaca; --ph-line: #31405b; --ph-soft: #222e44; --ph-blue: #a5b8ff; --ph-surface: #1a2437; background: var(--ph-surface); box-shadow: 0 10px 32px rgba(0,0,0,.2); }
.nightMode .ph-header .ph-nav { background: transparent; box-shadow: none; }
.nightMode .ph-nav-link { color: #b1bdd5; }
.nightMode .ph-nav-link.is-active { background: #303d60; color: #b1c2ff; }
.nightMode .ph-cart-count { background: #708eff; color: #fff; }
.nightMode .ph-login-button { background: #526fed; color: #fff; }
.nightMode .ph-account-avatar { background: #344367; color: #b1c2ff; }
.nightMode .ph-logout-link:hover { background: #453040; }
.nightMode .ph-theme-moon { display: none; }
.nightMode .ph-theme-sun { display: inline-flex; }
.nightMode #phSidebar .settings button.night { background: #debc54; color: #202944; }
@keyframes ph-dropdown-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1250px) {
    .ph-header { width: 100%; }
    .ph-header .ph-nav { width: calc(100% - 48px); padding: 0; gap: 16px; }
    .ph-menu-toggle { display: flex; }
    .ph-brand-copy > strong { font-size: 20px; }
    .ph-nav-links { margin-inline-start: 0; }
    .ph-nav-link { padding: 0 9px; gap: 6px; font-size: 12px; }
    #phSidebar {
        position: fixed;
        z-index: 45;
        top: 102px;
        right: 16px;
        left: auto;
        bottom: 16px;
        height: auto;
        max-height: calc(100dvh - 118px);
        width: min(320px, calc(100vw - 32px)) !important;
        margin: 0;
        padding: 28px 24px 20px;
        border-radius: 18px;
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(calc(100% + 32px));
        visibility: hidden;
        transition: transform .22s ease, visibility .22s;
        box-shadow: 0 18px 60px rgba(18, 32, 60, .14);
    }
    .showMenu #phSidebar { transform: translateX(0); visibility: visible; top: 102px; right: 16px; }
    body.showMenu { overflow: hidden; }
    .ph-sidebar-close { display: grid; place-items: center; position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; border-radius: 8px; background: transparent; color: var(--dark-blue); padding: 0; }
}
@media (max-width: 1120px) { .ph-nav-links { display: none; } }
@media (max-width: 640px) {
    .ph-header { width: 100%; height: 72px; }
    .ph-header .ph-nav { width: calc(100% - 24px); gap: 10px; padding: 0; }
    .ph-brand { gap: 8px; }
    .ph-brand-mark { width: 38px; height: 38px; border-radius: 11px; }
    .ph-brand-mark img { width: 32px; height: 32px; }
    .ph-brand-copy > strong { font-size: 18px; letter-spacing: -.6px; }
    .ph-brand-copy small { font-size: 9px; }
    .ph-brand-copy small > span, .ph-brand-copy bdi { display: none; }
    .ph-nav-actions { gap: 4px; }
    .ph-icon-button { width: 36px; height: 36px; border-radius: 10px; }
    .ph-action-divider { display: none; }
    .ph-login-button { width: 38px; height: 38px; padding: 0; justify-content: center; }
    .ph-login-button > span { display: none; }
    .ph-account-button { height: 38px; width: 38px; padding: 0; border: 0; justify-content: center; }
    .ph-account-copy, .ph-account-button > .ph-icon { display: none; }
    .ph-account-avatar { width: 36px; height: 36px; }
    .ph-dropdown { position: fixed; top: 84px; left: 16px; width: min(320px, calc(100vw - 32px)); max-height: calc(100dvh - 100px); }
    #phSidebar, .showMenu #phSidebar { top: 88px; max-height: calc(100dvh - 104px); }
}
@media (max-width: 420px) {
    .ph-header .ph-nav { padding: 0; gap: 7px; }
    .ph-brand-mark { display: none; }
    .ph-brand-copy > strong { font-size: 17px; }
    .ph-icon-button { width: 34px; height: 36px; }
    .ph-nav-actions { gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
    .ph-header *, #phSidebar, .backgroundMenu[data-ph-backdrop] { transition: none !important; animation: none !important; }
}
