﻿
/*

nav[class*="menu"] li[class*="current-menu-"]>a,
nav[class*="menu"] li[class*="current-menu-"]>.ct-sub-menu-parent {
    color: var(--linkActiveColor, var(--paletteColor1));
}
nav[class*="menu"] li[class*="current-menu-"]>a:hover,
nav[class*="menu"] li[class*="current-menu-"]>.ct-sub-menu-parent:hover {
    color: var(--linkActiveColor, var(--linkHoverColor));
}

*/



/* Цена на странице товара */

.entry-summary .price {
    font-size: 200%;
    margin-bottom: 0.8em;
}

.woocommerce-price-suffix { /* в т.ч. НДС */
    font-size: 50%;
    font-weight: normal;
}

img[alt="Стандартное изображение"] {
    opacity: 0.07;
}

.woocommerce-product-gallery img[alt="Стандартное изображение"] {
    display: none;
}



/* невидимые thumbs мешают нажимать на стрелку влево в галерее на странице товара */

@media (min-width: 690px) {
    .thumbs-left .flexy-pills {
        z-index: -1;
    }
}





/* Лишние в списке товаров */

span.out-of-stock-badge {
    display: none !important;
}
/* Fix для quantity поля */
.quantity[data-type="type-1"] {
    display: flex;
    align-items: center;
    width: auto !important;
}

.quantity[data-type="type-1"] input.qty {
    width: 60px !important;
    height: 40px !important;
    text-align: center;
    margin: 0 5px;
}

.quantity[data-type="type-1"] .ct-increase,
.quantity[data-type="type-1"] .ct-decrease {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 40px;
    cursor: pointer;
}

/* Скрыть надпись Quantity */
.quantity .screen-reader-text {
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0;
    border: 0;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Скрыть label перед полем quantity если есть */
.quantity label:not(.screen-reader-text) {
    display: none !important;
}

/* Убрать надпись Quantity: добавляемую плагином */
html[lang="en-US"] .quantity:before,
.quantity:before {
    content: "" !important;
    display: none !important;
}

/* Расположить quantity и кнопку в одну строку */
.ct-woo-card-actions form.cart {
    
    
    
    gap: 10px !important;
}

.ct-woo-card-actions .quantity {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

.ct-woo-card-actions button.button {
    flex: 1 1 auto !important;
    margin: 0 !important;
}

/* ======================================
   MOBILE ONLY STYLES (max-width: 575px)
   ====================================== */

@media (max-width: 575px) {
    /* GEO-IP popup - bottom fixed */
    .ao-geo-ip-question {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: auto !important;
        border-radius: 12px 12px 0 0 !important;
        padding: 12px 10px 12px 130px !important;
        background: #fff !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
        text-align: center !important;
        z-index: 99999 !important;
    }
    .ao-geo-ip-question__answer {
        display: inline-block !important;
        white-space: nowrap !important;
        font-size: 11px !important;
        padding: 8px 12px !important;
        border-radius: 5px !important;
        margin: 5px 3px 0 3px !important;
    }
    .ao-geo-ip-question__answer_yes {
        background: #e01e2f !important;
        color: #fff !important;
    }
    .ao-geo-ip-question__answer_no {
        background: #222 !important;
        color: #fff !important;
    }
    body {
        padding-bottom: 120px !important;
    }
}

/* ======================================
   MOBILE COMPACT CARDS (simple version)
   ====================================== */

@media (max-width: 575px) {
    /* Compact card */
    ul.products li.product {
        padding: 12px !important;
        margin-bottom: 10px !important;
        border: 1px solid #e5e5e5 !important;
        border-radius: 8px !important;
        background: #fff !important;
    }
    
    /* Title smaller */
    .products .product .woocommerce-loop-product__title {
        font-size: 13px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
    }
    
    /* Meta info smaller */
    .products .product #tb-manufacturer,
    .products .product #tb-catalog-number,
    .products .product #tb-stock,
    .products .product #tb-gorod {
        font-size: 11px !important;
        margin-bottom: 3px !important;
    }
    
    .products .product #tb-catalog-number p,
    .products .product #tb-stock p {
        margin: 0 !important;
    }
    
    /* Hide category */
    .products .product .entry-meta {
        bottom: 150px !important;
        right: 10px !important;
    }
    
    /* Price */
    .products .product .price {
        font-size: 16px !important;
        font-weight: bold !important;
        margin: 8px 0 !important;
    }
    
    /* Actions row */
    .products .product .ct-woo-card-actions {
        display: flex;
        flex-wrap: wrap !important;
        gap: 8px !important;
        align-items: center !important;
    }
    
    .products .product .ct-woo-card-actions form.cart {
        display: flex;
        gap: 8px !important;
        align-items: center !important;
        margin: 0 !important;
    }
    
    /* Quantity compact */
    .products .product .ct-woo-card-actions .quantity input.qty {
        width: 45px !important;
        height: 34px !important;
        font-size: 12px !important;
    }
    
    /* Buttons compact */
    .products .product .ct-woo-card-actions .button {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
}

/* Quantity + Add to cart as single row on desktop */
.products .product .ct-woo-card-actions form.cart {
    display: flex !important;
    align-items: stretch !important;
    gap: 0 !important;
}

.products .product .ct-woo-card-actions .quantity {
    margin: 0 !important;
}

.products .product .ct-woo-card-actions .quantity,
.products .product .ct-woo-card-actions .button {
    height: 45px !important;
}

.products .product .ct-woo-card-actions .quantity {
    border-radius: 4px 0 0 4px !important;
}

.products .product .ct-woo-card-actions .quantity input.qty {
    border-radius: 0 !important;
    height: 100% !important;
}

.products .product .ct-woo-card-actions .button.add_to_cart_button {
    border-radius: 0 4px 4px 0 !important;
    margin: 0 !important;
}

/* Fix: Quantity + Button as unified block */
[data-products] .product .ct-woo-card-actions form.cart {
    display: inline-flex !important;
    align-items: stretch !important;
    gap: 0 !important;
    flex-direction: row; flex-wrap: nowrap; gap: 0 !important;
}

[data-products] .product .ct-woo-card-actions .quantity[data-type="type-1"] {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    height: 45px !important;
}

[data-products] .product .ct-woo-card-actions .quantity[data-type="type-1"] input.qty {
    height: 100% !important;
}

[data-products] .product .ct-woo-card-actions button.add_to_cart_button {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    height: 45px !important;
    margin: 0 !important;
}

/* Force unified look */
[data-products] .ct-woo-card-actions form.cart {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
}

[data-products] .ct-woo-card-actions .quantity {
    border-right: none !important;
}

[data-products] .ct-woo-card-actions .quantity .ct-increase {
    border-top-right-radius: 0 !important;
}

[data-products] .ct-woo-card-actions .quantity .ct-decrease {
    border-bottom-right-radius: 0 !important;
}

/* Fix button text wrap on tablet */
@media (max-width: 1100px) {
    [data-products] .ct-woo-card-actions button.add_to_cart_button {
        white-space: nowrap !important;
        font-size: 12px !important;
        padding: 8px 10px !important;
    }
    
    [data-products] .ct-woo-card-actions .quantity {
        width: 70px !important;
    }
}

/* Hide site title text on mobile */
@media (max-width: 480px) {
    .site-branding .site-title-container {
        display: none !important;
    }
}

/* Bitrix24 chat widget on mobile - raise above country popup */
@media (max-width: 575px) {
    [data-b24-crm-button-cont] {
        bottom: 150px !important;
        right: 10px !important;
    }
}



/* Footer widget titles visible on dark background */
footer .widget-title,
.site-footer .widget-title,
[data-footer] .widget-title {
    color: #fff !important;
}




/* Site title RAMP colors */
.site-title a {
    color: #222 !important;
}
[data-transparent-row="yes"] .site-branding .site-title a {
    color: #fff !important;
}

/* Force white text on transparent header */
header [data-transparent-row="yes"] .site-title a,
[data-transparent-row="yes"] .site-title-container .site-title a,
.ct-header [data-transparent-row="yes"] .site-title a {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

/* View cart button - same height as Add to cart */
.ct-woo-card-actions .added_to_cart,
[data-products] .ct-woo-card-actions .added_to_cart {
    white-space: nowrap !important;
    height: 45px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    margin-left: 8px !important;
}

/* Cart mini-popup - on top and solid background */
.ct-cart-content,
.ct-cart-dropdown,
.ct-header-cart .ct-cart-content,
[data-id="cart"] .ct-cart-content {
    z-index: 999999 !important;
    background: #fff !important;
    opacity: 1 !important;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15) !important;
}


header .sub-menu a,
.ct-header .sub-menu a,
[data-header] .sub-menu a {
    color: #222 !important;
}

header .sub-menu a:hover,
.ct-header .sub-menu a:hover,
[data-header] .sub-menu a:hover {
    background: #222 !important;
    color: #fff !important;
}

.ct-footer .sub-menu a,
footer .sub-menu a,
[data-footer] .sub-menu a {
    color: inherit !important;
}

/* Header dropdown menu - white background */
#header .sub-menu {
    background: #fff !important;
    z-index: 999999 !important;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15) !important;
}

#header .sub-menu a {
    color: #222 !important;
}

#header .sub-menu a:hover {
    background: #222 !important;
    color: #fff !important;
}

/* Footer submenu - transparent */
.ct-footer .sub-menu {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    position: static !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ct-footer .sub-menu a {
    color: inherit !important;
    background: transparent !important;
}

    position: relative !important;
    z-index: 10 !important;
}

    flex: 1 !important;
}

    position: relative !important;
    flex-shrink: 0 !important;
}

/* Geo-IP popup - lower z-index, don't overlap content */
.ao-geo-ip-question {
    z-index: 9999 !important;
}

    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    height: 100% !important;
    border-radius: 0 4px 4px 0 !important;
}

    border-radius: 4px 0 0 4px !important;
}

/* Ensure search form shows button */
    overflow: visible !important;
}

    width: calc(100% - 100px) !important;
}

    display: flex !important;
    flex-direction: row; flex-wrap: nowrap; gap: 0 !important;
    align-items: stretch !important;
}

    flex: 1 1 auto !important;
    width: auto !important;
}

    position: static !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 90px !important;
}

    max-width: 100% !important;
    overflow: visible !important;
}

/* Force inline layout */
    display: inline-flex !important;
    vertical-align: top !important;
}

    height: 48px !important;
}

    height: 48px !important;
    border-radius: 0 4px 4px 0 !important;
}

    border-radius: 4px 0 0 4px !important;
}

    overflow-x: visible !important;
}

    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}

    width: 100% !important;
    max-width: 100% !important;
}

    padding-right: 100px !important;
}

    padding-right: 100px !important;
    position: relative !important;
}

    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 94px !important;
}

/* ================================================
/* Container overflow fix */
.brz .brz-section__content {
    overflow: visible !important;
}

/* Search form - inline flexbox layout */
.brz .dgwt-wcas-search-wrapp {
    display: block !important;
    max-width: calc(100% - 20px) !important;
}

.brz .dgwt-wcas-search-form {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 0 !important;
}

.brz .dgwt-wcas-sf-wrapp {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.brz .dgwt-wcas-search-submit {
    flex: 0 0 auto !important;
    position: relative !important;
    right: auto !important;
    top: auto !important;
}

/* Search bar fix for Brizy - CORRECT STRUCTURE */
.brz .dgwt-wcas-sf-wrapp {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
}

.brz .dgwt-wcas-search-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    border-radius: 4px 0 0 4px !important;
}

.brz .dgwt-wcas-search-submit {
    flex: 0 0 auto !important;
    position: static !important;
    border-radius: 0 4px 4px 0 !important;
}

.brz .dgwt-wcas-preloader {
    position: absolute !important;
    right: 100px !important;
}

/* Search form - move down on main page to avoid clipping */
.brz .dgwt-wcas-search-wrapp {
    margin-top: 32px !important;
}

/* Fix red triangle position in search */
.brz .dgwt-wcas-ico-magnifier,
.brz .dgwt-wcas-search-icon {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.brz .dgwt-wcas-search-input {
    padding-left: 40px !important;
}

/* Hide red triangle on search button */
.brz .dgwt-wcas-search-submit::before {
    display: none !important;
}

/* Mobile menu - ensure visible text */
.ct-panel .ct-menu-link,
.ct-panel nav a,
.ct-panel .menu-item a {
    color: #fff !important;
}

.ct-panel .ct-menu-link:hover,
.ct-panel nav a:hover,
.ct-panel .menu-item a:hover {
    color: #e01e2f !important;
}


#header .ct-header-account svg,
#header .ct-header-account path {
    fill: var(--theme-icon-color, currentColor) !important;
}

#header .ct-header-account svg {
    fill: currentColor !important;
}

}

}

}

/* Transparent header row - white icons and text */
[data-transparent-row="yes"] .ct-header-account .ct-icon,
[data-transparent-row="yes"] .ct-header-account .ct-icon path,
[data-transparent-row="yes"] .ct-cart-item .ct-icon,
[data-transparent-row="yes"] .ct-cart-item .ct-icon path,
[data-transparent-row="yes"] .ct-cart-total {
    fill: #fff !important;
    color: #fff !important;
}

/* Move back button down on mobile */
@media (max-width: 999px) {
    .btn-sticky-container {
        top: 105px !important;
    }
}


/* ================================================
   Product thumbnail - base styles
   ================================================ */
.ramp-product-thumb-wrap {
    width: 80px; min-width: 80px; height: 80px;
    flex-shrink: 0; display: flex;
    align-items: center; justify-content: center;
}
.ramp-product-thumb {
    max-width: 80px; max-height: 80px;
    width: auto; height: auto;
    object-fit: contain; display: block;
}

/* ================================================
   PRODUCT LIST — fixed-column desktop table layout
   Container visible: 1290px (90px to 1380px).
   Column map:
     link(390+10mgn) | entry-meta(165) | #tb-manufacturer(110)
     | #tb-catalog-number(165) | #tb-stock(80) | #tb-gorod(105)
     | .price(85) | .ct-woo-card-actions(180)
   Total = 1290px.
   ================================================ */
@media (min-width: 1000px) {

    /* Link column: 390px + 10px margin-right */
    [data-products=type-1] .product .woocommerce-loop-product__link {
        flex: 0 0 390px !important;
        width: 390px !important;
        min-width: 390px !important;
        max-width: 390px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        text-align: left !important;
        margin-right: 10px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    [data-products=type-1] .product .woocommerce-loop-product__link .woocommerce-loop-product__title {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
        margin: 0 !important;
        align-self: center !important;
        line-height: 1.3 !important;
    }
    [data-products=type-1] .product .ramp-product-thumb-wrap {
        flex-shrink: 0 !important;
        width: 80px !important;
        min-width: 80px !important;
        height: 80px !important;
    }

    /* Categories column: ul.entry-meta — 165px */
    [data-products=type-1] .product ul.entry-meta {
        flex: 0 0 165px !important;
        width: 165px !important;
        min-width: 165px !important;
        max-width: 165px !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        line-height: 1.25 !important;
        text-align: center !important;
        overflow: hidden !important;
    }
    [data-products=type-1] .product ul.entry-meta li { display: inline !important; }
    [data-products=type-1] .product ul.entry-meta a {
        white-space: normal !important;
        word-break: normal !important;
        margin-right: 0 !important;
    }

    /* Brand column: #tb-manufacturer — 110px */
    [data-products=type-1] .product #tb-manufacturer {
        flex: 0 0 110px !important;
        width: 110px !important;
        min-width: 110px !important;
        max-width: 110px !important;
        text-align: center !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow: hidden !important;
    }
    [data-products=type-1] .product #tb-manufacturer a { margin-right: 0 !important; }

    /* Part numbers column: #tb-catalog-number — 165px */
    [data-products=type-1] .product #tb-catalog-number {
        flex: 0 0 165px !important;
        width: 165px !important;
        min-width: 165px !important;
        max-width: 165px !important;
        text-align: center !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow: hidden !important;
    }

    /* Stock column: #tb-stock — 80px */
    [data-products=type-1] .product #tb-stock {
        flex: 0 0 80px !important;
        width: 80px !important;
        min-width: 80px !important;
        max-width: 80px !important;
        text-align: center !important;
        white-space: normal !important;
    }

    /* City column: #tb-gorod — 105px */
    [data-products=type-1] .product #tb-gorod {
        flex: 0 0 105px !important;
        width: 105px !important;
        min-width: 105px !important;
        max-width: 105px !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
    }
    [data-products=type-1] .product #tb-gorod a { margin-right: 0 !important; }

    /* Price column: 85px, sale price stacked vertically */
    [data-products=type-1] .product .price {
        flex: 0 0 85px !important;
        width: 85px !important;
        min-width: 85px !important;
        max-width: 85px !important;
        margin-left: 0 !important;
        white-space: normal !important;
        text-align: left !important;
        line-height: 1.2 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }
    [data-products=type-1] .product .price del {
        order: 1 !important;
        display: block !important;
        white-space: nowrap !important;
        opacity: 0.55 !important;
        font-size: 0.8em !important;
        line-height: 1.1 !important;
    }
    [data-products=type-1] .product .price ins {
        order: 2 !important;
        display: block !important;
        white-space: nowrap !important;
        text-decoration: none !important;
        font-weight: 600 !important;
        line-height: 1.1 !important;
    }
    [data-products=type-1] .product .price bdi { white-space: nowrap !important; }
    [data-products=type-1] .product .price .sale-price {
        display: flex !important; flex-direction: column !important;
        align-items: flex-start !important;
    }
    /* gap: city → price */
    [data-products=type-1] .product .price {
        padding-left: 10px !important;
        box-sizing: border-box !important;
    }
        [data-products=type-1] .product .ramp-price-placeholder { visibility: hidden !important; }

    /* Actions column: 180px total (55px qty + 125px button) */
    [data-products=type-1] .product .ct-woo-card-actions {
        flex: 0 0 180px !important;
        width: 180px !important;
        min-width: 180px !important;
        max-width: 180px !important;
        margin-left: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        overflow: visible !important;
    }
    [data-products=type-1] .product .ct-woo-card-actions form.cart {
        display: flex !important;
        align-items: center !important;
        width: 180px !important;
        min-width: 180px !important;
        max-width: 180px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    [data-products=type-1] .product .ct-woo-card-actions .quantity {
        flex: 0 0 55px !important;
        width: 55px !important;
        min-width: 55px !important;
        max-width: 55px !important;
    }
    /* All buttons: 125px */
    [data-products=type-1] .product .ct-woo-card-actions .button {
        flex: 0 0 125px !important;
        width: 125px !important;
        min-width: 125px !important;
        max-width: 125px !important;
        text-align: center !important;
        white-space: normal !important;
        margin: 0 !important;
    }
    /* Read more: offset 55px to align with Add to cart button position */
    [data-products=type-1] .product .ct-woo-card-actions a.button:not(.add_to_cart_button):not(.added_to_cart) {
        margin-left: 55px !important;
    }
}

/* ================================================
   RAMP mobile product card image improvement
   ================================================ */
@media (max-width: 768px) {

    .woocommerce ul.products li.product .woocommerce-loop-product__link {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .woocommerce ul.products li.product .ramp-product-thumb-wrap {
        width: 100%;
        min-width: 100%;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 16px auto;
        flex-shrink: 0;
    }

    .woocommerce ul.products li.product .ramp-product-thumb {
        width: auto;
        height: auto;
        max-width: 200px;
        max-height: 180px;
        object-fit: contain;
        display: block;
        margin: 0 auto;
    }

    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        text-align: center;
        width: 100%;
        margin-top: 0;
        line-height: 1.3;
    }
}