.marketplace {
    padding-top: 0;
}
.marketplace__cart-info h3 {
    font-size: 28px;
}

.no__luck-title br {
    display: none;
}

.marketplace__sidebar-title {
    font-weight: 500;
    font-size: 24px;
    line-height: 130%;
    letter-spacing: 0;
}

.marketplace__mobile-filter {
    border: 0.5px solid var(--primary-color);
    padding: 12px;
    border-radius: 50%;
    background-color: #FEFEFE;
    box-shadow: inset 0 2px 16px rgba(22, 41, 214, 0.04),
    inset 0 -2px 16px 0 rgba(22, 41, 214, 0.16);
    display: none;
    min-width: 48px;
    height: 48px;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
}

.marketplace__has-filters {
    border: 0.5px solid var(--primary-color);
    background-color: #30377F;
    color: var(--white-color);
    box-shadow: inset 0 2px 16px 0 rgba(22, 41, 214, 0.04),
    inset 0 -2px 16px 0 rgba(22, 41, 214, 0.16);
}

.drop__range {
    padding: 16px;
}

.cart-item__title {
    font-weight: 500;
    font-size: 20px;
    line-height: 130%;
    letter-spacing: 0;
}

.cart-item img {
    max-height: 86px;
    max-width: 86px !important;
    min-width: 86px;
    background: #CFCFCF;
    border-radius: 16px;
    object-fit: contain;
}

.marketplace__cart-info {
    display: flex;
    flex-direction: column;
}

.marketplace__cart-description {
    font-weight: 400;
    font-size: 18px;
    line-height: 160%;
    letter-spacing: 0;
    color: #949393;
    margin-top: 8px;
}

.marketplace__sidebar-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.marketplace__reset-filter-btn {
    font-weight: 500;
    font-size: 16px;
    line-height: 130%;
    letter-spacing: 0;
    color: #1629D6;
    background: transparent;
}

.marketplace__container {
    margin-top: 40px;
}


@media screen and (min-width: 769px) and (max-width: 1100px) {
    .marketplace__container .marketplace__search-panel {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        align-items: end;
    }

    .marketplace__container .marketplace__search-panel>* {
        width: 100%;
    }

    .marketplace__container .search-field {
        max-width: unset;
    }
}

.pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    border: unset;
    color: #0D1118;
    padding: 10px 17px;
    max-width: 44px;
    min-width: 44px;
    min-height: 44px;
    max-height: 44px;
    box-sizing: border-box;
    margin: 0;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.pagination li a:hover,
.pagination li span:hover {
    background-color: #1629D6;
    color: #fff;
}


.pagination li a:hover:not(.current),
.pagination li span:hover:not(.current) {
    background-color: #1629D6;
    color: #fff;
}


.pagination li .current {
    background-color: #E4EBFF;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: unset;
    box-sizing: border-box;
    pointer-events: none;
    height: 44px;
    width: 44px;
}

.pagination .prev,
.pagination .next {
    padding: 0;
}

.pagination .prev a,
.pagination .next a {
    display: inline-flex;
    cursor: pointer;
}

.marketplace__content .pagination .prev svg,
.marketplace__content .pagination .next svg {
    width: 48px;
    height: 48px;
    fill: none;
}

.marketplace__filter-btn {
    display: none;
}

.marketplace__sort p {
    color: #949393;
    font-weight: 400;
    font-size: 16px;
    line-height: 140%;
    letter-spacing: 0;
    margin-right: 8px;
}

.marketplace__sort span {
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 16px;
    line-height: 140%;
    letter-spacing: 0;
    color: #0D1118;
}


.no__luck {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 181px;
    margin-left: auto;
    margin-right: auto;
    max-width: 682px;
}

.no__luck-title {
    font-weight: 500;
    font-size: 24px;
    line-height: 130%;
    letter-spacing: 0;
    text-align: center;
}

.no__luck p {
    margin-top: 8px;
    margin-bottom: 24px;
    font-weight: 400;
    font-size: 18px;
    line-height: 150%;
    letter-spacing: 0;
    text-align: center;
    color: #4F4F4F;
}

.marketplace__search-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    gap: 16px;
    width: 100%;
    max-width: 783px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 60px;
}

.marketplace__search-panel-wrapper {
    display: grid;
    grid-template-columns: 896px;
    grid-template-rows: 1fr auto auto;
    justify-content: center; 
    align-items: end;
    padding-top: 156px;
    padding-left: 16px;
    padding-right: 16px;
    background: linear-gradient(to top left, rgba(192, 194, 246, 0.5), rgba(254, 254, 254, 1));
}

.marketplace__search-panel-wrapper:has(.marketplace__chips) .marketplace__search-panel {
    margin-bottom: 16px;
}

.marketplace__search-panel-wrapper h1 {
    margin-bottom: 40px;
    text-align: center;
}

.marketplace__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    max-width: 896px;
    margin: 0;
    margin-bottom: 60px;
}

.marketplace__chips-item {
    list-style-type: none;
    background-color: #30377F;
    padding: 4px 8px 4px 16px;
    color: var(--white-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.marketplace__chips-item-close {
    min-width: 24px;
    height: 24px;
    background-image: url('/wp-content/themes/meduzzen/assets/icons/close.svg');
    background-color: transparent;
    border: 0;
}

.search-field,
.dropdown-field {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FAFAFA;
    border-radius: 99px;
    padding: 16px;
    box-sizing: border-box;
}

.search-field {
    flex-grow: 1;
    width: 100%;
    border: 1px solid #E0E0E0;
    box-sizing: border-box;
}

.search-field:focus-within {
    border-color: var(--primary-color);
}

.search-field input {
    border: none;
    outline: none;
    background: transparent;
    max-width: 570px;
    width: 100%;
    font-size: 16px;
}

.dropdown-field {
    flex-grow: 1;
    cursor: pointer;
    justify-content: space-between;
}

.search-button {
    cursor: pointer;
    max-width: fit-content;
    position: absolute;
    right: 5px;
    height: 48px;
    background-color: rgba(22, 41, 214, 1);
    color: #fefefe;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    border-radius: 40px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 32px;
    white-space: nowrap;
    cursor: pointer;
    overflow: hidden;
    gap: 0;
    min-width: 140px;
    box-sizing: border-box;
    box-shadow: inset 0 2px 16px 0 rgba(255, 255, 255, 0.5),
    inset 0 -2px 12px 0 rgba(6, 6, 60, 0.8);
}

.search-button__svg {
    display: none;
}

.marketplace__search-panel .standard__btn {
    position: absolute;
}

.marketplace__reset-btn {
    margin-top: 16px;
    background: none;
    border: none;
    color: #1629D6;
    font-weight: 500;
    font-size: 16px;
    line-height: 130%;
    letter-spacing: 0;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s ease;
    padding-bottom: 24px;
    display: flex;
    align-items: start;
}

.marketplace__filter-content {
    max-height: 9999px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    display: flex;
    flex-direction: column;
    padding-right: 8px;
}

.marketplace__filter-group:not(.active) .marketplace__filter-content {
    max-height: 0;
}

/* Desktop: keep title + sort bar in one row (content-body uses contents so grid sees sort + list) */
@media screen and (min-width: 871px) {
    .marketplace__content {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto 1fr;
        grid-template-areas: "head sort" "list list";
    }
    .marketplace__content-head {
        grid-area: head;
    }
    .marketplace__content-body {
        display: contents;
    }
    .marketplace__sort-btns {
        grid-area: sort;
    }
    .marketplace__list {
        grid-area: list;
    }
}

.marketplace__filter-actions {
    display: none;
}

@media screen and (max-width: 870px) {

    .marketplace__reset-filter-btn {
        display: none;
    }

    .no__luck {
        padding-top: 80px;
    }

    .marketplace__filter-btn {
        display: block;
        cursor: pointer;
        background: transparent;
    }

    .marketplace__content-body {
        display: block;
    }
    .marketplace__content {
        display: block;
    }
    .marketplace__sort-btns {
        width: 100%;
        display: flex;
        gap: 8px;
        padding: 8px 0;
        position: sticky;
        top: 128px;
        z-index: 10;
        background-color: var(--white-color);
    }

    .marketplace__sidebar-title {
        margin-bottom: 12px;
        font-size: 20px;
    }

    .marketplace__sidebar {
        position: fixed;
        top: 55%;
        left: 16px;
        right: 16px;
        transform: translateY(-50%);
        max-height: 70%;
        background-color: #fff;
        border: 1px solid #CFCFCF;
        border-radius: 16px;
        padding: 16px 16px 0;
        overflow-y: auto;
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
        display: block;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .marketplace__sidebar::-webkit-scrollbar {
        display: none;
    }

    .marketplace__sidebar.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(-50%);
    }

    .marketplace__filter-actions {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        gap: 8px;
        padding-top: 16px;
        padding-bottom: 16px;
        background-color: #FEFEFE;
    }

    .marketplace__filter-actions .standard__btn {
        width: 100%;
    }

    .marketplace__clear-btn {
        background: transparent;
        font-weight: 500;
        font-size: 16px;
        line-height: 130%;
        color: #1629D6;
        width: 100%;
    }
}


@media screen and (max-width: 768px) {
    .marketplace__search-panel {
        flex-direction: column;
        gap: 8px;
    }

    .marketplace__content-head {
        flex-direction: column;
        align-items: unset;
        gap: 24px;
    }

    .dropdown-field,
    .search-field {
        width: 100%;
        max-width: unset;
    }

    .marketplace__sort {
        margin: unset;
    }

    .marketplace__wrapper,
    .marketplace__content {
        width: 100%;
    }
}


@media screen and (max-width: 500px) {
    

    .marketplace__sort-cart {
        width: 100%;
    }

    .marketplace__cart-wrap {
        width: 100%;
    }

    .marketplace__cart {
        width: 100%;
        justify-content: center;
    }

    .marketplace__cart-cta.standard__btn {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .marketplace__search-panel-wrapper{
        grid-template-columns: 1fr;

    }

    .search-button {
        width: fit-content;
        max-width: unset;
    }
}


.dropdown-field {
    position: relative;
}

.dropdown-content__title {
    font-weight: 500;
    font-size: 20px;
    line-height: 130%;
    letter-spacing: 0;
    color: #0D1118;
    margin-bottom: 24px;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


input[type=number] {
    -moz-appearance: textfield;
}

.hourly-dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #FEFEFE;
    border-radius: 16px;
    padding-top: 16px;
    padding-bottom: 16px;
    width: 100%;
    z-index: 10;
    box-sizing: border-box;
    max-height: 500px;
    overflow-y: auto;
}

.dropdown-content::-webkit-scrollbar {
    width: 8px;
}

.dropdown-content::-webkit-scrollbar-track {
    border-radius: 99px;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background-color: #E0E0E0;
    border-radius: 99px;
    border: none;
}


.dropdown-field .dropdown__title {
    color: #0D1118;
    transition: color 0.3s ease;
}


.dropdown-field.active .dropdown__title {
    color: #1629D6;
}


.dropdown-field .dropdown__icon {
    color: #0D1118;
    transition: transform 0.3s ease, color 0.3s ease;
}

.dropdown-field.active .dropdown__icon {
    transform: rotate(180deg);
    color: #1629D6;
}


.hourly-dropdown.active .dropdown-content {
    display: flex;
}

.category-dropdown.active .dropdown-content {
    display: flex;
}

.range-track {
    position: relative;
    height: 8px;
    border-radius: 8px;
    background: #CFCFCF;
}

.range-input {
    position: absolute;
    width: 100%;
    height: 4px;
    pointer-events: none;
    appearance: none;
    background: none;
    z-index: 2;
}

.range-input::-webkit-slider-thumb {
    pointer-events: all;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #FEFEFE;
    border: 2px solid #1629D6;
    cursor: pointer;
    position: relative;
    z-index: 3;
}

.range-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #FEFEFE;
    border: 2px solid #1629D6;
    cursor: pointer;
}

.range-values {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.range-values__title {
    color: var(--black-color);
}

.range-value {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.range-value label {
    font-weight: 400;
    font-size: 14px;
    line-height: 140%;
    letter-spacing: 0;
    color: #4F4F4F;
}

.range-values input {
    padding: 13px 10px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
}

.range-actions {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

.range-actions button {
    width: 100%;
}

.btn-reset.standard__btn {
    background: transparent;
    color: #1629D6;
    border: 1px solid #1629D6;
}

.input-icon-wrapper {
    position: relative;
    width: 100%;
}

.input-icon-wrapper input {
    width: 100%;
    padding-right: 32px;
    box-sizing: border-box;
}

.input-icon {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.marketplace__filter-header h5 {
    color: #4F4F4F;
}

.category-children {
    display: flex;
    flex-direction: column;
}

.category-parent + .category-parent {
    margin-top: 10px;
}

.category-parent__wrapper {
    max-height: 271px;
    overflow-y: scroll;
    padding-right: 8px;
}

.category-title {
    font-weight: 500;
    font-size: 18px;
    line-height: 150%;
    letter-spacing: 0;
    color: #0D1118;
    margin-bottom: 10px;
}

.category-title + .category-title {
    margin-top: 10px;
}

.child-item {
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0;
    color: #0D1118;
    display: flex;
    align-items: center;
    gap: 8px;
}

.child-item + .child-item {
    margin-top: 8px;
}

.child-item:has(input[type="checkbox"]:checked) {
    background-color: #F3F5FB;
}

.marketplace__cart-wrap {
    position: relative;
    display: inline-block;
    display: flex;
    gap: 8px;
}

.marketplace__cart {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.marketplace__cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 21px;
    border-radius: 10px;
    font-size: 11px;
    background: #1629D6;
    color: #fff;
    line-height: 1;
}

.marketplace__cart-dropdown {
    position: fixed;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 762px;
    max-width: 90%;
    background: #FEFEFE;
    border-radius: 16px;
    padding: 40px;
    z-index: 100;
    box-sizing: border-box;
    max-height: 879px;
}

.cart-recommendations {
    max-height: 200px;
    margin-top: 16px;
}

.marketplace__cart-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
}

.marketplace__cart-head h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.marketplace__cart-close {
    display: flex !important;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 11;
    transition: background 0.25s ease, border-radius 0.25s ease;
    background: transparent;
}


.marketplace__cart-close svg {
    height: 24px;
    width: 24px;
    display: flex;
}

@media screen and (min-width: 768px) {
    .marketplace__cart-close:hover {
        background: #30377F;
        border-radius: 4px;
        color: #FEFEFE;
    }
}

@media screen and (max-width: 768px) {
    .no__luck-title br {
        display: block;
    }

    .no__luck-title {
        font-size: 20px;
    }

    .marketplace__cart-info h3 {
        font-size: 24px;
    }

    .marketplace__cart-description {
        font-size: 16px;
    }

    .sorry__empty {
        font-size: 16px;
    }

    .no__luck p {
        font-size: 16px;
    }
}

.marketplace__cart-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
}

.sorry__empty {
    padding-top: 87px;
    padding-bottom: 127px;
    font-weight: 400;
    font-size: 20px;
    line-height: 160%;
    letter-spacing: 0;
    color: #949393;
}

.marketplace__cart-cta.standard__btn {
    margin-left: auto;
    font-size: 16px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
    margin-bottom: 40px;

    max-height: 300px;
    overflow-y: auto;
    padding-right: 16px;
}

.cart-items::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.cart-items::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 99px;
    max-height: 107px;
}

.cart-items::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 99px;
}

.cart-items::-webkit-scrollbar-button {
    display: none;
}

.cart-item {
    display: flex;
    gap: 16px;
    align-items: center;
}

.cart-item__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}


.cart-item__categories {
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0;
    color: #4F4F4F;
}

.cart-item__job-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item__job-price p {
    font-size: 14px;
    color: #4F4F4F;
}

.cart-recommendations__title {
    font-weight: 500;
    font-size: 20px;
    line-height: 130%;
    letter-spacing: 0;
    color: #949393;
}


.marketplace__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.marketplace__overlay.is-active {
    opacity: 1;
}


@media screen and (max-width: 768px) {
    .marketplace__cart-dropdown {
        padding: 16px;
    }

    .search-button {
        padding: 12px;
        min-width: unset;
    }

    .search-button span {
        display: none;
    }

    .search-button__svg {
        display: block;
    }

    .marketplace__mobile-filter {
        display: block;
    }
    
    .marketplace__search-panel {
        margin-bottom: 40px;
    }

    .marketplace__content-head {
        align-items: start !important;
    }

    .marketplace__chips {
        margin-bottom: 40px;
        display: none;
    }

    .marketplace__search-panel-wrapper:has(.marketplace__chips) .marketplace__search-panel {
        margin-bottom: 40px;
    }
}
