﻿/* =========================================
   CSS RIÊNG CHO TRANG CHI TIẾT SẢN PHẨM
   ========================================= */

/* 1. Layout Chung */
.product-detail-body {
    background-color: #0f1113;
    color: #e0e0e0;
    font-family: 'Rajdhani', sans-serif;
}

.product-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* 2. Breadcrumb (Đường dẫn) */
.breadcrumb {
    padding: 15px 0;
    background: #151515;
    border-bottom: 1px solid #222;
    margin-bottom: 30px;
}

    .breadcrumb .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .breadcrumb a {
        text-decoration: none;
        color: #b3b3b3;
    }

    .breadcrumb i {
        font-size: 0.8rem;
        margin: 0 10px;
        color: #555;
    }

    .breadcrumb .current {
        color: #00cec9;
        font-weight: 600;
        margin-left: 5px;
    }

/* 3. Phần Đầu: Ảnh & Thông tin mua hàng */
.product-top {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

/* Gallery Ảnh */
.product-gallery {
    flex: 1.2;
}

.main-img {
    width: 100%;
    height: 450px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 15px;
    background-color: #fff; /* Nền trắng để nổi bật sản phẩm */
    border: 1px solid #333;
}

.thumb-list {
    display: flex;
    gap: 12px;
    justify-content: center;
}

    .thumb-list img {
        width: 70px;
        height: 70px;
        object-fit: contain;
        background: #fff;
        border-radius: 8px;
        cursor: pointer;
        opacity: 0.6;
        border: 2px solid transparent;
        transition: 0.3s;
    }

        .thumb-list img:hover, .thumb-list img.active {
            opacity: 1;
            border-color: #6c5ce7;
        }

/* Thông tin mua hàng bên phải */
.product-buy-info {
    flex: 1;
}

.p-title {
    font-size: 2rem;
    margin-bottom: 15px;
    line-height: 1.3;
    color: #fff;
}

.p-rating {
    color: #f1c40f;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

    .p-rating span {
        color: #888;
        margin-left: 8px;
    }

.p-price-box {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.current-price {
    font-size: 2rem;
    font-weight: bold;
    color: #00cec9;
}

.old-price {
    text-decoration: line-through;
    color: #666;
    font-size: 1.1rem;
}

.discount {
    background: #ff4757;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
}

.p-short-desc {
    color: #b3b3b3;
    margin-bottom: 30px;
    line-height: 1.6;
}

.p-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-buy-now {
    flex: 2;
    padding: 15px;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
}

    .btn-buy-now:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
    }

.btn-add-cart {
    flex: 2;
    padding: 15px;
    background: transparent;
    border: 2px solid #6c5ce7;
    color: #6c5ce7;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}

    .btn-add-cart:hover {
        background: #6c5ce7;
        color: white;
    }

.btn-icon {
    flex: 0.5;
    background: #1e1e1e;
    border: 1px solid #333;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
}

.p-meta {
    list-style: none;
    padding: 0;
}

    .p-meta li {
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 10px;
        color: #aaa;
    }

    .p-meta i {
        color: #00cec9;
    }

/* 4. Phần Dưới: Tab & Sidebar */
.product-bottom-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Tabs */
.tab-buttons {
    display: flex;
    border-bottom: 2px solid #333;
    margin-bottom: 25px;
}

.tab-link {
    background: transparent;
    border: none;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    position: relative;
    text-transform: uppercase;
    font-family: inherit;
}

    .tab-link:hover {
        color: #fff;
    }

    .tab-link.active {
        color: #00cec9;
    }

        .tab-link.active::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 100%;
            height: 3px;
            background: #00cec9;
        }

.tab-content {
    animation: fadeIn 0.5s;
    line-height: 1.6;
    color: #d1d1d1;
}

.desc-banner {
    width: 100%;
    margin-top: 20px;
    border-radius: 8px;
}

.specs-list-container li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #222;
}

.specs-list-container strong {
    color: #fff;
}

.review-item {
    background: #1e1e1e;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #333;
}

/* Sidebar bên phải */
.p-sidebar .sidebar-box {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;
    margin-bottom: 25px;
}

.sidebar-box h3 {
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.game-details-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #bbb;
}

.game-details-list span {
    color: #fff;
    font-weight: 500;
}

/* Sản phẩm tương tự */
.related-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

    .related-item:last-child {
        border: none;
        margin: 0;
        padding: 0;
    }

    .related-item img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        background: #fff;
        border-radius: 6px;
    }

.related-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .related-info a {
        font-size: 0.95rem;
        font-weight: 600;
        color: #fff;
        margin-bottom: 5px;
        text-decoration: none;
        line-height: 1.2;
    }

        .related-info a:hover {
            color: #00cec9;
        }

    .related-info span {
        color: #00cec9;
        font-weight: bold;
        font-size: 0.9rem;
    }

/* Responsive */
@media (max-width: 900px) {
    .product-top, .product-bottom-grid {
        flex-direction: column;
        display: flex;
    }

    .product-gallery {
        margin-bottom: 20px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
