/* catalog.css – стили только для страницы каталога */

.catalog-title {
    text-align: center;
    margin: 2rem 0;
    font-size: 2rem;
}

.modal .form-group {
    margin-bottom: 1rem;
}
.modal .form-group input {
    width: 100%;
    padding: 0.5rem;
    border-radius: 40px;
    border: 1px solid #cbd5e1;
}
.captcha-group {
    display: flex;
    gap: 10px;
    align-items: center;
}
.captcha-question {
    flex: 1;
    background: #f1f5f9;
    padding: 0.5rem;
    border-radius: 40px;
    text-align: center;
    font-weight: bold;
}
.error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 5px;
}
.partner-price {
    color: #ef4444;
    font-weight: bold;
}
.old-price {
    text-decoration: line-through;
    color: #94a3b8;
    margin-right: 8px;
}

/* Аккуратные кнопки действий */
.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: center;
}
.add-to-cart, .quick-order, .reviews-btn, .youtube-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: 0.2s;
    flex: 0 0 auto;
}
.quick-order {
    background: #10b981;
}
.reviews-btn {
    background: #8b5cf6;
}
.youtube-btn {
    background: #FF0000;
}

/* Группа шаринга – иконки по центру */
.share-group {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
    justify-content: center;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: #e2e8f0;
    border: none;
    padding: 0.35rem 0.5rem;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
    width: 34px;
    height: 34px;
}
.share-btn i {
    font-size: 1rem;
    margin: 0;
}
.share-btn.whatsapp {
    background: #25D366;
    color: white;
}
.share-btn.telegram {
    background: #26A5E4;
    color: white;
}
.share-btn.instagram {
    background: radial-gradient(circle at 30% 110%, #ffdb8f, #d6246c, #bc1888);
    color: white;
}
.share-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

/* ----- Слайдер для нескольких изображений ----- */
.product-slider {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f1f5f9;
}
.slides-container {
    width: 100%;
    height: 100%;
    position: relative;
}
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slide.active {
    opacity: 1;
    z-index: 1;
}
.slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.product-slider .slider-prev,
.product-slider .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: background 0.2s;
}
.product-slider .slider-prev:hover,
.product-slider .slider-next:hover {
    background: rgba(0, 0, 0, 0.8);
}
.product-slider .slider-prev {
    left: 5px;
}
.product-slider .slider-next {
    right: 5px;
}
.thumbnails {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    padding: 5px;
}
.thumb {
    width: 40px;
    height: 40px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    background: white;
    transition: border-color 0.2s;
}
.thumb.active {
    border-color: #3b82f6;
}
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Единичное изображение (когда нет слайдера) */
.product-img-single {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}
.product-img-single img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.product-img-single i {
    font-size: 4rem;
    color: #3b82f6;
}

/* Видео-миниатюра (YouTube) */
.video-thumb {
    position: relative;
    cursor: pointer;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-thumb::after {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* Модальное окно для полноразмерного изображения (открываемого при клике) */
.full-image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 10000;
    cursor: pointer;
}
.full-image-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: transparent;
    box-shadow: none;
}
.full-image-content .full-image-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.full-image-content .full-image-close {
    position: absolute;
    top: -30px;
    right: -30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    z-index: 10001;
}
.full-image-content .full-image-close:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

/* Модалки отзывов */
.modal-reviews {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-reviews-content {
    background: white;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    border-radius: 24px;
    overflow-y: auto;
    padding: 1.5rem;
    position: relative;
}
.close-reviews-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #1e293b;
}
.product-detail-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}
.product-detail-price {
    font-size: 1.3rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}
.product-detail-desc {
    margin-bottom: 1rem;
    color: #475569;
}
.reviews-list-modal {
    margin-top: 1rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}
.review-item-modal {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}
.review-rating-modal {
    color: #fbbf24;
    margin-bottom: 0.3rem;
}
.review-text-modal {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}
.review-images-modal {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}
.review-images-modal img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}
.add-review-link {
    display: inline-block;
    margin-top: 1rem;
    background: #3b82f6;
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
}
.add-review-link:hover {
    background: #2563eb;
}

/* Адаптив для маленьких экранов */
@media (max-width: 768px) {
    .product-slider {
        height: 160px;
    }
    .share-btn {
        width: 30px;
        height: 30px;
    }
    .thumb {
        width: 30px;
        height: 30px;
    }
    .full-image-content .full-image-close {
        top: -25px;
        right: -25px;
        font-size: 1.5rem;
        width: 30px;
        height: 30px;
    }
}