/* Tulmash.ru Stage 1 fixes (isolated to main-template-tulmash-ru) */

/* 1.4 Narrow bottom cookie strip (desktop & mobile 375px) */
#ns-cookiesaccept,
.ns-cookiesaccept {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 6px 14px !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background: rgba(34, 34, 34, 0.94) !important;
    color: #ffffff !important;
    z-index: 9990 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15) !important;
    box-sizing: border-box !important;
}

#ns-cookiesaccept .ns-cookiesaccept-text,
.ns-cookiesaccept .ns-cookiesaccept-text {
    font-size: 11.5px !important;
    line-height: 1.25 !important;
    margin: 0 !important;
}

#ns-cookiesaccept .ns-cookiesaccept-button,
.ns-cookiesaccept .ns-cookiesaccept-button {
    min-width: auto !important;
    height: 28px !important;
    line-height: 28px !important;
    padding: 0 14px !important;
    font-size: 11.5px !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
    background: #ec5c1f !important;
    color: #ffffff !important;
}

@media only screen and (max-width: 600px) {
    #ns-cookiesaccept,
    .ns-cookiesaccept {
        padding: 5px 10px !important;
        gap: 8px !important;
        justify-content: space-between !important;
    }
    #ns-cookiesaccept .ns-cookiesaccept-text,
    .ns-cookiesaccept .ns-cookiesaccept-text {
        font-size: 10.5px !important;
        line-height: 1.2 !important;
    }
    #ns-cookiesaccept .ns-cookiesaccept-button,
    .ns-cookiesaccept .ns-cookiesaccept-button {
        height: 26px !important;
        line-height: 26px !important;
        padding: 0 10px !important;
        font-size: 11px !important;
    }
}

/* 1.4 Hide Bitrix24 auto-greeting popup until 30s or scroll; never hijack clicks */
body:not(.tm-chat-greet-ready) .b24-widget-button-popup,
body:not(.tm-chat-greet-ready) .b24-widget-button-popup-show {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Keep chat icon visible above narrow cookie bar without blocking catalog cards */
body:not(.tm-cookie-hidden) .b24-widget-button-wrapper.b24-widget-button-position-bottom-right {
    bottom: 48px !important;
    right: 12px !important;
}

body.tm-cookie-hidden .b24-widget-button-wrapper.b24-widget-button-position-bottom-right {
    bottom: 16px !important;
    right: 12px !important;
}

/* Keep exact card picture box geometry to prevent CLS */
.detail-picture-item picture {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.detail-picture-item img.intro-slider-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Make clickable price link match existing buy-button look */
a.buy-button {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
