/* ==========================================================================
   DD Premium Header v1.3.0 — 3-Option Header + Animated Running-Color Search Bar
   ========================================================================== */

/* Hide old Elementor / Astra headers visually while keeping Elementor drawers functional */
body.ddph-hide-theme-header header[data-elementor-type="header"],
body.ddph-hide-theme-header .elementor-location-header,
body.ddph-hide-theme-header header#masthead,
body.ddph-hide-theme-header .site-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ddph-wrapper,
.ddph-wrapper * {
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ddph-wrapper {
    position: relative;
    z-index: 9990;
    width: 100%;
    background: transparent;
}

/* 1. Main 3-Option Header Bar (Cart Left | Fixed Logo Center | MENU Right) */
.ddph-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 100%;
    box-shadow: 0 4px 20px rgba(30, 27, 75, 0.06);
}

body.ddph-sticky-on .ddph-header {
    position: sticky;
    top: 0;
    z-index: 9992;
}

body.admin-bar.ddph-sticky-on .ddph-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar.ddph-sticky-on .ddph-header {
        top: 46px;
    }
}

.ddph-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 20px;
    height: 64px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

/* Thin Colorful Rainbow Accent Line Under Header */
.ddph-rainbow-line {
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #ff3b5c 0%, #ff8a00 25%, #facc15 50%, #10b981 75%, #6d4aff 100%);
}

/* Option 1 (Left): Royal Purple Cart Pill */
.ddph-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.ddph-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #6d4aff 0%, #8b5cf6 100%);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(109, 74, 255, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.ddph-cart-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(109, 74, 255, 0.36);
    color: #ffffff !important;
}

.ddph-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ff3b5c;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}

/* Option 2 (Center): Fixed Medium-Size Logo Across ALL Pages & Devices */
.ddph-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ddph-logo-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

html body.ddph-active .ddph-header .ddph-logo-img,
.ddph-logo-img {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    width: auto !important;
    max-width: 165px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
}

.ddph-logo-text {
    font-size: 22px !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    color: #1e1b4b !important;
    line-height: 1 !important;
}

.ddph-logo-text span {
    background: linear-gradient(135deg, #6d4aff 0%, #ff3b5c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Option 3 (Right): MENU Pill Button */
.ddph-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.ddph-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 9999px;
    border: none;
    background: #1e1b4b;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(30, 27, 75, 0.18);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.ddph-menu-toggle:hover {
    background: #6d4aff;
    transform: translateY(-1px);
}

/* 2. Animated Running-Colors Border Product Search Bar Below Header */
@keyframes ddphRunningBorder {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.ddph-search-bar-section {
    width: 100%;
    padding: 12px 14px 8px 14px;
    position: relative;
    z-index: 20;
    clear: both;
}

.ddph-search-form {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 3.5px;
    border-radius: 9999px;
    background: linear-gradient(
        90deg,
        #ff3b5c,
        #ff8a00,
        #facc15,
        #10b981,
        #06b6d4,
        #6d4aff,
        #ec4899,
        #ff3b5c
    );
    background-size: 300% 300%;
    animation: ddphRunningBorder 4s linear infinite;
    box-shadow: 0 6px 20px rgba(109, 74, 255, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ddph-search-form:hover,
.ddph-search-form:focus-within {
    animation-duration: 2.2s;
    transform: translateY(-1px);
    box-shadow: 0 8px 26px rgba(109, 74, 255, 0.28);
}

.ddph-search-inner {
    display: flex;
    align-items: center;
    width: 100%;
    background: #ffffff;
    border-radius: 9999px;
    padding: 3px 4px 3px 16px;
    height: 44px;
}

.ddph-search-icon {
    color: #6d4aff;
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.ddph-search-input {
    flex: 1 1 auto !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1e1b4b !important;
    padding: 0 !important;
    height: 38px !important;
    min-width: 0 !important;
}

.ddph-search-input::placeholder {
    color: #9ca3af;
}

.ddph-search-submit {
    flex-shrink: 0;
    height: 36px;
    padding: 0 18px;
    border: none;
    border-radius: 9999px;
    background: linear-gradient(135deg, #6d4aff 0%, #ff3b5c 100%);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.ddph-search-submit:hover {
    opacity: 0.92;
}

/* 3. Slide-Out Menu Drawer (Slides in from Right) */
.ddph-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    z-index: 9998;
}

.ddph-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 84vw;
    background: #ffffff;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.16);
}

.ddph-mobile-drawer.is-open {
    transform: translateX(0);
}

.ddph-drawer-header {
    padding: 16px 18px;
    background: linear-gradient(135deg, #6d4aff 0%, #ff3b5c 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ddph-drawer-title {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ddph-drawer-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.ddph-drawer-links {
    padding: 8px 0;
    overflow-y: auto;
    flex: 1;
}

.ddph-drawer-menu-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ddph-drawer-menu-list li {
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #f3f4f6;
}

.ddph-drawer-menu-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    font-size: 15px;
    font-weight: 700;
    color: #1e1b4b !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ddph-drawer-menu-list li a::after {
    content: "›";
    font-size: 20px;
    color: #6d4aff;
}

.ddph-drawer-menu-list li a:hover {
    background: #f5f3ff;
    color: #6d4aff !important;
}

.ddph-drawer-footer {
    padding: 16px;
    border-top: 1px solid #f3f4f6;
}

.ddph-drawer-cta {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6d4aff 0%, #8b5cf6 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none !important;
}

/* 4. Mobile Adjustments (Logo stays fixed medium 42px height on all pages) */
@media (max-width: 768px) {
    .ddph-header-inner {
        padding: 8px 12px;
        height: 58px;
        gap: 6px;
    }

    .ddph-cart-label {
        display: none;
    }

    .ddph-cart-btn {
        padding: 7px 11px;
        gap: 5px;
    }

    .ddph-menu-toggle {
        padding: 7px 12px;
        font-size: 11.5px;
        gap: 5px;
    }

    .ddph-search-bar-section {
        padding: 8px 10px 6px 10px;
    }

    .ddph-search-inner {
        height: 40px;
        padding-left: 12px;
    }

    .ddph-search-input {
        font-size: 13px !important;
        height: 34px !important;
    }

    .ddph-search-submit {
        height: 32px;
        padding: 0 13px;
        font-size: 11.5px;
    }
}
