/* =========================================================
   SurliBox — собственные стили
   Не генерируется UniShop2, редактировать через FileZilla
   ========================================================= */


/* =========================================================
   Карточки каталога — В корзину / Рассчитать тираж
   ========================================================= */

.product-thumb .product-thumb__cart {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    gap: 9px !important;
    width: 100% !important;
}

.product-thumb .product-thumb__cart button[onclick*="cart.add"] {
    position: static !important;
    order: 1 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;

    width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 14px !important;

    background: #f58200 !important;
    border: 1px solid #f58200 !important;
    border-radius: 8px !important;
    color: #ffffff !important;

    font-weight: 600 !important;
    box-sizing: border-box !important;
}

.product-thumb .product-thumb__cart .product-thumb__quick-order {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;

    order: 2 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;

    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 14px !important;

    background: #ffffff !important;
    border: 1px solid #f58200 !important;
    border-radius: 8px !important;
    color: #f58200 !important;

    font-weight: 600 !important;
    box-sizing: border-box !important;
}

.product-thumb .product-thumb__cart .product-thumb__quick-order:hover {
    background: #fff5e9 !important;
    border-color: #ef7c00 !important;
    color: #ef7c00 !important;
}

/* =========================================================
   Модель 1 — цена базовой комплектации
   ========================================================= */

.sb-base-price-per {
    margin-left: 4px;
    font-size: 16px;
    font-weight: 500;
}

.sb-base-price-note {
    margin: 8px 0 14px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* =========================================================
   Страница товара — отключаем боковую XL-панель UniShop2
   Цена, параметры и кнопки остаются рядом с изображением
   ========================================================= */

@media (min-width: 1345px) {

    .product-block__wrapper {
        display: block !important;
    }

    .product-block__left-block {
        padding-right: 0 !important;
    }

    .product-block__left-block > .hidden-xl {
        display: block !important;
    }

    .product-block__right-block {
        display: none !important;
    }
}

/* SurliBox — информационный блок цены в карточке каталога */
.sb-catalog-price-info {
    margin: 7px 0 14px;
    padding: 8px 10px;
    background: #f7f7f7;
    border: 1px solid #eeeeee;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: #666;
}

.sb-catalog-price-info > div + div {
    margin-top: 3px;
}

.sb-catalog-price-info > div:first-child {
    color: #555;
}

/* SurliBox — более широкое поле количества в карточках каталога */
#product-category .product-thumb .qty-switch {
    width: 86px;
}

#product-category .product-thumb .qty-switch__input {
    width: 64px;
    text-align: center;
}

.sb-more-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Главный каталог значков — конверсионный блок */
.sb-badges-hero {
    max-width: 1180px;
    margin: 0 auto 32px;
    padding: 32px 28px;
    border: 1px solid #f2d8be;
    border-radius: 16px;
    background: linear-gradient(110deg, #fffdfa 0%, #fff 58%, #fff1e3 100%);
    overflow: hidden;
}

.sb-badges-hero__content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.sb-badges-hero__title {
    margin: 0 0 10px;
    color: #222;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.3;
}

.sb-badges-hero__text {
    max-width: 780px;
    margin: 0 auto 18px;
    color: #555;
    font-size: 16px;
    line-height: 1.6;
}

.sb-badges-hero__facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 28px;
    margin: 0 0 20px;
    color: #444;
    font-size: 15px;
}

.sb-badges-hero__facts i {
    margin-right: 6px;
    color: #f27800;
}

.sb-badges-hero__button {
    display: inline-block;
    padding: 14px 30px;
    border: 0;
    border-radius: 8px;
    background: #f27800;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 7px 18px rgba(242, 120, 0, 0.20);
}

.sb-badges-hero__button:hover {
    background: #dc6d00;
}

@media (max-width: 767px) {
    .sb-badges-hero {
        margin-bottom: 24px;
        padding: 24px 16px;
        border-radius: 12px;
    }

    .sb-badges-hero__title {
        font-size: 22px;
    }

    .sb-badges-hero__facts {
        flex-direction: column;
        gap: 7px;
    }

    .sb-badges-hero__button {
        width: 100%;
    }
}

.sb-badges-hero__label {
    display: inline-block;
    margin: 0 0 16px;
    padding: 9px 16px;
    border-radius: 24px;
    background: #ffead6;
    color: #e86f00;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.sb-badges-hero {
    margin-top: -4px;
}

/* Главный каталог значков — убираем левый сайдбар */
#product-category:has(.sb-badges-hero) #column-left {
    display: none !important;
}

/* Основной контент на всю ширину */
#product-category:has(.sb-badges-hero) #content {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

/* FAQ не растягиваем слишком широко */
#product-category:has(.sb-badges-hero) .kc-badges-faq {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

/* Главный каталог значков — мобильная сетка 2 + 1 по центру */
@media (max-width: 767px) {

    #product-category:has(.sb-badges-hero) #content .category-list {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    #product-category:has(.sb-badges-hero) #content .category-list > div {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
        float: none !important;
    }

    #product-category:has(.sb-badges-hero) #content .category-list > div:last-child:nth-child(odd) {
    grid-column: 1 / 3 !important;
    width: calc(50% - 6px) !important;
    justify-self: center !important;
    } 
}

/* Значки — кнопки карточек на мобильном */
@media (max-width: 767px) {

    .product-thumb__cart .sb-more-btn,
    .product-thumb__cart .product-thumb__quick-order {
        width: 100% !important;
        min-width: 0 !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        font-size: 12px !important;
        white-space: normal !important;
        line-height: 1.25 !important;
        text-align: center !important;
    }

    .product-thumb__cart .product-thumb__quick-order span {
        white-space: normal !important;
    }
}

/* =========================================================
   SurliBox — единая тиражная сетка
   ========================================================= */

.sb-tier-pricing {
    margin: 10px 0 14px;
}

.sb-tier-pricing__title {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
}


/* SurliCRM — компактная таблица тиражей для обычных товаров */
.sb-tier-pricing__grid {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.sb-tier-grid {
    display: grid;
    grid-template-columns: 70px repeat(var(--sb-tier-count), minmax(72px, 1fr));
    gap: 1px;
    width: 100%;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    overflow: hidden;
    background: #e6e6e6;
}

.sb-tier-grid__label,
.sb-tier-cell {
    min-height: 34px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    color: #555555;
    line-height: 1.15;
    text-align: center;
}

.sb-tier-grid__label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10px;
    background: #f5f5f5;
    font-size: 12px;
    font-weight: 700;
    color: #666666;
    white-space: nowrap;
}

.sb-tier-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.sb-tier-cell--qty {
    font-size: 13px;
    font-weight: 700;
}

.sb-tier-cell--price {
    font-size: 12px;
    font-weight: 600;
    color: #6a6a6a;
}

.sb-tier-cell:hover {
    background: #fff4e8;
    color: #d96d00;
}

.sb-tier-cell.active {
    background: #ef7c00;
    color: #ffffff;
}

@media (max-width: 767px) {
    .sb-tier-grid {
        width: max-content;
    }

    .sb-tier-grid__label,
    .sb-tier-cell {
        min-height: 32px;
    }
}

.sb-tier-pricing__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Тиражи — визуально как старые кнопки опций SurliBox,
   но с новой логикой реального количества и цены. */
.sb-tier-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 92px;
    min-height: 42px;
    padding: 6px 12px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    background: #f7f7f7;
    color: #555555;
    line-height: 1.15;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.sb-tier-btn:hover {
    border-color: #ef7c00;
    background: #fff4e8;
    color: #ef7c00;
}

.sb-tier-btn.active {
    border-color: #ef7c00;
    background: #ef7c00;
    color: #ffffff;
    box-shadow: none;
}

.sb-tier-btn__qty {
    font-size: 13px;
    font-weight: 700;
}

.sb-tier-btn__price {
    font-size: 11px;
    color: #777777;
}

.sb-tier-btn:hover .sb-tier-btn__price {
    color: #b55d00;
}

.sb-tier-btn.active .sb-tier-btn__price {
    color: #ffffff;
}

.sb-tier-pricing__note {
    margin-top: 10px;
    padding: 9px 11px;
    border-radius: 6px;
    background: #f7f7f7;
    color: #666666;
    font-size: 13px;
    line-height: 1.45;
}

.sb-tier-pricing__total,
.sb-zakat-total {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.4;
}

.sb-catalog-tier-price {
    font-weight: 700;
}

.sb-catalog-tier-info {
    padding: 6px 9px;
}

@media (max-width: 767px) {
    .sb-tier-pricing__list {
        gap: 6px;
    }

    .sb-tier-btn {
        min-width: calc(50% - 3px);
        flex: 1 1 calc(50% - 3px);
    }
}


/* SurliCRM file pricing — native UniShop2 look v1.4.4 */
.sb-exact-pricing--native {
    margin: 8px 0 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-sizing: border-box;
    max-width: 100%;
    color: inherit;
    font-family: inherit;
}
.sb-exact-pricing__status {
    margin: 0 0 7px;
    color: #777;
    font-size: 13px;
    line-height: 1.4;
}
.sb-exact-pricing__total {
    margin: 0;
    color: inherit;
    font-size: 16px;
    line-height: 1.4;
}
.sb-exact-pricing__total b {
    font-size: 18px;
    font-weight: 700;
}
.sb-exact-pricing__minimum {
    margin-top: 6px;
    color: #777;
    font-size: 13px;
    line-height: 1.4;
}
.product-page__add-to-cart.sb-exact-unavailable {
    opacity: .55;
    cursor: not-allowed;
}
.sb-exact-current-price {
    white-space: nowrap;
}


/* =========================================================
   SurliBox — единый вид карточек значков v1.4.6
   Фанера / акрил / закатные
   ========================================================= */
.product-page__price .sb-exact-current-price,
.product-page__price .sb-zakat-unit {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

.product-page__price .sb-base-price-per,
.product-page__price .sb-zakat-per,
.product-page__price .sb-minimum-order-label {
    margin-left: 4px;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #777;
}

.sb-badge-price-message {
    margin: 8px 0 7px;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.sb-badge-price-guide {
    margin-top: 0;
}

.sb-badge-price-guide .sb-tier-pricing__title,
.sb-zakat-tiers .sb-tier-pricing__title {
    margin-bottom: 7px;
    color: #777;
    font-size: 12px;
    font-weight: 500;
}

/* Справочные тиражи выглядят как компактные плашки UniShop2:
   количество сверху, цена за штуку прямо под ним. */
.sb-badge-price-guide .sb-tier-pricing__list,
.sb-zakat-tiers .sb-tier-pricing__list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.sb-badge-price-guide .sb-tier-btn,
.sb-zakat-tiers .sb-tier-btn {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: auto;
    min-width: 88px;
    min-height: 42px;
    padding: 6px 10px;
    border: 0;
    border-radius: 4px;
    background: #f4f4f4;
    color: #ef7c00;
}

.sb-badge-price-guide .sb-tier-btn:hover,
.sb-zakat-tiers .sb-tier-btn:hover {
    background: #fff0df;
    color: #ef7c00;
}

.sb-badge-price-guide .sb-tier-btn.active,
.sb-zakat-tiers .sb-tier-btn.active {
    background: #ef7c00;
    color: #fff;
}

.sb-badge-price-guide .sb-tier-btn__qty,
.sb-zakat-tiers .sb-tier-btn__qty {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.sb-badge-price-guide .sb-tier-btn__price,
.sb-zakat-tiers .sb-tier-btn__price {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.sb-badge-price-guide .sb-tier-btn:hover .sb-tier-btn__price,
.sb-zakat-tiers .sb-tier-btn:hover .sb-tier-btn__price {
    color: #c86600;
}

.sb-badge-price-guide .sb-tier-btn.active .sb-tier-btn__price,
.sb-zakat-tiers .sb-tier-btn.active .sb-tier-btn__price {
    color: #fff;
}

.sb-exact-pricing__minimum {
    margin-top: 7px;
    color: #666;
}

@media (max-width: 767px) {
    .sb-badge-price-guide .sb-tier-pricing__list,
    .sb-zakat-tiers .sb-tier-pricing__list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .sb-badge-price-guide .sb-tier-btn,
    .sb-zakat-tiers .sb-tier-btn {
        width: auto;
        min-width: 82px;
        padding: 6px 8px;
    }
}
