
/* --- ၁။ General Setup & Variables --- */
:root {
    --primary-blue: #2196F3;
    --dark-blue: #1976D2;
    --hover-blue: #1565C0;
    --bg-light: #f4f7f6;
    --text-dark: #222;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-top: 60px; /* Navbar height နဲ့ ကိုက်ညီရန် */
    font-family: 'Pyidaungsu', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    
}

/* --- ၂။ Navigation Bar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px; /* PC & Mobile height တစ်သမတ်တည်းထားခြင်း */
    z-index: 1000;
    display: flex;
    align-items: center;
    background-color: var(--primary-blue);
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* PC Navbar Layout ပြင်ဆင်ချက် */
.nav-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 20px; /* Logo နဲ့ Menu ကြား အကွာအဝေး */
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* PC မှာ အစက်လေးတွေ လုံးဝမပေါ်စေရန် ပြင်ဆင်ချက် */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    transition: transform 0.4s ease; /* Search ပွင့်ရင် ရွေ့သွားဖို့ */
}

.nav-menu li a {
    color: var(--white);
    text-decoration: none;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    transition: 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-menu li a i {
    margin-right: 8px;
    font-size: 1.1em;
}

.nav-menu li a:hover {
    background-color: rgba(255,255,255,0.2);
    border-radius: 4px;
}

/* Mobile Menu Toggle (အချောင်းသုံးချောင်း) */
.menu-toggle {
    display: none; /* PC မှာ ဖျောက်ထားမယ် */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 5px 0;
    transition: 0.3s;
}

/* --- ၃။ Search System --- */
.search-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    margin-left: auto; /* ဒါက Search ကို ညာဘက်အစွန်း တွန်းလိုက်တာပါ */
}

.search-box {
    width: 0;
    overflow: hidden;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-wrapper.active .search-box {
    width: 180px;
    margin-right: 8px;
}

#search-input {
    width: 100%;
    padding: 7px 15px;
    border-radius: 20px;
    border: 1px solid var(--white);
    outline: none;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.9);
}

.search-suggestions {
    position: absolute;
    top: 45px;
    right: 0;
    width: 250px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 2000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #333;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #e3f2fd;
    color: var(--primary-blue);
}

.search-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
}

/* --- ၄။ Book Cards & Layout --- */
.scroll-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    padding: 15px 20px;
    background: var(--white);
    border-radius: 10px;
    margin: 10px;
    -webkit-overflow-scrolling: touch;
}

.grid-view {
    flex-wrap: wrap !important;
    overflow-x: hidden !important;
    justify-content: center;
}

.book-card {
    background: var(--white);
    padding: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: 0.3s;
    flex: 0 0 145px;
}

.book-card:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.book-card img {
    width: 100%;
    height: 195px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
}

.book-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3em;
    line-height: 1.5em;
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 500;
}

/* --- ၅။ Headers & Section Controls --- */
.section-container {
    background-color: var(--white);
    margin: 15px 10px;
    padding: 10px;
    border-radius: 8px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
}

.section-header h2 {
    font-size: 1.1em;
    font-weight: bold;
    margin: 0;
}

/* VIEW ALL BUTTON ကို ပိုမိုလှပအောင် ပြင်ဆင်ချက် */
.view-all-btn {
    background-color: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.view-all-btn:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* --- ၆။ Tags & Categories --- */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
}

.tag-box {
    padding: 8px 16px;
    background-color: var(--dark-blue);
    color: #eff0f3;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    border-radius: 6px;
    transition: 0.3s;
}
.tag-box:hover {
    background-color:var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

/* --- ၇။ Mobile Responsive (Updated) --- */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block; /* Mobile မှာ အချောင်းသုံးချောင်း menu ပေါ်မယ် */
    }

    .nav-menu {
        position: fixed;
        top: 60px; /* Navbar width နဲ့ တူရမယ် */
        left: -100%;
        width: 260px;
        height: calc(100vh - 60px);
        background-color: var(--dark-blue);
        flex-direction: column;
        transition: 0.3s ease-in-out;
        z-index: 999;
        padding: 20px;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        margin-bottom: 5px;
    }

    .nav-menu li a {
        background-color: var(--hover-blue);
        padding: 15px 20px;
        border-radius: 6px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .menu-overlay.active {
        display: block;
        position: fixed;
        inset: 0;
        top: 60px; /* Navbar အောက်ကစပြီး ဖုံးမယ် */
        background-color: rgba(0,0,0,0.5);
        z-index: 998;
    }
}

/* Scrollbar Style */
.scroll-wrapper::-webkit-scrollbar { height: 6px; }
.scroll-wrapper::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }