/* Основные стили для страницы */
    .open-cart-btn-css {
        display: none;
    }

/* Стиль для кнопки "Открыть корзину" */
.open-cart-btn-css {
    background-color: transparent; /* Серый фон */
    color: #787878; /* Белый текст */
    border: none; /* Без обводки */
    border-radius: 50%; /* Круглая форма */
    width: 50px; /* Ширина кнопки */
    height: 50px; /* Высота кнопки */

    justify-content: center;
    align-items: center;
    cursor: pointer; /* Курсор в виде указателя */
    transition: background-color 0.3s ease; /* Плавное изменение фона */
}

/* Стиль для иконки внутри кнопки */
.open-cart-btn-css .cart-icon {
    font-size: 24px; /* Размер иконки */
    transition: filter 0.3s ease; /* Плавный переход для фильтра */
}

/* Изменение иконки при наведении */
.open-cart-btn-css:hover .cart-icon {
    filter: brightness(1.5); /* Увеличиваем яркость иконки */
}


/* Стиль для контейнера корзины */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0; /* Начальная прозрачность */
   /* transform: translateY(-10%); /* Лёгкий сдвиг вверх */
    display: flex; /* Для выравнивания содержимого */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: none; /* Блокируем клики в скрытом состоянии */
    transition: opacity 0.3s ease, transform 0.3s ease; /* Анимация плавности */
}

/* Когда корзина отображается */
.cart-overlay.show {
    opacity: 1; /* Полностью видно */
    transform: translateY(0); /* Возвращаем в норму */
    pointer-events: auto; /* Разрешаем взаимодействие */
}

/* Блокировка прокрутки страницы */
body .locked {
    overflow: hidden;  /* Отключаем прокрутку */
}

/* Контейнер для корзины */
.cart-container {
    background: #222222;
    padding: 20px;
    max-width: 700px;
    width: 90%;
    border-radius: 15px; /* Закругление контейнера */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Заголовок корзины */
h2 {
    margin: 0;
    font-size: 24px;
    color: #f5f5f5;
}

/* Стили для товаров в корзине */
.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Равномерно распределяем элементы */
    margin-bottom: 15px;
    padding: 10px;
    background-color: #3a3a3a;
    border-radius: 10px;
    border: 1px solid #444;
    max-width: 100%;
}

/* Стиль для изображения товара */
.cart-item img {
    object-fit: cover; /* Подгоняем изображение под размеры, обрезая лишние края */
    width: 120px;
    height: 80px; /* Сделаем изображение квадратным и меньшим */
    border-radius: 10px; /* Закругление изображения */
    margin-right: 15px;
    transition: transform 0.3s ease; /* Анимация увеличения/уменьшения */
}

.cart-item img:hover {
    transform: scale(1.05); /* Увеличиваем размер на 10% при наведении */
}

.cart-item img:active {
    transform: scale(0.9); /* Уменьшаем размер на 10% при нажатии */
}

/* Стиль для блока информации о товаре */
.item-info {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Распределяем элементы */
    flex-grow: 1; /* Равномерно растягиваем блок */
    margin-right: auto;
    flex-wrap: nowrap; /* Для адаптивности */
}

/* Название товара */
.item-info h4 {
    margin-left: 10px;
    font-size: 16px;
    color: #f5f5f5;
    flex-grow: 1;
}

/* Цена товара */
.item-info p {

    margin-right: 10px;
    font-size: 14px;
    color: #bbb;
}

.item-info .item-quantity {
    display: flex;
    align-items: center;
}


.item-quantity {

}

.item-info .quantity-btn {
    background-color: #444;
    border: none;
    font-size: 18px;
    padding: 5px;
    cursor: pointer;
    border-radius: 5px;
    margin: 0 15px;
    color: #f5f5f5;
}

.quantity-btn i {
    pointer-events: none; /* Убираем обработку кликов для самой иконки */
}

.quantity-btn:hover {
    background-color: #e0e0e0;
    transform: scale(1);
}

.quantity-btn:active {
    background-color: #d0d0d0;
    transform: scale(0.9);
}


.item-info .quantity-btn:hover {
    background-color: #555;
}

/* Количество товара */
.item-info input[type="number"] {
    width: 40px;
    text-align: center;
    font-size: 16px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #666;
    background-color: #555;
    color: #f5f5f5;
}


/* Стиль для кнопки удаления с изображением корзины */
.remove-item {
    padding-right: 15px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    background-size: cover;
    background-position: center;
}

/* Прокрутка в контейнере с товарами */
#cart-items {
    max-height: 40vh; /* Ограничиваем высоту */
    overflow-y: auto;
    scrollbar-width: thin; /* Устанавливаем тонкую полосу прокрутки для Firefox */
    scrollbar-color: #c3a615 #2a2a2a; /* Цвет полосы прокрутки и фона для Firefox */
    border-radius: 5px;
    margin-top: 10px;
}


/* Для браузеров, поддерживающих Webkit (Chrome, Safari, Edge) */
#cart-items::-webkit-scrollbar {
    width: 5px; /* Ширина полосы прокрутки */
}

#cart-items::-webkit-scrollbar-track {
    background-color: #2a2a2a; /* Цвет фона полосы прокрутки */
    border-radius: 5px;
}

#cart-items::-webkit-scrollbar-thumb {
    background-color: #4caf50; /* Цвет самой полосы прокрутки */
    border-radius: 5px;
    border: 2px solid #2a2a2a; /* Граница вокруг полосы прокрутки */
}

/* При наведении на полосу прокрутки */
#cart-items::-webkit-scrollbar-thumb:hover {
    background-color: #45a049; /* Цвет при наведении */
}

/* Стиль для формы */
#contact-form {
    position: sticky;
    top: 0;
    background-color: #2f2f2f; /* Изменим фон для соответствия цветовой гамме */
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10; /* Чтобы форма всегда была поверх */
    border-radius: 15px; /* Закругление формы */
}

#contact-form textarea {
    font-family: 'Arial', sans-serif; /* Указываем желаемый шрифт */
}

/* Стиль для кнопки оформления заказа */
#checkout-btn {
    background-color: #4caf50;
    color: white;
    padding: 12px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

#checkout-btn:hover {
    background-color: #45a049;
}

.cart-item .remove-item:hover {
    text-decoration: underline;
}

/* Стили для блока с лизингом */
.calculate-lease {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 10px;

}


.calculate-lease label {
    font-size: 18px;
    color: #f5f5f5;
    margin-right: 15px;
}


#contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


#contact-form input,
#contact-form textarea {
    padding: 14px;
    font-size: 16px;
    border: 1px solid #666;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    background-color: #4b4b4b;
    color: #c3c3c3;
}


#contact-form input[type="text"]:focus,
#contact-form textarea:focus {
    border-color: #b3ab2d;
    outline: none;
}

/* Кнопка отправки формы */
#contact-form button {
    background-color: #c59900;
    color: white;
    padding: 14px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#contact-form button:hover {
    background-color: #d6aa13;
}

/* Контейнер данных клиента */
.contact-data-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

/* Стили для контейнера корзины при отсутствии товаров */
#cart-items p {
    color: #777;
    font-size: 18px;
    text-align: center;
}

/* иконка корзины (для удаления) */

.remove-item {
    width: 30px;
    height: 30px;
    background-image: url('../svg/Trash_Can.svg');
    /*   background-size: contain; */
      background-position: center;
  }


  .total-sum {
      float: right;
  }


  /* Блок с сообщением */
.message-container {
    width: 100%;

    margin: 0 auto; /* Центрирование */
}

.message {
    width: 100%;
    height: 100px;
    padding: 10px;
    resize: none; /* Запрещаем изменение размера */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

/* Переключатель (тумблер) */
.toggle-container {
    display: flex;
    align-items: center; /* Выровнять элементы по вертикали */
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px; /* Уменьшаем ширину тумблера */
    height: 20px; /* Уменьшаем высоту тумблера */
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555454; /* Серый цвет фона */
    transition: 0.4s;
    border-radius: 34px;

}

.slider:before {
    position: absolute;
    content: "";
    height: 14px; /* Уменьшаем размер круга */
    width: 14px; /* Уменьшаем размер круга */
    border-radius: 50%;
    left: 3px; /* Сдвигаем круг для лучшего выравнивания */
    bottom: 3px; /* Сдвигаем круг для лучшего выравнивания */
    background-color: white;
    transition: 0.4s;
}

/* Изменение цвета фона при включении */
input:checked + .slider {
    background-color: #FFEB3B; /* Желтый цвет */
}

/* Сдвиг круга при включении */
input:checked + .slider:before {
    transform: translateX(20px); /* Сдвигаем круг в другую сторону */
}


.calculate-lease {
    display: grid;
    grid-template-columns: 1fr auto; /* Два столбца, первый гибкий, второй по содержимому */
    align-items: center; /* Вертикальное выравнивание элементов */
}

.lease-container {
    display: flex;
    align-items: center; /* Выравнивание по вертикали для блока с лейблом и переключателем */
}

.total-sum {
    text-align: right; /* Текст выравнивается по правому краю */
}

.total-sum p {
    color: #555;
    font-weight: 600; /* Установка веса шрифта, эквивалентно "жирному" */
}

.opisan_cart_product {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

.opisan_cart_product h4 {
    margin-right: 10px;
    font-size: 16px;
    color: #f5f5f5;
    flex-grow: 1;
}

.opisan_cart_product p {
    flex-grow: 1;
    margin-left: 40px;
}

/* Адаптив для телефона" */


/* Медиазапрос для мобильных устройств */
@media (max-width: 768px) {

    .total-sum p {
        color: #555;
        font-weight: 600;
        font-size: 12px;
    }

    .opisan_cart_product {
        display: flex;
        align-items: center;
        flex-direction: column;
        flex-wrap: wrap;
        margin-left: 10px;
    }

    #cart-items p {

        font-size: 12px;

    }

    .opisan_cart_product h4, p {
        margin: 0px;
    }
    .opisan_cart_product h4 {
        font-size: 16px;
        line-height: 1.4;
        margin: 0 0 8px;
        max-width: 100%;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Ограничение на 2 строки */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .opisan_cart_product h4 {
        margin-bottom: 5px;
        margin-right: 0;
        font-size: 14px;
    }

    .opisan_cart_product p {
        margin-left: 10px;
    }

    .cart-item {

        align-items: center;
    }

    .cart-item img {
        width: 80px; /* Уменьшаем размер изображения */
    }

    .quantity-btn {
        width: 28px; /* Уменьшаем размер кнопок */
        height: 28px;
        font-size: 16px;
    }

    .quantity-display {
        font-size: 16px; /* Уменьшаем размер текста в отображении количества */
    }

    .remove-item {
        font-size: 14px; /* Уменьшаем размер шрифта для кнопки удаления */
    }

    .cart-item img {
        width: 80px;
        height: 60px;
        margin: 0;
    }

    .calculate-lease label {

        font-size: 14px;
    }

    .item-info .quantity-btn {
        margin: 0 5px;
    }

    #contact-form input, #contact-form textarea {
        padding: 8px;
    }

    #contact-form {
        gap: 15px;
    }

}


/* Стили для планшетов (ширина экрана от 500 до 1024px) */
@media (max-width: 499px) {

    #cart-items p {
        font-size: 12px;
    }

    .opisan_cart_product h4 {
        margin-bottom: 5px;
        margin-right: 0;
        font-size: 12px;
    }

    .quantity-btn {
        width: 20px;
        height: 20px;

    }

    .item-info .quantity-btn {
        font-size: 10px;
    }

    .remove-item {
        width: 20px;
        height: 20px;
    }

    .cart-item img {
        width: 70px;
        height: 45px;
        margin: 0;
    }

    .message-container {
        width: 100%;
        margin: 0 auto;
    }

    #contact-form {
        gap: 10px;
    }

    .calculate-lease label {
        font-size: 12px;
    }


    #contact-form input, #contact-form textarea {
        font-size: 12px;
    }
}

/* Применяется только для устройств с шириной экрана 375px и меньше (например, iPhone SE) */
@media (max-width: 420px) {
    .message {
        height: 80%; /* Устанавливаем высоту только на маленьких экранах */
    }
}


/* Стили для блока уведомлений после фоормления заказа  */

.notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    background-color: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.notification.hidden {
    display: none;
}

.notification h2 {
    margin-bottom: 10px;
}

.notification .social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.notification .social-links a {
    text-decoration: none;
    font-size: 24px;
    color: #595959;
}

.fa-plus{
    width: 16px;
    height: 18px;
    fill: rgba(122, 122, 122, 0.53);
}

.item-info .item-quantity .quantity-btn{
    font-size: 1px;
}

/* 'это у нас типа стили для подцветки наших ебейший логотипов'  */
.notification .social-links a .fa-phone {
    stroke: #808080;
}

.notification .social-links a:hover .fa-phone {
    stroke: #A0A0A0;
}


.notification .social-links a .fa-envelope {
    fill: #ff8262;
}

.notification .social-links a:hover .fa-envelope {
    fill: #ff6347;
}

.notification .social-links a .fa-telegram {
    fill: #0088cc;
}

.notification .social-links a:hover .fa-telegram {
    fill: #1da1f2;
}


.notification .social-links a .fa-whatsapp {
    fill: #25d366;
}

.notification .social-links a:hover .fa-whatsapp {
    fill: #32e676;
}

/* '----------------------------------------------------------'  */

/* Крестик */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #898989;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #ff0000;
}

/* Затемнение фона */
.overlay_cart {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
}

.overlay_cart.active {
    display: block;
}

/* мобильные стили для блоков сообщения что заказ оформлен  */
@media (max-width: 768px) {
    .open-cart-btn-css {
        display: flex;
    }
    .notification {
        width: 70%;
    }
    .item-info .item-quantity .quantity-btn{
        width: 24px;
        height: 24px;
    }
    .fa-plus{
        width: 16px;
        height: 15px;
    }

}

/* сообщения об ошибке если телефон не ввели или ввели не полностью или имя пусто  */


/* Добавляем красную рамку и анимацию */
/* Добавляем красную рамку и анимацию */
.invalid {
    border: 1px solid red !important;
    animation: shake 0.5s ease, resetBorder 0.5s 0.5s forwards; /* Анимация тряски и плавного восстановления */
}

/* Анимация для тряски */
@keyframes shake {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    50% {
        transform: translateX(5px);
    }
    75% {
        transform: translateX(-5px);
    }
    100% {
        transform: translateX(0);
    }
}

/* Анимация для восстановления рамки */
@keyframes resetBorder {
    0% {
        border-color: red;
    }
    /* Начало анимации — красный цвет */
    100% {
        border-color: #666;
    }
    /* Плавно восстанавливаем цвет рамки до серого */
}


/* Стиль для шапки корзины */
.cap_cart {
    flex-direction: row-reverse;
    display: flex; /* Используем flexbox для выравнивания */
    justify-content: space-between; /* Распределяем элементы по краям */
    align-items: center; /* Выравнивание по вертикали */
    margin-bottom: 20px; /* Отступ снизу */
}

/* Заголовок корзины */
.cap_cart h2 {
    margin: 0;
    color: white; /* Белый цвет текста */
}

/* Кнопка закрытия */
/* Кнопка закрытия */
.close-btn-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #898989; /* Белый цвет для крестика */
    cursor: pointer;
    transition: color 0.2s ease;
    font-weight: 100; /* Убираем жирность, чтобы крестик стал тоньше */
    font-family: 'Arial', sans-serif; /* Использование более тонкого шрифта */
}


.close-btn-cart:hover {
    color: red; /* Цвет крестика при наведении */
}


/* Убираем подсветку при касании (на мобильных устройствах) для всех элементов */
* {
    -webkit-tap-highlight-color: transparent; /* Убираем подсветку на мобильных устройствах */
}


#cart-empty-message {
    position: absolute; /* Расположение ниже кнопки */
    margin-top: 10px; /* Отступ от кнопки */
    padding: 10px 20px;
    background-color: #f8d7da; /* Светло-красный фон */
    color: #721c24; /* Тёмный текст */
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    transition: opacity 0.5s ease, transform 0.5s ease; /* Анимация */
    opacity: 0; /* Скрыто по умолчанию */
    transform: translateY(-20px); /* Немного сдвинуто вверх */
    pointer-events: none; /* Сообщение не мешает клику */
}

#cart-empty-message.show {
    opacity: 1; /* Видимое сообщение */
    transform: translateY(0); /* Возвращаем на место */
    pointer-events: auto;
}


.cart-items {
  overflow: scroll; /* Включаем прокрутку */
  scrollbar-width: none; /* Для Firefox */
}

.cart-items::-webkit-scrollbar {
  display: none; /* Для Chrome, Safari, Edge */
}

.cart-items {
  overflow: scroll; /* Включаем прокрутку */
  scrollbar-width: none; /* Для Firefox */
}

.cart-items::-webkit-scrollbar {
  display: none; /* Для Chrome, Safari, Edge */
}

.fa-shopping-cart{
    fill: #8f8f8f;
}
button:hover .fa-shopping-cart{
    fill: #494949;
}

.quantity-btn.plus svg.fa-plus  {
    pointer-events: none; /* Отключаем события мыши для SVG */
}
.quantity-btn.minus svg.fa-plus  {
    pointer-events: none; /* Отключаем события мыши для SVG */
}


/* Стили для невалидного чекбокса */
#checkbox-btn.invalid {
    outline: 2px solid red;
}

/* Эффект тряски */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

#checkbox-btn.shake {
    animation: shake 0.5s ease-in-out;
}