﻿
.tech-store {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f5f7fa;
    padding-bottom: 50px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center !important;
    margin-bottom: 30px;
    position: relative;
}

    .section-title::after {
        content: '';
        width: 80px;
        height: 4px;
        background: #007bff;
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
    }

/* ========== SIDEBAR FILTER STYLES ========== */
.sidebar {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 2rem;
   
    position: sticky;
    top: 20px;
}

    .sidebar label {
        font-weight: 600;
        color: #2d3748;
        margin-bottom: 0.5rem;
        
        display: block;
    }

    .sidebar .form-check {
        padding-left: 0;
        margin-bottom: 0.75rem;
    }

    .sidebar .form-check-input {
        width: 1.2em;
        height: 1.2em;
        margin-top: 0.2em;
        margin-right: 0.8rem;
        border: 2px solid #cbd5e0;
        transition: all 0.2s ease;
    }

        .sidebar .form-check-input:checked {
            background-color: #4f46e5;
            border-color: #4f46e5;
        }

        .sidebar .form-check-input:focus {
            box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.25);
        }

    .sidebar .form-check-label {
        cursor: pointer;
        color: #4a5568;
        transition: color 0.2s ease;
    }

    .sidebar .form-check:hover .form-check-label {
        color: #2d3748;
    }

    /* Price range inputs */
    .sidebar .form-control {
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        padding: 0.5rem 0.75rem;
        transition: all 0.2s ease;
    }

        .sidebar .form-control:focus {
            border-color: #4f46e5;
            box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.1);
        }

    /* Filter button */
    .sidebar .btn-primary {
        background-color: #4f46e5;
        border: none;
        border-radius: 8px;
        padding: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

        .sidebar .btn-primary:hover {
            background-color: #4338ca;
            transform: translateY(-2px);
        }

        .sidebar .btn-primary i {
            margin-right: 8px;
        }

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        margin-bottom: 1.5rem;
    }

        .sidebar .row {
            flex-direction: column;
        }

        .sidebar .col {
            width: 100%;
            margin-bottom: 1rem;
        }

            .sidebar .col:last-child {
                margin-bottom: 0;
            }
}

/* Animation for checkboxes */
@keyframes checkAnim {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.sidebar .form-check-input:checked {
    animation: checkAnim 0.3s ease;
}
/* Áp dụng màu đen cho nav-link chỉ trong dropdown này và thêm !important */
#productsDropdown {
    color: black !important;
    text-align: center;
}

    /* Đảm bảo khi hover, màu vẫn giữ là đen */
    #productsDropdown:hover {
        color: black !important;
    }

.product-section {
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .product-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }

.product-image {
    position: relative;
    overflow: hidden;
}

    .product-image img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.out-of-stock {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: #fff;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

.product-info {
    padding: 15px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    height: 3.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/*.product-price {
    font-size: 1.1rem;
    color: #007bff;
    font-weight: 700;
    margin-bottom: 10px;
}*/

.product-price {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
}

.product-old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-left: 5px;
}

.product-rating {
    color: #ffc107;
    margin-bottom: 10px;
}

.product-actions {
    display: flex;
    justify-content: space-between;
}
.product-meta {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.btn-add-cart, .btn-disabled {
    display: block;
    width: 80%;
    margin: 10px auto;
    padding: 8px;
    font-size: 0.95rem;
    border-radius: 25px;
    transition: background 0.3s ease;
}

.btn-add-cart {
    background: #007bff;
    color: #fff;
    border: none;
}

    .btn-add-cart:hover {
        background: #0056b3;
    }

.btn-disabled {
    background: #6c757d;
    color: #fff;
    border: none;
    cursor: not-allowed;
}

.product-actions {
    display: flex;
    justify-content: center;
    padding: 10px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.btn-wishlist, .btn-compare {
    background: none;
    border: 1px solid #ced4da;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    transition: all 0.3s ease;
}

    .btn-wishlist:hover {
        color: #dc3545;
        border-color: #dc3545;
    }

    .btn-compare:hover {
        color: #007bff;
        border-color: #007bff;
    }

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

    .pagination .page-item .page-link {
        color: #007bff;
        padding: 8px 12px;
        margin: 0 5px;
        border-radius: 5px;
        border: 1px solid #dee2e6;
        transition: background 0.3s ease, color 0.3s ease;
    }

    .pagination .page-item.active .page-link {
        background: #007bff;
        color: #fff;
        border-color: #007bff;
    }

    .pagination .page-item .page-link:hover {
        background: #007bff;
        color: #fff;
        border-color: #007bff;
    }

    .pagination .page-item.disabled .page-link {
        color: #6c757d;
        cursor: not-allowed;
    }

/* Mega Menu Styles */
.nav-item.dropdown {
    position: relative;
}

.mega-menu.dropdown-menu {
    width: 100%;
    max-width: 1200px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 1000; /* Đảm bảo Mega Menu hiển thị trên Sidebar */
    display: none; /* Ẩn mặc định, hiển thị khi hover */
}

.nav-item.dropdown:hover .mega-menu.dropdown-menu {
    display: block; /* Hiển thị khi hover */
}

.mega-menu .row {
    display: flex;
    flex-wrap: wrap;
}

.mega-menu .col-md-3 {
    padding: 10px;
}

.mega-menu h6 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #007bff;
    margin-bottom: 15px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.mega-menu .dropdown-item {
    font-size: 0.95rem;
    color: #333;
    padding: 8px 10px;
    border-radius: 5px;
    transition: background 0.3s ease, color 0.3s ease;
}

    .mega-menu .dropdown-item:hover {
        background: #007bff;
        color: #fff;
    }

/* Đảm bảo Sidebar không che Mega Menu */
.sidebar.sticky-top {
    z-index: 1;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
    }

    .product-image img {
        height: 150px;
    }

    .product-name {
        font-size: 1.1rem;
    }

    .btn-add-cart, .btn-disabled {
        width: 100%;
        font-size: 0.9rem;
    }

    .pagination .page-link {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    .mega-menu.dropdown-menu {
        width: 100%;
        max-width: 100%;
        transform: none;
        left: 0;
    }

    .mega-menu .col-md-3 {
        width: 100%;
        padding: 5px;
    }
}


/* About Section */
.about {
    padding: 50px 0;
    background-color: var(--light-gray);
    text-align: center;
}

.section-title {
    margin-bottom: 30px;
    font-size: 28px;
    color: var(--primary-color);
    position: relative;
   
}

    .section-title::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        height: 3px;
        background-color: var(--secondary-color);
    }

.about-content {
    max-width: 800px;
    margin: 0 auto 30px;
}

.features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.feature {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    padding: 20px;
    background-color: var(--white);
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

    .feature:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

.feature-icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Why Choose Us */
.why-choose-us {
    padding: 50px 0;
}

.reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.reason {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    padding: 20px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.reason-icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Testimonials */
.testimonials {
    padding: 50px 0;
    background-color: var(--light-gray);
}

.testimonial-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.testimonial {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    padding: 25px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.testimonial-content {
    margin-bottom: 15px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

    .author-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.author-info h4 {
    margin-bottom: 5px;
}

.author-rating {
    color: #ffc107;
}


.single-rating {
    font-size: 15px;
    color: #333;
    margin: 5px 0;
}

.stars {
    color: #FFC107; /* Màu vàng cho sao */
    font-weight: bold;
}

    .stars::after {
        content: "★";
        color: #ddd; /* Màu xám cho sao chưa đạt */
        letter-spacing: 3px;
    }