/*
	Theme Name:   Savoy Child
	Theme URI:    http://themeforest.net/item/savoy-minimalist-ajax-woocommerce-theme/12537825
	Description:  Savoy child theme
	Author:       NordicMade
	Author URI:   http://www.nordicmade.com
	Template:     savoy
	Version:      1.0
*/

/* Child theme CSS
--------------------------------------------------------------- */

/* ================================
   Кнопка "Купить на маркетплейсе"
================================ */
.marketplace-btn {
    padding: 15px 25px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.marketplace-btn:hover {
    background: #333;
}

#nm-wishlist .marketplace-btn {
    padding: 15px 25px !important;
    font-size: 16px !important;
}

/* Wishlist — мобильная версия: корректный центр и размер */
@media (max-width: 768px) {
    #nm-wishlist .marketplace-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;

        font-size: 0 !important;
        line-height: 1 !important;
        padding: 15px 25px !important;
    }

    #nm-wishlist .marketplace-btn::after {
        content: "Купить";
        font-size: 16px;
        line-height: 1;
        color: #fff;
        display: block;
    }
}

/* Overlay модального окна */
#marketplace-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;

}

/* Контент окна */
.marketplace-modal-content {
    background: #fff;
    width: 100%;
    max-width: 420px;
    padding: 30px;
    position: relative;

    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: nmFadeIn 0.25s ease-out;
    will-change: opacity, transform;

}

/* Крестик закрытия */
.marketplace-close {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 22px;
    line-height: 1;
    color: #000;
    cursor: pointer;
    transition: color 0.2s ease;
}

.marketplace-close:hover {
    color: #888;
}

/* Заголовок окна */
.marketplace-modal-content h3 {
    margin-bottom: 20px;
    text-align: center;
}

/* Кнопки маркетплейсов внутри модального окна */
.marketplace-links a {
    display: block;
    margin-bottom: 10px;
    padding: 5px 20px;
    text-align: center;
    text-decoration: none;
    border: 1px solid #282828;
    color: #ffffff;
    background: #282828;
    transition: all 0.2s ease;
}
.nm-btn-mail {
    padding: 15px 20px !important;
}

.marketplace-links a:hover {
    background: #333333;
    color: #ffffff;
}

/* Анимация появления окна */
@keyframes nmFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

#marketplace-modal {
    display: block;
}

#marketplace-modal .mfp-container {
    position: fixed;
    inset: 0;
}

.marketplace-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: calc(100% - 30px);
    max-width: 420px;

    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* Мобильная корректировка */
@media (max-width: 768px) {
    .marketplace-modal-content {
        max-height: calc(100vh - 30px);
    }
}

/* Скрываем стандартные кнопки Add to Cart и количество */
.single_add_to_cart_button,
.variations_form .quantity,
.single_variation_wrap .quantity {
    display: none !important;
}

/* ================================
   Advanced Linked Variations — Savoy style
================================ */

/* Контейнер */
.dsalv-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 !important;
}

/* Название группы атрибутов */
.dsalv-attribute-label {
    font-family: 'Roboto', sans-serif !important;
    font-size: 16px; /* подберите 13px или 14px по теме */
    font-weight: normal;
    margin-bottom: 10px;
    color: #282828; /* или цвет темы */
}
.dsalv-attribute {
    margin-bottom: 20px;
}

/* Общий стиль блока кнопки */
.dsalv-term {
    display: inline-flex;
    align-items: stretch;
    justify-content: stretch;
	min-width: 44px;
    font-family: 'Roboto', sans-serif !important;
    font-size: 16px; /* подберите 13px или 14px по теме */
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0 !important;
    border-radius: 10px !important;
}

/* Кнопка внутри */
.dsalv-term span,
.dsalv-term a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 10px 8px;
    min-width: 44px;
    font-family: 'Roboto', sans-serif !important;
    font-size: 14px; /* подберите 13px или 14px по теме */
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    border-radius: 10px !important;
}

/* Активная кнопка */
.dsalv-term.active span,
.dsalv-term.active a {
    background: #282828 !important;
    color: #fff !important;
    border: 1px solid #282828 !important;
    cursor: default;
}

/* Неактивные кнопки */
.dsalv-term:not(.active) span,
.dsalv-term:not(.active) a {
    background: #fff !important;
    color: #282828 !important;
    border: 1px solid #282828 !important;
}

/* Hover для неактивных */
.dsalv-term:not(.active) span:hover,
.dsalv-term:not(.active) a:hover {
    background: #666666 !important;
    color: #fff !important;
    border: 1px solid #666666 !important;
}

/* Убираем тултипы hint.css */
.dsalv-term.hint--top::before,
.dsalv-term.hint--top::after {
    display: none !important;
    content: none !important;
}

.dsalv-term.hint--top,
.dsalv-term.active.hint--top {
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}


/* Скругление Яндекс-Карты */
.ymaps-2-1-79-map {
    border-radius: 15px;
    overflow: hidden;
}
a[title="YaMaps — Яндекс.Карты для WordPress"] {
    display: none !important;
}

/* Выравнивание фона в баннерах по правому краю */
.small_banners_bg_right img{
    float: right;
    max-height: 100px;
}
/* Выравнивание фона в баннерах по левому краю */
.small_banners_bg_left img{
    float: left;
    max-height: 100px;
}
/* Выравнивание фона в баннерах по левому краю */
.small_banners_bg_mini img{
    float: left;
    max-height: 80px;
}


.txt_black {
    color: #000000;
}

.txt_line_height {
    color: #000000;
}
.button_width_100 a{
	width: 100%;
}
.footer_logos {
	padding-top: 5px;
}
.footer_logos li{
	width: 100%;
	height: 44px;
	border-radius: 10px;
	border: 1px solid #ffffff;
	display: flex !important;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px !important;
    opacity: 0.6;
	transition: opacity 0.25s ease;
}
.footer_logos li:hover{
    opacity: 1;
}
.footer_logos li a {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
}
.nm-footer-bar-logo {
	opacity: 0.6;
}

/* Плавная прокрутка вверх */
html {
  scroll-behavior: smooth;
}
























/* =====================================================
   Стили для страницы "Инструкция"
===================================================== */

/* ---------- BASE CONTAINER ---------- */

.br-custom .nm-single-product-summary-col {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}
.br-custom {
	border-bottom: 1px solid #e3e3e3;
}
.br-custom .nm-single-product-summary-col .summary.entry-summary .button{
    padding: 15px 25px;
    width: 100%;
    text-align: center;
    margin-top: 21px;
}
.br-custom .nm-single-product-summary-col .woocommerce-product-gallery__image img {
    	border-radius: 10px !important;
	}
.br-custom .entry-title{
	font-size: 26px;
	line-height: 1.2;
}

.br-button-instruction {
	margin-top: 50px;
}
.br-button-instruction-single {
	margin-bottom: 50px;
}
.br-button-instruction-single a {
	min-width: 140px;
	padding-left: 28px;
	padding-right: 28px;
}
.manual_icon img{
	border-radius: 0px !important;
}
.manual_heading_white h3{
    color: #fff !important;
}
.manual_heading_line_black {
	background: #282828;
	padding-top: 13px;
	padding-bottom: 11px;
	border-radius: 15px !important;
}
.manual_recomend {
	background: #eeeeee;
	border-radius: 15px !important;
	padding-top: 32px;
	padding-left: 15px !important;
	padding-right: 15px !important;
}
.manual_text {
	padding-left: 15px !important;
	padding-right: 15px !important;
}
.manual_image {
	padding-left: 50px !important;
	padding-right: 50px !important;
}
.manual_recomend_otstup {
	padding-left: 85px;
	margin-bottom: -75px; 
}



/* ---------- DESKTOP (40 / 60) ---------- */

@media (min-width: 992px) {

    .br-custom .nm-single-product-summary-col {
        display: flex;
        align-items: flex-start;
    }

    /* Left: image */
    .br-custom .nm-single-product-summary-col .woocommerce-product-gallery {
        width: 42%;
        box-sizing: border-box;
    }

    /* Right: summary */
    .br-custom .nm-single-product-summary-col .summary.entry-summary {
        width: 58%;
        box-sizing: border-box;
    }

    /* Inner summary columns */
    .br-custom .nm-single-product-summary-col .nm-product-summary-inner-col {
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;

    }
	.br-custom .nm-single-product-summary-col .woocommerce-product-gallery__image img {
    	max-width: 400px;
	}
	.br-custom {
	background: #eeeeee;
	}
	
}


/* ---------- MOBILE / TABLET ---------- */

@media (max-width: 1080px) {

    .br-custom .nm-single-product-summary-col {
        display: block;
        padding-left: 0;
        padding-right: 0;
    }

    .br-custom .nm-single-product-summary-col .woocommerce-product-gallery,
    .br-custom .nm-single-product-summary-col .summary.entry-summary {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    /* Content width limit */
    .br-custom .nm-single-product-summary-col .woocommerce-product-gallery__wrapper,
    .br-custom .nm-single-product-summary-col .summary.entry-summary {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
	.br-custom .nm-single-product-summary-col .woocommerce-product-gallery__image img {
    	max-width: 500px;
	}
	.br-custom .entry-title{
		margin-top: 49px;
	}

}

@media (max-width: 550px) {

    .br-custom .nm-single-product-summary-col .summary.entry-summary {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Content width limit */
    .br-custom .nm-single-product-summary-col .woocommerce-product-gallery__wrapper,
    .br-custom .nm-single-product-summary-col .summary.entry-summary {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
	.br-custom .nm-single-product-summary-col .woocommerce-product-gallery__image img {
    	max-width: 500px;
	}
}


/* ---------- IMAGE ALIGNMENT ---------- */

.br-custom .nm-single-product-summary-col .woocommerce-product-gallery__image img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    height: auto;
}


/* ---------- SPACING POLISH ---------- */

.br-custom .nm-single-product-summary-col .summary.entry-summary {
    margin-top: 0;
}

.br-custom .nm-single-product-summary-col .woocommerce-product-details__short-description {
    margin-top: 24px;
}


/* ---------- SHARE BLOCK ---------- */






.br-custom-related {
	border-top: 1px solid #e3e3e3;
	padding-top: 56px;
	padding-bottom: 19px;
}

.br-custom-related .nm-section-title {
	padding-bottom: 28px;
	font-size: 24px;
}

@media (max-width: 550px) {

.br-custom-related {
	padding-top: 42px;
	padding-bottom: 7px;
}


}




.br-custom-related .products {
    display: flex;
    flex-wrap: wrap;
}
@media (min-width: 751px) {
	.br-custom-related .product {
    	width: 25% !important;
    	float: left !important;
    	box-sizing: border-box;
	}
}
@media (max-width: 750px) {
	.br-custom-related .product {
    	width: 50% !important;
    	float: left !important;
    	box-sizing: border-box;
	}
}




























/* ===== Instructions Archive ===== */

.br-instruction-header {
	max-width: 1280px;
	margin: auto;
}

.br-instruction-breadcrumb {
	padding-top: 40px;
	padding-bottom: 10px;
	font-size: 18px;
}

.breadcrumb-item {
    cursor: pointer;
    color: #777777;
    transition: color 0.2s;
}
.breadcrumb-item:hover {
    color: #da2032;
}
.breadcrumb-item.active {
    color: #da2032;
    cursor: default;
}
.delimiter {
    color: #777777;
}






.br-instruction-status {
	width: 100%;
	max-width: 1220px;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 16px;
	font-size: 14px;
	text-align: center;
	padding: 0px 15px;
}

.br-instruction-button {
	width: 100%;
	max-width: 1220px;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 40px;
	padding: 0px 15px;
}

.br-instruction-button a {
	display: inline-block;
	width: 100%;
	font-size: 16px;
	text-align: center;
	padding: 16px 0px;
	color: #282828;
    transition: all 0.2s ease;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.br-instruction-button a:hover {
    color: #da2032;
}






.nm-instruction-title {
    padding-bottom: 16px;
    font-size: 26px;
    line-height: 1.2;
}

.nm-instruction-excerpt {
    padding-bottom: 20px;
    font-size: 16px;
}






.nm-instruction-item{
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

.nm-instruction-item .nm-row{
    display: flex;
}

.nm-instruction-item .col-xs-12 {
    float: left !important;
    box-sizing: border-box;
}
.nm-instruction-item .col-md-4 {
    width: 30%;
}
.nm-instruction-item .col-md-8 {
	padding-left: 20px;
    width: 70%;
}
.nm-instruction-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: auto;
    display: block;
    border-radius: 10px;
    border: 1px solid #eeeeee;
}
.nm-instruction-item.is-last {
    border-bottom: none !important;
}

/* Infinite load */
.nm-infinite-load-wrap {
    margin: 60px 0 0;
    text-align: center;
}





@media (max-width: 750px) {
	.nm-instruction-item .col-md-4 {
    	width: 40%;
	}
	.nm-instruction-item .col-md-8 {
    	width: 60%;
	}
}



@media (max-width: 550px) {
	
	.br-instruction-breadcrumb {
		padding-top: 25px;
	}

    /* === GRID контейнер === */
    #nm-instruction-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
        box-sizing: border-box;

        /* КЛЮЧЕВОЕ */
        grid-auto-rows: 1fr;
    }

    /* === Карточка === */    
    .nm-instruction-item {
    	padding: 15px 0;
    	border: none;
        /* КЛЮЧЕВОЕ */
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    /* Сбрасываем сетку темы */
    .nm-instruction-item .nm-row {
        display: flex;
        flex-direction: column;
        height: 100%;
        margin: 0;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100%;
        
    }
    
    .nm-instruction-item,
    .nm-instruction-image,
    .nm-instruction-image img {
        max-width: 100%;
        overflow: hidden;
    }
    /* === Изображение === */
    .nm-instruction-item .col-md-4 {
        width: 100%;
        padding: 0;
        margin-bottom: 10px;
    }

    .nm-instruction-image img {
        width: 100% !important;
        height: auto;
        display: block;
        border-radius: 10px;
        max-width: 100% !important; /* ВОТ ОН */        
        margin: 0 !important;
    }
    /* === Контент === */
    .nm-instruction-item .col-md-8 {
        width: 100%;
        padding: 0;

        /* КЛЮЧЕВОЕ */
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }

    /* === Заголовок === */
    .nm-instruction-title {
        font-size: 16px;
        line-height: 1.3;
        margin-bottom: 0px;
    }

    /* Скрываем описание */
    .nm-instruction-excerpt {
        display: none;
    }

    /* === Кнопка всегда снизу === */
    .nm-instruction-item .nm-btn {
        margin-top: auto;
        width: 100%;
        text-align: center;
        font-size: 14px;
        padding: 15px 0;
    }
}


/* =====================================================
   SINGLE INSTRUCTION — FIX IMAGE OVERFLOW (MOBILE)
===================================================== */
@media (max-width: 550px) {

    /* Убираем отрицательные отступы Savoy */
    .br-single-instruction-showcase .nm-row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Страховка от горизонтального скролла */
    .br-single-instruction-showcase {
        overflow-x: hidden;
    }

    /* Галерея */
    .br-single-instruction-showcase .woocommerce-product-gallery {
        width: 100%;
        max-width: 100%;
        margin: 0 auto 20px;
    }

    .br-single-instruction-showcase .woocommerce-product-gallery img {
        width: 100%;
        height: auto;
        display: block;
    }
}






















/* Load more button (Savoy-like) */
.nm-load-more-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Текст */
.nm-load-more-text {
    transition: opacity 0.2s ease;
}

/* Спиннер */
.nm-load-more-spinner {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    margin: -10px 0 0 -10px;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0,0,0,0);
    border-top-color: #DA2032;
    border-left-color: rgba(218, 32, 50, 1);
    border-radius: 50%;
    animation: nm-spin 0.6s linear infinite;
}

/* Состояние загрузки */
.nm-load-more-btn.loading .nm-load-more-text {
    opacity: 0;
}

.nm-load-more-btn.loading .nm-load-more-spinner {
    display: inline-block;
}

/* Анимация */
@keyframes nm-spin {
    to { transform: rotate(360deg); }
}