/* ============================================================
   Kalibr — Vanilla CSS (Optimized & Accessible & Fully Responsive)
   ============================================================ */

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { --orange: #ff4500; --orange-600: #e63e00; --orange-50: #fff2ec; --bg: #ffffff; --bg-soft: #f7f7f8; --bg-warm: #fff8f3; --ink: #0f1115; --ink-2: #2a2f3a; --muted: #6b7280; --line: #ececef; --shadow-sm: 0 1px 2px rgba(15,17,21,0.04), 0 1px 3px rgba(15,17,21,0.06); --shadow-md: 0 4px 12px rgba(15,17,21,0.06), 0 2px 4px rgba(15,17,21,0.04); --shadow-lg: 0 18px 40px rgba(15,17,21,0.10), 0 6px 14px rgba(15,17,21,0.05); --r-sm: 8px; --r: 14px; --r-lg: 20px; --r-xl: 28px; --container: 1240px; }

html, body { overflow-x: hidden; width: 100%; height: 100%; scroll-behavior: auto; }
body { font-family: "Inter", system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
input, select, textarea { font: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* Header & Logo */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 32px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }

.brand-logo { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; transition: all 0.3s ease; }
.brand:hover .brand-logo { transform: scale(1.05) rotate(-5deg); }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }

.nav { display: none; gap: 8px; margin: 0 auto; align-items: center; }
.nav a { position: relative; padding: 8px 14px; border-radius: 10px; font-weight: 500; color: var(--ink-2); transition: color .2s ease, background .2s ease; }
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.nav a.active { color: var(--orange); }
.nav a.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -2px; height: 2px; border-radius: 2px; background: var(--orange); }

.header-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.lang-switcher { position: relative; }
.lang-button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--ink-2); background: #fff; transition: all 0.2s ease; }
.lang-button:hover { background: var(--bg-soft); box-shadow: var(--shadow-sm); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transform: translateY(10px); transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); z-index: 60; }
.lang-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.lang-menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background 0.2s ease; }
.lang-menu button:hover { background: var(--bg-soft); }
.lang-menu button.active { color: var(--orange); font-weight: 700; }

.cart-trigger { position: relative; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--ink-2); transition: all 0.2s ease; }
.cart-trigger:hover { background: var(--bg-soft); color: var(--ink); }
.cart-badge { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff; }

.mobile-toggle { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px; color: var(--ink-2); transition: all 0.2s ease; }
.mobile-toggle:hover { background: var(--bg-soft); }
.mobile-nav { display: none; border-top: 1px solid var(--line); padding: 12px 24px 16px; background: #fff; }
.mobile-nav.open { display: block; display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a { display: block; padding: 12px 14px; border-radius: 10px; font-weight: 500; color: var(--ink-2); }
.mobile-nav a.active { color: var(--orange); background: var(--orange-50); }
.mobile-nav a:hover { background: var(--bg-soft); }

@media (min-width: 900px) { .nav { display: flex; } .mobile-toggle { display: none; } .mobile-nav { display: none !important; } }

/* Hero Slayder */
.hero { position: relative; overflow: hidden; padding: 64px 0 80px; background: linear-gradient(180deg, #fff 0%, #fff8f3 100%); }
.hero-carousel { display: grid; grid-template-columns: 1fr; align-items: center; width: 100%; min-height: 480px; position: relative; }
.hero-slide { grid-area: 1 / 1; opacity: 0; pointer-events: none; transition: opacity 0.6s ease-in-out; display: flex; flex-direction: column-reverse; align-items: center; gap: 32px; padding: 20px 0; }
.hero-slide.active { opacity: 1; pointer-events: auto; z-index: 2; }

@media (min-width: 900px) { 
    .hero-slide { flex-direction: row; gap: 64px; justify-content: center; } 
    .hero-carousel { min-height: 400px; }
    .hero-slide-info { text-align: left; flex: 1; max-width: 500px; }
    /* Bosh sahifadagi kitob qizil chiziqgacha markazga surildi */
    .hero-slide-art { flex: 1; display: flex; justify-content: flex-start; align-items: center; padding-left: 20px; }
}

.hero-slide-info h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.05; letter-spacing: -0.02em; font-weight: 800; margin-bottom: 20px; }
.hero-slide-info .lede { font-size: 18px; color: var(--muted); max-width: 480px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
@media (min-width: 900px) { .hero-actions { justify-content: flex-start; } }

.btn-hero-main {
    padding: 14px 40px; 
    border-radius: 14px;
}
.btn-hero-main:hover {
    transform: translateY(-4px) scale(1.02);
}

.hero-indicators-local { display: flex; gap: 8px; justify-content: center; margin-top: 24px; padding-left: 0; }
@media (min-width: 900px) { .hero-indicators-local { justify-content: flex-start; margin-top: 32px; padding-left: 0; } }
.hero-indicators-local .dot { width: 10px; height: 10px; border-radius: 5px; background: var(--line); transition: all 0.3s ease; }
.hero-indicators-local .dot.active { background: var(--orange); width: 24px; }

.hero-art-container { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-book-meta { margin-top: 32px; display: flex; flex-direction: column; align-items: center; text-align: center; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 14px; font-weight: 600; font-size: 15px; transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); white-space: nowrap; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 8px 22px rgba(255, 69, 0, 0.28); }
.btn-primary:hover { background: var(--orange-600); transform: translateY(-3px); box-shadow: 0 12px 28px rgba(255, 69, 0, 0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-soft); transform: translateY(-3px); }
.btn-dark { background: var(--ink); color: #fff; border: none; }
.btn-dark:hover { background: var(--ink-2); transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2); }

/* 3D KITOB EFFEKTI (Bosh va Ichki sahifada bir xil yirik hajmda) */
.hero-book-link { display: block; cursor: pointer; transform: scale(1); transition: transform 0.2s; animation: float-card 4s ease-in-out infinite alternate;}
.hero-book-link:hover { transform: scale(1.05) translateY(-5px); animation-play-state: paused; }

.book-3d-wrapper { width: 100%; display: flex; justify-content: center; align-items: center; padding: 20px; perspective: 1200px; }
.book-3d { display: flex; flex-direction: column; justify-content: center; transform: translateZ(0); }

/* Kitob o'lchami kattalashtirildi */
.inner-book-3d { width: 200px; display: flex; align-items: center; transform-style: preserve-3d; perspective: 2000px; position: relative; margin: 0 auto; }
@media(min-width: 900px) { .inner-book-3d { width: 300px; } }

.inner-book-3d:before { content: ""; width: 100%; position: absolute; height: 0; bottom: 14px; transform: rotateY(-20deg) translateZ(-20px); z-index: 0; box-shadow: 15px 18px 25px 18px rgba(0, 0, 0, 0.3); }
.inner-book-3d .img-3d { transform: rotateY(-20deg); width: 100%; z-index: 5; clear: both; height: 100%; background: #ddd; position: relative; }
.inner-book-3d img { width: 100%; height: 100%; display: block; position: absolute; top: 0; left: 0; border-radius: 2px 6px 6px 2px; object-fit: cover; }
.inner-book-3d .img-3d:before { content: ""; display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 2px solid rgba(0, 0, 0, 0.2); box-sizing: border-box; border-left: 4px solid rgba(0, 0, 0, 0.3); z-index: 2; border-radius: 2px 6px 6px 2px; }

.page-3d { width: calc(100% - 20px); height: calc(100% - 2px); position: absolute; box-shadow: inset 0px -1px 2px rgba(50, 50, 50, 0.2), inset -1px 0px 1px rgba(150, 150, 150, 0.1); border-radius: 0px 3px 3px 0px; transform: rotateY(-20deg) translateZ(-5px); right: -3px; z-index: 4; background: white; }
.page-2-3d { height: calc(100% - 4px); right: -6px; z-index: 3; }
.page-3-3d { height: calc(100% - 6px); right: -9px; z-index: 2; }
.page-4-3d { height: calc(100% - 8px); right: -12px; z-index: 1; }
.page-5-3d { height: calc(100% - 10px); right: -15px; z-index: 0; }
.img-3d.final-page-3d { position: absolute; z-index: -1; right: -17px; transform: rotateY(-19deg) translateZ(-10px) scale(0.984); }

@keyframes float-card { 0% { transform: translateY(0px) scale(1); } 100% { transform: translateY(-15px) scale(1); } }

/* Sections & Book Cards */
.section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); }
.section-warm { background: var(--bg-warm); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.02em; font-weight: 800; }
.section-head .subtitle { color: var(--muted); margin-top: 4px; }
.section-head .view-all { display: inline-flex; align-items: center; gap: 6px; color: var(--orange); font-weight: 600; font-size: 14px; transition: all 0.2s ease; }
.section-head .view-all:hover { color: var(--orange-600); transform: translateX(4px); }

.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 640px) { .book-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 900px) { .book-grid { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
.book-grid.kids { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .book-grid.kids { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 900px) { .book-grid.kids { grid-template-columns: repeat(4, 1fr); gap: 32px; } }

/* Yozuvlar va fonlarsiz Kitob Kartochkasi */
.book-card { display: flex; flex-direction: column; transition: transform 0.3s ease; background: transparent; border: none; border-radius: 0; box-shadow: none !important; }
.book-card:hover { transform: translateY(-4px); }
.book-cover-link { display: block; flex: 1; }
.book-cover { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: var(--bg-soft); border-radius: 12px; margin-bottom: 12px; box-shadow: var(--shadow-md); transition: transform 0.3s ease; }
.book-card:hover .book-cover { transform: scale(1.03); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-lang { position: absolute; top: 10px; right: 10px; background: rgba(255, 255, 255, 0.94); color: var(--ink); padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; backdrop-filter: blur(4px); }
.book-body { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.book-title { font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.2s; }
.book-card:hover .book-title { color: var(--orange); }
.book-author { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.book-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.book-price { font-weight: 800; font-size: 16px; color: var(--ink); letter-spacing: -0.01em; }

.cart-ctrl { display: inline-flex; align-items: center; background: var(--bg-soft); color: var(--ink); border-radius: 999px; height: 38px; overflow: hidden; transition: width .25s cubic-bezier(.2,.8,.2,1), background .2s ease, transform .2s ease; white-space: nowrap; flex-shrink: 0; user-select: none; font-weight: 600; }
.cart-ctrl:hover { background: #e6e6ea; transform: scale(1.05); }
.cart-ctrl.icon-only { width: auto; padding: 0 16px; justify-content: center; gap: 6px; }
.cart-ctrl.qty { width: 110px; justify-content: space-between; padding: 0 4px; background: var(--ink); color: #fff; transform: scale(1) !important; }
.cart-ctrl button { width: 34px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; transition: background .15s; }
.cart-ctrl.qty button:hover { background: rgba(255, 255, 255, 0.2); }
.cart-ctrl .qty-num { font-weight: 700; font-size: 14px; min-width: 22px; text-align: center; display: inline-block; animation: qty-pop .18s ease; }
@keyframes qty-pop { from { transform: translateY(-4px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.bestsellers-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 24px; }
@media (max-width: 899px) { .bestsellers-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; margin: 0 -24px; padding-left: 24px; padding-right: 24px; gap: 16px; } .bestsellers-row > .book-card { flex: 0 0 70%; max-width: 240px; scroll-snap-align: start; } }

/* Info Boxes */
.info-boxes-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 24px; }
@media (min-width: 600px) { .info-boxes-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .info-boxes-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.info-box { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 16px; text-align: center; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; gap: 8px; transition: all 0.3s ease; }
.info-box:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.info-box-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--orange-50); color: var(--orange); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 4px; flex-shrink: 0; transition: transform 0.3s ease; }
.info-box:hover .info-box-icon { transform: scale(1.1) rotate(5deg); }
.info-box-icon svg { width: 20px; height: 20px; }
.info-box h3 { font-size: 15px; font-weight: 700; color: var(--ink); }
.info-box p { color: var(--muted); font-size: 13px; line-height: 1.4; }

/* Reviews Marquee */
.reviews-section { position: relative; overflow: hidden; }
.marquee { position: relative; display: flex; flex-direction: column; gap: 18px; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 35%, black 65%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0%, black 35%, black 65%, transparent 100%); }
.marquee-row { display: flex; gap: 18px; width: max-content; animation: marquee-r 38s linear infinite; }
.marquee-row.row-l { animation: marquee-l 42s linear infinite; }
.marquee-row.row-r2 { animation: marquee-r 36s linear infinite; }
@keyframes marquee-r { 0% { transform: translateX(-50%); } 100% { transform: translateX(0%); } }
@keyframes marquee-l { 0% { transform: translateX(0%); } 100% { transform: translateX(-50%); } }
.review-card { flex: 0 0 auto; width: 320px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; transition: transform 0.3s ease; }
.review-card:hover { transform: scale(1.02); box-shadow: var(--shadow-md); z-index: 2; }
.review-stars { display: inline-flex; gap: 2px; }
.review-stars svg { width: 16px; height: 16px; color: var(--orange); }
.review-stars svg.dim { color: #e6e6ea; }
.review-text { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.review-user { font-size: 13px; color: var(--muted); font-weight: 600; }

/* Authors */
.authors-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 700px) { .authors-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .authors-grid { grid-template-columns: repeat(4, 1fr); gap: 22px; } }
.author-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; transition: all 0.3s ease; }
.author-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.author-avatar { width: 92px; height: 92px; border-radius: 50%; background: var(--bg-soft); overflow: hidden; transition: transform 0.4s ease; }
.author-card:hover .author-avatar { transform: scale(1.08); }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-weight: 700; font-size: 16px; }
.author-meta { color: var(--muted); font-size: 13px; }
.author-card .btn { margin-top: 8px; padding: 8px 14px; font-size: 13px; }

/* Catalog page */
.catalog-shell { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 32px 0 64px; }
@media (min-width: 900px) { .catalog-shell { grid-template-columns: 260px 1fr; gap: 32px; } }
.sidebar { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; height: fit-content; transition: box-shadow 0.3s; }
.sidebar:hover { box-shadow: var(--shadow-sm); }
.sidebar h3 { font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; }
.sidebar h3:first-child { margin-top: 0; }
.search-box { position: relative; }
.search-box input { width: 100%; box-sizing: border-box; padding: 11px 14px 11px 38px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; background: var(--bg-soft); transition: all 0.2s ease; }
.search-box input:focus { outline: none; border-color: var(--orange); background: #fff; box-shadow: 0 0 0 3px var(--orange-50); }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.filter-list label { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink-2); transition: background 0.2s; }
.filter-list label:hover { background: var(--bg-soft); }
.filter-list input[type="checkbox"] { appearance: none; width: 16px; height: 16px; border: 2px solid var(--line); border-radius: 5px; display: inline-grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: all 0.2s; }
.filter-list input[type="checkbox"]:checked { background: var(--orange); border-color: var(--orange); transform: scale(1.1); }
.filter-list input[type="checkbox"]:checked::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.price-range { margin-top: 8px; }
.price-range input[type="range"] { width: 100%; accent-color: var(--orange); cursor: pointer; }
.price-range-vals { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.reset-btn { margin-top: 16px; width: 100%; padding: 10px; background: var(--orange-50); color: var(--orange); border-radius: 10px; font-weight: 600; font-size: 13px; transition: all 0.2s; }
.reset-btn:hover { background: #ffe1d2; transform: translateY(-2px); }
.catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.catalog-head h1 { font-size: 28px; letter-spacing: -0.02em; font-weight: 800; }
.catalog-head .count { color: var(--muted); margin-left: 8px; font-weight: 500; font-size: 16px; }
.empty { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 48px 24px; text-align: center; color: var(--muted); }

/* Modals */
.checkout-modal-overlay { position: fixed; inset: 0; background: rgba(15, 17, 21, 0.4); opacity: 0; pointer-events: none; transition: opacity .35s ease; z-index: 200; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.checkout-modal-overlay.open { opacity: 1; pointer-events: auto; }
.checkout-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -40%) scale(0.95); width: min(480px, 92%); background: #fff; border-radius: var(--r-lg); z-index: 201; opacity: 0; pointer-events: none; transition: all .4s cubic-bezier(0.25, 0.46, 0.45, 0.94); display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,0.2); max-height: 90vh; }
.checkout-modal.open { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.checkout-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.checkout-modal-head h3 { font-size: 18px; font-weight: 700; }
.checkout-modal-body { padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.checkout-modal-foot { padding: 20px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.form-input { width: 100%; box-sizing: border-box; max-width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; background: var(--bg-soft); transition: all .2s; color: var(--ink); }
.form-input:focus { background: #fff; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-50); }
.map-container { width: 100%; height: 220px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }

/* Cart drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(15, 17, 21, 0.4); opacity: 0; pointer-events: none; transition: opacity .35s ease; z-index: 100; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; z-index: 101; transform: translateX(100%); transition: transform .4s cubic-bezier(0.25, 0.46, 0.45, 0.94); display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,0.15); }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 18px; font-weight: 700; }
.drawer-close { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); transition: all 0.2s; }
.drawer-close:hover { background: var(--bg-soft); transform: rotate(90deg); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 12px; }
.cart-line { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; transition: transform 0.2s; }
.cart-line:hover { transform: translateX(-4px); border-color: #d1d1d6; }
.cart-line img { width: 60px; height: 80px; border-radius: 10px; object-fit: cover; background: var(--bg-soft); flex-shrink: 0; }
.cart-line-body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-line-title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.cart-line-author { font-size: 12px; color: var(--muted); }
.cart-line-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.cart-line .cart-ctrl { height: 32px; }
.cart-line .cart-ctrl.qty { width: 96px; background: var(--ink); color: #fff;}
.cart-line .cart-ctrl button { width: 28px; height: 32px; }
.cart-line-price { font-weight: 700; color: var(--orange); font-size: 14px; }
.drawer-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.drawer-empty svg { width: 56px; height: 56px; color: #d6d6db; margin: 0 auto 12px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 18px 22px 22px; background: #fff; }
.drawer-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.drawer-total span:first-child { color: var(--muted); font-size: 14px; }
.drawer-total span:last-child { font-weight: 800; font-size: 22px; color: var(--ink); }
.drawer-foot .btn { width: 100%; justify-content: center; }

/* Admin Panel */
.admin-login-wrapper { display: flex; align-items: center; justify-content: center; min-height: 70vh; }
.admin-box { width: 100%; max-width: 400px; background: #fff; padding: 32px; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.admin-layout { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 32px 0; }
.admin-card { background: #fff; padding: 24px; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.admin-table-wrapper { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.admin-table th, .admin-table td { padding: 16px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.admin-table th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.05em; }
.status-badge { padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; display: inline-block; text-align: center; }
.status-badge.active { background: #e6f4ea; color: #008a20; }
.status-badge.empty { background: #ffebee; color: #d93025; }
.admin-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; }

/* ============================================================
   YANGILANGAN MINIMALIST FOOTER
   ============================================================ */
.site-footer { background: #0f1115; color: #d6d8dd; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; padding-bottom: 48px; }
@media (min-width: 800px) { 
  .footer-grid { grid-template-columns: 2fr 1.2fr 1.2fr; gap: 40px; } 
}

.footer-col.main-about { max-width: 100%; }
.footer-col.contact-col, .footer-col.follow-col { max-width: 100%; }

.footer-brand-line { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand-line img { width: 44px; height: 44px; border-radius: 12px; }
.footer-brand-line .brand-name { color: #fff; font-size: 22px; font-weight: 800; }
.footer-tagline { color: #98a0ad; font-size: 14px; line-height: 1.55; margin-bottom: 18px; max-width: 320px; }

/* Bitta Butun Social Row Link */
.social-row-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #98a0ad;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 4px 0;
}
.social-row-link .icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: transparent;
    color: #fff;
}
.social-row-link .icon-wrap svg {
    width: 18px;
    height: 18px;
}
.social-row-link:hover {
    color: var(--orange);
    transform: translateX(4px);
}
.social-row-link:hover .icon-wrap {
    border-color: var(--orange);
    background: rgba(255, 69, 0, 0.1);
    color: var(--orange);
}

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 22px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #98a0ad; }

/* 🔥 KITOB ICHKI SAHIFASI VA MUALLIF SAHIFASI (QISQARTIRILGAN VA ANIMATSIYALI) */
.bd-container { padding-top: 32px; padding-bottom: 80px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 32px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb span svg { width: 12px; height: 12px; transform: rotate(-90deg); opacity: 0.6; }
.breadcrumb .active { color: var(--ink); font-weight: 600; }

.bd-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 64px; }
@media(min-width: 800px) { 
    /* Markazga yaqinroq bo'lishi va balansi ushlab turilishi uchun */
    .bd-grid { grid-template-columns: 360px 1fr; gap: 64px; align-items: center; } 
}

/* 3D kitob sahifa ochilganda chapdan uchib keladi */
.bd-cover-wrapper { border-radius: var(--r-xl); display: flex; justify-content: center; align-items: center; }
.slide-from-center { animation: slideBookLeft 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes slideBookLeft {
    0% { transform: translateX(150px) scale(1.05); opacity: 0; }
    100% { transform: translateX(0) scale(1); opacity: 1; }
}

.bd-info { display: flex; flex-direction: column; max-width: 500px; } /* 3-rasmdagi qizil chiziqgacha qisqartirildi */
.fade-in-delayed { opacity: 0; animation: fadeInDelayed 0.8s 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes fadeInDelayed {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.bd-genre-badge { display: inline-block; align-self: flex-start; padding: 6px 12px; background: var(--orange-50); color: var(--orange); font-size: 12px; font-weight: 700; border-radius: 999px; margin-bottom: 16px; letter-spacing: 0.05em; text-transform: uppercase; }
.bd-info h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 800; line-height: 1.1; margin-bottom: 24px; letter-spacing: -0.02em; }

/* Ma'lumot qatorlari (max-width orqali qisqartirildi) */
.bd-meta { list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-bottom: 32px; max-width: 100%; }
.bd-meta li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.meta-left { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.meta-left svg { color: var(--ink-2); opacity: 0.8; }

.bd-actions-wrap { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; max-width: 100%; }
.bd-actions-wrap .cart-ctrl { height: 48px; border-radius: 12px; font-size: 16px; background: var(--bg-soft); }
.bd-actions-wrap .cart-ctrl.qty { background: var(--ink); }
.bd-actions-wrap .cart-ctrl.icon-only { width: 48px; border-radius: 12px; padding: 0; }
.bd-actions-wrap .cart-ctrl button { height: 48px; width: 40px; }
.bd-actions-wrap .cart-ctrl .qty-num { font-size: 16px; min-width: 28px; }
.bd-actions-wrap .btn-dark { height: 48px; padding: 0 32px; border-radius: 12px; flex: 1; min-width: 180px; justify-content: center; }

.bd-split { display: grid; grid-template-columns: 1fr; gap: 48px; }
@media(min-width: 900px) { .bd-split { grid-template-columns: 1fr 360px; gap: 80px; } }

.bd-split h2 { font-size: 24px; font-weight: 800; margin-bottom: 24px; letter-spacing: -0.01em; }

.bd-mini-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.bd-mini-card { background: var(--bg-soft); padding: 16px 20px; border-radius: 14px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); transition: transform 0.2s; }
.bd-mini-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.bd-mini-card span { font-size: 13px; color: var(--muted); }
.bd-mini-card strong { font-size: 15px; font-weight: 700; color: var(--ink); }

.bd-desc { font-size: 15px; line-height: 1.7; color: var(--ink-2); margin-bottom: 32px; white-space: pre-line; }

.bd-quotes h3 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.bd-quotes p { font-size: 15px; font-style: italic; color: var(--muted); margin-bottom: 12px; padding-left: 16px; border-left: 3px solid var(--orange); line-height: 1.5; }

/* 2-RASM: Yumaloq profil qutisi (Box) muallif va bio o'ng tomonda chiroyli serif bilan */
.bd-author-box { background: var(--bg-soft); border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); display: flex; align-items: center; flex-wrap: wrap; }
.bd-author-box img { width: 90px; height: 90px; object-fit: cover; border-radius: 50%; margin: 20px; flex-shrink: 0; border: 3px solid #fff; box-shadow: var(--shadow-sm); }
.bda-info { flex: 1; min-width: 150px; padding: 20px 0; }
.bda-info h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }

/* O'ng tomondagi chiroyli Bio qismi */
.bda-bio-box { flex: 2; display: flex; flex-direction: column; align-items: flex-end; padding: 20px; border-left: 1px solid var(--line); min-width: 200px; }
.bda-bio { font-size: 14px; color: var(--muted); line-height: 1.6; font-family: "Georgia", serif; text-align: right; }
.bda-social-logos { display: flex; align-items: center; gap: 12px; color: var(--ink-2); opacity: 0.8; margin-top: 12px; }
.bda-social-logos img { border-radius: 6px; }
.bda-social-logos svg { width: 22px; height: 22px; }

@media (max-width: 600px) {
    .bd-author-box { flex-direction: column; text-align: center; }
    .bda-info { padding: 0 20px 20px; }
    .bda-bio-box { align-items: center; text-align: center; border-left: none; border-top: 1px solid var(--line); width: 100%; }
    .bda-bio { text-align: center; }
}

.spacer-lg { height: 80px; }
.body-no-scroll { overflow: hidden; }

/* 📱 TELEFON UCHUN MUKAMMAL DIZAYN */
@media (max-width: 899px) {
  .mobile-filter-toggle { display: flex !important; margin-bottom: 16px; background: var(--bg-soft); border-radius: 10px; }
  .sidebar-filters { display: none !important; margin-top: 16px; }
  .sidebar-filters.open { display: block !important; }
  .sidebar { padding: 16px; margin-bottom: 20px; }
}

@media (max-width: 599px) { 
  .container { padding: 0 16px; } 
  .section { padding: 40px 0; } 
  .header-inner { height: 60px; gap: 12px; } 
  .brand-name { font-size: 16px; } 
  .hero-slide { gap: 16px; }
  .hero-slide-info h1 { font-size: 32px; }
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .book-grid.kids { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .book-body { padding: 0; }
  .book-title { font-size: 14px; min-height: 36px; }
  .book-price { font-size: 14px; }
  .cart-ctrl.qty { width: 84px; }
  .cart-ctrl button { width: 24px; height: 32px; }
  .cart-ctrl { height: 32px; }
  .cart-ctrl .qty-num { font-size: 13px; min-width: 18px; }
  .bestsellers-row { padding-left: 16px; padding-right: 16px; margin: 0 -16px; }
  .checkout-modal { width: calc(100% - 32px); }
  .bd-actions-wrap .btn-dark { width: 100%; flex: none; }
}

/* 🔥 PREMIUM SCROLL ANIMATSIYA */
.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}