/* =============================================================
   ZEROVA HEADER BUILDER V3 — Admin CSS
   Pixel-accurate Pixfort/Conseil aesthetic
   ============================================================= */

/* ── Reset & Base ── */
.zvhb, .zvhb * { box-sizing: border-box; }
.zvhb button, .zvhb input, .zvhb select, .zvhb textarea { font-family: inherit; }

/* Hide WP chrome */
#zv-header-builder .postbox-header { display: none !important; }
#zv-header-builder .inside { padding: 0 !important; margin: 0 !important; }
#zv-header-builder { border: none !important; box-shadow: none !important; background: transparent !important; }
#poststuff #zv-header-builder { margin-top: 0; }

/* ── Root ── */
.zvhb {
    background: #1a1d24;
    color: #c9d1d9;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.45;
    border-radius: 8px;
    overflow: hidden;
}

/* =============================================================
   TOPBAR
   ============================================================= */

.zvhb-topbar {
    height: 56px;
    background: #13151a;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    position: sticky;
    top: 32px;
    z-index: 100;
}

.zvhb-topbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 16px;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.zvhb-topbar__logo-mark {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    width: 22px;
    height: 22px;
}
.zvhb-topbar__logo-mark span {
    border-radius: 2px;
    background: #6C63FF;
}
.zvhb-topbar__logo-mark span:nth-child(2) { background: #A89CFF; }
.zvhb-topbar__logo-mark span:nth-child(3) { background: #4B44CC; }
.zvhb-topbar__logo-mark span:nth-child(4) { background: #8B84EE; }

.zvhb-topbar__title strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #e6edf3;
    letter-spacing: -0.01em;
}
.zvhb-topbar__help {
    display: block;
    font-size: 0.72rem;
    color: #6C63FF;
    text-decoration: none;
    margin-top: 1px;
}
.zvhb-topbar__help:hover { text-decoration: underline; color: #A89CFF; }

/* Device tabs */
.zvhb-topbar__devices {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 4px;
}

.zvhb-device-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #8b949e;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.15s;
}
.zvhb-device-btn:hover { color: #e6edf3; background: rgba(255,255,255,0.05); }
.zvhb-device-btn.active { background: #21262d; color: #e6edf3; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }

/* Right */
.zvhb-topbar__right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.zvhb-topbar__preview {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #8b949e;
    cursor: pointer;
}

.zvhb-badge {
    background: #2ea043;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 0.03em;
}

.zvhb-topbar__icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    cursor: pointer;
    color: #8b949e;
    transition: all 0.15s;
}
.zvhb-topbar__icon-btn:hover { color: #e6edf3; background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }

/* =============================================================
   CANVAS  (areas)
   ============================================================= */

.zvhb-canvas {
    padding: 14px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ── Area ── */
.zvhb-area {
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: 8px;
    overflow: visible;
}

.zvhb-area__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
}

.zvhb-area__label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.zvhb-area__cols {
    display: flex;
    align-items: stretch;
    min-height: 72px;
    border-top: 1px dashed rgba(255,255,255,0.06);
}

/* ── Column ── */
.zvhb-col {
    flex: 1 1 0;
    position: relative;
    min-height: 72px;
    border-right: 1px dashed rgba(255,255,255,0.06);
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.zvhb-col:last-of-type { border-right: none; }

.zvhb-col__hover-actions {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    gap: 4px;
    z-index: 5;
    background: #21262d;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 3px;
}
.zvhb-col:hover .zvhb-col__hover-actions { display: flex; }

.zvhb-dropzone {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 44px;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.15s;
}
.zvhb-dropzone.drag-over {
    background: rgba(108,99,255,0.08);
    outline: 2px dashed rgba(108,99,255,0.4);
    outline-offset: -2px;
}

/* Add column button */
.zvhb-add-col {
    width: 32px;
    flex-shrink: 0;
    background: transparent;
    border: 1px dashed rgba(255,255,255,0.1);
    border-left: none;
    color: rgba(255,255,255,0.2);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.zvhb-add-col:hover {
    background: rgba(108,99,255,0.1);
    color: #A89CFF;
    border-color: rgba(108,99,255,0.3);
}

/* ── Gear Buttons ── */
.zvhb-gear-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    cursor: pointer;
    color: #8b949e;
    font-size: 0.72rem;
    font-weight: 500;
    transition: all 0.15s;
}
.zvhb-gear-btn:hover { color: #e6edf3; background: rgba(255,255,255,0.08); }
.zvhb-gear-btn--sm { padding: 3px 7px; font-size: 0.7rem; }
.zvhb-gear-btn--danger:hover { color: #f85149; background: rgba(248,81,73,0.1); border-color: rgba(248,81,73,0.3); }
.zvhb-area-gear { padding: 4px 8px; }

/* ── Trash ── */
.zvhb-trash {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    border: 1.5px dashed rgba(255,255,255,0.08);
    border-radius: 8px;
    color: rgba(255,255,255,0.2);
    font-size: 0.78rem;
    margin-top: 4px;
    transition: all 0.15s;
    cursor: default;
}
.zvhb-trash.drag-over {
    border-color: #f85149;
    background: rgba(248,81,73,0.06);
    color: #f85149;
}

/* =============================================================
   PALETTE
   ============================================================= */

.zvhb-palette {
    padding: 16px;
    background: #13151a;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.zvhb-palette__group { margin-bottom: 14px; }

.zvhb-palette__group-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b7280;
    margin-bottom: 8px;
}

.zvhb-palette__items { display: flex; flex-wrap: wrap; gap: 6px; }

.zvhb-palette__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 5px;
    background: #21262d;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 7px;
    cursor: grab;
    color: #c9d1d9;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.15s;
    user-select: none;
}
.zvhb-palette__item:hover {
    background: #2d333b;
    border-color: rgba(255,255,255,0.12);
    color: #fff;
    transform: translateY(-1px);
}
.zvhb-palette__item:active { cursor: grabbing; opacity: 0.7; }

.zvhb-palette__footer {
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.72rem;
    color: rgba(255,255,255,0.2);
    text-align: center;
    margin-top: 4px;
}

/* =============================================================
   PILLS (in dropzones)
   ============================================================= */

.zvhb-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 6px;
    background: #21262d;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    cursor: grab;
    transition: all 0.15s;
    position: relative;
}
.zvhb-pill:hover {
    background: #2d333b;
    border-color: rgba(108,99,255,0.3);
}
.zvhb-pill:active { cursor: grabbing; opacity: 0.6; }
.zvhb-pill.dragging { opacity: 0.3; }

.zvhb-pill__icon {
    width: 22px; height: 22px;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700;
    color: #fff; flex-shrink: 0;
    font-family: monospace;
}

.zvhb-pill__label {
    font-size: 0.78rem;
    font-weight: 500;
    color: #c9d1d9;
    white-space: nowrap;
}

.zvhb-pill__gear {
    width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: none; cursor: pointer;
    color: #6b7280; border-radius: 3px; padding: 0;
    opacity: 0; transition: all 0.1s;
}
.zvhb-pill:hover .zvhb-pill__gear { opacity: 1; }
.zvhb-pill__gear:hover { color: #A89CFF; background: rgba(108,99,255,0.15); }

/* =============================================================
   GLOBAL SETTINGS SECTION
   ============================================================= */

.zvhb-global-section {
    padding: 20px 20px 4px;
    background: #1a1d24;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.zvhb-gs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    gap: 20px;
}
.zvhb-gs-row:last-child { border-bottom: none; }

.zvhb-gs-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #c9d1d9;
    line-height: 1.4;
}
.zvhb-gs-label small { color: #6b7280; font-weight: 400; font-size: 0.77rem; }

.zvhb-gs-row--cards { align-items: flex-start; padding: 16px 0; }

/* Radio cards */
.zvhb-radio-cards { display: flex; gap: 10px; }

.zvhb-radio-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    color: #8b949e;
}
.zvhb-radio-card input { display: none; }
.zvhb-radio-card__box {
    width: 72px; height: 48px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: #21262d;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.zvhb-radio-card__box--default { position: relative; }
.zvhb-radio-card__box--default::after {
    content: '';
    position: absolute;
    width: 44px; height: 100%;
    background: rgba(255,255,255,0.06);
    border-right: 1px solid rgba(255,255,255,0.08);
    border-left: 1px solid rgba(255,255,255,0.08);
}
.zvhb-radio-card__box--default span {
    position: absolute;
    width: 2px; height: 70%;
    background: rgba(255,255,255,0.2);
}
.zvhb-radio-card__box--full {
    background: linear-gradient(90deg, rgba(108,99,255,0.15) 0%, rgba(168,156,255,0.1) 100%);
}

.zvhb-radio-card input:checked ~ .zvhb-radio-card__box {
    border-color: #6C63FF;
    box-shadow: 0 0 0 2px rgba(108,99,255,0.25);
}

.zvhb-select-wrap { position: relative; }
.zvhb-select-wrap::after {
    content: '';
    position: absolute; right: 12px; top: 50%;
    width: 7px; height: 7px;
    border-right: 1.5px solid #6b7280;
    border-bottom: 1.5px solid #6b7280;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.zvhb-select {
    appearance: none;
    background: #21262d;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 7px;
    color: #c9d1d9;
    font-size: 0.82rem;
    padding: 8px 32px 8px 12px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
    min-width: 200px;
}
.zvhb-select:focus { border-color: #6C63FF; }

/* Toggle */
.zvhb-toggle { display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.zvhb-toggle input { display: none; }
.zvhb-toggle__track {
    width: 40px; height: 22px;
    background: #30363d;
    border-radius: 11px;
    position: relative;
    transition: background 0.2s;
}
.zvhb-toggle__thumb {
    position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    background: #8b949e;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
}
.zvhb-toggle input:checked + .zvhb-toggle__track { background: #6C63FF; }
.zvhb-toggle input:checked + .zvhb-toggle__track .zvhb-toggle__thumb { transform: translateX(18px); background: #fff; }

/* =============================================================
   MODAL
   ============================================================= */

.zvhb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 100000;
}

.zvhb-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 580px;
    max-width: 95vw;
    max-height: 90vh;
    background: #161b22;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
    z-index: 100001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.zvhb-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: #1c2128;
    flex-shrink: 0;
}
.zvhb-modal__head h3 { margin: 0; font-size: 1rem; font-weight: 700; color: #e6edf3; }

.zvhb-modal__close {
    width: 30px; height: 30px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    color: #8b949e;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    padding: 0;
    transition: all 0.15s;
}
.zvhb-modal__close:hover { color: #e6edf3; background: rgba(255,255,255,0.1); }

/* Modal tabs */
.zvhb-modal__tabs {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: #161b22;
    flex-shrink: 0;
}
.zvhb-modal-tab {
    height: 40px;
    padding: 0 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: #8b949e;
    margin-bottom: -1px;
    transition: all 0.15s;
    font-family: inherit;
}
.zvhb-modal-tab:hover { color: #e6edf3; }
.zvhb-modal-tab.active { color: #A89CFF; border-bottom-color: #6C63FF; }

/* Modal body */
.zvhb-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: #30363d transparent;
}
.zvhb-modal__body::-webkit-scrollbar { width: 4px; }
.zvhb-modal__body::-webkit-scrollbar-thumb { background: #30363d; border-radius: 2px; }

/* Modal footer */
.zvhb-modal__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.07);
    background: #1c2128;
    flex-shrink: 0;
}

/* Modal form rows */
.zvhb-mf-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.zvhb-mf-row:last-child { border-bottom: none; }

.zvhb-mf-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b7280;
    padding: 16px 0 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 4px;
}

.zvhb-mf-label {
    font-size: 0.82rem;
    color: #8b949e;
    font-weight: 500;
    line-height: 1.4;
}
.zvhb-mf-label small { display: block; font-size: 0.72rem; color: #6b7280; margin-top: 2px; }

.zvhb-mf-row--full { grid-template-columns: 1fr; gap: 6px; }
.zvhb-mf-row--toggle { grid-template-columns: 1fr auto; }

/* Form inputs */
.zvhb-input, .zvhb-select-m, .zvhb-textarea {
    width: 100%;
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #e6edf3;
    font-size: 0.82rem;
    padding: 7px 10px;
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
}
.zvhb-input:focus, .zvhb-select-m:focus, .zvhb-textarea:focus { border-color: #6C63FF; box-shadow: 0 0 0 3px rgba(108,99,255,0.15); }
.zvhb-textarea { min-height: 80px; resize: vertical; font-family: monospace; }

.zvhb-input-group {
    display: flex;
    align-items: stretch;
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.zvhb-input-group:focus-within { border-color: #6C63FF; }
.zvhb-input-group .zvhb-input { border: none; border-radius: 0; }
.zvhb-input-group__suffix {
    padding: 0 10px;
    display: flex; align-items: center;
    font-size: 0.72rem; color: #6b7280;
    background: rgba(255,255,255,0.03);
    border-left: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

/* Select in modal */
.zvhb-mf-select-wrap { position: relative; }
.zvhb-mf-select-wrap::after {
    content: '';
    position: absolute; right: 10px; top: 50%;
    width: 6px; height: 6px;
    border-right: 1.5px solid #6b7280; border-bottom: 1.5px solid #6b7280;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.zvhb-select-m { appearance: none; padding-right: 28px; cursor: pointer; }

/* Color picker in modal */
.zvhb-modal__body .wp-picker-container { display: flex; align-items: center; gap: 8px; }
.zvhb-modal__body .wp-color-result {
    border-radius: 6px !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    background: #0d1117 !important;
    box-shadow: none !important;
    height: 32px !important;
}
.zvhb-modal__body .wp-color-result-text { color: #8b949e !important; font-size: 0.78rem !important; }
.zvhb-modal__body .wp-color-result:hover { border-color: #6C63FF !important; }

/* Alignment selector */
.zvhb-align-btns { display: flex; gap: 4px; }
.zvhb-align-btn {
    width: 36px; height: 32px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    background: #21262d;
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}
.zvhb-align-btn span {
    display: block; height: 2px; background: #6b7280; border-radius: 1px; transition: background 0.1s;
}
.zvhb-align-btn span:nth-child(1) { width: 20px; }
.zvhb-align-btn span:nth-child(2) { width: 14px; }
.zvhb-align-btn span:nth-child(3) { width: 18px; }
.zvhb-align-btn:hover, .zvhb-align-btn.active { border-color: #6C63FF; background: rgba(108,99,255,0.1); }
.zvhb-align-btn:hover span, .zvhb-align-btn.active span { background: #A89CFF; }
/* Center align */
.zvhb-align-btn[data-align="center"] span { margin-left: auto; margin-right: auto; }
.zvhb-align-btn[data-align="end"] span { margin-left: auto; }

/* Size selector */
.zvhb-size-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.zvhb-size-btn {
    height: 28px; padding: 0 12px;
    background: #21262d;
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    color: #8b949e;
    transition: all 0.15s;
    font-family: inherit;
}
.zvhb-size-btn:hover, .zvhb-size-btn.active { border-color: #6C63FF; color: #A89CFF; background: rgba(108,99,255,0.1); }

/* Media picker in modal */
.zvhb-media-picker { display: flex; flex-direction: column; gap: 8px; }
.zvhb-media-preview { border-radius: 8px; overflow: hidden; max-width: 200px; }
.zvhb-media-preview img { display: block; max-width: 100%; height: auto; }
.zvhb-media-preview:empty { display: none; }
.zvhb-media-btn-row { display: flex; gap: 6px; }

/* Buttons */
.zvhb-btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 34px; padding: 0 16px;
    border-radius: 7px; border: 1px solid transparent;
    cursor: pointer; font-size: 0.82rem; font-weight: 600;
    transition: all 0.15s; font-family: inherit;
}
.zvhb-btn--primary { background: #6C63FF; color: #fff; border-color: #6C63FF; }
.zvhb-btn--primary:hover { background: #5850e0; }
.zvhb-btn--ghost { background: #21262d; color: #c9d1d9; border-color: rgba(255,255,255,0.1); }
.zvhb-btn--ghost:hover { border-color: rgba(255,255,255,0.2); color: #e6edf3; }
.zvhb-btn--sm { height: 28px; padding: 0 10px; font-size: 0.75rem; border-radius: 5px; }

/* =============================================================
   FRONTEND HEADER
   ============================================================= */

.zvhb-fe {
    position: relative;
    width: 100%;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.zvhb-fe--sticky { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }
.zvhb-fe--shadow { box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 4px 24px rgba(0,0,0,0.15); }
.zvhb-fe--scrolled { background: var(--zvhb-sticky-bg) !important; }
.zvhb-fe--scrolled.zvhb-fe--shadow { box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 4px 24px rgba(0,0,0,0.08); }
.zvhb-fe--hidden { transform: translateY(-100%); }

.zvhb-fe-area { width: 100%; }
.zvhb-fe-inner { margin: 0 auto; display: flex; align-items: center; }

.zvhb-fe-logo { display: inline-flex; align-items: center; text-decoration: none; }
.zvhb-fe-logo .zvhb-fe-logo__img { height: var(--lh, 40px); width: auto; display: block; }
.zvhb-fe-logo__text { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.04em; color: inherit; display: flex; align-items: center; }
.zvhb-logo-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg,#6C63FF,#A89CFF); margin-left: 3px; }

.zvhb-fe-menu { position: relative; }
.zvhb-fe-nav { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 2px; }
.zvhb-fe-nav > li { position: relative; }
.zvhb-fe-nav > li > a { display: flex; align-items: center; gap: 4px; padding: 6px 12px; font-size: var(--nav-fs,0.9rem); font-weight: var(--nav-fw,500); color: var(--nav-c,rgba(255,255,255,0.85)); text-decoration: none; border-radius: 6px; transition: all 0.2s; }
.zvhb-fe-nav > li > a:hover { color: var(--nav-h,#fff); background: var(--nav-hbg,rgba(255,255,255,0.08)); }
.zvhb-fe-nav .sub-menu { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(6px); min-width: 210px; background: var(--dd-bg,#fff); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.18); padding: 6px; list-style: none; margin: 0; opacity: 0; visibility: hidden; pointer-events: none; transition: all 0.25s cubic-bezier(0.16,1,0.3,1); z-index: 10; }
.zvhb-fe-nav > li:hover > .sub-menu { opacity: 1; visibility: visible; pointer-events: all; transform: translateX(-50%) translateY(0); }
.zvhb-fe-nav .sub-menu a { display: block; padding: 7px 12px; font-size: 0.875rem; color: var(--dd-c,#1A1A2E); text-decoration: none; border-radius: 7px; transition: background 0.15s; }
.zvhb-fe-nav .sub-menu a:hover { background: rgba(108,99,255,0.06); color: #6C63FF; }

.zvhb-fe-btn { display: inline-flex; align-items: center; text-decoration: none; transition: all 0.25s ease; font-family: inherit; line-height: 1.2; }
.zvhb-fe-btn:hover { background: var(--hbg) !important; color: var(--htc) !important; transform: translateY(-1px); }

.zvhb-fe-search { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; border-radius: 50%; color: rgba(255,255,255,0.7); transition: all 0.2s; }
.zvhb-fe-search:hover { color: #fff; background: rgba(255,255,255,0.1); }
.zvhb-fe-phone { display: flex; align-items: center; gap: 6px; text-decoration: none; font-size: 0.85rem; transition: opacity 0.2s; }
.zvhb-fe-phone:hover { opacity: 0.8; }
.zvhb-fe-link { text-decoration: none; font-size: 0.875rem; transition: opacity 0.2s; }
.zvhb-fe-link:hover { opacity: 0.75; }

.zvhb-fe-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.zvhb-fe-toggle span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: all 0.3s ease; }
@media (max-width: 1024px) { .zvhb-fe-menu { display: none; } .zvhb-fe-toggle { display: flex; } }

body.zvhb-has-sticky { padding-top: var(--zvhb-h, 80px); }

/* ── FIX: Builder topbar not clipped by WP admin ── */
body.post-type-zv_header #wpcontent,
body.post-type-zv_header #wpbody,
body.post-type-zv_header #wpbody-content,
body.post-type-zv_header .wp-has-current-submenu,
body.post-type-zv_header #poststuff {
    overflow: visible !important;
}

body.post-type-zv_header #poststuff {
    padding-top: 0 !important;
}

body.post-type-zv_header .zvhb-topbar {
    top: 46px; /* WP admin bar height */
}

/* ── FIX: Frontend 3-level dropdown (Essentials-style) ── */

/* Level 2 */
.zvhb-fe-nav .sub-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 220px;
    background: var(--dd-bg, #fff);
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.06);
    padding: 8px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16,1,0.3,1);
    z-index: 9999;
}

.zvhb-fe-nav > li:hover > .sub-menu,
.zvhb-fe-nav > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

.zvhb-fe-nav .sub-menu li {
    position: relative;
}

.zvhb-fe-nav .sub-menu a {
    display: block;
    padding: 8px 12px;
    font-size: 0.875rem;
    color: var(--dd-c, #1A1A2E);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s;
    white-space: nowrap;
}

.zvhb-fe-nav .sub-menu a:hover {
    background: rgba(108,99,255,0.06);
    color: #6C63FF;
}

/* Level 3 — opens to the right */
.zvhb-fe-nav .sub-menu .sub-menu {
    top: -8px;
    left: calc(100% + 6px);
    transform: translateX(6px);
    border-radius: 12px;
}

.zvhb-fe-nav .sub-menu li:hover > .sub-menu,
.zvhb-fe-nav .sub-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(0);
}

/* Dropdown indicator arrow for items with children */
.zvhb-fe-nav > li.menu-item-has-children > a::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);
    margin-left: 5px;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.zvhb-fe-nav > li.menu-item-has-children:hover > a::after {
    transform: rotate(225deg) translateY(-2px);
    opacity: 1;
}

/* Level 3 indicator — arrow pointing right */
.zvhb-fe-nav .sub-menu li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    margin-left: auto;
    float: right;
    margin-top: 6px;
    opacity: 0.5;
}

/* Level 3 — left side positioning if near edge */
@media (max-width: 1200px) {
    .zvhb-fe-nav .sub-menu .sub-menu {
        left: auto;
        right: calc(100% + 6px);
        transform: translateX(-6px);
    }
    .zvhb-fe-nav .sub-menu li:hover > .sub-menu {
        transform: translateX(0);
    }
}

/* ── Modal z-index fix so it sits above WP admin chrome ── */
.zvhb-overlay { z-index: 100100; }
.zvhb-modal   { z-index: 100101; }

/* ── Pill gear always visible on hover ── */
.zvhb-pill__gear {
    opacity: 0;
    transition: opacity 0.15s;
}
.zvhb-pill:hover .zvhb-pill__gear { opacity: 1; }
