.shop-by-collection-mobile-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 4.375rem);
    bottom: 4.375rem;
    background-color: var(--white);
    z-index: 1050;
    flex-direction: column;
    overflow: hidden;
    overflow-x: hidden;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.2s ease-in-out;
    box-sizing: border-box;
}

.shop-by-collection-mobile-popup.active {
    visibility: visible;
    opacity: 1;
    display: flex;
}

.shop-by-collection-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: var(--white);
    min-height: 3.5rem;
    flex-shrink: 0;
}

.shop-by-collection-mobile-header .back-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--grey-dark);
    font-family: Poppins, sans-serif;
    font-size: 1rem;
    font-weight: 400;
}

.shop-by-collection-mobile-header .back-button .s4d-icon {
    font-size: 1.25rem;
    font-weight: 100;
}

.shop-by-collection-mobile-header .back-text {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.5;
}

.shop-by-collection-mobile-header .close-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--grey-dark);
}

.shop-by-collection-mobile-header .close-button .s4d-icon {
    font-size: 1.5rem;
}

.shop-by-collection-mobile-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: var(--white);
    padding-bottom: 1rem;
    box-sizing: border-box;
    max-width: 100%;
}

.collections-mobile-list {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    max-width: 100%;
}

.collection-mobile-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--gray);
    font-family: Poppins, sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    text-decoration: none;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
    max-width: 100%;
}

.collection-mobile-item:hover,
.collection-mobile-item:active {
    background-color: var(--border-light-grey);
}

.collection-mobile-name {
    overflow: hidden;
    color: var(--background-dark-grey);
    text-overflow: ellipsis;
    font-family: Poppins;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.collection-mobile-banner-wrapper {
    padding: 1rem;
    background-color: var(--white);
    box-sizing: border-box;
    max-width: 100%;
}

.collection-mobile-banner-link {
    display: block;
    width: 100%;
    max-width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    box-sizing: border-box;
}

.collection-mobile-banner-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 0.5rem;
    object-fit: cover;
}

.shop-by-collection-mobile-content::-webkit-scrollbar {
    width: 0.25rem;
}

.shop-by-collection-mobile-content::-webkit-scrollbar-track {
    background: transparent;
}

.shop-by-collection-mobile-content::-webkit-scrollbar-thumb {
    background: var(--grey-light);
    border-radius: 0.125rem;
}

.shop-by-collection-mobile-content::-webkit-scrollbar-thumb:hover {
    background: var(--grey);
}

.shop-by-collection-mobile-menu-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.shop-by-collection-mobile-menu-item .title {
    flex: 1;
}

.shop-by-collection-mobile-menu-item .s4d-icon {
    font-size: 1.25rem !important;
    margin-left: 0.5rem;
}

@media (max-width: 61.9375rem) {
    .shop-by-collection-dropdown .dropdown-menu,
    .shop-by-collection-dropdown.show .dropdown-menu {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .shop-by-collection-menu .collections-dropdown-content {
        flex-direction: column;
        padding: 1rem;
        box-sizing: border-box;
        max-width: 100%;
        overflow-x: hidden;
    }

    .shop-by-collection-menu .collections-grid {
        grid-template-columns: 1fr;
        max-height: none;
        gap: 0.5rem;
    }

    .shop-by-collection-menu .collection-banner-wrapper {
        flex: 0 0 auto;
        width: 100%;
        margin-top: 1rem;
    }

    .mobile-header-text {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        font-weight: 500;
        cursor: pointer;
        color: var(--black);
    }
}

@media (min-width: 48rem) {
    .shop-by-collection-mobile-popup {
        display: none !important;
    }
}

body.shop-by-collection-mobile-open {
    overflow: hidden !important;
    overflow-x: hidden !important;
    width: 100% !important;
    height: 100% !important;
}

* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}
