/*
Theme Name: Kayan
Theme URI: https://example.com/kayan
Author: Kayan Team
Author URI: https://example.com
Description: Single-page WordPress theme using the Sanam design as-is. WordPress acts purely as backend via REST.
Version: 1.0.0
Text Domain: kayan
*/

/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* ===== VARIABLES ===== */
:root {
    --primary: #195259;
    --primary-light: rgba(25, 82, 89, .08);
    --primary-dark: #123d42;
    --accent: #ff8b6a;
    --bg: #ffffff;
    --card: #ffffff;
    --card-soft: #f8f9fb;
    --text: #1e2330;
    --muted: #8b919e;
    --light-grey: #f2f3f5;
    --radius: 14px;
    --radius-lg: 24px;
    --nav-h: 68px;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    /* Remove mobile blue highlight */
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

img {
    display: block;
    max-width: 100%;
}

input {
    font-family: inherit;
}

/* ===== SPLASH ===== */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, var(--primary) 0%, #1a4a52 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .6s ease, visibility .6s ease;
}

.splash-screen.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    animation: splashEnter .8s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 100%;
    max-width: 400px;
    gap: 4px;
}

.splash-icon {
    font-size: 4.5rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

#splash-logo-img {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

.splash-logo h1 {
    font-size: 2.6rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.splash-logo p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-top: 8px;
    font-weight: 300;
}

@keyframes splashEnter {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes popIn {
    0% {
        transform: scale(.7);
        opacity: 0
    }

    100% {
        transform: scale(1);
        opacity: 1
    }
}

/* ===== APP CONTAINER ===== */
.app-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

/* ===== HEADER ===== */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
}

.app-header.hidden-header {
    display: none;
}

.page-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* ===== DRAWER MENU ===== */
.category-drawer {
    position: absolute;
    top: 60px;
    right: 24px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1000;
    min-width: 180px;
}

.drawer-item {
    padding: 10px 14px;
    text-align: right;
    font-size: 0.95rem;
    color: var(--text);
    border-radius: 8px;
    transition: background 0.2s;
}

.drawer-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* ===== CUSTOM SELECT ===== */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-btn {
    width: 100%;
    height: 42px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    font-size: .9rem;
    color: var(--text);
    cursor: pointer;
    transition: border-color .2s;
}

.custom-select-btn:hover,
.custom-select-btn.open {
    border-color: var(--primary);
}

.custom-select-btn.error {
    border-color: #e53935;
}

.custom-select-btn i {
    transition: transform .2s;
    color: var(--muted);
}

.custom-select-btn.open i {
    transform: rotate(180deg);
}

.custom-select-list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    z-index: 500;
    list-style: none;
    padding: 6px;
    max-height: 220px;
    overflow-y: auto;
}

.custom-select-list.open {
    display: block;
}

.custom-select-list li {
    padding: 9px 12px;
    border-radius: 7px;
    font-size: .9rem;
    cursor: pointer;
    color: var(--text);
    transition: background .15s;
}

.custom-select-list li:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.custom-select-list li.selected {
    background: var(--primary);
    color: #fff;
}

/* ===== ICON BUTTON ===== */
.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    color: var(--text);
    font-size: 1.2rem;
    transition: all .2s;
}

.icon-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* ===== PAGES ===== */
.pages-container {
    flex: 1;
    overflow-y: auto;
    padding-bottom: calc(var(--nav-h) + 20px);
}

.page {
    display: none;
    padding: 0 24px 24px;
    animation: fadeUp .35s ease;
}

.page.active {
    display: block;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px)
    }

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

/* ===== SEARCH BAR ===== */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-soft);
    border-radius: var(--radius);
    padding: 0 16px;
    height: 48px;
    margin-bottom: 20px;
}

.search-bar i {
    color: var(--muted);
    font-size: 1.15rem;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: .9rem;
    color: var(--text);
    height: 100%;
}

.search-bar .filter-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

/* ===== CATEGORIES ===== */
.categories-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 20px;
    margin-bottom: 8px;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--muted);
    background: var(--card-soft);
    transition: all .25s;
}

.category-chip.active {
    background: var(--primary);
    color: #fff;
}

.category-chip:hover:not(.active) {
    background: var(--primary-light);
    color: var(--primary);
}

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.see-all-btn {
    color: var(--primary);
    font-size: .85rem;
    font-weight: 500;
    background: none;
    transition: opacity .2s;
}

.see-all-btn:hover {
    opacity: .7;
}

/* ===== LOADING ===== */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 200px;
    gap: 12px;
    color: var(--muted);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== BOOK CARDS ===== */
.books-horizontal-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 20px;
    scrollbar-width: none;
    cursor: grab;
}

.books-horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.books-horizontal-scroll:active {
    cursor: grabbing;
}

.book-card {
    min-width: 130px;
    width: 130px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform .2s;
}

.book-card:hover {
    transform: translateY(-4px);
}

.book-cover {
    width: 100%;
    height: 185px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
    background: var(--card-soft);
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.book-card:hover .book-cover img {
    transform: scale(1.04);
}

.book-card h4 {
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-card .book-author {
    font-size: .78rem;
    color: var(--muted);
    margin-top: 2px;
}

.book-card .book-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .75rem;
    color: var(--muted);
    margin-top: 4px;
}

.book-card .book-meta i {
    color: #f5c518;
}

/* ===== CONTINUE READING ===== */
.continue-reading {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: all .2s;
}

.continue-reading:hover {
    background: rgba(25, 82, 89, .14);
}

.cr-cover {
    width: 50px;
    height: 70px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.cr-info {
    flex: 1;
}

.cr-info h4 {
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.cr-author {
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.progress-bar {
    height: 5px;
    background: rgba(25, 82, 89, .2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
}

.cr-percent {
    font-size: .85rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

/* ===== BOOKS GRID ===== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: var(--card);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 200;
    padding: 0 8px;
}

.bottom-nav.hidden-nav {
    display: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    position: relative;
    padding: 6px 10px;
    transition: color .2s;
}

.nav-item i {
    font-size: 1.35rem;
}

.nav-item span:not(.badge) {
    font-size: .7rem;
    font-weight: 500;
}

.nav-item.active {
    color: var(--primary);
}

.cart-nav-item.active i {
    background: var(--primary);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -14px;
}

.badge {
    position: absolute;
    top: 2px;
    right: 6px;
    background: #ff4d4f;
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== DETAIL PAGE ===== */
.detail-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 16px;
}

.detail-top-title {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
}

.detail-cover-area {
    display: flex;
    justify-content: center;
    padding: 20px 0 32px;
}

.detail-cover-img {
    width: 165px;
    height: 245px;
    border-radius: 12px;
    object-fit: cover;
}

.detail-body {
    padding: 0;
}

.detail-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.detail-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.bookmark-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.bookmark-circle.bookmarked {
    background: #ff8b6a;
}

.detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.detail-author {
    font-size: .9rem;
    color: var(--muted);
    margin-bottom: 20px;
}

.detail-stats {
    display: flex;
    align-items: stretch;
    background: var(--card-soft);
    border-radius: var(--radius);
    padding: 16px 0;
    margin-bottom: 20px;
}

.stat-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-label {
    font-size: .72rem;
    color: var(--muted);
    font-weight: 500;
}

.stat-val {
    font-size: .9rem;
    font-weight: 600;
}

.stat-divider {
    width: 1px;
    background: var(--light-grey);
}

.detail-desc {
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 24px;
}

.detail-bottom-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0 8px;
}

.qty-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-soft);
    border-radius: 8px;
    padding: 8px 14px;
}

.qty-label {
    font-size: .75rem;
    color: var(--muted);
    font-weight: 500;
    margin-left: 6px;
}

.qty-btn {
    font-size: 1rem;
    color: var(--text);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-num {
    font-weight: 700;
    font-size: 1rem;
    min-width: 20px;
    text-align: center;
}

.add-cart-btn {
    flex: 1;
    height: 46px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s, opacity .15s;
}

.add-cart-btn:active {
    transform: scale(.97);
    opacity: .9;
}

/* ===== MORE BOOKS PAGE ===== */
.more-hero {
    margin-bottom: 24px;
}

.more-hero h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.more-hero p {
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.6;
}

.more-featured {
    display: flex;
    align-items: stretch;
    gap: 16px;
    background: var(--card-soft);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 8px;
}

.more-featured .mf-cover {
    width: 90px;
    height: 130px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.more-featured .mf-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.more-featured .mf-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.more-featured .mf-info .mf-author {
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.more-featured .mf-info .mf-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.more-featured .mf-info .detail-btn {
    align-self: flex-start;
    padding: 7px 20px;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font-size: .8rem;
    font-weight: 500;
    transition: opacity .2s;
}

.more-featured .mf-info .detail-btn:hover {
    opacity: .85;
}

/* ===== CART ===== */
.cart-empty,
.fav-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    gap: 8px;
}

.cart-empty h3,
.fav-empty h3 {
    font-size: 1.15rem;
    margin-top: 8px;
}

.cart-empty p,
.fav-empty p {
    font-size: .88rem;
    color: var(--muted);
}

.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
}

.cart-item+.cart-item {
    margin-top: 4px;
}

.cart-item-img {
    width: 65px;
    height: 90px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: .92rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.cart-item-info .ci-author {
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.cart-item-info .ci-price {
    font-weight: 700;
    color: var(--primary);
    font-size: .95rem;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.cart-item-actions .delete-btn {
    color: #ff4d4f;
    font-size: 1.1rem;
    padding: 4px;
    transition: opacity .2s;
}

.cart-item-actions .delete-btn:hover {
    opacity: .7;
}

.cart-item-actions .qty-box {
    padding: 4px 10px;
    gap: 8px;
}

.cart-summary {
    padding: 24px 0 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: .9rem;
    color: var(--muted);
}

.summary-row.total {
    color: var(--text);
    font-weight: 700;
    font-size: 1.15rem;
    margin-top: 12px;
    padding-top: 12px;
}

.checkout-btn {
    background: var(--primary) !important;
}

/* ===== DEVELOPER PAGE ===== */
.dev-page {
    padding: 20px 0;
}

.dev-avatar-area {
    text-align: center;
    margin-bottom: 28px;
}

.dev-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.dev-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.dev-role {
    font-size: .92rem;
    color: var(--primary);
    font-weight: 500;
}

.dev-bio-card {
    background: var(--card-soft);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.dev-bio-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}

.dev-bio-card p {
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.75;
}

.dev-info-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.dev-info-card {
    display: flex;
    gap: 14px;
    align-items: center;
    background: var(--card-soft);
    border-radius: var(--radius);
    padding: 16px 20px;
}

.dev-info-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dev-info-card h4 {
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.dev-info-card p {
    font-size: .82rem;
    color: var(--muted);
}

.dev-skills {
    background: var(--card-soft);
    border-radius: var(--radius);
    padding: 20px;
}

.dev-skills h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: .82rem;
    font-weight: 500;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn .25s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.modal-content {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    width: 100%;
    max-width: 420px;
    animation: modalSlideUp .3s ease;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0
    }

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input {
    width: 100%;
    height: 46px;
    border-radius: 10px;
    background: var(--card-soft);
    border: none;
    padding: 0 16px;
    font-size: .9rem;
    color: var(--text);
    outline: none;
    transition: background .2s;
}

.form-group input:focus {
    background: var(--primary-light);
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-light);
    border-radius: 10px;
    padding: 14px 16px;
    color: var(--primary);
    font-weight: 600;
    font-size: .9rem;
}

.payment-method i {
    font-size: 1.3rem;
}

.submit-order-btn {
    width: 100%;
    height: 50px;
    margin-top: 8px;
    background: var(--primary) !important;
    border-radius: 12px;
    font-size: .95rem;
}

/* Success modal */
.success-content {
    text-align: center;
    padding: 40px 24px;
}

.success-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.success-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.success-content p {
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.6;
}

.payment-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    color: var(--primary) !important;
    font-weight: 600;
    font-size: .9rem !important;
}

/* ===== UTILITY ===== */
.hidden-header {
    display: none !important;
}

.hidden-nav {
    display: none !important;
}

/* ===== DESKTOP ===== */
@media (min-width:768px) {
    .pages-container {
        padding: 0 60px calc(var(--nav-h) + 20px);
    }

    .page {
        padding: 0 40px 40px;
    }

    .books-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .app-header {
        padding: 20px 60px 12px;
    }

    .detail-cover-img {
        width: 200px;
        height: 300px;
    }

    .detail-bottom-bar {
        max-width: 450px;
    }

    .dev-info-cards {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .dev-info-card {
        flex: 1;
        min-width: 200px;
    }
}

@media (min-width:1100px) {
    .pages-container {
        padding: 0 120px calc(var(--nav-h) + 20px);
    }

    .page {
        padding: 0 60px 40px;
        max-width: 1100px;
        margin: 0 auto;
    }

    .app-header {
        padding: 20px 120px 12px;
    }

    .books-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .book-card {
        min-width: 150px;
        width: 150px;
    }

    .book-cover {
        height: 210px;
    }
}

/* ===== CATEGORY DRAWER ===== */
.category-drawer {
    position: sticky;
    top: 60px;
    z-index: 99;
    background: var(--bg);
    padding: 0 16px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    max-height: 0;
    overflow-y: hidden;
    transition: max-height .35s cubic-bezier(.4, 0, .2, 1), padding .35s ease, opacity .3s ease;
    opacity: 0;
    border-bottom: 1px solid transparent;
}

.category-drawer.drawer-open {
    max-height: 80px;
    padding: 10px 16px;
    opacity: 1;
    border-bottom-color: var(--card-soft);
}

.category-drawer::-webkit-scrollbar {
    display: none;
}

.drawer-item {
    padding: 8px 18px;
    border-radius: 20px;
    background: var(--card-soft);
    font-size: .85rem;
    font-weight: 500;
    color: var(--muted);
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.drawer-item:hover,
.drawer-item.active-drawer {
    background: var(--primary);
    color: #fff;
}

/* ===== HEADER BADGE ===== */
.header-left .icon-btn {
    position: relative;
}

.header-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ff4d4f;
    color: #fff;
    font-size: .55rem;
    font-weight: 700;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== WHATSAPP BUTTON ===== */
.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    border-radius: 12px;
    background: #25D366;
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    margin-top: 20px;
    transition: opacity .2s;
}

.whatsapp-btn:hover {
    opacity: .85;
}

.whatsapp-btn i {
    font-size: 1.4rem;
}

/* ===== BROWSE BUTTON ===== */
.browse-btn {
    padding: 14px 32px !important;
    flex: none !important;
}

/* ===== SUCCESS OK BUTTON ===== */
.success-ok-btn {
    margin-top: 20px;
    width: 100%;
    height: 48px;
    border-radius: 12px;
    background: var(--primary) !important;
}

/* ===== ALREADY IN CART STATE ===== */
.add-cart-btn.in-cart {
    background: var(--muted) !important;
    pointer-events: none;
    opacity: .7;
}