/* ====== Базовые стили навигации ====== */
.nav { display: flex; flex-wrap: wrap; padding-left: 0; margin-bottom: 0; list-style: none; }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { color: #495057; background-color: #ffffff; border-color: #dee2e6 #dee2e6 #ffffff; }
.nav-link { display: block; padding: 0.5rem 1rem; transition: all 0.3s ease; }
.nav-link:hover { background-color: rgba(0,0,0,0.05); }
.nav-link.active { position: relative; }

/* Анимация подчеркивания активной вкладки */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: currentColor;
    animation: tabSlide 0.3s ease;
}
@keyframes tabSlide {
    from { width: 0; }
    to { width: 100%; }
}

/* ====== Стили для адаптивности (d-lg-none, d-lg-block) ====== */
.d-lg-none { display: none !important; }
.d-lg-block { display: block !important; padding-top: 15px; }
@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
}

/* ====== Каталог / Детальная страница ====== */
.catalog-detail__slider { margin: 0; max-width: 100% !important; }
.catalog-detail__header { padding-bottom: 15px; }
.catalog-detail__inner .prop-table > div:nth-child(odd) { background-color: #fcfcfe; margin: 0; padding: 15px; }
.catalog-detail__inner > nav { border-bottom: 1px solid #dee2e6; }

.label { display: inline; padding: .2em .6em .3em; font-size: 75%; font-weight: bold; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25em; }

.tab-content > .tab-pane { display: none; }
.tab-pane { animation: fadeIn 0.5s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.show { display: block !important; }

/* ====== Таблицы свойств ====== */
.my-prop-table_code span { color: #79b715; font-weight: 700; }
.my-prop-table_code p { font-size: 13px; margin: 0 !important; }
.my-col h3 { font-weight: 600; text-align: center; text-transform: uppercase; margin-bottom: 15px; }
.my-hr-catalog-element { width: 50%; text-align: center; height: 1px; color: #79b715 !important; margin-bottom: 15px; border: none; background-color: #79b715 !important; }

a:not([href]):not([tabindex]) { color: inherit; text-decoration: none; }

.div-title__catalog > .title-block__10 { font-size: 1.2rem; }
.d-lg-block > br { display: none; }
.d-lg-block > h3 { font-size: 14px; margin: 0; line-height: 20px; }

.chek_compare { visibility: hidden; }

/* ====== Кнопки ====== */
.btn-buy, .button_compare_element {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn-buy:hover, .button_compare_element:hover {
    filter: brightness(0.85);
    transform: translateY(-1px);
}
.btn-buy:active, .button_compare_element:active {
    transform: translateY(1px);
    filter: brightness(0.8);
}
.btn-buy::after, .button_compare_element::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}
.btn-buy:focus:not(:active)::after,
.button_compare_element:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}
@keyframes ripple {
    0% { transform: scale(0, 0); opacity: 0.5; }
    20% { transform: scale(25, 25); opacity: 0.3; }
    100% { transform: scale(50, 50); opacity: 0; }
}

/* ====== Слайдер ====== */
.slider-for img, .slider-nav img {
    transition: transform 0.3s ease;
}
.slider-for img:hover, .slider-nav img:hover {
    transform: scale(1.02);
}
.slider-nav .slick-slide img {
    max-width: 87%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ====== КАЛЬКУЛЯТОР */

/* --- Общий контейнер --- */
.form-calc__box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
}

/* --- Заголовок (общий стиль) --- */
.form-calc__box > div:first-child {
    font-weight: 600;
    font-size: 14px;
    min-width: 120px;
    padding-left: 30px;
    position: relative;
}

/* ====== ИКОНКА КОРОБКИ (только для Упаковок) ====== */
.form-calc__box > div:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: url('/local/templates/profparket_10.2019/images/calc_p.png') no-repeat center/contain;
    display: block;
}

/* ====== Стили для Площади (иконка паркета) ====== */
.form-calc__box--m2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
}

.form-calc__box--m2 > div:first-child {
    position: relative;          /* Чтобы иконка позиционировалась */
    padding-left: 30px;          /* Отступ под иконку */
    font-weight: 600;
    font-size: 14px;
    min-width: 120px;
}

.form-calc__box--m2 > div:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: url('/local/templates/profparket_10.2019/images/calc_s.png') no-repeat center/contain;
    display: block;
}

/* ====== ПОЛЯ ВВОДА (спиннеры) */
.spinner-group {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px;
    background: #fff;
    position: relative;
    width: 100%;
    max-width: 180px;
    background-image: none !important;
    padding-left: 0 !important;
}

.spinner-label {
    padding: 0 8px;
    color: #666;
    font-size: 13px;
    border-right: 1px solid #ddd;
}

/* Общие стили для инпутов */
#calc-up-input, #calc-m2-input, #calc-m2-input-first {
    border: none;
    text-align: center;
    width: 50px;
    height: 30px;
    outline: none;
    font-size: 15px;
}

.spinner-btns {
    display: flex;
    flex-direction: column;
    border-left: 1px solid #ddd;
}

.spinner-btns button {
    border: none;
    background: none;
    padding: 0 6px;
    font-size: 10px;
    cursor: pointer;
    color: #666;
    height: 15px;
    line-height: 1;
}

.spinner-btns button:hover {
    color: #79b715;
}

/* ====== НОВЫЕ СТИЛИ ДЛЯ РАЗДЕЛЬНЫХ ПОЛЕЙ ПЛОЩАДИ ====== */
.form-calc__box--m2 .spinner-group {
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 5px;
    padding-right: 5px;
}

/* Выравниваем размер "м²" как у "уп." */
.form-calc__box--m2 .spinner-label {
    font-size: 13px;           /* такой же, как у Упаковок */
    padding: 0 8px;
    color: #666;
    border-right: 1px solid #ddd;
}

#calc-m2-input-first {
    border: none;
    outline: none;
    width: 35px !important;   /* уменьшили ширину до 35px */
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    background: #f0f0f0;
    border-radius: 3px;
    padding: 2px 5px;
    margin-left: 4px;
    margin-right: 4px;
}

#calc-m2-second-display {
    color: #888;
    font-size: 14px;
    padding: 0 5px;
}

/* ====== ЗАПАС НА ПОДРЕЗКУ ====== */
.form-calc__podrez {
    padding: 10px 0;
    font-size: 13px;
}
.form-calc__podrez label {
    margin-right: 15px;
    cursor: pointer;
}
.form-calc__podrez input[type="radio"] {
    margin-right: 3px;
}

/* ====== ИТОГОВАЯ ЦЕНА ====== */
.form-calc__itog {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.form-calc__itog .price_new {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.form-calc__itog-summ {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}
.form-calc__itog-summ span {
    color: #333;
}

/* ====== КНОПКИ В КАЛЬКУЛЯТОРЕ ====== */
.btn-buy, .button_compare_element {
    padding: 10px 20px;
    background-color: #79b715;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 5px;
}
.btn-buy:hover {
    background-color: #6aa312;
}
.button_compare_element {
    background-color: #5a5a5a;
}
.button_compare_element:hover {
    background-color: #444;
}
