﻿/* Tùy chỉnh màu chủ đạo */
.text-navy {
    color: #1a2b4c !important;
}
.container {
    max-width: 1440px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
/* Header */
.ega-header .nav-link {
    font-size: 15px;
}

    .ega-header .nav-link:hover {
        color: #b58d55 !important; /* Đổi màu vàng nâu khi hover */
    }

/* Khối Slider Banner */
.hero-slider {
    width: 100%;
    height: 650px; /* Độ cao banner */
    overflow: hidden;
}
img {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE/Edge */
    user-select: none; /* Standard */
    pointer-events: none; /* Chặn hoàn toàn click chuột và kéo thả vào ảnh */
}
.slider-item {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Nút trượt 2 bên */
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: white;
    border: none;
    border-radius: 50%;
    z-index: 10;
    color: #1a2b4c;
    transition: 0.3s;
}

    .slider-nav-btn:hover {
        background: #1a2b4c;
        color: white;
    }

    .slider-nav-btn.prev {
        left: 20px;
    }

    .slider-nav-btn.next {
        right: 20px;
    }




/* Khung chứa dạng lưới hoặc cuộn ngang */
.collections-scroll-container {
    width: 100%;
    overflow: hidden;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(180px, 1fr)); /* Mặc định chia 6 cột trên máy tính */
    gap: 20px;
}

@media (max-width: 992px) {
    .collections-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
}

/* Kích thước và tỉ lệ khung ảnh chuẩn đẹp dọc */
.danhmuc-img {
    height: 320px; /* Điều chỉnh chiều cao khung ảnh theo ý muốn */
    background-color: #f8f9fa;
}

    .danhmuc-img img {
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
    }

/* Hiệu ứng phóng to nhẹ ảnh khi di chuột vào */
.danhmuc-item:hover .danhmuc-img img {
    transform: scale(1.05);
}

/* Lớp phủ hiệu ứng chuyển màu từ trong suốt sang tối ở chân ảnh */
.collection-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
}

.danhmuc-txt {
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
/* Thu hẹp khoảng cách trên dưới của tất cả các khối trang chủ */
.policy-and-collections,
.explore-collections-section {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
}

/* Giảm khoảng cách giữa khối Cam kết và khối Bộ sưu tập */
.service-policies {
    margin-bottom: 15px !important;
}

/* Đảm bảo khung lưới danh mục không bị khoảng trống thừa */
.collections-scroll-container {
    margin-top: 5px;
}

/* Khung chứa tổng thể, ẩn thanh cuộn mặc định */
.collections-scroll-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -ms-overflow-style: none; /* Ẩn thanh cuộn trên IE/Edge */
    scrollbar-width: none; /* Ẩn thanh cuộn trên Firefox */
}

    .collections-scroll-container::-webkit-scrollbar {
        display: none; /* Ẩn thanh cuộn trên Chrome/Safari */
    }

/* Ép tất cả các thẻ bộ sưu tập xếp thành MỘT HÀNG NGANG DUY NHẤT */
.collections-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    padding-bottom: 10px;
}

    /* Cố định chiều rộng của từng item để chúng không bị bóp méo hoặc rớt dòng */
    .collections-grid .collection-item {
        flex: 0 0 200px; /* Chiều rộng cố định mỗi thẻ là 200px (bạn có thể tăng giảm tùy ý) */
        max-width: 200px;
    }

/* Chiều cao khung ảnh */
.danhmuc-img {
    height: 300px;
    background-color: #f8f9fa;
}

    .danhmuc-img img {
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
    }

.danhmuc-item:hover .danhmuc-img img {
    transform: scale(1.05);
}

.collection-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
}


/* Responsive cho màn hình nhỏ hơn */
@media (max-width: 992px) {
    .flash-sale-item {
        flex: 0 0 calc((100% - 2 * 16px) / 3);
        max-width: calc((100% - 2 * 16px) / 3);
    }
}

@media (max-width: 768px) {
    .flash-sale-item {
        flex: 0 0 calc((100% - 1 * 16px) / 2);
        max-width: calc((100% - 1 * 16px) / 2);
    }
}

/* 1. Phần khung bao phủ ẩn thanh tràn và tạo hiệu ứng mờ 2 mép biên */
.brand-marquee-wrapper {
    width: 100%;
    position: relative;
    display: flex;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

/* 2. Dải track chứa toàn bộ logo xếp thành hàng ngang và chạy bằng animation */
.brand-marquee-track {
    display: flex;
    width: max-content;
    animation: brandScroll 30s linear infinite;
}

/* Tạm dừng chuyển động khi rê chuột vào dải logo */
.brand-marquee-wrapper:hover .brand-marquee-track {
    animation-play-state: paused;
}

/* 3. Từng item logo */
.brand-marquee-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 160px; /* Khoảng cách đều giữa các logo */
}

/* 4. Định dạng ảnh logo */
.brand-logo-img {
    max-height: 40px; /* Chiều cao đồng đều chuẩn */
    width: auto !important;
    max-width: 120px;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.85;
}

.brand-marquee-item a:hover .brand-logo-img {
    transform: scale(1.08);
    opacity: 1;
}

/* 5. Thiết lập keyframes cho hiệu ứng trượt vô tận */
@keyframes brandScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%); /* Dịch chuyển đúng một nửa vì dữ liệu đã được nhân đôi */
    }
}



/* Lớp phủ mờ che toàn màn hình */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

    /* Khi lớp phủ được kích hoạt */
    .cart-overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* Khung sidebar giỏ hàng trượt từ phải sang */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 600px;
    max-width: 100vw; /* Responsive cho mobile */
    height: 100vh;
    z-index: 1050;
    transform: translateX(100%); /* Ẩn ra ngoài mép phải */
    transition: transform 0.3s ease-in-out;
}

    /* Khi sidebar được kích hoạt */
    .cart-sidebar.active {
        transform: translateX(0);
    }


.breadcrumb-wrapper {
    background-color: #f8f9fa !important;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}

    .breadcrumb-wrapper .breadcrumb {
        background: transparent;
        padding: 0;
        margin: 0;
        font-size: 0.875rem;
    }

    .breadcrumb-wrapper .breadcrumb-item + .breadcrumb-item::before {
        content: "/";
        color: #6c757d;
        padding: 0 8px;
    }
/* Trên Mobile (Màn hình nhỏ hơn hoặc bằng 768px): tự động ép hiển thị 2 cột */
@media (max-width: 768px) {
    .flash-sale-item {
        flex: 0 0 calc((100% - 1 * 12px) / 2) !important;
        max-width: calc((100% - 1 * 12px) / 2) !important;
    }

    /* Thu nhỏ khoảng cách gap giữa 2 cột trên mobile cho gọn gàng */
    .flash-sale-track {
        gap: 12px !important;
    }
}
/* Tổng thể khối đánh giá */
.feedback {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

    .feedback .title {
        font-size: 1.2rem;
        font-weight: bold;
        color: #1a2b4c;
        margin-bottom: 15px;
    }

/* Phần thống kê điểm sao ở trên */
.toprt {
    background: #f8f9fa;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.crt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.lcrt {
    font-size: 1.8rem;
    color: #d0021b;
    font-weight: bold;
}

.rcrt {
    flex: 1;
    max-width: 300px;
}

    .rcrt .r {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 4px;
        font-size: 0.85rem;
    }

    .rcrt .bgb {
        flex: 1;
        height: 6px;
        background: #e5e5e5;
        border-radius: 3px;
        overflow: hidden;
    }

    .rcrt .bgb-in {
        height: 100%;
        background: #ffc107;
    }

/* Nút gửi đánh giá */
.send-feedback, .btn-send {
    background-color: #1a2b4c !important;
    color: #fff !important;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

    .send-feedback:hover, .btn-send:hover {
        opacity: 0.9;
    }

/* Form viết đánh giá & Chọn sao */
.feedback-form {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.rating-stars ul#stars {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 5px 0 15px 0;
    gap: 5px;
}

    .rating-stars ul#stars > li.star {
        font-size: 1.5rem;
        color: #ccc;
        cursor: pointer;
    }

        .rating-stars ul#stars > li.star.selected,
        .rating-stars ul#stars > li.star.hover {
            color: #ffc107;
        }

/* Khung nhập nội dung và input thông tin */
.input-area, .box-input {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.input-area {
    height: 90px;
    resize: vertical;
}

.box-2 {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
}

@media (max-width: 768px) {
    .box-2 {
        grid-template-columns: 1fr;
    }
}

/* Ẩn input file thô và làm đẹp nút Đính kèm ảnh */
.hide {
    display: none !important;
}

.custom-file-upload {
    display: inline-block;
    padding: 6px 15px;
    cursor: pointer;
    background: #f1f3f5;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 10px;
}

    .custom-file-upload:hover {
        background: #e2e6ea;
    }

/* Danh sách bình luận hiển thị */
.ratingLst {
    list-style: none;
    padding: 0;
}

    .ratingLst .par {
        border-bottom: 1px solid #eaeaea;
        padding: 15px 0;
    }

    .ratingLst .rh {
        display: flex;
        justify-content: space-between;
        margin-bottom: 5px;
        font-weight: bold;
    }

    .ratingLst .rc .fa-star.active {
        color: #ffc107;
    }

    .ratingLst .rc .fa-star {
        color: #ccc;
    }

/* Khắc phục lỗi thanh phần trăm bị tràn số */
.bgb {
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.bgb-in {
    background: #ffc107 !important;
    height: 8px;
    /* Đảm bảo chiều rộng phần trăm không vượt quá 100% */
    max-width: 100%;
}

/* Tinh chỉnh lại giao diện form đánh giá khi xổ xuống */
.feedback-form {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 15px;
}

    /* Đồng bộ kích thước các ô input và textarea */
    .feedback-form .form-control {
        border-radius: 6px;
        border-color: #cbd5e1;
        font-size: 0.9rem;
    }

        .feedback-form .form-control:focus {
            border-color: #1a2b4c;
            box-shadow: 0 0 0 0.2rem rgba(26, 43, 76, 0.15);
        }

/* Khung trả lời của Admin bám sát mẫu */
.admin-comment {
    background-color: #f1f2f4 !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
}

    .admin-comment .action li:hover {
        color: #1a2b4c !important;
        text-decoration: underline;
    }

/* Khoảng cách các mục bình luận */
.ratingLst .par:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}