@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select:focus, textarea:focus, input:focus {
        font-size: 16px;
    }
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

*:focus {
    outline: 0 !important;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus, .input {
    outline: 0 !important;
    box-shadow: 0 0 0 0.1rem white;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    background-image: url('../images/background.png');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 30px !important;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -25px;
    margin-left: -25px;
    z-index: 2;
    display: none;
}

.item-loader-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #000000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    display: none;
}

.contacts-header {
    color: rgba(255,255,255,.55);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.brand-link {
    display: block;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 5px;
    text-decoration: none;
    color: #fff;
    transition: background-color 0.5s ease, color 0.5s ease;
    text-align: center
}

    .brand-link:hover {
        background-color: #444;
        color: #fff;
    }

.search-container {
    background-color: #fff;
    padding: 20px 0;
    margin-bottom: 20px;
    border-radius: 5px;
}

.search-form {
    margin-bottom: 10px;
    min-width: 300px;
    padding: 0;
}

.cart-sum-link {
    text-decoration: none;
}

.sparePartsSection {
    padding: 20px 20px;
    margin: 20px 0;
    background: #fff;
}

.sparePartItemCard {
    padding: 20px 0;
    cursor: pointer;
}

    .sparePartItemCard .item-image-container {
        overflow: hidden;
        width: 100%;
        height: 180px;
        border-radius: 10px;
    }

    .sparePartItemCard img {
        transition: transform 0.3s ease-in-out;
        width: 100%;
        height: 100%;
        text-align: center;
        max-height: 200px;
    }

    .sparePartItemCard:hover img {
        transform: scale(1.2);
    }

    .sparePartItemCard p {
        text-align: left;
        margin: 0px;
    }

    .sparePartItemCard .item-price {
        font-size: 18px;
        font-weight: bold;
    }

    .sparePartItemCard p {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .sparePartItemCard .item-name {
        font-weight: bold;
    }

    .sparePartItemCard:hover .item-name {
        color: red;
    }

    .sparePartItemCard .item-modelGenerations {
    }

        .sparePartItemCard .item-modelGenerations span {
            font-weight: bold;
        }

    .sparePartItemCard a {
        width: 100%;
    }


.product-card {
    display: flex;
    flex-direction: column; /* Изменено на вертикальное расположение на мобильных устройствах */
    /*margin: 20px;
    padding: 20px;*/
    background: #fff;
}

.product-images {
    display: flex;
    flex: 1;
    flex-direction: column; /* Изменено на вертикальное расположение на мобильных устройствах */
    align-items: center;
}

.product-header {
    background: #f8f8f8;
    padding: 0 0 20px 0;
}

    .product-header h1 {
        overflow: hidden;
        text-overflow: ellipsis;
    }

#mainImage {
    max-width: 100%;
    height: auto;
    border-radius: 7px;
}

.product-images img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    margin-left: 4px;
    border-radius: 2px;
}

.thumbnail-images {
    display: flex;
    margin-top: 10px;
    justify-content: space-around;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

    .thumbnail-images img {
        max-width: 100px;
        height: auto;
        cursor: pointer;
        scroll-snap-align: center;
    }

/* Дополнительные стили для мобильных устройств */
@media (max-width: 768px) {
    .product-images {
        flex-direction: column; /* Вертикальное расположение на мобильных устройствах */
    }

    #mainImage {
        width: 100%; /* Занимает 100% ширины на мобильных устройствах */
    }

    .thumbnail-images {
        margin-top: 10px; /* Добавлено для отступа от основного изображения */
        overflow-x: auto;
        overflow-y: hidden;
        flex-direction: row;
        width: 100%; /* Занимает 100% ширины на мобильных устройствах */
    }
}

.product-details {
    flex: 1;
    padding-left: 20px;
    padding-top: 20px;
}

.product-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: #008000;
    vertical-align: middle;
    margin-right: 20px;
}

.product-description {
    font-size: 16px;
    margin-bottom: 10px;
}

.product-specs {
    list-style-type: none;
    padding: 0;
}

    .product-specs li {
        font-size: 14px;
        margin-bottom: 5px;
    }


/* КОРЗИНА */


.main-cart-container {
    background: #fff;
    padding: 20px;
}

.summary-container {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
}

.form-check {
    margin-bottom: 10px;
}

#cartForm {
    margin-top: 20px;
}

.cart-delete-button {
    color: red;
}
.cart-total-sum-title {
    font-size: 24px;
}

.cart-total-sum {
    font-size: 24px;
}

.cart-item {
    display: flex;
    align-items: center;
    margin-top: 10px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-image {
    width: 180px;
    height: 100%;
    border-radius: 5px;
    margin-right: 10px;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-name {
    font-size: 18px;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 14px;
    font-weight: bold;
}

.cart-delete-button {
    background-color: #dc3545; /* Цвет кнопки удаления */
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

/* Медиа-запрос для адаптации на мобильных устройствах */
@media (max-width: 767px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item-image {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .cart-item-info {
        text-align: left;
    }
}


/* Стили для красивого оформления переключателей */
.custom-control-input:checked ~ .custom-control-label {
    background-color: #000;
    color: #fff;
}

    .custom-control-input:checked ~ .custom-control-label::before {
        border-color: #fff;
    }

.custom-control-input {
    display: none;
}

.custom-control-label {
    background-color: #fff;
    color: #000;
    border: 1px solid #0000002e;
    cursor: pointer;
    padding: 4px 10px;
    display: inline-block;
    margin-bottom: 0;
    border-radius: 4px;
}

.custom-radio {
    display: inline-block;
    overflow: hidden;
}

.custom-radio-group-name {
    display: block;
}

.custom-radio-button-group > div {
    display: inline-block !important;
    margin-right: 40px;
}

.search-form-new {
    background: white;
    border-radius: 4px;
    padding: 10px 20px;
}