.bibnet_fly_cart

{
display:block;
visibility: hidden;
}
/**/
 .main_content table td, .main_content table th
  {
    padding: 5px;
  }

  .card_body
  {
    background: #d7dde1
  }
  .button_s
  {
    background: #FFCC00;
background: linear-gradient(180deg,rgba(255, 204, 0, 1) 0%, rgba(251, 168, 0, 1) 100%);
color:#000
  }

  .form-check-input:checked
  {
  border-color:  rgba(251, 168, 0, 1);
  background-color: #FFCC00;
  }
/* === Форма оформления заказа === */
/* === Блок согласия с раскрывающимся текстом === */
.checkout-bottom {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.cart-agree-wrap {
    max-width: 600px;
    flex: 1;
}

.cart-agree-checkbox {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.cart-agree-checkbox input {
    margin-top: 4px;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    accent-color: #c00;
    cursor: pointer;
}

.cart-agree-checkbox label {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
    line-height: 1.4;
}

.cart-agree-text-wrapper {
    padding-left: 26px; /* выравнивание под текстом чекбокса */
}

/* Свернутый текст: показываем только 2 строки */
.cart-agree-text {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    position: relative;
}

.cart-agree-text.is-collapsed {
    max-height: 36px; /* примерно 2 строки */
    overflow: hidden;
}

/* Градиентная затухающая маска внизу свернутого текста */
.cart-agree-text.is-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
}

.cart-agree-text.is-expanded {
    max-height: 1000px; /* достаточно большое значение для плавного раскрытия */
}

/* Кнопка "Читать полностью" */
.cart-agree-toggle {
    background: none;
    border: none;
    padding: 0;
    margin-top: 4px;
    font-size: 12px;
    color: #c00;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.15s;
}

.cart-agree-toggle:hover {
    color: #a00;
    text-decoration: none;
}

/* Контакты */
.checkout-contacts {
    font-size: 12px;
    color: #888;
    line-height: 1.6;
    text-align: right;
    min-width: 250px;
}
.checkout-contacts strong {
    color: #555;
}

 /* Стили для автокомплита */
#partname_results .list-group-item {
    border: none;
    border-bottom: 1px solid #eee;
    padding: 12px 15px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.1s;
}
#partname_results .list-group-item:last-child {
    border-bottom: none;
}
#partname_results .list-group-item:hover,
#partname_results .list-group-item.active {
    background-color: #f8f9fa;
    color: #000;
}
/* Подсветка найденного текста (желтый фон) */
#partname_results mark {
    background-color: #ffe066;
    color: inherit;
    padding: 0;
    font-weight: 600;
}
/* Стили для карточек запчастей */
.part-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.part-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}
.part-img-wrapper {
    position: relative;
    height: 200px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.part-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Картинка заполняет блок, обрезая лишнее */
    transition: transform 0.3s ease;
}
.part-card:hover .part-img-wrapper img {
    transform: scale(1.05); /* Легкий зум при наведении */
}
.part-price-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ffc107;
    color: #000;
    font-weight: 800;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.part-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Ограничиваем текст двумя строками */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    height: 40px;
}
.part-title:hover {
    color: #0d6efd;
}
.part-specs {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.5;
}
@media (max-width: 991px) {
    .checkout-bottom {
        flex-direction: column;
    }
    .checkout-contacts {
        text-align: left;
        min-width: auto;
    }
}
.cart-checkout {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 28px;
    margin-top: 20px;
}

.cart-checkout-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

/* Левая часть: поля */
.checkout-fields .form-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.checkout-fields .form-control {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.checkout-fields .form-control:focus {
    border-color: #c00;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
    outline: none;
}

/* Правая часть: панель итога */
.checkout-summary-box {
    background: #f9fafb;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 20px;
    position: sticky;
    top: 20px;
}

.checkout-summary-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 10px;
}

.checkout-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    padding-top: 14px;
    margin-top: 14px;
    margin-bottom: 16px;
    border-top: 1px solid #e5e5e5;
}

/* Кнопка оформления */
.btn-checkout {
    display: block;
    width: 100%;
    padding: 14px 18px;
    background: #FFCC00;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-checkout:hover {
    background: #FFD633;
}

/* Нижняя часть: согласие и контакты */
.checkout-bottom {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.checkout-bottom .cart-agree {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    max-width: 600px;
}

.checkout-bottom .cart-agree input {
    margin-top: 3px;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    accent-color: #c00;
}

.checkout-contacts {
    font-size: 12px;
    color: #888;
    line-height: 1.6;
    text-align: right;
    min-width: 250px;
}
.checkout-contacts strong {
    color: #555;
}

/* Адаптив */
@media (max-width: 991px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    .checkout-summary-box {
        position: static;
    }
    .checkout-bottom {
        flex-direction: column;
    }
    .checkout-contacts {
        text-align: left;
    }
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 4px;
    background: transparent;
    border: none !important; /* на всякий случай перекрываем bootstrap-стили */
    display: block;
}
/* === Список товаров === */
.cart-page-body {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    margin-bottom: 24px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}
.cart-item-row:last-child {
    border-bottom: none;
}
.cart-item-row:hover {
    background: #fafbfc;
}

/* Левая часть (фото + инфо) */
.cart-item-main {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}
.cart-item-img-link {
    flex: 0 0 auto;
}
.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #f0f0f0;
}

.cart-item-info {
    min-width: 0;
}

/* Бейджи */
.cart-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-red { background: #ff3b5c; }
.badge-green { background: #00b341; }

.cart-item-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.3;
}

.cart-item-discount {
    font-size: 13px;
    color: #8a95a1;
}

/* Центральная часть (Количество) */
.cart-item-qty {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 140px;
    flex: 0 0 auto;
}

.qty-btn {
    width: 32px;
    height: 32px;
    background: #f4f4f4;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.qty-btn:hover { background: #e5e5e5; }

.qty-input {
    width: 40px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    background: transparent;
    outline: none;
}

.qty-price-per-unit {
    width: 100%;
    text-align: center;
    font-size: 11px;
    color: #8a95a1;
    margin-top: 4px;
}

/* Правая часть (Цены и действия) */
.cart-item-pricing {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    flex: 0 0 auto;
    width: 280px;
}

.cart-item-price-wrap {
    text-align: right;
    min-width: 100px;
}

.cart-item-price {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.1;
}

.cart-item-old-price {
    font-size: 12px;
    color: #a0aab2;
    text-decoration: line-through;
    margin-top: 2px;
}

.cart-item-discount-badge {
    display: inline-block;
    background: #ff3b5c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
}

.cart-item-bonus {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 12px;
    color: #1a1a1a;
    margin-top: 6px;
}

/* Иконки действий */
.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s;
}
.action-btn:hover { opacity: 0.7; }

/* === Адаптив === */
@media (max-width: 991px) {
    .cart-item-row {
        flex-wrap: wrap;
        gap: 16px;
    }
    .cart-item-main { width: 100%; }
    .cart-item-qty { width: auto; margin-right: auto; }
    .cart-item-pricing { width: 100%; justify-content: space-between; }
}

/* Остальные стили (cart-footer, cart-checkout и т.д. оставляем из предыдущего ответа) */
        /* Кастомные стили для корзины */
        .cart-dropdown {
            width: 380px;
            border: none;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
            padding: 0;
            overflow: hidden;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            background-color: #fff;
        }

        .cart-body {
            padding: 20px;
        }

        /* Стили для товара */
        .cart-item {
            display: flex;
            margin-bottom: 20px;
            position: relative;
        }

        .cart-item-img {
            width: 120px;
            height: 120px;
            object-fit: contain;
            margin-right: 15px;
            background-color: #f8f9fa; /* Легкий фон для картинки */
            border-radius: 4px;
        }

        .cart-item-info {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }

        .cart-item-price {
            font-size: 16px;
            font-weight: 700;
            color: #333;
            line-height: 1.2;
            margin-bottom: 4px;
        }

        .old-price {
            font-size: 13px;
            color: #999;
            text-decoration: line-through;
            font-weight: normal;
            margin-left: 8px;
        }

        .bonus-badge {
            font-size: 12px;
            color: #2e9e44; /* Зеленый цвет с сайта */
            display: flex;
            align-items: center;
            margin-bottom: 4px;
            font-weight: 600;
        }

        .bonus-badge i {
            font-size: 14px;
            margin-right: 4px;
        }

        .cart-item-title {
            font-size: 13px;
            line-height: 1.4;
            color: #333;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-top: 2px;
        }

        /* Итоговая секция */
        .cart-footer {
            padding: 15px 20px 20px;
            background-color: #fff;
            border-top: 1px solid #eee;
        }

        .total-row {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 15px;
        }

        .total-label {
            font-size: 20px;
            font-weight: 700;
            color: #333;
        }

        .total-amount {
            text-align: right;
        }

        .total-price {
            font-size: 24px;
            font-weight: 700;
            color: #333;
            line-height: 1.2;
        }

        .total-bonus {
            font-size: 13px;
            color: #2e9e44;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            font-weight: 600;
        }

        .total-bonus i {
            font-size: 14px;
            margin-right: 4px;
        }

        /* Красная кнопка */
        .btn-checkout {
            background-color: #FFCC00; /* Красный цвет */
            border-color: #CCA300;
            color: #fff;
            font-weight: 700;
            font-size: 16px;
            padding: 12px;
            width: 100%;
            border-radius: 8px;
            transition: background-color 0.2s;
        }

        .btn-checkout:hover {
            background-color: #FFDE5C;
            border-color: #FFCC00;
            color: #fff;
        }

        /* Убираем стрелку у выпадающего меню */
        .dropdown-menu::before {
            display: none;
        }

.cart-item {
    position: relative;
    overflow: hidden; /* чтобы кнопка не вылезала за пределы карточки */
}

/* Кнопка удаления: по умолчанию невидима и не кликабельна */
.cart-item-remove {
    position: absolute;
    top: 6px;
    right: 6px;

    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;      /* не ловит клики, пока скрыта */
    transition: opacity .15s ease, visibility .15s ease;
}

/* Появление при наведении на карточку */
.cart-item:hover .cart-item-remove,
.cart-item:focus-within .cart-item-remove {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;      /* клики ловит только сама кнопка */
}

/* Наведение на саму кнопку — чуть ярче */
.cart-item-remove:hover {
    background: #d9534f;       /* bootstrap danger */
}

/* На тач-устройствах hover не работает — показываем кнопку всегда */
@media (hover: none) {
    .cart-item-remove {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}