/* ============================================================
   МОДУЛЬ КАЛЬКУЛЯТОРА ТРЕЙД-ИН
   Основные стили для модуля mod_tradein_calc
   ============================================================ */

/* ----- Подключаем иконки через Font Awesome (уже загружен в шаблоне) ----- */
.ic {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    font-style: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Иконки из Font Awesome 6 */
.ic-chevron-right:before {
    content: "\f054" !important; /* fa-chevron-right */
}
.ic-chevron-down:before {
    content: "\f078" !important; /* fa-chevron-down */
}
.ic-chevron-left:before {
    content: "\f053" !important; /* fa-chevron-left */
}
.ic-chevron-up:before {
    content: "\f077" !important; /* fa-chevron-up */
}
.ic-close:before {
    content: "\f00d" !important; /* fa-times / fa-xmark */
}
.ic-search:before {
    content: "\f002" !important; /* fa-search */
}
.ic-check:before {
    content: "\f00c" !important; /* fa-check */
}
.ic-heart:before {
    content: "\f004" !important; /* fa-heart */
}
.ic-heart-full:before {
    content: "\f004" !important; /* fa-heart */
}
.ic-cart:before {
    content: "\f07a" !important; /* fa-shopping-cart */
}
.ic-user:before {
    content: "\f007" !important; /* fa-user */
}
.ic-home:before {
    content: "\f015" !important; /* fa-home */
}
.ic-phone:before {
    content: "\f095" !important; /* fa-phone */
}
.ic-mail:before {
    content: "\f0e0" !important; /* fa-envelope */
}
.ic-mark:before {
    content: "\f041" !important; /* fa-map-marker */
}
.ic-city:before {
    content: "\f64f" !important; /* fa-city */
}
.ic-telegram:before {
    content: "\f2c6" !important; /* fa-telegram (brands) */
    font-family: 'Font Awesome 6 Brands' !important;
}
.ic-whatsapp:before {
    content: "\f232" !important; /* fa-whatsapp (brands) */
    font-family: 'Font Awesome 6 Brands' !important;
}
.ic-instagram:before {
    content: "\f16d" !important; /* fa-instagram (brands) */
    font-family: 'Font Awesome 6 Brands' !important;
}
.ic-facebook:before {
    content: "\f09a" !important; /* fa-facebook (brands) */
    font-family: 'Font Awesome 6 Brands' !important;
}
.ic-bars:before {
    content: "\f0c9" !important; /* fa-bars */
}
.ic-plus:before {
    content: "\f067" !important; /* fa-plus */
}
.ic-minus:before {
    content: "\f068" !important; /* fa-minus */
}

/* ----- Общие стили контейнера ----- */
.trade-calc-container {
    margin: 20px 0;
}

.trade-calc__wrap {
    display: flex;
    align-items: flex-start;
    padding: 48px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 35px rgba(0, 0, 0, 0.07);
}

.trade-calc__form {
    flex: 1 0 0;
}

/* ----- Заголовок ----- */
.trade-calc__form-title {
    margin-bottom: 20px;
}

.trade-calc__form-title h3._big {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.trade-calc__form-title p {
    line-height: 1.4;
    font-size: 17px;
    color: #7f7f7f;
}

/* ----- Выпадающий список ----- */
.trade-dropdown {
    position: relative;
    margin-bottom: 32px;
}

.trade-dropdown._field .trade-dropdown__head {
    position: relative;
    height: 56px;
}

.trade-dropdown._field .trade-dropdown__head > a {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0 40px 0 19px;
    border: 1px solid #ededed;
    border-radius: 8px;
    width: 100%;
    height: 100%;
    line-height: 54px;
    font-size: 17px;
    color: #000;
    text-decoration: none;
    transition: border-color 0.3s;
}

.trade-dropdown._field .trade-dropdown__head > a:after {
    position: absolute;
    top: 50%;
    right: 19px;
    margin-top: -0.5em;
    content: "\f078";
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    font-size: 12px;
}

.trade-dropdown._field .trade-dropdown__head > a:hover {
    border-color: #000;
}

.trade-dropdown__wrap {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: tradeSlideDown 0.25s ease;
}

@keyframes tradeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trade-dropdown__wrap:before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    margin-left: -8px;
    border: 8px solid transparent;
    border-bottom: 10px solid #fff;
}

/* ----- Табы брендов ----- */
.trade-dropdown__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 30px;
}

.trade-dropdown__tab {
    cursor: pointer;
    display: inline-block;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
}

.trade-dropdown__tab:hover {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
    color: #212529;
}

.trade-dropdown__tab.active {
    box-shadow: inset 0 0 0 2px #000;
}

/* ----- Список моделей ----- */
.trade-dropdown__lists {
    overflow: auto;
    max-height: 250px;
    font-size: 15px;
}

.trade-dropdown__lists ul {
    margin: 0;
    padding: 0 30px 30px;
    list-style: none;
}

.trade-dropdown__lists ul:nth-child(n+2) {
    display: none;
}

.trade-dropdown__lists li {
    margin-bottom: 17px;
}

.trade-dropdown__lists li:last-child {
    margin-bottom: 0;
}

.trade-dropdown__lists li .model-item {
    cursor: pointer;
    display: block;
    transition: 0.3s;
    color: #212529;
}

.trade-dropdown__lists li .model-item:hover {
    color: var(--main-color, #e00d2d);
}

/* ----- Скроллбар ----- */
.trade-dropdown__lists::-webkit-scrollbar {
    width: 6px;
}
.trade-dropdown__lists::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 3px;
}
.trade-dropdown__lists::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 3px;
}
.trade-dropdown__lists::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* ----- Блок с опциями ----- */
.trade-dropdown__choices {
    margin-top: 30px;
}

.trade-dropdown__choices h3._big {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a1a2e;
}

/* ----- Опция (характеристика) ----- */
.product-choice {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.product-choice:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.product-choice__head {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 13px;
    color: #212529;
}

.product-choice__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-choice__grid label {
    cursor: pointer;
    display: inline-block;
}

.product-choice__grid label input[type="radio"] {
    display: none;
}

.product-choice__grid label span {
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    background: #fff;
    font-weight: 500;
    font-size: 13px;
    color: #000;
    transition: 0.15s;
}

.product-choice__grid label span:hover {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.product-choice__grid label:has(input:checked) span {
    box-shadow: inset 0 0 0 2px #000;
}

.product-choice__grid label .option-price {
    color: #198754;
    font-weight: 500;
    font-size: 13px;
	display: none;
}

/* ----- Анимация ----- */
.product-choice {
    animation: tradeFadeIn 0.4s ease;
}

@keyframes tradeFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- Блок с ценой (всегда виден, темный) ----- */
.trade-calc__box {
    flex: none;
    overflow: hidden;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 384px;
    min-height: 380px;
    margin-left: 72px;
    padding: 28px 32px 32px;
    border-radius: 12px;
    background: #000;
    line-height: 1.4;
    color: #fff;
}

.trade-calc__box:before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -133px;
    left: -88px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(50% 50% at 50% 50%, #434343 0, #000 100%);
}

.trade-calc__box-top {
    width: 100%;
    max-width: 240px;
    opacity: 0.9;
    font-size: 14px;
    margin-bottom: 8px;
}

.trade-calc__box-head {
    margin-bottom: 30px;
    line-height: 1;
    font-weight: 500;
    font-size: 48px;
}

.trade-calc__box-head span {
    color: #0d6efd;
}

.trade-calc__box-btn {
    margin-bottom: 24px;
}

.trade-calc__box-btn .btn {
    min-width: 250px;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    background: #0d6efd;
    color: #fff;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.trade-calc__box-btn .btn:hover {
    background: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.35);
}

.trade-calc__box-btn .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.trade-calc__box-btn .btn._full {
    width: 100%;
}

.trade-calc__box-btn .btn .ic-chevron-right {
    margin-left: 8px;
}

.trade-calc__box-descr {
    opacity: 0.5;
    margin: auto 0 0;
    font-size: 13px;
}

/* ----- Модальное окно ----- */
.trade-modal-summary {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.trade-modal-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 15px;
    border-bottom: 1px solid #f1f3f5;
}

.trade-modal-summary__row:last-child {
    border-bottom: none;
}

.trade-modal-summary__row._total {
    border-top: 2px solid #dee2e6;
    padding-top: 12px;
    margin-top: 6px;
    font-weight: 700;
    font-size: 18px;
    color: #0d6efd;
    border-bottom: none;
}

.trade-modal-summary__label {
    color: #6c757d;
    font-weight: 500;
}

.trade-modal-summary__value {
    color: #212529;
    text-align: right;
    font-weight: 500;
}

/* ----- Стили для полей в форме ConvertForms ----- */
.trade-order__el {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.trade-order__el-info {
    list-style: none;
    margin: 0;
    padding: 0;
}

.trade-order__el-info li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f1f3f5;
    font-size: 15px;
}

.trade-order__el-info li:last-child {
    border-bottom: none;
}

.trade-order__el-info li span {
    color: #6c757d;
    font-weight: 500;
}

.trade-order__el-info li strong {
    color: #212529;
    font-weight: 600;
}

.trade-order__price-row {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border-radius: 10px;
    padding: 20px 25px;
    text-align: center;
    color: #ffffff;
}

.trade-order__price-head {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 400;
}

.trade-order__price-count {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

@media (max-width: 1199px) {
    .trade-calc__wrap {
        padding: 40px;
    }
    .trade-calc__box {
        margin-left: 40px;
    }
    .trade-order__price-count {
        font-size: 28px;
    }
}

@media (max-width: 991px) {
    .trade-calc__wrap {
        display: block;
        padding: 0;
        border-radius: 12px;
        box-shadow: none;
    }
    .trade-calc__form {
        padding: 32px;
    }
    .trade-calc__box {
        margin: 0;
        width: 100%;
        min-height: auto;
        border-radius: 0 0 12px 12px;
    }
    .trade-calc__box-head {
        font-size: 30px;
    }
}

@media (max-width: 767px) {
    .trade-calc__form {
        padding: 24px;
    }
    .trade-calc__box {
        padding: 24px;
    }
    .trade-calc__box-head {
        font-size: 26px;
        margin-bottom: 20px;
    }
    .trade-dropdown__tabs {
        padding: 20px;
    }
    .trade-dropdown__lists ul {
        padding: 0 20px 20px;
    }
    .trade-dropdown__tab {
        padding: 8px 12px;
        font-size: 12px;
    }
    .product-choice__grid label span {
        padding: 8px 12px;
        font-size: 12px;
    }
    .trade-order__el-info li {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 8px 0;
    }
    .trade-order__price-count {
        font-size: 24px;
    }
    .trade-modal-summary__row {
        font-size: 14px;
        flex-wrap: wrap;
    }
    .trade-modal-summary__row._total {
        font-size: 16px;
    }
}

@media (max-width: 575px) {
    .trade-calc__form {
        padding: 20px;
    }
    .trade-calc__form-title h3._big {
        font-size: 20px;
    }
    .trade-calc__form-title p {
        font-size: 15px;
    }
    .trade-calc__box {
        padding: 20px;
    }
    .trade-calc__box-head {
        font-size: 22px;
    }
    .trade-calc__box-btn .btn {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 0;
    }
    .trade-dropdown__tabs {
        gap: 6px;
        padding: 16px;
    }
    .trade-dropdown__tab {
        font-size: 11px;
        padding: 6px 10px;
    }
    .trade-dropdown__lists {
        font-size: 14px;
    }
    .product-choice__grid label span {
        padding: 6px 10px;
        font-size: 12px;
    }
    .trade-order__price-count {
        font-size: 20px;
    }
}

/* ============================================================
   ДОПОЛНИТЕЛЬНЫЕ СТИЛИ (исправление конфликтов с Bootstrap)
   ============================================================ */

/* Переопределяем стандартный dropdown-toggle от Bootstrap */
.trade-dropdown-toggle {
    cursor: pointer !important;
    text-decoration: none !important;
}

.trade-dropdown-toggle:after {
    display: none !important;
}

/* Правильное отображение стрелки для нашего выпадающего списка */
.trade-dropdown._field .trade-dropdown__head > a.trade-dropdown-toggle {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0 40px 0 19px;
    border: 1px solid #ededed;
    border-radius: 8px;
    width: 100%;
    height: 100%;
    line-height: 54px;
    font-size: 17px;
    color: #000;
    text-decoration: none;
    transition: border-color 0.3s;
}

.trade-dropdown._field .trade-dropdown__head > a.trade-dropdown-toggle:after {
    position: absolute;
    top: 50%;
    right: 19px;
    margin-top: -0.5em;
    content: "\f078";
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    font-size: 17px;
    display: inline-block !important;
    border: none !important;
	line-height: 17px;
}

.trade-dropdown._field .trade-dropdown__head > a.trade-dropdown-toggle:hover {
    border-color: #000;
}
/* ----- Стили для двухшаговой формы в модальном окне ----- */
.trade-order__step {
    margin-bottom: 16px;
    font-size: 15px;
    color: #7f7f7f;
}

.trade-order__el {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 16px;
    padding: 20px 23px;
    border: 1px solid #ededed;
    border-radius: 12px;
}

.trade-order__el-info {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    width: 100%;
}

.trade-order__el-info li:nth-child(n+2) {
    margin-top: 14px;
}

.trade-order__el-info li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f1f3f5;
}

.trade-order__el-info li:last-child {
    border-bottom: none;
}

.trade-order__el-info span {
    color: #6c757d;
    font-weight: 500;
}

.trade-order__el-info strong {
    color: #212529;
    font-weight: 600;
}

.trade-order__price {
    margin-bottom: 16px;
    border-radius: 12px;
    background: #f9f9f9;
}

.trade-order__price-row {
    padding: 20px 24px;
    border-bottom: 4px solid #fff;
}

.trade-order__price-row:first-child {
    padding-top: 23px;
}

.trade-order__price-row:last-child {
    padding-bottom: 23px;
    border-bottom: none;
}

.trade-order__price-row._descr {
    line-height: 1.35;
    font-size: 13px;
    /*color: #7f7f7f;*/
	color: #fff;
}

.trade-order__price-head {
    opacity: 0.5;
    margin-bottom: 4px;
    font-size: 15px;
}

.trade-order__price-count {
    font-weight: 700;
    font-size: 32px;
}

.trade-order__next {
    cursor: pointer;
    margin-top: 20px;
}

.trade-order__next.btn._h-big._full {
  cursor: pointer;
  display: inline-block;
  position: relative;
  padding: 18px 23px;
  min-width: 100%;
  background: #000;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: center;
  line-height: 18px;
  font-weight: 500;
  font-size: 15px;
  color: #fff;
  -webkit-transition: .3s;
  transition: .3s;
  padding-left: 15px;
  padding-right: 15px;
}

.trade-order__next.btn._h-big._full:hover {
  background-color: #323234;
  color: #fff;
}

[id^="convertforms-container-tradecalc_"] {
  display: flex;
  justify-content: center;
}



.trade-order__back {
    cursor: pointer;
    display: inline-block;
    margin-bottom: 20px;
}

/* Скрываем поля с HTML в форме ConvertForms */
#convertforms-container-<?php echo $uniqueId; ?> input[name="cf[trade_order_el_info]"],
#convertforms-container-<?php echo $uniqueId; ?> textarea[name="cf[trade_order_el_info]"],
#convertforms-container-<?php echo $uniqueId; ?> input[name="cf[trade_order_price_info]"],
#convertforms-container-<?php echo $uniqueId; ?> textarea[name="cf[trade_order_price_info]"] {
    display: none !important;
}
/* ============================================================
   КНОПКА "ВЕРНУТЬСЯ НАЗАД"
   ============================================================ */
[id^="trade-step2-back-tradecalc_"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  color: #666;
  transition: color .3s;
  text-decoration: none;
}

[id^="trade-step2-back-tradecalc_"]::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f060"; /* fa-arrow-left */
  font-size: 14px;
  transition: transform .3s;
}

[id^="trade-step2-back-tradecalc_"]:hover {
  color: #000;
}

[id^="trade-step2-back-tradecalc_"]:hover::before {
  transform: translateX(-3px);
}

/* ============================================================
   КНОПКА "ПРОДОЛЖИТЬ" (ШАГ 1)
   ============================================================ */
[id^="trade-step1-btn-tradecalc_"] {
  cursor: pointer;
  display: inline-block;
  position: relative;
  padding: 18px 23px;
  min-width: 100%;
  background: #000;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: center;
  line-height: 18px;
  font-weight: 500;
  font-size: 15px;
  color: #fff;
  -webkit-transition: .3s;
  transition: .3s;
  padding-left: 15px;
  padding-right: 15px;
}

[id^="trade-step1-btn-tradecalc_"]:hover {
  background-color: #323234;
  color: #fff;
}

/* ============================================================
   КОНТЕЙНЕР CONVERTFORMS
   ============================================================ */
[id^="convertforms-container-tradecalc_"] {
  display: flex;
  justify-content: center;
}

/* ============================================================
   КНОПКА "ОСТАВИТЬ ЗАЯВКУ" (ОСНОВНАЯ)
   ============================================================ */
/* Если у кнопки есть ID, начинающийся с tradein-open-btn */
[id^="tradein-open-btn"] {
  /* Стили для основной кнопки */
}

/* Или если это кнопка с классом */
.btn._main._big._full {
  /* Стили */
}

/* ============================================================
   ДОПОЛНИТЕЛЬНО: ФОРМА ВНУТРИ КОНТЕЙНЕРА
   ============================================================ */
[id^="convertforms-container-tradecalc_"] form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

[id^="convertforms-container-tradecalc_"] form .form-group {
  width: 100%;
}

[id^="convertforms-container-tradecalc_"] form .btn {
  min-width: 200px;
}
.popup-shop__main {
  padding: 16px 20px 20px;
  border-radius: 8px;
  background: #f6f6f6;
}
 
.popup-shop {
  font-size: 15px;
}







 

/* Создаем свой бэкдроп через ::before у body */
.modal-open .modal.show::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.modal.show .modal-dialog {
    z-index: 1051 !important;
    position: relative !important;
}

.modal.show .modal-content {
    z-index: 1052 !important;
    position: relative !important;
}














