/* ========== СТРАНИЦА ТОВАРА ========== */

/* Основная карточка */
.product {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.product__gallery {
    flex: 1;
    min-width: 300px;
}

.product__main-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(238, 167, 37, 0.3);
}

.product__main-image img {
    width: 100%;
    display: block;
}

.product__zoom {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}

.product__zoom:hover {
    background: var(--accent-primary);
    transform: scale(1.05);
}

.product__thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.thumb:hover {
    border-color: var(--accent-secondary);
}

.thumb.active {
    border-color: var(--accent-primary);
}

.product__info {
    flex: 1;
    min-width: 300px;
}

.product__title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.product__badge {
    display: inline-block;
    background: linear-gradient(145deg, var(--accent-primary), var(--accent-secondary));
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 15px;
}

.product__rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.stars {
    color: var(--accent-secondary);
    font-size: 18px;
}

.reviews-count {
    color: var(--text-gray);
    font-size: 14px;
}

.product__price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.product__actions {
    margin-bottom: 20px;
}

.product__short-specs {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-gray);
}

.product__short-specs div {
    padding: 5px 0;
    border-bottom: 1px dashed rgba(238, 167, 37, 0.2);
}

/* Характеристики */
.product-specs {
    margin-bottom: 60px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.specs-category {
    background: rgba(15, 35, 48, 0.6);
    border-radius: 16px;
    padding: 20px;
}

.specs-category h3 {
    color: var(--accent-secondary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(238, 167, 37, 0.3);
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(238, 167, 37, 0.1);
    font-size: 14px;
}

.spec-row span:first-child {
    color: var(--text-gray);
}

.spec-row span:last-child {
    color: var(--text-light);
}

/* Описание */
.product-description {
    margin-bottom: 60px;
}

.description-content {
    background: rgba(15, 35, 48, 0.6);
    border-radius: 16px;
    padding: 30px;
}

.description-content p {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 15px;
}

.description-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.description-content li {
    color: var(--text-gray);
    margin-bottom: 8px;
}

/* Похожие товары */
.related-products {
    margin-bottom: 60px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.related-card {
    background: linear-gradient(145deg, rgba(15, 35, 48, 0.95), rgba(20, 40, 52, 0.9));
    border: 1px solid rgba(238, 167, 37, 0.25);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.related-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-secondary);
}

.related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
}

.related-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.related-card .price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 15px;
}

/* Отзывы */
.product-reviews {
    margin-bottom: 60px;
}

.reviews-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    background: rgba(15, 35, 48, 0.6);
    padding: 20px;
    border-radius: 16px;
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.big-rating {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-secondary);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-card {
    background: rgba(15, 35, 48, 0.4);
    border: 1px solid rgba(238, 167, 37, 0.15);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s;
}

.review-card:hover {
    border-color: rgba(238, 167, 37, 0.3);
}

.review__header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.review__avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.review__author {
    font-weight: 600;
    color: var(--accent-secondary);
}

.review__rating {
    color: var(--accent-secondary);
    font-size: 14px;
}

.review__date {
    margin-left: auto;
    color: var(--text-gray);
    font-size: 12px;
}

.review__content p {
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 10px;
}

.review__photo {
    max-width: 200px;
    border-radius: 12px;
    margin-top: 10px;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    color: var(--accent-primary);
}

/* Уведомление */
.notification-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary);
    color: var(--text-light);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    z-index: 4000;
    display: none;
    animation: fadeInOut 3s ease forwards;
    white-space: nowrap;
}

/* Адаптивность */
@media (max-width: 768px) {
    .product {
        flex-direction: column;
    }
    
    .product__title {
        font-size: 1.5rem;
    }
    
    .product__price {
        font-size: 1.5rem;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .reviews-summary {
        flex-direction: column;
        text-align: center;
    }
    
    .review__header {
        flex-direction: column;
        text-align: center;
    }
    
    .review__date {
        margin-left: 0;
    }
    
    .thumb {
        width: 60px;
        height: 60px;
    }

    .notification-toast {
        white-space: normal;
        text-align: center;
        max-width: 90vw;
        font-size: 12px;
    }
}

/* ========== МОДАЛЬНОЕ ОКНО ДЛЯ ОТЗЫВА ========== */
/* ========== МОДАЛЬНОЕ ОКНО ДЛЯ ОТЗЫВА ========== */
.review-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.review-modal__content {
    background: linear-gradient(145deg, #0A1A24, #0C1F2A);
    border: 2px solid var(--accent-secondary);
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    padding: 30px;
    position: relative;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-secondary) rgba(255, 255, 255, 0.1);
    margin-right: 10px;
}

/* Полоса прокрутки */
.review-modal__content::-webkit-scrollbar {
    width: 6px;
}

.review-modal__content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.review-modal__content::-webkit-scrollbar-thumb {
    background: var(--accent-secondary);
    border-radius: 10px;
}

.review-modal__content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}


.review-modal__content {
    margin-left: auto;
    margin-right: auto;
}



.review-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.review-modal__header h3 {
    color: var(--accent-secondary);
    font-size: 1.5rem;
    margin: 0;
}

.review-modal__close {
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
}

.review-modal__close:hover {
    color: var(--accent-primary);
}

.form-group {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.form-group label {
    display: block;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group select {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(238, 167, 37, 0.3);
    border-radius: 12px;
    color: var(--text-light);
    font-family: 'Guidy', Arial, sans-serif;
}

.rating-input {
    display: flex;
    gap: 10px;
}

.rating-star {
    font-size: 28px;
    cursor: pointer;
    color: var(--text-gray);
    transition: all 0.3s;
}

.rating-star:hover,
.rating-star.active {
    color: var(--accent-secondary);
}

textarea {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(238, 167, 37, 0.3);
    border-radius: 12px;
    color: var(--text-light);
    font-family: inherit;
    resize: vertical;
}

input[type="file"] {
    color: var(--text-gray);
}

small {
    display: block;
    color: var(--text-gray);
    font-size: 11px;
    margin-top: 5px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox label {
    margin-bottom: 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.checkbox a {
    color: var(--accent-primary);
    text-decoration: none;
}

.checkbox a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.review-modal__info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(238, 167, 37, 0.2);
    font-size: 12px;
    color: var(--text-gray);
    text-align: center;
    flex-shrink: 0;
}

#submitReviewBtn {
    margin-bottom: 15px;
    flex-shrink: 0;
}

/* Уведомление */
.notification-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary);
    color: var(--text-light);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    z-index: 4000;
    display: none;
    animation: fadeInOut 3s ease forwards;
    white-space: nowrap;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); visibility: hidden; }
}

@media (max-width: 768px) {
    .notification-toast {
        white-space: normal;
        text-align: center;
        max-width: 90vw;
        font-size: 12px;
    }
    
    .review-modal__content {
        max-height: 90vh;
        padding-right: 25px;
        margin-right: 5px;
        padding: 20px;
    }
    
    .review-modal__header h3 {
        font-size: 1.2rem;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .checkbox label {
        font-size: 12px;
    }
    
    .rating-star {
        font-size: 24px;
    }
}