.header-top__location,
.cart-widget__btn,
.modal-form__btn,
.order-btn,
.form-question form button,
.modal-callback__btn,
.js-more-btn,
.catalog-sidebar__lead,
.js-cart-widget-delivery-no-address,
.js-cart-widget-delivery-has-address .arrow {
    cursor:pointer;
}
.modal-checkout-delivery__btn{
    width:100%;
    cursor:pointer;
}
.modal-delivery__content{
    width: 100%;
}

.modal-delivery__content .modal-delivery__notice{
    margin-top: 1rem;
}

/* Hide header favorite & login icons but keep their layout space on desktop only */
@media (min-width: 62.01rem) {
    .header-favorite,
    .header-login {
        visibility: hidden;
    }
}

/* Header top "Еще" dropdown */
.header-top__toggle-wrap {
    position: relative;
}
.header-top__toggle {
    cursor: pointer;
}
.header-top__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 12rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(20, 40, 2, 0.14);
    padding: 8px 0;
    z-index: 100;
}
.header-top__toggle-wrap.is-open .header-top__dropdown {
    display: block;
}
.header-top__dropdown-item {
    display: block;
    padding: 8px 14px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #142802;
    text-decoration: none;
    transition: background 0.15s;
}
.header-top__dropdown-item:hover {
    background: #f5f7f2;
}
.header-search__category-item img{
    width:48px;
    height:48px;
    object-fit: cover;
    border-radius: 8px;
}
.js-header-search-categories{
    margin-bottom: 2.5rem;
}

/* Header search dropdown: equalize product card sizes */
.header-search__goods {
    align-items: stretch;
}
.header-search__goods {
    flex-wrap: wrap;
}
.header-search__goods-item {
    width: calc((100% - 1rem) / 3);
}
@media (max-width: 47.9375rem) {
    .header-search__goods-item {
        width: calc(50% - 0.25rem);
    }
}
.header-search__goods-item {
    display: flex;
    flex-direction: column;
}
.header-search__goods-img {
    height: 15rem;
    overflow: hidden;
    flex-shrink: 0;
}
.header-search__goods-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.header-search__goods-img a{
    height:100%;
}


.modal-checkout-delivery__map-inner {
    min-height: 280px;
    height: 100%;
}
.map-iframe{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.home-ymap-inner {
    display: block;
    width: 100%;
    height: 100%;
}

/* modal-delivery: same functional styles as modal-checkout-delivery */
.modal-delivery__map.js-delivery-map-block {
    position: relative;
}
.modal-delivery__map-inner {
    min-height: 200px;
    height: 100%;
}
.modal-delivery__map .modal-delivery__map-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 200px;
}
.modal-delivery__map.mob .modal-delivery__map-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 160px;
}
/* Point mode: only after clicking "Указать местоположение на карте" can user pick a place; cursor = crosshair (pin/precision) */
.modal-delivery.point_mode .js-delivery-map-block,
.modal-delivery.point_mode .js-delivery-map-block .modal-delivery__map-inner,
.modal-delivery.point_mode .js-delivery-map-block .modal-delivery__map-inner * {
    cursor: crosshair !important;
}
.modal-delivery__suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 10;
    background: #fff;
    border: 1px solid rgba(20, 40, 2, 0.2);
    border-radius: 8px;
    max-height: 240px;
    overflow-y: auto;
    margin-top: 4px;
}
.modal-delivery__enter {
    position: relative;
}
.modal-delivery__suggestions .modal-checkout-delivery__suggestions-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.95rem;
}
.modal-delivery__suggestions .modal-checkout-delivery__suggestions-item:hover {
    background: rgba(20, 40, 2, 0.06);
}
.modal-checkout-delivery__wrap::before{
    display:none;
}

/* Empty slot in catalog slider (keeps grid layout when fewer than 8 categories on last page) */
.catalog-item--empty {
    visibility: hidden;
    pointer-events: none;
}

/* Catalog filter: ensure label is positioning context so the invisible checkbox covers it and receives clicks */
.catalog-filter__options-wrap label {
    position: relative;
}
.catalog-filter__options-wrap input[type="checkbox"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

/* Checkout recipient form: red border on invalid inputs, single error message under form */
.modal-user__form input.is-invalid {
    border: 1px solid red;
}
.modal-user__form-error {
    color: red;
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}
/* Callback consent: only the checkbox box is red when invalid, not the whole block */
.modal-user__form .check-container input[type="checkbox"].is-invalid + .check-checkmark {
    border-color: red;
}

/* Bulk order modal: variation title under main title (product + size) */
.modal-user__variation-title {
    margin-top: 0.6rem;
    margin-bottom: 0;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.3;
    color: rgba(20, 40, 2, 0.8);
}

/* Phone mask: same look as other placeholders (#142802 @ 40% opacity) when empty */
input.js-phone-empty {
    color: rgba(20, 40, 2, 0.4);
}

/* Services dropdown */
.header-services__btn {
    position: relative;
}
.header-services__btn.open .header-services__btn-arrow {
    transform: scale(-1);
    transition: all ease .3s;
}
.header-services__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(20, 40, 2, 0.14);
    min-width: 13.75rem;
    z-index: 1000;
    white-space: nowrap;
}
.header-services__btn.open .header-services__dropdown {
    display: block;
}
.header-services__dropdown-inner {
    max-height: 22.25rem;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    padding: 8px 0;
}
.header-services__dropdown-inner::-webkit-scrollbar {
    width: 8px;
}
.header-services__dropdown-inner::-webkit-scrollbar-track {
    background: transparent;
}
.header-services__dropdown-inner::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}
.header-services__dropdown-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(20, 40, 2, 0.45);
    padding: 4px 14px 6px;
    text-transform: none;
}
.header-services__dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #142802;
    text-decoration: none;
    transition: background 0.15s;
}
.header-services__dropdown-item:hover {
    background: #f5f7f2;
}
.header-services__dropdown-img {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.header-services__dropdown-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.header-top__dropdown-item{
    text-wrap: nowrap;
}

#modal-request .form-checkbox{
    margin-bottom: 1.5rem;
}

/* Modal callback/request: keep title inside borders (clear of close button) */
.modal-callback__title {
    padding-right: 4rem;
    line-height: 1.25;
    word-wrap: break-word;
}

/* Services full-screen menu (mobile, exactly like catalog-menu) */
.services-menu {
    display: none;
}
@media (max-width: 62rem) {
    .services-menu.is-open {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        background: #fff;
        z-index: 1000;
        padding-top: 1.25rem;
        scroll-behavior: smooth;
        scrollbar-width: thin;
    }
    .services-menu.is-open::-webkit-scrollbar {
        width: 8px;
    }
    .services-menu.is-open::-webkit-scrollbar-track {
        background: transparent;
    }
    .services-menu.is-open::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }
    .services-menu.is-open .wrapper {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    .services-menu__top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1.5rem;
        flex-shrink: 0;
    }
    .services-menu__back {
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        width: 3rem;
        height: 3rem;
        background: #eef2e9;
        cursor: pointer;
    }
    .services-menu__text {
        font-weight: 400;
        font-size: 1rem;
        line-height: 100%;
        letter-spacing: -0.02em;
        text-align: center;
        color: #000;
    }
    .services-menu__cart {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        width: 3rem;
        height: 3rem;
        background: #eef2e9;
        text-decoration: none;
        color: inherit;
    }
    .services-menu__cart-count {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: -0.625rem;
        right: -0.5rem;
        width: 1.25rem;
        height: 1.25rem;
        border-radius: 50%;
        background: #f3ff95;
        font-weight: 750;
        font-size: 0.75rem;
        line-height: 133%;
        letter-spacing: -0.02em;
        color: #142802;
    }
    .services-menu__search {
        width: 100%;
        margin-bottom: 1rem;
        flex-shrink: 0;
    }
    .services-menu__nav {
        flex: 1;
        position: relative;
        width: 100%;
        overflow-y: auto;
        margin-top: 0.75rem;
        scrollbar-width: thin;
    }
    .services-menu__nav::-webkit-scrollbar {
        width: 8px;
    }
    .services-menu__nav::-webkit-scrollbar-track {
        background: transparent;
    }
    .services-menu__nav::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }
    .services-menu__nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        width: 100%;
        background: #fff;
    }
    .services-menu__nav > ul > li {
        margin-bottom: 8px;
        width: 100%;
        max-width: 21.25rem;
    }
    .services-menu__nav li.services-menu__label-li {
        margin-bottom: 4px;
    }
    .services-menu__label {
        display: block;
        font-size: 0.75rem;
        font-weight: 500;
        color: rgba(20, 40, 2, 0.45);
        padding: 0.25rem 0 0.125rem;
        text-transform: none;
    }
    .services-menu__nav a.services-menu__item {
        position: relative;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        height: 3rem;
        padding: 0.75rem 0.75rem;
        padding-left: 0;
        text-decoration: none;
        color: #000;
        font-size: 0.9375rem;
        border-radius: 8px;
        transition: background 0.2s;
        white-space: nowrap;
    }
    .services-menu__nav a.services-menu__item:hover {
        background: #eef2e9;
    }
    .services-menu__img {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 3rem;
        height: 3rem;
        border-radius: 8px;
        background: #eef2e9;
        overflow: hidden;
        flex-shrink: 0;
    }
    .services-menu__img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
    }
}
@media (max-width: 992px) {
    .services-menu.is-open {
        overflow: hidden;
    }
    .services-menu.is-open .wrapper {
        height: 100%;
    }
    .services-menu__nav {
        flex: 1;
        min-height: 0;
    }
}
/* On desktop hide header dropdown when opening from mobile trigger; on mobile hide inline dropdown */
@media (max-width: 62rem) {
    .header-services__dropdown {
        display: none !important;
    }
}

/* Match business form checkbox UI inside calc/request modals */
.modal-calc .form-checkbox__wrap {
    margin-top: 1.375rem;
}

.modal-calc .form-checkbox__wrap label {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 1rem;
    color: rgba(20, 40, 2, 0.4);
}

.modal-calc .form-checkbox__wrap label:last-child {
    margin-bottom: 0;
}

.modal-calc .form-checkbox__wrap label::before {
    content: "";
    border: 1px solid #142802;
    border-radius: 4px;
    min-width: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

.modal-calc .form-checkbox__wrap label::after {
    content: "";
    position: absolute;
    left: 5px;
    width: 13px;
    height: 10px;
    background: url(../img/icon/check-marker.svg) no-repeat;
    display: none;
}

.modal-calc .form-checkbox__wrap label a {
    color: #142802;
}

.modal-calc .form-checkbox__wrap input {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: 0;
}

.modal-calc .form-checkbox__wrap input[type="checkbox"]:checked + label:before {
    background: #467b31;
    border: 1px solid #467b31;
}

.modal-calc .form-checkbox__wrap input[type="checkbox"]:checked + label:after {
    display: block;
}

/* Home article-block second: ensure category chips are visible */
.article-block.second .article-item__cat {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Modal fotofooter gallery */
.form-foto__footer-item:not(.no-modal){
    cursor: pointer;
}
.modal-fotofooter__gallery {
    margin-top: 1.5rem;
    max-height: 75vh;
    overflow-y: auto;
    padding-right: 0.5rem;
    scroll-behavior: smooth;
}
.modal-fotofooter__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}
.js-modal-fotofooter-gallery-brands .modal-fotofooter__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.modal-fotofooter__grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}
.modal-fotofooter__grid-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.modal-form__btn{
    position: static;
    transform: unset;
    margin-top: 24px;
}
/* Brands gallery: keep full logos without cropping */
.js-modal-fotofooter-gallery-brands .modal-fotofooter__grid-item{
    padding: 1rem;
}
.js-modal-fotofooter-gallery-brands .modal-fotofooter__grid-item img {
    object-fit: contain;
}
@media (max-width: 48rem) {
    .modal-fotofooter__grid,
    .js-modal-fotofooter-gallery-brands .modal-fotofooter__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 48rem) {
    .catalog-content .product-item.promo ,
    .catalog-content .product-item{
        order: unset !important;
    }
}
@media (min-width: 62.01rem) {
    .header-fixed .header-top {
        display: none;
    }
    .header-is-fixed .catalog-menu{
        top:3.3rem;
    }
}