:root {
    --primary-color: #8B5A2B;      /* Màu nâu đất ấm áp */
    --primary-light: #B87C4B;      /* Nâu sáng hơn */
    --primary-dark: #5A3A1C;       /* Nâu đậm */
    
    --secondary-color: #C49A6C;     /* Màu be vàng */
    --accent-color: #D4AF37;        /* Màu vàng Phật giáo */
    
    --text-color: #2C1810;          /* Màu chữ chính - nâu đen */
    --text-light: #6B4F3F;          /* Màu chữ phụ */
    --text-muted: #8F7A6B;          /* Màu chữ mờ */
    
    --bg-light: #FDF8F2;             /* Nền sáng ấm */
    --bg-white: #FFFFFF;             /* Nền trắng */
    --bg-cream: #FFF9F0;             /* Nền kem */
    
    --dark-bg: #2C1810;              /* Nền tối */
    
    --border-color: #E8D5C4;         /* Màu viền */
    --shadow-sm: 0 2px 8px rgba(44, 24, 16, 0.05);
    --shadow-md: 0 4px 16px rgba(44, 24, 16, 0.08);
    --shadow-lg: 0 8px 24px rgba(44, 24, 16, 0.12);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-family-serif: 'Merriweather', 'Times New Roman', serif;
    
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-circle: 50%;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-cream);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-serif);
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(139, 90, 43, 0.1);
    border-radius: var(--border-radius-circle);
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== TOP BAR ==================== */
.top-bar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    font-size: 14px;
    padding: 8px 0;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s;
}

.top-bar a:hover {
    color: white;
}

/* ==================== HEADER MAIN ==================== */
.header-main {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.logo-wrapper {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon i {
    font-size: 28px;
    color: var(--accent-color);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: var(--font-family-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.logo-sub {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

/* ==================== USER MENU ==================== */
.user-menu {
    display: inline-block;
}

.user-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px;
    border-radius: 50px;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid transparent;
}

.user-btn:hover {
    background: var(--bg-cream);
    border-color: var(--border-color);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar i {
    font-size: 24px;
    color: white;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
    color: var(--text-color);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.auth-buttons .btn {
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 14px;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-primary {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ==================== SEARCH SECTION ==================== */
.search-section {
    background: var(--bg-cream);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.search-container {
    width: 100%;
}

.search-form {
    margin-bottom: 10px;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 3px;
    transition: all 0.3s;
}

.search-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(139, 90, 43, 0.1);
}

.search-icon-left {
    padding-left: 15px;
    color: var(--text-muted);
    font-size: 16px;
}

.search-input {
    flex: 1;
    border: none;
    padding: 12px 10px;
    font-size: 15px;
    background: transparent;
    min-width: 0;
}

.search-input:focus {
    outline: none;
}

.search-filter-wrapper {
    position: relative;
    margin-right: 5px;
}

.search-filter {
    padding: 8px 30px 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-cream);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    min-width: 120px;
}

.search-filter:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 12px;
    pointer-events: none;
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 25px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: translateX(-2px);
}

.popular-searches {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
}

.popular-searches a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 12px;
    background: white;
    border-radius: 20px;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.popular-searches a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==================== MAIN NAVIGATION ==================== */
.nav-main {
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-radius: var(--border-radius-md);
}

.nav-link i {
    color: var(--primary-color);
    font-size: 16px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: rgba(139, 90, 43, 0.05);
    color: var(--primary-color);
}

.nav-link:hover i {
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
    position: relative;
    background: rgba(139, 90, 43, 0.08);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-lg);
    padding: 12px;
    margin-top: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.dropdown-item {
    padding: 8px 15px;
    border-radius: var(--border-radius-md);
    transition: all 0.3s;
    color: var(--text-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.dropdown-item:hover {
    background: rgba(139, 90, 43, 0.08);
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Mega Menu */
.mega-menu {
    width: 500px !important;
    padding: 20px !important;
}

.menu-section {
    margin-bottom: 15px;
}

.menu-title {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.menu-title i {
    margin-right: 8px;
}

.menu-item {
    display: block;
    padding: 5px 10px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 13px;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s;
}

.menu-item:hover {
    background: rgba(139, 90, 43, 0.05);
    color: var(--primary-color);
    transform: translateX(5px);
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    min-height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 60px 0;
    border-radius: var(--border-radius-xl);
    margin: 20px 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><path d="M50 15 L61 35 L85 35 L65 50 L75 75 L50 62 L25 75 L35 50 L15 35 L39 35 Z" fill="white"/></svg>');
    background-size: 60px;
    background-repeat: repeat;
    animation: float 20s linear infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    width: 100%;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: fadeInUp 1s;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s 0.2s both;
}

/* ==================== CARDS ==================== */
.card {
    background: white;
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.card-link i {
    transition: transform 0.3s;
}

.card-link:hover i {
    transform: translateX(5px);
}

/* ==================== SECTION TITLES ==================== */
.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    color: var(--text-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

.section-title-left {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 30px;
    font-family: var(--font-family-serif);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
}

.section-title-left i {
    color: var(--primary-color);
    margin-right: 10px;
}

.btn-view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 5px 15px;
    border-radius: 50px;
    background: rgba(139, 90, 43, 0.1);
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    background: var(--primary-color);
    color: white;
}

/* ==================== SEARCH RESULTS ==================== */
.search-header {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.no-results {
    background: white;
    border-radius: var(--border-radius-xl);
    padding: 50px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    text-align: center;
}

.badge {
    padding: 5px 10px;
    border-radius: 50px;
    font-weight: 500;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--dark-bg);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 20px;
    margin-top: 60px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.footer h5 {
    color: white;
    font-size: 18px;
    margin-bottom: 25px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s;
    display: inline-block;
    font-size: 14px;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-links i {
    margin-right: 8px;
    color: var(--primary-color);
    font-size: 12px;
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact i {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: var(--primary-color);
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 30px 0;
}

.footer-bottom {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* ==================== BACK TO TOP ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-circle);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
}

.back-to-top.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991px) {
    .nav-menu {
        flex-wrap: wrap;
    }
    
    .nav-link {
        padding: 12px 15px;
    }
    
    .mega-menu {
        width: 100% !important;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 32px;
    }
    
    .search-wrapper {
        flex-wrap: wrap;
    }
    
    .search-input {
        width: 100%;
    }
    
    .search-filter-wrapper {
        width: 100%;
        margin: 5px 0;
    }
    
    .search-filter {
        width: 100%;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .popular-searches {
        justify-content: center;
    }
    
    .logo-wrapper {
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .auth-buttons {
        justify-content: center;
    }
    
    .section-title-left {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .btn-view-all {
        margin-left: 0 !important;
    }
    /* Thêm vào file style.css */

/* User Menu */
.user-menu {
    display: inline-block;
}

.user-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px;
    border-radius: 50px;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid transparent;
}

.user-btn:hover {
    background: var(--bg-cream);
    border-color: var(--border-color);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    text-transform: uppercase;
}

.user-name {
    font-weight: 500;
    color: var(--text-color);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-role-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    color: white;
    margin-left: 5px;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.auth-buttons .btn {
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 14px;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-primary {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

}