/* ===================================================
   NAVBAR
   =================================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 6px 24px rgba(132, 86, 118, 0.08);
}

.header-top {
    background: linear-gradient(90deg, #df5f96 0%, #7f24ae 100%);
    color: #fff;
}

.header-top-bar {
    min-height: 44px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

.header-top-left,
.header-top-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-top-right {
    justify-content: flex-end;
}

.header-top-center {
    display: flex;
    justify-content: center;
}

.header-top-message {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0.96;
}

.social-link {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    border-radius: 50%;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-link:hover {
    transform: translateY(-1px);
    opacity: 0.88;
}

.header-user-greeting,
.header-separator,
.link-logout,
.link-admin {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
}

.link-admin {
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.navbar-shell {
    min-height: 110px;
    display: flex;
    align-items: center;
}

.navbar-main-row {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 26px;
}

.logo {
    justify-self: start;
}

.logo img {
    max-height: 86px;
    width: auto;
    display: block;
}

.nav-menu {
    min-width: 0;
}

.nav-menu-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-mobile-topbar,
.nav-mobile-account {
    display: none;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.nav-list > li {
    position: relative;
}

.nav-list a,
.nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #4a3342;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.nav-list a::after,
.nav-trigger::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 4px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f05f96 0%, #8728b8 100%);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.22s ease;
}

.nav-list a:hover,
.nav-list a.is-active,
.nav-list .has-dropdown.is-active > .nav-trigger,
.nav-trigger:hover,
.nav-trigger:focus {
    color: #972b8f;
    outline: none;
}

.nav-list a:hover::after,
.nav-list a.is-active::after,
.nav-list .has-dropdown.is-active > .nav-trigger::after,
.nav-trigger:hover::after,
.nav-trigger:focus::after {
    transform: scaleX(1);
}

.nav-trigger i {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.has-dropdown:hover > .nav-trigger i,
.has-dropdown:focus-within > .nav-trigger i,
.has-dropdown.is-open > .nav-trigger i,
.has-dropdown.is-active > .nav-trigger i {
    transform: rotate(180deg);
}

.nav-submenu {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    min-width: 230px;
    list-style: none;
    margin: 0;
    padding: 12px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 34px rgba(107, 58, 121, 0.16);
    border: 1px solid rgba(202, 168, 194, 0.24);
    display: none;
    flex-direction: column;
    gap: 6px;
}

.nav-submenu a {
    min-height: 0;
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 14px;
    background: transparent;
}

.nav-submenu a::after {
    display: none;
}

.nav-submenu a:hover {
    background: #fdf1f7;
    color: #972b8f;
}

.has-dropdown:hover > .nav-submenu,
.has-dropdown:focus-within > .nav-submenu,
.has-dropdown.is-open > .nav-submenu {
    display: flex;
}

.header-right {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 14px;
}

.account-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    text-decoration: none;
    background: linear-gradient(180deg, #fff7fb 0%, #fde9f2 100%);
    color: #b03b83;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.account-btn i {
    width: 18px;
    height: 18px;
    display: block;
    background: #b03b83;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12c2.7 0 5-2.3 5-5s-2.3-5-5-5-5 2.3-5 5 2.3 5 5 5Zm0 2c-3.3 0-10 1.7-10 5v3h20v-3c0-3.3-6.7-5-10-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cart-btn {
    width: 54px;
    height: 54px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(180deg, #bc3d9d 0%, #8c1fb5 100%);
    box-shadow: 0 12px 24px rgba(143, 42, 152, 0.24);
}

.cart-btn i {
    width: 22px;
    height: 22px;
    display: block;
    background: #fff;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 18c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm10 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM7.2 14h9.6c.8 0 1.5-.5 1.8-1.3l3-7.1-1.9-.8-2.7 6.2H8.1L4.3 2H1v2h2l3.6 8.4-1.3 2.4C4.5 15.4 5.5 17 7.2 17Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -2px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #df6595;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(223, 101, 149, 0.32);
}

.cart-bubble-notice {
    position: fixed;
    z-index: 2000;
    background: #1f2937;
    color: #fff;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    transform: translateX(-50%) translateY(-6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.cart-bubble-notice::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent #1f2937 transparent;
}

.cart-bubble-notice.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.cart-bubble-notice.is-floating {
    top: 88px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-10px);
    pointer-events: auto;
    white-space: normal;
    width: min(92vw, 460px);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.cart-bubble-notice.is-floating::after {
    display: none;
}

.cart-bubble-notice.is-floating.is-error {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.35);
}

.cart-bubble-notice.is-floating.is-info {
    background: #1f2937;
    color: #fff;
}

.menu-toggle,
.nav-close {
    display: none;
}

@media (max-width: 1180px) {
    .header-top-message {
        font-size: 12px;
    }

    .nav-list a,
    .nav-trigger {
        font-size: 16px;
        padding: 0 8px;
    }

    .account-btn span {
        display: none;
    }

    .account-btn {
        padding: 0;
        width: 48px;
        justify-content: center;
    }
}

@media (max-width: 900px) {
    body.nav-open {
        overflow: hidden;
    }

    .header-top {
        display: block;
    }

    .header-top-bar {
        grid-template-columns: 1fr;
        justify-items: center;
        min-height: 36px;
        padding: 0 12px;
    }

    .header-top-left,
    .header-top-right {
        display: none;
    }

    .header-top-message {
        font-size: 11px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .navbar-shell {
        min-height: 84px;
    }

    .navbar-main-row {
        grid-template-columns: auto 1fr auto;
        gap: 12px;
    }

    .menu-toggle {
        width: 44px;
        height: 44px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border: 0;
        border-radius: 14px;
        background: transparent;
        cursor: pointer;
    }

    .menu-toggle span {
        width: 20px;
        height: 2px;
        border-radius: 999px;
        background: #533647;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .menu-toggle.is-active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .logo {
        justify-self: center;
    }

    .logo img {
        max-height: 58px;
    }

    .header-right {
        gap: 10px;
    }

    .account-btn {
        display: none;
    }

    .cart-btn {
        width: 46px;
        height: 46px;
    }

    .cart-bubble-notice.is-floating {
        top: 70px !important;
    }

    .nav-menu {
        position: fixed;
        inset: 0;
        display: block;
        pointer-events: none;
        opacity: 0;
        background: rgba(48, 25, 43, 0.18);
        transition: opacity 0.24s ease;
        z-index: 1200;
    }

    .nav-menu.active {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-menu-inner {
        position: absolute;
        top: 0;
        left: 0;
        width: min(100%, 420px);
        height: 100%;
        padding: 18px 16px 24px;
        background: linear-gradient(180deg, #fffefe 0%, #fff6fb 100%);
        box-shadow: 14px 0 34px rgba(80, 43, 76, 0.16);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 16px;
        transform: translateX(-100%);
        transition: transform 0.24s ease;
        overflow-y: auto;
    }

    .nav-menu.active .nav-menu-inner {
        transform: translateX(0);
    }

    .nav-mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 4px 4px 8px;
    }

    .nav-mobile-label {
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #9e4d84;
    }

    .nav-close {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 14px;
        background: #fff;
        color: #5b374b;
        box-shadow: 0 8px 18px rgba(112, 68, 95, 0.08);
        cursor: pointer;
    }

    .nav-mobile-account {
        display: block;
    }

    .nav-mobile-account-card {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 14px;
        align-items: center;
        padding: 16px 18px;
        border-radius: 24px;
        background: linear-gradient(180deg, #fffafd 0%, #fdeef5 100%);
        text-decoration: none;
        color: #6e3d65;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    }

    .nav-mobile-account-icon {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: linear-gradient(180deg, #f9d7e8 0%, #f7ecf3 100%);
        color: #b23b84;
    }

    .nav-mobile-account-copy {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .nav-mobile-account-copy strong {
        font-size: 20px;
        font-weight: 500;
    }

    .nav-mobile-account-copy span {
        font-size: 14px;
        color: #8a6c7d;
    }

    .nav-list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .nav-list > li {
        width: 100%;
        border-radius: 26px;
        overflow: hidden;
        background: linear-gradient(180deg, #ffffff 0%, #fff5fa 100%);
        box-shadow: 0 10px 20px rgba(121, 78, 110, 0.08);
    }

    .nav-list > li.has-dropdown {
        background: linear-gradient(90deg, #df5f96 0%, #7f24ae 100%);
    }

    .nav-list > li.has-dropdown .nav-trigger {
        color: #fff;
    }

    .nav-list > li.has-dropdown .nav-trigger::after {
        display: none;
    }

    .nav-list > li > a,
    .nav-trigger {
        width: 100%;
        min-height: 60px;
        justify-content: space-between;
        padding: 0 22px;
        font-size: 22px;
        font-weight: 500;
    }

    .nav-list > li > a::after,
    .nav-trigger::after {
        display: none;
    }

    .nav-list > li > a.is-active {
        color: #972b8f;
    }

    .nav-submenu {
        position: static;
        display: grid;
        grid-template-rows: 0fr;
        min-width: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.16);
        border-radius: 0;
    }

    .nav-submenu li {
        overflow: hidden;
    }

    .has-dropdown.is-open .nav-submenu {
        grid-template-rows: 1fr;
        padding: 0 14px 14px;
    }

    .nav-submenu a {
        min-height: 48px;
        padding: 0 16px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.18);
        color: #fff;
        font-size: 15px;
        margin-top: 8px;
    }

    .nav-submenu a:hover {
        background: rgba(255, 255, 255, 0.24);
        color: #fff;
    }
}

@media (max-width: 640px) {
    .navbar-shell {
        min-height: 78px;
    }

    .logo img {
        max-height: 52px;
    }

    .nav-mobile-account-copy strong {
        font-size: 18px;
    }

    .nav-list > li > a,
    .nav-trigger {
        min-height: 56px;
        font-size: 19px;
        padding: 0 18px;
    }

    .nav-menu-inner {
        width: 100%;
    }
}
