/* :root {
    --primary: #2ec976;       
    --primary-dark: #0d7a5e;  
    --primary-light: #e0f7f5; 
    --dark: #1a1a1a;          
    --dark-gray: #4a4a4a;     
    --secondary-btn: #8fa69f; 
    --accent: #ff6b6b;        
    --surface: #ffffff;       
    --background: #f8fcfb;    
} */

:root {
    /* Tone Vàng đồng (Trích xuất từ file logo.png mới) */
    --primary: #dfb84f;
    /* Vàng đồng chủ đạo (phần thân chữ và vòng cung giữa) */
    --primary-dark: #b58c2a;
    /* Vàng sậm/nâu vàng (vùng tối ở đáy vòng cung và chân chữ) */
    --primary-light: #fffcf5;
    /* Nền vàng cực nhạt - pha chút hơi ấm để hợp với màu gold */

    /* Điểm nhấn & Nút bấm */
    --accent: #ceba5a;
    /* Vàng chanh sáng (vùng bắt sáng chói nhất trên thân chữ L) */
    --secondary-btn: #d2a742;
    /* Vàng trung gian (nối giữa vùng sáng và vùng tối) */

    /* Các màu trung tính (Giữ nguyên sự tối giản để tôn màu vàng) */
    --dark: #1a1a1a;
    /* Đen nguyên bản cho chữ chính */
    --dark-gray: #4a4a4a;
    /* Xám tối cho chữ phụ */
    --surface: #ffffff;
    /* Trắng tinh cho các khối card, form */
    --background: #f9f9f9;
    /* Trắng xám nhạt cho nền web tổng thể */
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
}

body {
    color: var(--dark);
    background-color: var(--background);
    min-height: 100vh;
}

button,
input,
select,
a {
    outline: none;
}

.container {
    width: 100%;
    max-width: 90%;
    padding: 0 clamp(0.5rem, 0.3182rem + 0.9091vw, 1rem);
}

.text-primary-custom {
    color: var(--primary) !important;
}

.bg-primary-custom {
    background-color: var(--primary) !important;
}

.bg-primary-light {
    background-color: var(--primary-light) !important;
}

.bg-dark-custom {
    background-color: var(--dark) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.bg-accent {
    background-color: var(--accent) !important;
}

.btn-primary-custom {
    background-color: var(--primary);
    color: #fff;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

header,
nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
}

.nav-link-custom {
    color: white !important;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 1.2rem 1.5rem !important;
    position: relative;
    transition: all 0.2s ease;
}

.nav-link-custom:hover {
    color: #ffe4e6 !important;
}

.nav-link-custom.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 4px;
    background-color: white;
    border-radius: 4px 4px 0 0;
}

.hover-primary:hover {
    color: var(--primary) !important;
}

.section-title {
    font-size: clamp(1.5rem, 1.3909rem + 0.5455vw, 1.8rem);
    font-weight: 800;
    color: var(--dark);
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.product-col {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-left: 3px;
    /* Thêm dòng này để đẩy ảnh sang phải */
}

.product-card {
    border: 1px solid rgba(46, 201, 118, 0.06);
    border-radius: 16px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    padding: 20px;
    background: var(--surface);
    height: 100%;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.product-card:hover {
    transform: scale(1.01);
    box-shadow: 0 15px 35px rgba(46, 201, 118, 0.12);
    border-color: var(--primary-light);
}

.product-img-wrap {
    position: relative;
    overflow: hidden;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 10px;
}

.product-img-wrap a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.product-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-img {
    transform: scale(1.06);
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--dark);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.product-card:hover .product-title {
    color: var(--primary-dark);
}

.product-actions-wrap {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.btn-add-cart {
    color: var(--primary);
    border: 1px solid var(--primary);
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.85rem;
}

.btn-add-cart:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-buy-now {
    flex: 1;
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.btn-buy-now:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.badge-discount {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 16px 0 16px 0;
    z-index: 3;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.25);
}

.line-through {
    text-decoration: line-through;
}

.news-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.news-card:hover .news-img {
    transform: scale(1.05);
}

.news-card:hover h5 {
    color: var(--primary-dark);
}

.news-img-wrap {
    overflow: hidden;
    position: relative;
    height: 220px;
}

.news-img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-img {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
    height: 35px;
}

.brand-img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.category-list .list-group-item {
    border: none;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
    color: #333;
    background: transparent;
    transition: color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list .list-group-item:last-child {
    border-bottom: none;
}

.category-list .list-group-item:hover {
    color: var(--primary);
    background: transparent;
}

.contact-form-input {
    border-radius: 30px;
    padding: 0.75rem 1.5rem;
    border: 1px solid #e5e7eb;
    font-size: 0.95rem;
}

.contact-form-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(46, 201, 118, 0.2);
    border-color: var(--primary);
}

textarea.contact-form-input {
    border-radius: 20px;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.login-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

@media all and (min-width: 992px) {
    .dropdown-hover:hover .dropdown-menu {
        display: block;
        animation: fadeIn 0.3s ease-in-out;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Base style cho TẤT CẢ menu dropdown */
.dropdown-menu {
    border-radius: 12px !important;
    padding: 10px 0 !important;
    min-width: 230px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.navbar-nav .dropdown-menu {
    position: absolute !important;
    top: 80%;
    left: 20%;
    margin-top: 0;
}

.navbar-nav .dropdown-hover .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    right: auto;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 15px;
    left: auto;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

.dropdown-item {
    font-size: 0.95rem;
    color: #4a4a4a;
    padding: 10px 20px !important;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-light) !important;
    color: var(--primary-dark) !important;
    padding-left: 25px !important;
}

/* Custom màu sắc cho Pagination đồng bộ với nút bấm */
.pagination .page-item.active .page-link {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
}

.pagination .page-link {
    color: var(--primary);
    border-color: #dee2e6;
    box-shadow: none !important;
}

.pagination .page-link:hover {
    color: var(--primary-dark);
    background-color: var(--primary-light);
    border-color: #dee2e6;
}

/* FIX: Định dạng hiển thị trượt Offcanvas Menu Mobile */
@media (max-width: 767.98px) {
    .offcanvas-body .navbar-nav {
        padding: 15px !important;
    }

    .offcanvas-md {
        max-width: 80vw;
    }

    .nav-link-custom {
        padding: 12px 15px !important;
    }

    .nav-link-custom.active::after {
        display: none;
    }

    .nav-link-custom.active {
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
    }

    /* FIX LỖI SUBMENU TRÊN MOBILE: Bỏ viền, gỡ Absolute để đẩy tự nhiên */
    .navbar-nav .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        background-color: transparent !important;
        border: none !important;
        /* Đã loại bỏ viền của submenu */
        margin-top: 0 !important;
        margin-left: 20px !important;
        margin-bottom: 10px !important;
        border-radius: 0 !important;
        padding: 5px 0 !important;
        display: none;
    }

    .navbar-nav .dropdown-menu.show {
        display: block !important;
    }

    .navbar-nav .dropdown-item {
        color: rgba(255, 255, 255, 0.8) !important;
        padding-left: 15px !important;
        font-size: 0.95rem !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        background-color: transparent !important;
        white-space: normal !important;
    }

    .navbar-nav .dropdown-item:hover,
    .navbar-nav .dropdown-item:focus {
        background-color: transparent !important;
        color: #ffffff !important;
        padding-left: 22px !important;
    }

    .navbar-nav .dropdown-hover .dropdown-menu::before {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    .container {
        max-width: 100%;
        margin: 0;
    }
}

/* Styling cho các khối bài viết liên quan (post-box) */
.post-box {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-column: column;
    flex-direction: column;
}

.post-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.post-box-img {
    height: 180px;
    overflow: hidden;
}

.post-box-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-box:hover .post-box-img img {
    transform: scale(1.05);
}

.post-box-detail {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-title a {
    text-decoration: none;
    color: #212529;
}

.post-title a:hover {
    color: var(--primary);
}

.post-entry p {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.post-meta span {
    font-size: 0.75rem;
    color: #adb5bd;
}