@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&display=swap');

/* ---------------------------------------------------------------------------
   bookoff.uz — marketplace styles
   Ranglar: qog'oz + siyoh + lapis ko'k (asosiy), g'isht (iliq urg'u, kam).
   Ma'lumot: docs/branding.md
--------------------------------------------------------------------------- */
:root {
    --ink: #1a1917;
    --ink-2: #46433f;
    --muted: #6f6b64;
    --muted-2: #8f8a81;
    --paper: #f4f1ea;
    --paper-2: #ebe6db;
    --card: #ffffff;
    --line: #dcd6ca;
    --line-2: #e8e3d9;
    --lapis: #1f3fb3;
    --lapis-dark: #15297f;
    --lapis-tint: #e3e8f7;
    --lapis-ink: #122a80;
    --brick: #b5442b;
    --brick-dark: #9a3620;
    --brick-tint: #f6e5df;
    --ok: #1f6b45;
    --ok-tint: #e2f0e7;
    --warn: #8a5a0b;
    --warn-tint: #faeed4;
    --err: #a0291c;
    --err-tint: #f8e3df;
    --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --radius: 6px;
    --radius-sm: 4px;
    --shadow: 0 1px 2px rgba(26, 25, 23, .06), 0 8px 24px -12px rgba(26, 25, 23, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
:focus-visible { outline: 2px solid var(--lapis); outline-offset: 2px; }
.shell { width: min(100% - 48px, 1180px); margin: auto; }
.i { width: 1em; height: 1em; vertical-align: -.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Header ------------------------------------------------------------------ */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 76px; }
.brand { flex: none; display: block; width: 146px; }
.brand img { display: block; width: 100%; height: auto; }
.header-search { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 520px; margin: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 4px 4px 14px; }
.header-search:focus-within { border-color: var(--lapis); box-shadow: 0 0 0 3px rgba(31, 63, 179, .14); }
.header-search .i { color: var(--muted); font-size: 18px; }
.header-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; font-size: 14px; }
.header-search input::placeholder { color: var(--muted-2); }
.header-search button { border: 0; border-radius: var(--radius-sm); background: var(--ink); padding: 9px 16px; color: #fff; font-size: 13px; font-weight: 600; }
.header-search button:hover { background: var(--lapis); }
.header-browse { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 14px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.header-browse:hover { border-color: var(--ink); }
.category-nav { display: flex; align-items: center; gap: 28px; min-height: 46px; border-top: 1px solid var(--line-2); overflow: auto; white-space: nowrap; scrollbar-width: none; }
.category-nav::-webkit-scrollbar { display: none; }
.category-nav a { font-size: 13px; font-weight: 500; color: var(--ink-2); padding: 12px 0; border-bottom: 2px solid transparent; }
.category-nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.category-nav .nav-panel { margin-left: auto; color: var(--lapis); font-weight: 600; }
.category-nav form { display: flex; align-items: center; }
.nav-logout { border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 500; padding: 0; }
.nav-logout:hover { color: var(--ink); }

/* Type & buttons ---------------------------------------------------------- */
.section-kicker, .eyebrow { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--lapis); }
.hero h1, .catalog-banner h1, .panel-intro h1, .account-intro h1, .seller-heading h1 { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; line-height: 1.08; }
.section-heading h2, .story-copy h2, .closing-cta h2, .detail-description h2 { font-family: var(--serif); font-size: clamp(28px, 3vw, 38px); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; margin: 10px 0 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: var(--radius); padding: 13px 20px; font-size: 14px; font-weight: 600; line-height: 1.2; transition: background .15s, border-color .15s, color .15s; }
.button-dark { background: var(--lapis); color: #fff; }
.button-dark:hover { background: var(--lapis-dark); }
.button-light { background: var(--card); color: var(--ink); }
.button-light:hover { background: var(--paper); }
.button-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button-ghost:hover { border-color: var(--ink); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.text-link:hover { color: var(--lapis); border-bottom-color: var(--lapis); }

/* Hero -------------------------------------------------------------------- */
.hero { background: var(--paper); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 48px; min-height: 560px; }
.hero-copy { padding: 64px 0; }
.hero h1 { font-size: clamp(40px, 4.6vw, 62px); margin: 14px 0 20px; max-width: 12ch; }
.hero h1 em { font-style: italic; color: var(--lapis); font-weight: 500; }
.hero-lead { max-width: 46ch; color: var(--ink-2); font-size: 17px; line-height: 1.65; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-note { margin: 30px 0 0; color: var(--muted); font-size: 13px; }
.hero-covers { position: relative; height: 520px; }
.hero-cover { position: absolute; display: block; width: 236px; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: var(--paper-2); box-shadow: 0 32px 56px -22px rgba(26, 25, 23, .38), 0 0 0 1px rgba(26, 25, 23, .08); transition: transform .25s; }
.hero-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-cover:hover { transform: translateY(-6px) rotate(0deg) !important; z-index: 4; }
.hero-cover-1 { left: 50%; top: 48px; margin-left: -118px; transform: rotate(-2deg); z-index: 2; }
.hero-cover-2 { left: 4%; top: 120px; width: 196px; transform: rotate(-8deg); z-index: 1; }
.hero-cover-3 { right: 2%; top: 150px; width: 204px; transform: rotate(7deg); z-index: 3; }
.hero-chip { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; background: var(--card); color: var(--ink); font-size: 12px; font-weight: 600; padding: 6px 9px; border-radius: var(--radius-sm); box-shadow: 0 2px 8px rgba(0, 0, 0, .14); }
.hero-cover.cover-text { display: flex; flex-direction: column; justify-content: space-between; padding: 22px 18px; background: var(--lapis); color: var(--paper); }
.hero-cover.cover-text strong { font-family: var(--serif); font-size: 26px; line-height: 1.15; font-weight: 500; }
.hero-cover.cover-text small { font-size: 12px; opacity: .8; }
.hero-cover-2.cover-text { background: var(--paper-2); color: var(--ink); }
.hero-cover-3.cover-text { background: var(--card); color: var(--ink); }

/* Trust strip ------------------------------------------------------------- */
.trust-strip { background: var(--card); border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 18px 0; }
.trust-grid span { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.trust-grid b { font-size: 12px; font-weight: 600; color: var(--lapis); font-variant-numeric: tabular-nums; }

/* Sections ---------------------------------------------------------------- */
.section { padding: 72px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading p { color: var(--muted); font-size: 15px; margin: 0; }
.section-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.section-more:hover { color: var(--lapis); border-bottom-color: var(--lapis); }
.section-listings { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-trending { padding-bottom: 0; }

/* Category cards ---------------------------------------------------------- */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.category-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 190px; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, transform .15s; }
.category-card:hover { border-color: var(--ink); transform: translateY(-3px); }
.category-count { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); font-variant-numeric: tabular-nums; }
.category-card strong { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.15; max-width: 10ch; }
.category-arrow { position: absolute; right: 18px; bottom: 18px; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); font-size: 16px; transition: background .15s, color .15s, border-color .15s; }
.category-card:hover .category-arrow { background: var(--lapis); border-color: var(--lapis); color: #fff; }

/* Book cards -------------------------------------------------------------- */
.book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 22px; }
.book-card { display: block; min-width: 0; }
.book-cover { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; margin-bottom: 14px; overflow: hidden; border-radius: var(--radius-sm); background: var(--paper-2); border: 1px solid var(--line-2); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.book-card:hover img { transform: scale(1.03); }
.book-cover-fallback { flex-direction: column; align-items: start; justify-content: space-between; padding: 22px 20px; background: var(--paper-2); color: var(--ink); }
.book-card:nth-child(even) .book-cover-fallback { background: var(--lapis-tint); color: var(--lapis-ink); }
.fallback-mark { display: block; width: 28px; height: 28px; }
.fallback-title { display: block; margin: auto 0; font-family: var(--serif); font-size: 24px; line-height: 1.15; font-weight: 500; }
.fallback-line { width: 36px; height: 2px; background: currentColor; opacity: .6; }
.condition-badge { position: absolute; right: 10px; top: 10px; background: var(--card); color: var(--ink); padding: 6px 9px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.demo-badge { position: absolute; left: 10px; bottom: 10px; background: var(--ink); color: #fff; padding: 6px 9px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; }
.rank-badge { position: absolute; left: 10px; top: 10px; z-index: 2; display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 9px; background: var(--lapis); color: #fff; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.book-meta { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.book-title { display: block; margin: 5px 0 2px; font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.25; }
.book-author { display: block; color: var(--muted); font-size: 13px; }
.book-price { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.book-price .i { color: var(--muted); }
.book-card:hover .book-price .i { color: var(--lapis); }

/* Empty state ------------------------------------------------------------- */
.empty-state { display: flex; align-items: center; justify-content: center; gap: 44px; min-height: 300px; background: var(--card); padding: 40px; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-icon { display: grid; place-items: center; width: 120px; height: 150px; border-radius: var(--radius-sm); background: var(--lapis-tint); color: var(--lapis); }
.empty-icon svg { width: 56px; height: 56px; }
.empty-state h3 { font-family: var(--serif); font-size: 28px; font-weight: 600; margin: 8px 0; }
.empty-state p { max-width: 42ch; color: var(--muted); font-size: 14px; line-height: 1.65; }
.empty-state .button { margin-top: 8px; }

/* Story ------------------------------------------------------------------- */
.story-section { padding: 88px 0; background: var(--paper-2); border-top: 1px solid var(--line); }
.story-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: 72px; }
.story-visual { position: relative; min-height: 440px; display: flex; flex-direction: column; justify-content: space-between; padding: 36px; background: var(--lapis); color: var(--paper); border-radius: var(--radius); }
.story-visual .story-mark { width: 72px; height: 72px; }
.story-visual blockquote { margin: 0; font-family: var(--serif); font-size: clamp(30px, 3.2vw, 42px); font-style: italic; font-weight: 500; line-height: 1.15; letter-spacing: -.01em; }
.story-visual cite { display: block; margin-top: 18px; font-style: normal; font-size: 13px; opacity: .8; }
.story-copy > p { max-width: 52ch; color: var(--ink-2); font-size: 16px; line-height: 1.7; margin: 18px 0; }
.story-steps { margin: 28px 0; }
.story-steps > div { display: flex; gap: 18px; border-top: 1px solid var(--line); padding: 16px 0; }
.story-steps b { font-size: 12px; font-weight: 600; color: var(--lapis); font-variant-numeric: tabular-nums; margin-top: 3px; }
.story-steps strong, .story-steps small { display: block; }
.story-steps strong { font-size: 15px; font-weight: 600; }
.story-steps small { margin-top: 3px; color: var(--muted); font-size: 13px; }

/* Closing CTA ------------------------------------------------------------- */
.closing-cta { background: var(--ink); color: var(--paper); padding: 64px 0; }
.closing-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.closing-cta .section-kicker { color: #9fb0ea; }
.closing-cta h2 { max-width: 22ch; margin: 8px 0 0; }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: var(--paper); border-top: 1px solid rgba(255, 255, 255, .08); }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 56px 0; }
.footer-top img { width: 150px; height: auto; }
.footer-top p { color: #b9b4aa; font-size: 14px; margin: 18px 0 0; max-width: 36ch; }
.footer-links { display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: #b9b4aa; }
.footer-links strong { color: var(--paper); margin-bottom: 6px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(255, 255, 255, .12); padding: 20px 0; color: #b9b4aa; font-size: 13px; }

/* Catalog ----------------------------------------------------------------- */
.catalog-banner { background: var(--paper-2); border-bottom: 1px solid var(--line); padding: 52px 0; }
.catalog-banner h1 { font-size: clamp(34px, 3.6vw, 48px); margin: 10px 0 8px; }
.catalog-banner p { font-size: 16px; color: var(--muted); margin: 0; }
.catalog-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding: 44px 0 96px; }
.filters { align-self: start; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.filters-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.filters-heading strong { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.filters-heading a { color: var(--lapis); font-size: 13px; font-weight: 600; }
.filter-label { display: block; font-size: 13px; font-weight: 600; margin: 18px 0 6px; }
.filters input, .filters select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); font-size: 14px; padding: 10px; }
.filters input:focus, .filters select:focus { border-color: var(--lapis); outline: 0; box-shadow: 0 0 0 3px rgba(31, 63, 179, .14); }
.price-inputs { display: flex; gap: 8px; }
.filter-submit { width: 100%; margin-top: 20px; }
.results-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 24px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.results-heading h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 6px 0 0; }
.results-sort { color: var(--muted); font-size: 13px; }
.catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.catalog-empty { min-height: 360px; }
.pagination { margin-top: 36px; }
.pagination nav { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination a, .pagination span { display: inline-block; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; }
.pagination a:hover { border-color: var(--ink); }
.pagination span[aria-current=page] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination span[aria-current=page] span { border: 0; padding: 0; background: transparent; color: inherit; }
.pagination svg { width: 14px; height: 14px; }

/* Nearby filter ----------------------------------------------------------- */
.nearby-filter { margin: -20px -20px 22px; padding: 20px 20px 22px; background: var(--lapis-tint); border-bottom: 1px solid #cfd8f0; border-radius: var(--radius) var(--radius) 0 0; }
.nearby-filter h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.2; margin: 8px 0; color: var(--lapis-ink); }
.nearby-filter > p { font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.nearby-filter .filter-label { margin-top: 14px; }
.nearby-filter .filter-submit { margin-top: 12px; font-size: 13px; padding: 12px 10px; }
.nearby-filter .filter-submit:disabled { opacity: .6; cursor: wait; }
.location-status { font-size: 12px; line-height: 1.5; color: var(--ink-2); margin: 12px 0; }
.coordinate-details { border-top: 1px solid #cfd8f0; padding-top: 12px; }
.coordinate-details summary { cursor: pointer; color: var(--lapis); font-size: 13px; font-weight: 600; }
.coordinate-inputs { display: grid; gap: 7px; margin-top: 12px; }
.coordinate-inputs label { font-size: 12px; font-weight: 600; }
.coordinate-inputs button, .location-clear button { border: 0; background: none; color: var(--lapis); font-size: 13px; font-weight: 600; padding: 6px 0; text-align: left; }
.location-clear { margin-top: 8px; }
.nearby-filter .form-success, .nearby-filter .form-errors { font-size: 12px; padding: 10px; margin: 12px 0; }

/* Listing detail ---------------------------------------------------------- */
.detail-page { padding: 28px 0 90px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 13px; margin-bottom: 32px; }
.breadcrumbs a:hover { color: var(--lapis); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
.detail-gallery { min-width: 0; }
.detail-cover { width: 100%; aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.detail-cover img { max-width: 100%; max-height: 100%; object-fit: contain; }
.detail-cover.book-cover-fallback { padding: 40px; align-items: start; justify-content: space-between; }
.detail-cover .fallback-title { font-size: 44px; }
.detail-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.detail-thumbs img { width: 76px; height: 92px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.detail-info { padding-top: 16px; }
.detail-info h1 { font-family: var(--serif); font-size: clamp(32px, 3.6vw, 48px); line-height: 1.1; letter-spacing: -.015em; font-weight: 600; margin: 10px 0 8px; }
.detail-author { font-size: 16px; color: var(--muted); }
.detail-price { font-size: 30px; font-weight: 600; border-bottom: 1px solid var(--line); padding: 20px 0; font-variant-numeric: tabular-nums; }
.detail-price span { font-size: 16px; color: var(--muted); font-weight: 500; }
.detail-facts { padding: 20px 0; }
.detail-facts > div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.detail-facts span { color: var(--muted); }
.condition-note { font-size: 14px; line-height: 1.65; color: var(--ink-2); }
.buyer-note { display: flex; gap: 12px; align-items: start; background: var(--lapis-tint); border-left: 3px solid var(--lapis); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 18px; margin: 12px 0 22px; }
.buyer-note .i { color: var(--lapis); font-size: 20px; margin-top: 1px; }
.buyer-note p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--lapis-ink); }
.detail-back { width: 100%; }
.detail-description { max-width: 720px; padding: 56px 0; }
.detail-description h2 { font-size: 30px; }
.detail-description p { color: var(--ink-2); line-height: 1.75; }
.related-books { padding: 44px 0 0; border-top: 1px solid var(--line); }

/* Panel login ------------------------------------------------------------- */
.panel-page { max-width: 820px; padding: 80px 0 120px; }
.panel-intro { text-align: center; }
.panel-intro h1 { font-size: 44px; margin: 12px 0; }
.panel-intro p { color: var(--muted); }
.panel-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.panel-option { display: flex; align-items: center; gap: 16px; min-height: 130px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, transform .15s; }
.panel-option:hover { border-color: var(--lapis); transform: translateY(-3px); }
.panel-symbol { display: grid; place-items: center; flex: none; width: 52px; height: 52px; background: var(--lapis-tint); color: var(--lapis); border-radius: var(--radius-sm); font-size: 22px; }
.panel-option strong, .panel-option small { display: block; }
.panel-option strong { font-size: 16px; font-weight: 600; }
.panel-option small { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 6px; }
.panel-option .i { margin-left: auto; color: var(--muted); }
.panel-home-link { display: inline-block; margin-top: 28px; color: var(--lapis); font-size: 14px; font-weight: 600; }

/* Account / auth ---------------------------------------------------------- */
.account-page { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 80px; align-items: center; min-height: 600px; padding-top: 72px; padding-bottom: 100px; }
.account-intro h1 { font-size: clamp(36px, 4vw, 54px); margin: 14px 0; }
.account-intro > p, .seller-heading p { max-width: 52ch; color: var(--ink-2); line-height: 1.7; font-size: 16px; }
.account-points { display: flex; flex-direction: column; gap: 12px; margin-top: 36px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.account-points b { color: var(--lapis); font-weight: 600; font-variant-numeric: tabular-nums; margin-right: 8px; }
.account-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; }
.account-card h2, .form-section h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 0 0 20px; }
.account-form { display: flex; flex-direction: column; }
.account-form label, .form-field label { display: block; font-size: 13px; font-weight: 600; margin: 16px 0 6px; }
.account-form input, .form-field input, .form-field select, .form-field textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); font-size: 15px; padding: 12px 13px; outline: 0; }
.account-form input:focus, .form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--lapis); box-shadow: 0 0 0 3px rgba(31, 63, 179, .14); }
.form-button { width: 100%; margin-top: 22px; }
.form-footnote, .form-help { color: var(--muted); line-height: 1.6; font-size: 13px; }
.form-footnote { margin: 18px 0 0; }
.form-success { background: var(--ok-tint); color: var(--ok); border-left: 3px solid var(--ok); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 13px 16px; font-size: 14px; line-height: 1.5; }
.form-errors { background: var(--err-tint); color: var(--err); border-left: 3px solid var(--err); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 13px 16px; font-size: 14px; line-height: 1.5; }
.form-errors ul { margin: 6px 0 0; padding-left: 18px; }
.local-code { background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; margin: 16px 0; }
.local-code strong { font-size: 20px; letter-spacing: .12em; margin-left: 6px; font-variant-numeric: tabular-nums; }
.resend-form { margin-top: 16px; }
.resend-form button { border: 0; background: none; color: var(--lapis); font-weight: 600; font-size: 13px; padding: 0; }
.auth-divider { position: relative; text-align: center; color: var(--muted); font-size: 13px; margin: 24px 0; }
.auth-divider:before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.auth-divider span { position: relative; background: var(--card); padding: 0 12px; }
.phone-login > summary { cursor: pointer; color: var(--lapis); font-size: 14px; font-weight: 600; }
.phone-login .account-form { margin-top: 8px; }

/* Seller pages ------------------------------------------------------------ */
.seller-heading { background: var(--paper-2); border-bottom: 1px solid var(--line); padding: 48px 0; }
.seller-heading h1 { font-size: clamp(34px, 3.6vw, 48px); margin: 10px 0; }
.seller-heading p { margin: 0; }
.seller-heading-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.seller-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 40px; padding-top: 44px; padding-bottom: 100px; }
.seller-form { min-width: 0; }
.form-section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 16px; }
.form-section-heading { display: flex; gap: 16px; align-items: start; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 4px; }
.form-section-heading > span { color: var(--lapis); font-size: 13px; font-weight: 600; margin-top: 5px; font-variant-numeric: tabular-nums; }
.form-section h2 { margin: 0 0 4px; }
.form-section-heading p { font-size: 13px; color: var(--muted); margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.form-field.full { grid-column: 1 / -1; }
.form-field textarea { resize: vertical; }
.form-field input[type=file] { font-size: 13px; padding: 9px; }
.form-field small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 6px; }
.seller-submit { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; }
.seller-submit p { font-size: 13px; color: var(--muted); margin: 0; }
.seller-sidebar { align-self: start; position: sticky; top: 24px; }
.seller-tip { background: var(--lapis-tint); border-radius: var(--radius); padding: 24px; color: var(--lapis-ink); }
.seller-tip .i { font-size: 22px; color: var(--lapis); }
.seller-tip h3 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 12px 0; }
.seller-tip p { font-size: 13px; line-height: 1.65; margin: 0; }
.seller-sidebar > a { display: inline-block; color: var(--lapis); font-size: 14px; font-weight: 600; margin-top: 20px; }
.seller-location-map { width: 100%; height: 310px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-2); z-index: 0; }
.map-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.map-actions button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); padding: 9px 12px; font-size: 13px; font-weight: 600; }
.map-actions button:hover { border-color: var(--ink); }
.map-actions button:disabled { opacity: .5; }
.map-actions span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.seller-map-pin { position: relative; background: transparent; border: 0; }
.seller-map-pin span { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50% 50% 50% 0; background: var(--lapis); transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 3px 12px rgba(26, 25, 23, .35); }
.seller-map-pin span:after { content: ''; position: absolute; top: 8px; left: 8px; width: 6px; height: 6px; background: #fff; border-radius: 50%; }
.seller-location-map .leaflet-control-attribution { font-size: 10px; }

/* My books ---------------------------------------------------------------- */
.my-books { padding-top: 40px; padding-bottom: 100px; min-height: 400px; }
.my-books-list { display: grid; gap: 12px; }
.my-book-row { display: flex; gap: 20px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.my-book-thumb { flex: none; width: 84px; height: 108px; background: var(--paper-2); border-radius: var(--radius-sm); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.my-book-thumb svg { width: 30px; height: 30px; }
.my-book-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-book-main h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 8px 0 4px; }
.my-book-main p, .my-book-main small { color: var(--muted); font-size: 13px; margin: 0; }
.status-chip { display: inline-block; background: var(--paper-2); color: var(--ink-2); border-radius: var(--radius-sm); padding: 4px 8px; font-size: 12px; font-weight: 600; }
.status-moderation { background: var(--warn-tint); color: var(--warn); }
.status-active { background: var(--ok-tint); color: var(--ok); }
.status-rejected, .status-blocked { background: var(--err-tint); color: var(--err); }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1000px) {
    .category-nav { gap: 22px; }
    .hero-grid { grid-template-columns: 1fr .9fr; gap: 24px; }
    .hero-covers { height: 460px; transform: scale(.86); transform-origin: center; }
    .story-grid { gap: 40px; }
    .book-grid { gap: 22px 16px; }
}
@media (max-width: 850px) {
    .account-page { grid-template-columns: 1fr; gap: 32px; min-height: 0; }
    .account-card { max-width: 560px; }
    .seller-layout { grid-template-columns: 1fr; }
    .seller-sidebar { position: static; }
    .seller-heading-row { align-items: start; flex-direction: column; }
}
@media (max-width: 760px) {
    .shell { width: min(100% - 32px, 1180px); }
    .header-inner { gap: 12px; flex-wrap: wrap; padding: 12px 0; }
    .brand { width: 128px; }
    .header-browse { margin-left: auto; }
    .header-search { order: 3; flex-basis: 100%; max-width: none; }
    .category-nav { gap: 20px; }
    .hero-grid { grid-template-columns: 1fr; min-height: 0; gap: 0; }
    .hero-copy { padding: 48px 0 24px; }
    .hero h1 { font-size: clamp(36px, 9vw, 52px); max-width: none; }
    .hero-covers { height: 380px; transform: none; margin: 0 0 24px; }
    .hero-cover { width: 180px; }
    .hero-cover-1 { margin-left: -90px; top: 24px; }
    .hero-cover-2 { width: 150px; left: 0; top: 70px; }
    .hero-cover-3 { width: 156px; right: 0; top: 90px; }
    .trust-grid { grid-template-columns: 1fr; gap: 10px; padding: 16px 0; }
    .section { padding: 56px 0; }
    .section-heading { align-items: start; }
    .category-grid, .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .story-grid, .detail-grid { grid-template-columns: 1fr; gap: 32px; }
    .story-visual { min-height: 340px; }
    .closing-inner { align-items: start; flex-direction: column; }
    .catalog-layout { grid-template-columns: 1fr; gap: 28px; }
    .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-info { padding-top: 0; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-top > div:first-child { grid-column: 1 / -1; }
    .panel-options { grid-template-columns: 1fr; }
    .panel-page { padding: 60px 0 90px; }
}
@media (max-width: 550px) {
    .account-page { padding-top: 48px; padding-bottom: 72px; }
    .account-card { padding: 24px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-section { padding: 20px; }
    .seller-submit { align-items: stretch; flex-direction: column; }
    .seller-submit .button { width: 100%; }
    .my-book-thumb { width: 68px; height: 88px; }
    .my-book-main h2 { font-size: 18px; }
}
@media (max-width: 480px) {
    .header-browse { font-size: 12px; padding: 8px 10px; }
    .category-nav { min-height: 42px; }
    .category-nav a { font-size: 12px; }
    .hero-actions { gap: 10px; }
    .hero-actions .button { flex: 1 1 auto; }
    .category-grid { gap: 10px; }
    .category-card { min-height: 150px; padding: 16px; }
    .category-card strong { font-size: 19px; }
    .section-heading { display: block; }
    .section-more { display: inline-flex; margin-top: 14px; }
    .book-grid { gap: 18px 12px; }
    .fallback-title { font-size: 19px; }
    .book-title { font-size: 16px; }
    .book-author { font-size: 12px; }
    .book-price { font-size: 14px; }
    .empty-state { flex-direction: column; gap: 28px; text-align: center; padding: 40px 20px; }
    .empty-icon { width: 96px; height: 120px; }
    .catalog-banner { padding: 40px 0; }
    .results-sort { display: none; }
    .detail-cover .fallback-title { font-size: 30px; }
    .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .button, .category-card, .panel-option, .book-cover img, .hero-cover { transition: none; }
}

/* Qo'shimcha: trust strip ikonkalari, kategoriya hisoblagichi */
.trust-grid .i { color: var(--lapis); font-size: 18px; }
.category-card small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.section-more .i, .button .i, .text-link .i { font-size: 1em; }

/* Muqova o'rnini bosuvchi karta: belgi kichik, chiziq "Demo" belgisidan yuqorida */
.book-cover img.fallback-mark, .detail-cover img.fallback-mark { width: 28px; height: 28px; object-fit: contain; transform: none; }
.detail-cover img.fallback-mark { width: 40px; height: 40px; }
.book-cover-fallback { padding-bottom: 48px; }
.detail-cover.book-cover-fallback { padding-bottom: 40px; }
