:root {
    --dph-ink: #111816;
    --dph-green: #254D43;
    --dph-gold: #C39A63;
    --dph-cream: #EEE7DB;
    --dph-beige: #DAD0BF;
    --dph-border: rgba(195, 154, 99, .22);
    --dph-ease: cubic-bezier(.22, 1, .36, 1);
}

body.dph-active {
    --dph-header-height: 82px;
}

body.dph-active.dph-lock {
    overflow: hidden;
}

/* Hide common theme / Elementor headers because this plugin is the site header. */
body.dph-active #site-header:not(.dph-header),
body.dph-active header.site-header:not(.dph-header),
body.dph-active .elementor-location-header {
    display: none !important;
}

.dph-header,
.dph-header *,
.dph-search-overlay,
.dph-search-overlay *,
.dph-mobile-panel,
.dph-mobile-panel * {
    box-sizing: border-box;
}

.dph-header {
    position: sticky;
    top: 0;
    z-index: 9990;
    width: 100%;
    direction: rtl;
    color: var(--dph-cream);
    background: rgba(17, 24, 22, .94);
    border-bottom: 1px solid var(--dph-border);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    font-family: inherit;
}

.admin-bar .dph-header { top: 32px; }

.dph-header::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    width: min(22vw, 320px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--dph-gold));
    opacity: .72;
}

.dph-header-shell {
    width: min(100% - 48px, 1440px);
    min-height: var(--dph-header-height);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(150px, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
}

.dph-brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.dph-brand .custom-logo-link,
.dph-mobile-logo .custom-logo-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.dph-brand .custom-logo,
.dph-mobile-logo .custom-logo {
    display: block;
    width: auto;
    height: 50px;
    max-width: 180px;
    object-fit: contain;
}

.dph-logo-fallback {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    color: var(--dph-cream) !important;
    text-decoration: none !important;
    letter-spacing: .12em;
    line-height: 1;
}

.dph-logo-fallback span {
    font-size: 18px;
    font-weight: 750;
}

.dph-logo-fallback small {
    font-size: 8px;
    color: var(--dph-gold);
    letter-spacing: .22em;
}

.dph-desktop-nav { min-width: 0; }

.dph-menu-list,
.dph-menu-list ul,
.dph-mobile-menu-list,
.dph-mobile-menu-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dph-menu-list {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(18px, 2vw, 34px);
}

.dph-menu-list > li {
    position: relative;
}

.dph-menu-list a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: rgba(238, 231, 219, .82);
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 520;
    transition: color .25s ease;
    white-space: nowrap;
}

.dph-menu-list > li > a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 7px;
    width: 0;
    height: 1px;
    background: var(--dph-gold);
    transition: width .35s var(--dph-ease);
}

.dph-menu-list a:hover,
.dph-menu-list .current-menu-item > a,
.dph-menu-list .current-menu-ancestor > a {
    color: var(--dph-cream);
}

.dph-menu-list > li:hover > a::after,
.dph-menu-list .current-menu-item > a::after,
.dph-menu-list .current-menu-ancestor > a::after {
    width: 100%;
}

.dph-menu-list .sub-menu {
    position: absolute;
    top: calc(100% + 9px);
    right: -18px;
    min-width: 220px;
    padding: 10px;
    border: 1px solid var(--dph-border);
    border-radius: 16px;
    background: #17201d;
    box-shadow: 0 24px 70px rgba(0,0,0,.32);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .22s ease, transform .32s var(--dph-ease), visibility .22s ease;
}

.dph-menu-list .sub-menu .sub-menu {
    top: -10px;
    right: calc(100% + 8px);
}

.dph-menu-list li:hover > .sub-menu,
.dph-menu-list li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dph-menu-list .sub-menu a {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    color: rgba(238, 231, 219, .76);
}

.dph-menu-list .sub-menu a:hover {
    color: var(--dph-cream);
    background: rgba(195, 154, 99, .08);
}

.dph-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    direction: rtl;
}

.dph-action {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    outline: 0;
    background: transparent;
    color: rgba(238, 231, 219, .82) !important;
    text-decoration: none !important;
    min-height: 44px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.dph-action:hover {
    color: var(--dph-cream) !important;
    background: rgba(195, 154, 99, .08);
}

.dph-action:active { transform: scale(.96); }

.dph-icon,
.dph-action svg,
.dph-overlay-close svg,
.dph-search-submit svg,
.dph-mobile-quicklinks svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.dph-action svg,
.dph-overlay-close svg,
.dph-search-submit svg,
.dph-mobile-quicklinks svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dph-cart-icon-wrap { position: relative; display: inline-flex; }

.dph-cart-count {
    position: absolute;
    top: -8px;
    left: -9px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 99px;
    background: var(--dph-gold);
    color: var(--dph-ink);
    border: 2px solid var(--dph-ink);
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
}

.dph-menu-trigger { display: none; }

/* Full-screen search */
.dph-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: grid;
    place-items: center;
    padding: 32px;
    background: var(--dph-ink);
    color: var(--dph-cream);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .32s ease, visibility .32s ease;
    overflow: hidden;
    direction: rtl;
}

.dph-search-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dph-search-pattern {
    position: absolute;
    inset: -10%;
    background-image: linear-gradient(rgba(17,24,22,.76), rgba(17,24,22,.76)), url('../images/paisley.jpg');
    background-size: 620px auto;
    background-position: center;
    mix-blend-mode: luminosity;
    opacity: .14;
    transform: scale(1.04);
    pointer-events: none;
}

.dph-search-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(37,77,67,.42), transparent 35%),
        radial-gradient(circle at 80% 80%, rgba(195,154,99,.12), transparent 30%);
    pointer-events: none;
}

.dph-overlay-close {
    position: absolute;
    top: 28px;
    left: 32px;
    z-index: 3;
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(238,231,219,.17);
    background: rgba(238,231,219,.04);
    color: var(--dph-cream);
    cursor: pointer;
    transition: transform .35s var(--dph-ease), background .25s ease;
}

.dph-overlay-close:hover {
    transform: rotate(90deg);
    background: rgba(195,154,99,.1);
}

.dph-search-content {
    position: relative;
    z-index: 2;
    width: min(880px, 100%);
    transform: translateY(22px);
    opacity: 0;
    transition: transform .55s var(--dph-ease), opacity .35s ease;
}

.dph-search-overlay.is-open .dph-search-content {
    transform: translateY(0);
    opacity: 1;
}

.dph-kicker {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--dph-gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
}

.dph-search-content h2 {
    margin: 0 0 42px;
    color: var(--dph-cream);
    font-size: clamp(34px, 5vw, 72px);
    line-height: 1.15;
    font-weight: 650;
}

.dph-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(238,231,219,.35);
}

.dph-search-field {
    width: 100%;
    min-width: 0;
    height: 72px;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--dph-cream) !important;
    font: inherit;
    font-size: clamp(22px, 3vw, 38px);
    font-weight: 450;
    direction: rtl;
}

.dph-search-field::placeholder { color: rgba(238,231,219,.3); }

.dph-search-submit {
    min-width: 122px;
    height: 52px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 14px;
    background: var(--dph-gold);
    color: var(--dph-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: transform .25s ease, filter .25s ease;
}

.dph-search-submit:hover { transform: translateY(-2px); filter: brightness(1.05); }
.dph-search-hint { margin: 14px 0 0; color: rgba(238,231,219,.5); font-size: 12px; }

/* Mobile drawer */
.dph-mobile-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10015;
    width: min(88vw, 420px);
    height: 100dvh;
    padding: 24px;
    display: flex;
    flex-direction: column;
    background: var(--dph-ink);
    color: var(--dph-cream);
    border-left: 1px solid var(--dph-border);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .52s var(--dph-ease), visibility .52s ease;
    overflow-y: auto;
    direction: rtl;
}

.dph-mobile-panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

.dph-mobile-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 38px;
}

.dph-mobile-panel .dph-overlay-close {
    position: static;
    width: 42px;
    height: 42px;
}

.dph-mobile-nav { flex: 1; }

.dph-mobile-menu-list > li {
    border-bottom: 1px solid rgba(238,231,219,.08);
}

.dph-mobile-menu-list a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 54px;
    color: rgba(238,231,219,.84);
    text-decoration: none !important;
    font-size: 16px;
    font-weight: 540;
}

.dph-mobile-menu-list .current-menu-item > a,
.dph-mobile-menu-list a:hover { color: var(--dph-gold); }

.dph-mobile-menu-list .sub-menu {
    padding: 0 16px 10px 0;
}

.dph-mobile-menu-list .sub-menu a {
    min-height: 42px;
    color: rgba(238,231,219,.58);
    font-size: 14px;
}

.dph-mobile-quicklinks {
    display: grid;
    gap: 8px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--dph-border);
}

.dph-mobile-quicklinks a {
    position: relative;
    min-height: 50px;
    padding: 0 14px;
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    background: rgba(238,231,219,.04);
    color: var(--dph-cream) !important;
    text-decoration: none !important;
    font-size: 13px;
}

.dph-mobile-quicklinks .dph-cart-count {
    position: static;
    border: 0;
}

.dph-mobile-quicklinks a > svg:last-child { width: 16px; height: 16px; opacity: .45; }

.dph-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10010;
    background: rgba(0,0,0,.58);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility .3s ease;
}

.dph-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px,1px,1px,1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

@media (max-width: 1100px) {
    .dph-header-shell {
        width: min(100% - 32px, 1440px);
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 18px;
    }

    .dph-menu-list { gap: 16px; }
    .dph-menu-list a { font-size: 13px; }
    .dph-action-label { display: none; }
    .dph-action { padding-inline: 9px; }
}

@media (max-width: 860px) {
    body.dph-active { --dph-header-height: 68px; }
    .admin-bar .dph-header { top: 46px; }

    .dph-header-shell {
        width: calc(100% - 24px);
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }

    .dph-desktop-nav { display: none; }
    .dph-menu-trigger { display: inline-flex; }
    .dph-brand .custom-logo { height: 42px; max-width: 150px; }
    .dph-actions { gap: 0; }
    .dph-action { width: 40px; height: 40px; min-height: 40px; padding: 0; }

    .dph-search-overlay { padding: 24px 20px; }
    .dph-search-pattern { background-size: 420px auto; opacity: .11; }
    .dph-overlay-close { top: 20px; left: 20px; width: 44px; height: 44px; }
    .dph-search-content h2 { margin-bottom: 30px; }
    .dph-search-form { grid-template-columns: 1fr; gap: 14px; }
    .dph-search-field { height: 58px; }
    .dph-search-submit { width: 100%; }
}

@media (max-width: 480px) {
    .dph-header-shell { width: calc(100% - 18px); }
    .dph-brand .custom-logo { height: 38px; max-width: 132px; }
    .dph-logo-fallback span { font-size: 15px; }
    .dph-logo-fallback small { font-size: 7px; }
    .dph-action { width: 37px; height: 37px; }
    .dph-icon, .dph-action svg { width: 19px; height: 19px; }
    .dph-cart-count { top: -7px; left: -7px; }
    .dph-search-content h2 { font-size: 32px; }
    .dph-search-field { font-size: 21px; }
    .dph-mobile-panel { width: min(92vw, 390px); padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .dph-header *,
    .dph-search-overlay *,
    .dph-mobile-panel *,
    .dph-backdrop {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
