/* Ziraverse Hair - CodyHouse Mega Dropdown Integration (Obsidian, Pink & Gold Theme) */

.cd-dropdown-wrapper {
    display: inline-block;
    position: relative;
    -webkit-font-smoothing: antialiased;
    flex: 0 0 auto;
}

.cd-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(255,120,164,0.22), rgba(217,168,75,0.12));
    border: 1px solid #FF78A4;
    color: #FF78A4 !important;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cd-dropdown-trigger:hover, .cd-dropdown-trigger.dropdown-is-active {
    background: #FF78A4;
    color: #0A090D !important;
    box-shadow: 0 4px 20px rgba(255, 120, 164, 0.4);
}

.cd-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 320px;
    background: #160910;
    border: 1px solid #5B2436;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.cd-dropdown h2 {
    display: none;
}

.cd-dropdown.dropdown-is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cd-dropdown .cd-close {
    display: none;
    position: absolute;
    top: 12px;
    right: 16px;
    color: #94A3B8;
    font-size: 18px;
}

.cd-dropdown-content {
    list-style: none;
    padding: 12px 0;
    margin: 0;
}

.cd-dropdown-content > li {
    position: relative;
}

.go-back {
    display: none;
}

.cd-dropdown-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #FFF7FB;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.cd-dropdown-content a:hover, .cd-dropdown-content li.is-active > a {
    background: #28101B;
    color: #FF78A4;
}

.cd-dropdown-content .cd-search {
    padding: 10px 16px;
    border-bottom: 1px solid #5B2436;
    margin-bottom: 8px;
}

.cd-dropdown-content .cd-search input {
    width: 100%;
    background: #0C0508;
    border: 1px solid #5B2436;
    color: #FFF;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
}

/* Secondary Flyout Submenus for Desktop */
.cd-secondary-dropdown, .cd-dropdown-gallery, .cd-dropdown-icons {
    position: absolute;
    top: 0;
    left: 100%;
    width: 480px;
    min-height: 100%;
    background: #190B12;
    border: 1px solid #5B2436;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    display: none;
}

.cd-dropdown-content li:hover > .cd-secondary-dropdown,
.cd-dropdown-content li:hover > .cd-dropdown-gallery,
.cd-dropdown-content li.is-active > .cd-secondary-dropdown,
.cd-dropdown-content li.is-active > .cd-dropdown-gallery {
    display: block;
}

.cd-dropdown-content li:hover > .cd-dropdown-icons,
.cd-dropdown-content li.is-active > .cd-dropdown-icons {
    display: grid;
}

.cd-secondary-dropdown .see-all, .cd-dropdown-gallery .see-all, .cd-dropdown-icons .see-all {
    display: block;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #5B2436;
    font-weight: 700;
    color: #FF78A4;
}

.cd-dropdown-icons {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cd-dropdown-item {
    background: #28101B;
    border: 1px solid #5B2436;
    padding: 12px;
    border-radius: 8px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.cd-dropdown-item:hover {
    border-color: #FF78A4;
    transform: translateY(-2px);
}

.cd-dropdown-item h3 {
    font-size: 14px;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.cd-dropdown-item p {
    font-size: 12px;
    color: #94A3B8;
    margin: 0;
}

/* Mobile Adjustments */
@media (max-width: 992px) {
    .cd-dropdown-wrapper {
        order: 2;
    }
    .cd-dropdown-trigger {
        padding: 9px 14px;
        font-size: 13px;
    }
    .cd-dropdown {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        overflow-y: auto;
        padding-top: 56px;
        max-width: 100vw;
    }
    .cd-dropdown h2 {
        display: block;
        position: absolute;
        top: 16px;
        left: 20px;
        color: #FFFFFF;
        font-size: 16px;
        margin: 0;
    }
    .cd-dropdown .cd-close {
        display: block;
    }
    .cd-secondary-dropdown, .cd-dropdown-gallery, .cd-dropdown-icons {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        display: block;
        min-height: 0;
        padding: 14px;
    }
    .cd-dropdown-icons {
        display: grid;
    }
    .cd-secondary-dropdown.is-hidden,
    .cd-dropdown-gallery.is-hidden,
    .cd-dropdown-icons.is-hidden {
        display: none;
    }
    .go-back {
        display: block;
    }
}
