﻿
.tech-store {
    font-family: 'Inter', sans-serif;
    background: #f8f9fa;
    padding: 50px 0;
}

.container {
    max-width: 1200px;
    margin: 30px auto;  /* Căn giữa container */
   
}


.sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 20px;
}

.product-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    position: relative;
}

    .section-title::after {
        content: '';
        width: 50px;
        height: 3px;
        background: #007bff;
        position: absolute;
        bottom: -8px;
        left: 0;
    }

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
}
.product-old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-left: 5px;
}
/*.product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #e44d26;
    margin-bottom: 15px;
}*/
.product-price {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
}
.product-meta p {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 8px;
}

.product-main-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

    .product-main-image img {
        width: 100%;
        height: 400px;
        object-fit: cover;
        transition: transform 0.4s ease;
    }

    .product-main-image:hover img {
        transform: scale(1.05);
    }

.product-thumbnails {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.thumbnail-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #e9ecef;
    transition: border-color 0.3s ease, opacity 0.3s ease;
}

    .thumbnail-image:hover {
        border-color: #007bff;
        opacity: 0.9;
    }

.video-iframe, .video-player {
    border-radius: 8px;
}

.product-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/*chỉnh chi tiết sản phẩm*/
/* Đảm bảo tab-content có vị trí tương đối để chứa các tab */
.tab-content {
    position: relative;
    min-height: 100px; /* Đảm bảo không gian cho hiệu ứng */
    background-color: white; /* Màu nền của phần nội dung tab */
}

/* Hiệu ứng cho tab-pane */
.tab-pane {
    opacity: 0;
    transform: translateY(20px); /* Bắt đầu từ dưới lên */
    transition: opacity 0.3s ease, transform 0.3s ease; /* Hiệu ứng mượt mà */
    color: black; /* Màu chữ của tab */
}

    /* Khi tab được hiển thị */
    .tab-pane.show {
        opacity: 1;
        transform: translateY(0); /* Trượt lên vị trí ban đầu */
    }

    /* Đảm bảo tab active hiển thị ngay lập tức */
    .tab-pane.active {
        opacity: 1;
        transform: translateY(0);
    }

/* Tùy chỉnh giao diện nav-tabs */
.nav-tabs .nav-link {
    background-color: #333; /* Màu nền của tab khi không được chọn */
    color: #18181b; /* Màu chữ của tab khi không được chọn */
    transition: background-color 0.3s ease, color 0.3s ease;
}

    /* Khi tab được chọn (active) */
    .nav-tabs .nav-link.active {
        background-color: #007bff; /* Màu nền của tab khi được chọn */
        color: white; /* Màu chữ của tab khi được chọn */
        border-bottom: 2px solid #007bff; /* Màu viền dưới */
    }

.btn-add-cart, .btn-checkout, .btn-disabled {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-add-cart {
    background: #28a745;
    color: #fff;
    border: none;
}

    .btn-add-cart:hover {
        background: #218838;
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    }

.btn-checkout {
    background: #007bff;
    color: #fff;
    border: none;
}

    .btn-checkout:hover {
        background: #0056b3;
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    }

.btn-disabled {
    background: #adb5bd;
    color: #fff;
    border: none;
    cursor: not-allowed;
}

.product-details .detail-item {
    font-size: 1rem;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.6;
}

    .product-details .detail-item strong {
        color: #1a1a1a;
    }

.product-variants .variant-list {
    list-style: none;
    padding: 0;
}

    .product-variants .variant-list li {
        margin-bottom: 10px;
    }

.variant-link {
    color: #007bff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

    .variant-link:hover {
        color: #0056b3;
        text-decoration: underline;
    }

.reviews-section {
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.review-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

    .review-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

.reviews-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

    .reviews-meta li {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.95rem;
        color: #6c757d;
    }

    .reviews-meta .fa {
        color: #007bff;
    }

.review-rating {
    color: #ffc107;
    font-weight: 500;
}

.review-comment {
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
}

.review-date {
    font-size: 0.9rem;
    color: #6c757d;
}

.no-reviews {
    font-size: 1rem;
    color: #6c757d;
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.review-form .form-label {
    font-weight: 500;
    color: #1a1a1a;
}

.review-form .form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 10px;
    font-size: 1rem;
}

    .review-form .form-control:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

.review-form .btn-primary {
    background: #007bff;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

    .review-form .btn-primary:hover {
        background: #0056b3;
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    }

.btn-outline-primary {
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

    .btn-outline-primary:hover {
        background: #007bff;
        color: #fff;
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    }

.login-prompt {
    font-size: 1rem;
    color: #6c757d;
}

    .login-prompt a {
        color: #007bff;
        text-decoration: none;
    }

        .login-prompt a:hover {
            text-decoration: underline;
        }

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
}

.modal-content {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.modal-image {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: #1a1a1a;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.3s ease;
}

    .close:hover {
        color: #007bff;
    }

.variant-images {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.variant-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.variant-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .tech-store {
        padding: 30px 0;
    }

    .product-main-image img {
        height: 300px;
    }

    .product-title {
        font-size: 1.75rem;
    }

    .product-price {
        font-size: 1.5rem;
    }

    .product-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-add-cart, .btn-checkout, .btn-disabled {
        width: 100%;
        padding: 10px;
    }

    .thumbnail-image, .variant-image {
        width: 60px;
        height: 60px;
    }

    .reviews-meta {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .product-main-image img {
        height: 250px;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .product-price {
        font-size: 1.25rem;
    }
}

/* Container cho liên kết hình ảnh bình luận */
.comment-image-link {
    display: inline-block; /* Đảm bảo liên kết hiển thị như một khối nội tuyến */
    position: relative; /* Cho phép định vị tuyệt đối cho các phần tử con nếu cần */
    max-width: 100%; /* Giới hạn kích thước tối đa */
    cursor: pointer; /* Con trỏ tay khi hover */
    text-decoration: none; /* Loại bỏ gạch chân mặc định của liên kết */
    transition: opacity 0.3s ease; /* Hiệu ứng mượt mà khi thay đổi opacity */
}

/* Hình ảnh bình luận */
.comment-image {
    max-width: 100%; /* Đảm bảo hình ảnh không vượt quá container */
    height: auto; /* Giữ tỷ lệ khung hình */
    border-radius: 4px; /* Góc bo tròn nhẹ */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Đổ bóng nhẹ để nổi bật */
    object-fit: cover; /* Đảm bảo hình ảnh được căn chỉnh tốt */
    vertical-align: middle; /* Loại bỏ khoảng cách dư thừa dưới hình ảnh */
}


/* Comments Section */
.comments-section .section-title {
    color: #333;
    margin-bottom: 15px;
}

.comment-item {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.reply-comment-item {
    margin-left: 20px;
    border-left: 2px solid #eee;
}

.comments-meta li {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.comment-content {
    margin-top: 10px;
    color: #444;
}

.comment-images {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.comment-image-link {
    display: inline-block;
    position: relative;
    max-width: 100px;
    cursor: zoom-in;
    text-decoration: none;
}

.comment-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.comment-image-link:hover .comment-image {
    transform: scale(1.05);
    opacity: 0.9;
}

.no-comments {
    color: #888;
}

.comment-form .form-group {
    margin-bottom: 15px;
}

.comment-form .btn {
    padding: 10px 20px;
    border-radius: 6px;
}

/* Star Rating Styles */
.star-rating {
    font-size: 1.5rem;
    color: #ccc;
}

.star-container {
    cursor: pointer;
    display: inline-flex;
    gap: 5px;
}

.star {
    transition: color 0.3s ease;
}

    .star.active {
        color: #ffca28; /* Màu vàng cho sao được chọn */
    }

    .star:hover,
    .star.hover-active {
        color: #ffca28; /* Màu vàng khi hover */
    }

        .star:hover ~ .star,
        .star.hover-active ~ .star {
            color: #ccc; /* Sao bên phải trở lại màu xám khi hover */
        }

/* Average Rating Display */
.average-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.star-display {
    color: #ccc; /* Màu mặc định cho sao rỗng */
}

    .star-display i {
        font-size: 1.2rem;
    }

    .star-display .active {
        color: #ffca28; /* Màu vàng cho sao được tô */
    }

.average-rating span {
    color: #555;
}

