/* --- СТИЛИ СТРАНИЦЫ ПРОДУКТА (product.css) --- */

.product-page-content {
    flex: 1;
    padding: 10px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto; /* Центрируем контент по центру экрана */
}

.back-link {
    display: inline-block;
    color: #aaaaaa;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #ffffff;
}

/* Сетка: на компьютерах две колонки, на мобильных — одна под другой */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.product-large-image {
    width: 100%;
    height: 400px;
    background-color: #333333;
    border: 1px solid #444444;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-main-title {
    font-size: 2.5rem;
    color: #FF3030;
}

.product-meta {
    font-size: 0.85rem;
    color: #888888;
}

.product-full-description {
    color: #cccccc;
    line-height: 1.6;
    font-size: 1.05rem;
}

.product-full-description h3 {
    color: #ffffff;
    margin: 25px 0 10px 0;
}

.product-full-description ul {
    padding-left: 20px;
}

.price-color {
    color: #90FF90;
}

.product-full-description li {
    margin-bottom: 8px;
}

/* Зона с кнопками действий */
.product-action-zone {
    display: flex;
    gap: 15px;
    margin-top: auto; /* Прижимает кнопки к низу, если контента мало */
    padding-top: 30px;
}

.action-btn {
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.action-btn.primary {
    background-color: #ffffff;
    color: #2b2b2b;
    border: none;
}

.action-btn.primary:hover {
    background-color: #e0e0e0;
}

.action-btn.secondary {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #555555;
}

.action-btn.secondary:hover {
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Адаптация сетки для планшетов и мобильных */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr; /* Переключаем в одну колонку */
        gap: 30px;
    }

    .product-large-image {
        height: 250px;
    }

    .product-action-zone {
        flex-direction: column; /* Кнопки встают друг под друга */
    }
}

/* --- ГАЛЕРЕЯ-СЛАЙДЕР В КАРТОЧКЕ ПРОДУКТА --- */

.product-slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: #333333;
    border: 1px solid #444444;
    border-radius: 12px;
    overflow: hidden; /* Скрывает картинки, которые не активны */
}

/* Контейнер для слайдов */
.product-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

/* --- ГАЛЕРЕЯ-СЛАЙДЕР В КАРТОЧКЕ ПРОДУКТА --- */

.product-slider-container {
    position: relative;
    width: 100%;
    height: 550px; /* Увеличили высоту для вертикальных скриншотов */
    background-color: #1e1e1e; /* Темный фон для полей по бокам */
    border: 1px solid #444444;
    border-radius: 12px;
    overflow: hidden;
}

.product-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.product-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-slide.active {
    opacity: 1;
    visibility: visible;
}

/* Стилизация вертикальной картинки */
.screenshot-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Картинка масштабируется, полностью влезая по высоте */
    cursor: pointer; /* Указатель руки при наведении, намекающий на клик */
    transition: transform 0.2s ease;
}

.screenshot-img:hover {
    transform: scale(1.01); /* Легкий интерактивный эффект при наведении */
}

/* Стрелки управления */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.2s;
}

.slider-arrow:hover { background-color: rgba(0, 0, 0, 0.9); }
.prev-btn { left: 15px; }
.next-btn { right: 15px; }

/* Точки */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.dot.active {
    background-color: #ffffff;
    transform: scale(1.2);
}

/* --- МОДАЛЬНОЕ ОКНО (LIGHTBOX) --- */
.lightbox {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 1000; /* Перекрывает абсолютно всё на странице */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Глубокий темный полупрозрачный фон */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-content {
    max-width: 95%;
    max-height: 90vh; /* Ограничиваем картинку по высоте экрана */
    object-fit: contain;
    border-radius: 4px;
    animation: zoomEffect 0.25s ease; /* Плавное появление */
}

@keyframes zoomEffect {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.lightbox-close:hover { color: #aaaaaa; }

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .product-slider-container { height: 420px; }
    .lightbox-close { right: 20px; top: 10px; }
}
