/* Основные стили для контейнера */
.product-main-container {
    display: flex;
    align-items: stretch;
    gap: 30px;

    width: 100%;
    box-sizing: border-box;
}

/* Контейнер для изображения */
.product-image-container {
    flex-shrink: 0;
    width: 150px;
    display: flex;
    justify-content: center;
    align-items: center; /* Вертикальное центрирование */
    min-height: 200px; /* Минимальная высота, если таблица маленькая */
}

/* Стили для изображения */
.product-tech-image {
    width: 100%;
    height: auto;
    max-width: 280px;
    max-height: 100%; /* Не выходит за контейнер */
    object-fit: contain;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
}

/* Обертка для таблицы и кастомного скролла */
.product-table-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    position: relative;
}

/* Контейнер с прокруткой */
.product-table-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Скрываем стандартный скролл в Firefox */
    -ms-overflow-style: none; /* Скрываем стандартный скролл в IE/Edge */
}

/* Скрываем стандартный скролл в Chrome/Safari */
.product-table-scroll-container::-webkit-scrollbar {
    display: none;
}

/* Контейнер для таблицы */
.product-table-container {
    width: 100%;
}

/* Стили для таблицы */
.product-offers-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #E3E3E3;
    table-layout: auto;
}

.product-offers-table th,
.product-offers-table td {
    border: 1px solid #E3E3E3;
    padding: 8px;
    text-align: center;
    white-space: nowrap;
}

.product-offers-table th:first-child,
.product-offers-table td:first-child {
    min-width: 80px;
}

.product-offers-table th:last-child,
.product-offers-table td:last-child {
    min-width: 120px;
    white-space: normal;
}

/* Стили для заголовка */
.product-table-title {
    text-align: center;
    width: 100%;
}

.table-title-product-page {
    width: 100% !important;
    margin-bottom: 0;
    font-size: 16px !important;
    padding: 12px;
    background: rgba(36, 44, 89, 1);
    color: rgba(226, 230, 252, 1) !important;
}

.product-offers-table th {
    background-color: #f8f8f8;
    font-weight: 600;
}

/* Стили для блока управления количеством */
.quantity-control {
    display: flex;
    align-items: center;
    border: 1.5px solid #bbb;
    border-radius: 6px;
    width: 110px;
    height: 38px;
    background-color: #fff;
    user-select: none;
    font-size: 14px;
}

.quantity-minus,
.quantity-plus {
    cursor: pointer;
    background: none;
    border: none;
    color: #222;
    font-size: 18px;
    font-weight: 500;
    padding: 0 10px;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.quantity-minus:hover,
.quantity-plus:hover {
    color: #000;
    background-color: #f5f5f5;
}

.quantity-input-wrapper {
    flex: 1;
    text-align: center;
}

.btn, input[type=text] {
    padding: 0!important;
    height: 44px;
}

.quantity-input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 14px;
    padding: 0;
    outline: none;
    box-sizing: border-box;
}

/* Стили для кнопки заказа */
.add-to-basket-btn {
    width: 100%;
    padding: 4px 10px;
    background: rgba(96, 159, 33, 1);
    border-radius: 2px;
    color: rgba(255, 255, 255, 1);
    font-size: 14px;
    font-weight: 550;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.add-to-basket-btn:hover {
    background: rgba(76, 139, 13, 1);
}

.add-to-basket-btn svg {
    vertical-align: middle;
    margin-right: 6px;
}

/* Сообщение об отсутствии предложений */
.no-offers-message {
    padding: 20px;
    border: 1px solid #e3e3e3;
    background-color: #f9f9f9;
    color: #666;
}

/* Кастомный скроллбар - как кольцо Юпитера */
.custom-scrollbar {
    width: 100%;
    height: 30px; /* Увеличиваем высоту для кольца */
    margin-top: 10px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-scrollbar-track {
    width: 100%;
    height: 2px; /* Тонкая синяя полоска */
    background-color: #0000FF; /* Синий цвет для дорожки */
    position: relative;
    border-radius: 1px;
}

.custom-scrollbar-thumb {
    position: absolute;
    width: 8px; /* Точка 8px */
    height: 8px;
    background-color: #969ECB; /* Цвет точки */
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%); /* Центрируем по горизонтали и вертикали */
    cursor: default; /* Обычный курсор, не указывает на возможность перетаскивания */
    z-index: 10;
    box-shadow: 0 0 0 5px rgb(243 245 254); /* Красное кольцо с промежутком 5px */
    transition: box-shadow 0.2s ease;
    pointer-events: none; /* Точка не реагирует на события мыши */
}

/* Эффект свечения для кольца (опционально) */
.custom-scrollbar-thumb {
    animation: ringPulse 2s infinite ease-in-out;
}

@keyframes ringPulse {
    0% {
        box-shadow: 0 0 0 5px rgb(171, 173, 179);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(243, 245, 254, 0.6);
    }
    100% {
        box-shadow: 0 0 0 5px rgb(243, 245, 254);
    }
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .product-offers-table th{
        background: #242C59;
        color: white;
    }
    .product-main-container {
        flex-direction: column;
        align-items: center;
    }

    .product-image-container {
        width: 100%;
        max-width: 300px;
        margin-bottom: 20px;
    }

    .product-table-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .product-offers-table {
        min-width: 600px;
    }

    .product-offers-table th,
    .product-offers-table td {
        white-space: nowrap;
    }

    /* Адаптируем кольцо для мобильных */
    .custom-scrollbar {
        height: 40px;
    }

    .custom-scrollbar-thumb {
        width: 10px; /* Немного больше на мобильных */
        height: 10px;
        box-shadow: 0 0 0 6px #FF0000; /* Увеличиваем кольцо */
    }
}

