
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    font-family: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

.main-header,
.site-header {
    position: relative;
    border-bottom: 1px solid #f1edf0;
    box-shadow: 0 4px 18px rgba(33, 20, 59, .045);
    transition: all .3s ease;
}

.main-header.scrolled {
    box-shadow: 0 8px 30px rgba(31, 20, 54, .09);
}

.site-nav-link {
    display: flex;
    height: 100%;
    align-items: center;
    color: #292333;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: color .2s ease;
}

.site-nav-link:hover {
    color: #B9757F;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    border-radius: 10px;
    background: #B9757F;
    transition: width .25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Desktop Mega Menu */

.desktop-item {
    position: relative;
}

.desktop-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 60;
    width: min(1000px, calc(100vw - 40px));
    padding: 24px;
    border: 1px solid #f0edf0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(33, 20, 59, .13);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity .25s ease, visibility .25s ease, transform .25s ease;
}

.desktop-item:hover .desktop-dropdown,
.desktop-item:focus-within .desktop-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.menu-chevron {
    transition: transform .25s ease;
}

.desktop-item:hover .menu-chevron,
.desktop-item:focus-within .menu-chevron {
    transform: rotate(180deg);
}

/* Category Tabs */

.category-tab {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #fff;
    text-align: left;
    transition: all .2s ease;
}

.category-tab:hover,
.category-tab.active {
    border-color: #F0C8C5;
    background: #FDF7F7;
}

.category-tab.active > span:first-child {
    background: #B9757F;
    color: #fff;
}

.category-content {
    display: none;
}

.category-content.active {
    display: block;
    animation: categoryFade .2s ease;
}

@keyframes categoryFade {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mega Menu Cards */

.mega-card {
    transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

.mega-card:hover {
    transform: translateY(-3px);
    background: #FDF7F7;
    box-shadow: 0 8px 24px rgba(185, 117, 127, .10);
}

.mega-icon {
    transition: all .25s ease;
}

.mega-card:hover .mega-icon {
    background: #B9757F;
    color: #fff;
}

/* Mobile Overlay */

.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(19, 11, 34, .65);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility .3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Mobile Menu */

.mobile-menu {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    width: 88%;
    max-width: 390px;
    overflow: hidden;
    background: #fff;
    box-shadow: 15px 0 50px rgba(0, 0, 0, .15);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform .3s cubic-bezier(.22, 1, .36, 1), visibility .3s ease;
    will-change: transform;
}

.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
}

/* Mobile Panels */

.mobile-panel-area {
    position: relative;
    height: calc(100% - 132px);
    overflow: hidden;
    background: #fff;
}

.mobile-panel {
    position: absolute;
    inset: 0;
    z-index: 1;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background: #fff;
    transform: translateX(25px);
    transition: transform .25s ease, opacity .25s ease, visibility .25s ease;
}

.mobile-panel.active {
    z-index: 2;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.mobile-panel.previous {
    visibility: visible;
    opacity: 0;
    transform: translateX(-25px);
}

.mobile-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #e8c4c7 transparent;
}

.mobile-scroll::-webkit-scrollbar,
.search-results::-webkit-scrollbar {
    width: 4px;
}

.mobile-scroll::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #e8c4c7;
}

.mobile-scroll::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track {
    background: transparent;
}

/* Mobile Navigation */

.mobile-nav-link,
.mobile-link {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 16px;
    padding: 15px 16px;
    margin-bottom: 4px;
    border-radius: 12px;
    color: #4b4654;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    transition: background .2s ease, color .2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active,
.mobile-link:hover,
.mobile-link:active {
    background: #F9F0F1;
    color: #21143B;
}

.mobile-category-link {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 12px;
    padding: 15px 12px;
    border-bottom: 1px solid #f1edf0;
    text-align: left;
    transition: background .2s ease;
}

.mobile-category-link:hover {
    background: #FDF7F7;
}

/* Body Scroll Lock */

body.menu-open,
body.modal-open {
    overflow: hidden !important;
}

/* Search Modal */

.search-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 12vh 16px 30px;
    background: rgba(19, 11, 34, .75);
    backdrop-filter: blur(5px);
}

.search-modal.active {
    display: flex;
    animation: modalFade .2s ease;
}

.search-box {
    width: 100%;
    max-width: 672px;
    overflow: visible;
    border: 1px solid #f1edf0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(0, 0, 0, .2);
    transform: translateY(15px);
    transition: transform .25s ease;
}

.search-modal.active .search-box {
    transform: translateY(0);
}

/* Search Results */

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 90;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #f1edf0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 15px 35px rgba(33, 20, 59, .13);
}

.search-results.hidden {
    display: none !important;
}

.search-result-item:last-child {
    border-bottom: 0;
}

/* Search Suggestions */

.search-suggestion {
    padding: 6px 13px;
    border-radius: 30px;
    background: #F9F0F1;
    color: #B9757F;
    font-size: 10px;
    font-weight: 700;
    transition: all .2s ease;
}

.search-suggestion:hover {
    background: #B9757F;
    color: #fff;
}

/* Apply Modal */

.apply-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 16px;
    background: rgba(19, 11, 34, .78);
    backdrop-filter: blur(5px);
}

.apply-modal.active {
    display: flex;
    animation: modalFade .2s ease;
}

.apply-dialog {
    position: relative;
    display: grid;
    width: 100%;
    max-width: 896px;
    max-height: 94vh;
    overflow-y: auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(0, 0, 0, .2);
    animation: modalSlide .25s ease;
}

@keyframes modalFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SweetAlert Premium Theme */

.swal2-popup {
    width: 340px !important;
    padding: 24px 22px !important;
    border-radius: 16px !important;
    background: #fff !important;
    font-family: inherit !important;
    box-shadow: 0 20px 60px rgba(33, 20, 59, .18) !important;
}

.swal2-title {
    padding: 0 !important;
    margin: 14px 0 8px !important;
    color: #21143B !important;
    font-size: 17px !important;
    font-weight: 800 !important;
}

.swal2-html-container {
    margin: 0 !important;
    color: #777184 !important;
    font-size: 12px !important;
    line-height: 1.7 !important;
}

.swal2-icon {
    margin: 5px auto 12px !important;
    transform: scale(.85);
}

.swal2-actions {
    margin: 20px 0 0 !important;
    gap: 8px !important;
}

.swal2-confirm {
    min-width: 110px !important;
    padding: 10px 22px !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #21143B, #B9757F) !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    box-shadow: 0 5px 15px rgba(185, 117, 127, .20) !important;
}

.swal2-cancel {
    padding: 10px 20px !important;
    border-radius: 8px !important;
    background: #F3F1F7 !important;
    color: #51465F !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.swal2-confirm:focus,
.swal2-cancel:focus {
    box-shadow: none !important;
}

.swal2-toast {
    width: auto !important;
    min-width: 260px !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
}

.swal2-toast .swal2-title {
    margin: 0 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.swal2-toast .swal2-icon {
    margin: 0 8px 0 0 !important;
    transform: scale(.7);
}

.swal2-backdrop-show {
    background: rgba(23, 13, 39, .55) !important;
    backdrop-filter: blur(4px);
}

/* Responsive */

@media (min-width: 1024px) {
    .apply-dialog {
        grid-template-columns: 2fr 3fr;
    }
}

@media (max-width: 1023px) {
    .desktop-dropdown {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .mobile-menu {
        width: 90%;
    }

    .search-modal {
        padding-top: 8vh;
    }

    .apply-modal {
        padding: 10px;
    }

    .apply-dialog {
        max-height: 94vh;
    }
}

@media (max-width: 480px) {
    .swal2-popup {
        width: calc(100% - 36px) !important;
        padding: 22px 18px !important;
    }

    .swal2-toast {
        width: calc(100% - 30px) !important;
        min-width: unset !important;
    }
}

/* Reduced Motion */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
