﻿.software-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.back-button {
    font-size: 16px;
    color: #007BFF;
    border: 1px solid #008DD2;
    padding: 5px 10px;
    border-radius: 30px;
    text-decoration: none;
}

.software-title {
    font-size: 28px;
    font-weight: bold;
}

.product-main-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.main-image {
    flex: 1 1 570px;
    max-width: 100%;
}

    .main-image img {
        width: 570px;
        height: 310px;
        object-fit: contain; /* или 'cover' для обрезки фото*/
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    }

.product-description {
    flex: 1 1 500px;
    max-width: 600px;
}

.description-text {
    max-height: 250px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

.btn-primary {
    background-color: #008DD2;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    color: white;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
    margin-top: 15px;
}

    .btn-primary:hover {
        background-color: #0070b0;
    }

.gallery-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    margin-top: 30px;
}

.gallery-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

    .gallery-scroll::-webkit-scrollbar {
        height: 10px;
    }

    .gallery-scroll::-webkit-scrollbar-thumb {
        background: #007BFF;
        border-radius: 3px;
    }

.thumbnail {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
    cursor: pointer;
}

    .thumbnail:hover {
        transform: scale(1.05);
    }

.software-tabs {
    margin-top: 40px;
}

.nav-tabs .nav-link {
    border: none;
    font-weight: 500;
    color: #007BFF;
}

    .nav-tabs .nav-link.active {
        border-bottom: 2px solid #008DD2;
        color: #000;
    }

.table td {
    vertical-align: middle;
}

.download-section {
    margin: 20px 0;
}

.alert-section {
    margin-top: 20px;
}

/* ==== Адаптив под мобильные устройства ==== */
@media (max-width: 992px) {
    .software-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        text-align: left;
    }

    .software-title {
        font-size: 22px;
        line-height: 1.3;
    }

    .back-button {
        font-size: 14px;
        padding: 6px 12px;
        margin-top: 0;
    }

    .product-main-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .main-image {
        flex: 1 1 auto;
        width: 100%;
        text-align: center;
    }

        .main-image img {
            width: 100%;
            height: auto;
            max-height: 280px;
        }

    .product-description {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 0 10px;
    }

    .description-text {
        max-height: none;
        overflow: visible;
    }

    .buttons-row {
        flex-direction: column;
        width: 100%;
        gap: 10px !important;
        margin-top: 10px !important;
    }

        .buttons-row .btn-primary {
            width: 100%;
            text-align: center;
            font-size: 15px;
        }

    .gallery-wrapper {
        margin-top: 20px;
        padding: 0 10px;
    }

    .gallery-scroll {
        gap: 8px;
    }

    .thumbnail {
        width: 80px;
        height: 60px;
    }

    .software-tabs {
        margin-top: 30px;
        padding: 0 10px;
    }

    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        scrollbar-width: none; /* скрыть скролл для Firefox */
    }

        .nav-tabs::-webkit-scrollbar {
            display: none; /* скрыть скролл для Chrome/Safari */
        }

        .nav-tabs .nav-item {
            flex: 0 0 auto; /* не сжимать элементы */
        }

        .nav-tabs .nav-link {
            font-size: 14px;
            padding: 8px 12px;
            white-space: nowrap;
        }

    .tab-content {
        padding: 10px;
    }

    .modal-dialog {
        margin: 10px;
    }

    .modal-content {
        border-radius: 10px;
    }

    .card-text-wrapper {
        overflow: visible;
        padding: 0 5px;
    }

    .review-card .card-text {
        -webkit-line-clamp: 8; /* немного больше строк на мобильных */
        font-size: 1px;
        line-height: 1.5;
    }

    .read-more {
        font-size: 0.95rem;
        margin-top: 5px;
        display: inline-block;
    }

    .description-text {
        max-height: 250px;
        overflow: hidden;
        position: relative;
    }
}

@media (max-width: 576px) {
    .software-title {
        font-size: 20px;
    }

    .main-image img {
        max-height: 220px;
    }

    .btn-primary {
        font-size: 14px;
        padding: 8px 15px;
    }

    .thumbnail {
        width: 70px;
        height: 50px;
    }

    .nav-tabs .nav-link {
        font-size: 13px;
        padding: 6px 8px;
    }

    .review-card .card-text {
        -webkit-line-clamp: 10;
        font-size: 14px;
    }

    .read-more {
        font-size: 0.9rem;
    }
}





.card-text-wrapper {
    overflow: hidden;
}

.review-card .card-text {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 6; /* кол-во строк до обрезки */
    -webkit-box-orient: vertical;
}

.read-more {
    color: #007bff;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    align-self: flex-start; /* прижать к левому краю */
}
