/* --- ОСНОВНОЙ КОНТЕЙНЕР --- */
.product-detail {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr; /* Сбалансированные пропорции */
    gap: 50px;
    background: rgba(20, 18, 35, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(108, 92, 231, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    margin-bottom: 50px;
    align-items: start;
}

/* --- ГАЛЕРЕЯ (ЛЕВАЯ ЧАСТЬ) --- */
.product-gallery {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Рамка главного изображения */
.main-img-wrap {
    width: 100%;
    height: 500px;
    background: radial-gradient(circle, rgba(45, 40, 65, 0.8) 0%, rgba(15, 12, 41, 1) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
}

.main-img-wrap img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5)); /* Тень для самой картинки */
}

/* Слайдер миниатюр */
.thumbnails-wrapper {
    position: relative;
    margin-top: 20px;
    padding: 0 40px; /* Место для стрелочек */
}

.thumbnails {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 5px 0;
}

/* Скрываем полосу прокрутки для красоты */
.thumbnails::-webkit-scrollbar { display: none; }

.thumbnails img {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.3s;
    background: #1e1b2e;
    opacity: 0.4;
}

.thumbnails img.active, .thumbnails img:hover {
    opacity: 1;
    border-color: #6c5ce7;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #6c5ce7;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    font-weight: bold;
}
.nav-arrow.left { left: 0; }
.nav-arrow.right { right: 0; }

/* --- ПРАВАЯ КОЛОНКА (КОНТЕНТ) --- */
.product-detail-info {
    display: flex;
    flex-direction: column;
}

.product-detail-info h1 {
    font-size: 2.5em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.1;
}

.product-rating-badge {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffd700;
}

/* Блок характеристик */
.product-meta {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 30px;
}

.product-meta p {
    margin: 8px 0;
    color: #bdc3c7;
    font-size: 0.95em;
    display: flex;
    justify-content: space-between;
}

.product-meta span {
    color: #fff;
    font-weight: 600;
}

.product-price-large {
    font-size: 3em;
    font-weight: 800;
    color: #6c5ce7;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(108, 92, 231, 0.4);
}

.product-description {
    color: #ecf0f1;
    line-height: 1.6;
    margin-bottom: 40px;
    font-size: 1.1em;
    border-left: 3px solid #6c5ce7;
    padding-left: 20px;
}

/* КНОПКИ ДЕЙСТВИЙ */
.product-actions-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.add-to-cart-btn-large, .fav-btn-large {
    height: 60px; /* Одинаковая высота */
    border-radius: 16px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    width: 100%;
}

.add-to-cart-btn-large {
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    color: white;
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

.add-to-cart-btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(108, 92, 231, 0.5);
}

.fav-btn-large {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.fav-btn-large.active {
    background: #fff;
    color: #ff4757;
    border-color: #ff4757;
}

.fav-btn-large:hover {
    background: rgba(255, 255, 255, 0.2);
}

.fav-btn-large:hover { background: rgba(108, 92, 231, 0.1); border-color: #6c5ce7; color: #fff; }
.fav-btn-large.active { background: #fff; color: #ff4757; border-color: #ff4757; }
.fav-btn-large .heart-icon { font-size: 1.2em; }

/* --- КНОПКА НАЗАД --- */
.back-link {
    display: inline-flex; align-items: center; padding: 10px 25px;
    background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px; color: #fff; text-decoration: none; margin-bottom: 25px;
    font-size: 0.95em; transition: 0.3s;
}

.back-link:hover { background: #6c5ce7; border-color: #6c5ce7; transform: translateX(-5px); }

/* --- СЕКЦИЯ ОТЗЫВОВ (Твои стили сохранены) --- */
.reviews-section { max-width: 900px; margin: 0 auto; }
.reviews-header-block { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.write-review-btn { background: rgba(255, 255, 255, 0.1); border: 1px solid #6c5ce7; color: #6c5ce7; padding: 10px 20px; border-radius: 20px; cursor: pointer; transition: 0.3s; }
.write-review-btn:hover { background: #6c5ce7; color: white; }
.review-form-container { background: rgba(30, 25, 50, 0.8); padding: 20px; border-radius: 12px; border: 1px solid rgba(108, 92, 231, 0.3); margin-bottom: 30px; }
.review-form-container textarea { width: 100%; height: 100px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: white; padding: 10px; margin-bottom: 15px; resize: vertical; }
.submit-review-btn { background: #4caf50; color: white; border: none; padding: 10px 25px; border-radius: 8px; cursor: pointer; }
.review-card { display: flex; gap: 20px; background: rgba(45, 40, 65, 0.6); padding: 20px; border-radius: 12px; margin-bottom: 20px; border: 1px solid rgba(255, 255, 255, 0.05); }
.review-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
    flex-shrink: 0;
    
    /* Добавь это: */
    overflow: hidden; 
    border: 2px solid rgba(255, 255, 255, 0.1);
}
.review-content { flex-grow: 1; }
.review-top { display: flex; justify-content: space-between; margin-bottom: 10px; }
.review-stars { color: #ffd700; letter-spacing: 2px; }
.review-date { font-size: 0.8em; color: #888; margin-left: 10px; font-weight: normal; }
.my-review-badge { display: inline-block; background: rgba(108, 92, 231, 0.2); color: #a29bfe; border: 1px solid #6c5ce7; font-size: 0.75em; padding: 1px 6px; border-radius: 10px; margin-left: 10px; vertical-align: middle; }
.edit-link { background: none; border: none; color: #a29bfe; cursor: pointer; text-decoration: underline; padding: 0; }
.edit-form-wrapper { margin-top: 15px; background: rgba(0, 0, 0, 0.3); padding: 15px; border-radius: 12px; border: 1px solid rgba(108, 92, 231, 0.2); }
.edit-form-wrapper textarea { width: 100%; height: 80px; background: rgba(15, 12, 41, 0.8); border: 1px solid rgba(255, 255, 255, 0.2); color: white; padding: 10px; border-radius: 8px; resize: vertical; outline: none; }
.save-btn-small { background: #4caf50; color: white; border: none; padding: 8px 20px; border-radius: 20px; cursor: pointer; font-weight: 500; }
.cancel-btn-small { background: rgba(255, 107, 107, 0.2); color: #ff6b6b; border: 1px solid #ff6b6b; padding: 8px 20px; border-radius: 20px; cursor: pointer; font-weight: 500; }

@media (max-width: 900px) {
    .product-detail { grid-template-columns: 1fr; }
}


/* --- Адаптив страницы товара --- */
@media (max-width: 900px) {
    .product-detail {
        grid-template-columns: 1fr; /* Блоки друг под другом */
        padding: 25px;
        gap: 30px;
    }
    .main-img-wrap {
        height: 350px;
    }
}
@media (max-width: 600px) {
    .main-img-wrap {
        height: 250px;
    }
    .product-detail-info h1 {
        font-size: 1.8em;
    }
    .product-price-large {
        font-size: 2.2em;
    }
    .review-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .review-top {
        flex-direction: column;
        gap: 5px;
    }
    .review-date {
        margin-left: 0;
        display: block;
    }
}

.formatted-text {
    line-height: 1.8;
    color: #ecf0f1;
}
.formatted-text h3 {
    margin-top: 25px;
    color: #a29bfe;
}
.formatted-text ul {
    margin-left: 20px;
    list-style: disc;
}
.specs-table {
    width: 100%;
    border-collapse: collapse;
}
.specs-table tr {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.specs-table td {
    padding: 12px;
}
.specs-table td:first-child {
    color: #888;
    width: 40%;
}