/* Tulmash.ru Stage 2: Catalog UX (isolated to 3 target categories in main-template-tulmash-ru) */

/* 2.1 Compact hero conditions bar under H1 (keeps cards visible on 1st screen) */
.tm-cat-hero {
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 0 0 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
}
.tm-cat-hero__main {
    flex: 1 1 560px;
    min-width: 0;
}
.tm-cat-hero__sub {
    font-size: 14.5px;
    line-height: 1.35;
    color: #333333;
    margin: 0 0 8px;
    font-weight: 500;
}
.tm-cat-hero__conds {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tm-cat-hero__conds li {
    font-size: 12.5px;
    line-height: 1.3;
    color: #171717;
    position: relative;
    padding-left: 14px;
}
.tm-cat-hero__conds li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ec5c1f;
}
.tm-cat-hero__cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 8px;
    background: #ec5c1f;
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    border: 1px solid #ec5c1f;
}
.tm-cat-hero__cta:hover {
    background: #ffffff;
    color: #171717 !important;
}

/* 2.4 Quick navigation / sort pills */
.tm-quick-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
}
.tm-quick-nav__label {
    font-size: 12.5px;
    color: #666666;
    margin-right: 4px;
}
.tm-qnav-btn {
    appearance: none;
    border: 1px solid #d5d5d5;
    background: #ffffff;
    color: #171717;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
    transition: all 0.15s ease;
}
.tm-qnav-btn:hover {
    border-color: #ec5c1f;
    color: #ec5c1f;
}
.tm-qnav-btn.is-active {
    background: #ec5c1f;
    border-color: #ec5c1f;
    color: #ffffff;
}
.tm-hidden-by-nav {
    display: none !important;
}

/* 2.3 Price text above button in catalog cards */
.tm-card-price-text {
    font-size: 17px;
    font-weight: 700;
    color: #171717;
    margin: 10px 0 8px;
    line-height: 1.2;
    text-align: center;
}

/* 2.5 Short task selection form after cards */
.tm-podbor-box {
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    padding: 24px 24px 20px;
    margin: 28px 0 24px;
}
.tm-podbor-box__title {
    font-size: 22px;
    font-weight: 700;
    color: #171717;
    margin: 0 0 6px;
    line-height: 1.25;
}
.tm-podbor-box__sub {
    font-size: 14px;
    color: #555555;
    margin: 0 0 16px;
}
.tm-podbor-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: stretch;
}
.tm-podbor-form__input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #d2d2d2;
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
    color: #171717;
    box-sizing: border-box;
}
.tm-podbor-form__input:focus {
    outline: none;
    border-color: #ec5c1f;
}
.tm-podbor-form__submit {
    height: 44px;
    padding: 0 20px;
    border: 1px solid #ec5c1f;
    border-radius: 8px;
    background: #ec5c1f;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.tm-podbor-form__submit:hover {
    background: #d54f16;
}
.tm-podbor-form__submit:disabled {
    opacity: 0.65;
    cursor: wait;
}
.tm-podbor-form__policy {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: #666666;
}
.tm-podbor-form__policy a {
    color: #ec5c1f;
    text-decoration: underline;
}
.tm-podbor-form__err {
    margin-top: 8px;
    font-size: 13px;
    color: #c62828;
    display: none;
}

/* 2.7 Trust block (molotkovye only, real materials) */
.tm-trust-box {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 16px;
    padding: 22px 24px;
    margin: 0 0 24px;
}
.tm-trust-box__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}
.tm-trust-box__title {
    font-size: 20px;
    font-weight: 700;
    color: #171717;
    margin: 0;
}
.tm-trust-box__geo {
    font-size: 13.5px;
    font-weight: 600;
    color: #ec5c1f;
    text-decoration: none;
}
.tm-trust-box__geo:hover {
    text-decoration: underline;
}
.tm-trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.tm-trust-card {
    display: block;
    background: #f8f8f8;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 14px 16px;
    text-decoration: none !important;
    transition: border-color 0.15s ease;
}
.tm-trust-card:hover {
    border-color: #ec5c1f;
}
.tm-trust-card__tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #ec5c1f;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.tm-trust-card__name {
    font-size: 14.5px;
    font-weight: 700;
    color: #171717;
    line-height: 1.35;
    margin-bottom: 4px;
}
.tm-trust-card__meta {
    font-size: 12.5px;
    color: #666666;
}

/* 2.8 Mobile fixed bottom bar (<= 767px only) */
.tm-mobile-bar {
    display: none;
}
@media only screen and (max-width: 991px) {
    .tm-podbor-form__grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media only screen and (max-width: 767px) {
    .tm-cat-hero {
        padding: 10px 12px;
        gap: 8px;
        margin-bottom: 10px;
    }
    .tm-cat-hero__sub {
        font-size: 13px;
        margin-bottom: 6px;
    }
    .tm-cat-hero__conds {
        gap: 4px 10px;
    }
    .tm-cat-hero__conds li {
        font-size: 11.5px;
        padding-left: 11px;
    }
    .tm-cat-hero__conds li::before {
        width: 5px;
        height: 5px;
        top: 5px;
    }
    .tm-cat-hero__cta {
        width: 100%;
        padding: 9px 14px;
        font-size: 13px;
    }
    .tm-quick-nav {
        gap: 6px;
        margin-bottom: 12px;
    }
    .tm-qnav-btn {
        padding: 5px 11px;
        font-size: 12px;
    }
    .tm-podbor-box {
        padding: 16px 14px;
    }
    .tm-podbor-box__title {
        font-size: 18px;
    }
    .tm-podbor-form__grid {
        grid-template-columns: 1fr;
    }
    .tm-trust-grid {
        grid-template-columns: 1fr;
    }

    /* Fixed 3-button bottom bar on mobile without overlapping cookie or chat */
    body.tm-has-mobile-bar {
        padding-bottom: 58px !important;
    }
    .tm-mobile-bar {
        display: grid;
        grid-template-columns: 1fr 1fr 1.15fr;
        gap: 6px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 54px;
        padding: 6px 8px;
        background: #ffffff;
        border-top: 1px solid #e2e2e2;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
        z-index: 9985;
        box-sizing: border-box;
    }
    .tm-mobile-bar__btn {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 40px;
        border-radius: 8px;
        font-size: 12.5px;
        font-weight: 700;
        text-decoration: none !important;
        white-space: nowrap;
        padding: 0 6px;
        box-sizing: border-box;
    }
    .tm-mobile-bar__btn--call {
        background: #f3f3f3;
        color: #171717 !important;
        border: 1px solid #dcdcdc;
    }
    .tm-mobile-bar__btn--msg {
        background: #e8f5e9;
        color: #1b5e20 !important;
        border: 1px solid #c8e6c9;
    }
    .tm-mobile-bar__btn--kp {
        background: #ec5c1f;
        color: #ffffff !important;
        border: 1px solid #ec5c1f;
    }

    /* Position cookie bar cleanly ABOVE mobile bar */
    body.tm-has-mobile-bar #ns-cookiesaccept,
    body.tm-has-mobile-bar .ns-cookiesaccept {
        bottom: 54px !important;
    }
    /* Position B24 chat icon cleanly ABOVE mobile bar + cookie bar */
    body.tm-has-mobile-bar:not(.tm-cookie-hidden) .b24-widget-button-wrapper.b24-widget-button-position-bottom-right {
        bottom: 120px !important;
        right: 10px !important;
    }
    body.tm-has-mobile-bar.tm-cookie-hidden .b24-widget-button-wrapper.b24-widget-button-position-bottom-right {
        bottom: 64px !important;
        right: 10px !important;
    }
}

/* 3.6 Similar models block at bottom of product cards */
.tm-similar-box {
    margin: 36px 0 28px;
}
.tm-similar-box__title {
    font-size: 24px;
    font-weight: 700;
    color: #171717;
    margin: 0 0 18px;
    line-height: 1.25;
}
.tm-similar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.tm-similar-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    padding: 14px;
    text-decoration: none !important;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.tm-similar-card:hover {
    border-color: #ec5c1f;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}
.tm-similar-card__img {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.tm-similar-card__img img {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
}
.tm-similar-card__name {
    font-size: 14.5px;
    font-weight: 700;
    color: #171717;
    line-height: 1.3;
    margin-bottom: 8px;
}
.tm-similar-card__perf {
    font-size: 12.5px;
    color: #555555;
    margin-bottom: 10px;
}
.tm-similar-card__price {
    margin-top: auto;
    font-size: 15px;
    font-weight: 700;
    color: #ec5c1f;
}
@media only screen and (max-width: 991px) {
    .tm-similar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media only screen and (max-width: 575px) {
    .tm-similar-grid {
        grid-template-columns: 1fr;
    }
    .tm-similar-box__title {
        font-size: 20px;
    }
}
