/* =========================================
   CATALOG PAGE — DEDICATED STYLESHEET
   Sprint: Catalog Layout Alignment + Modern UI Final Pass
   All catalog-specific styles. Global tokens/base come from tokens.css, base.css, layout.css.
   Do NOT duplicate .pub-container here — it lives in layout.css only.
   ========================================= */

/* =========================================
   CATALOG PAGE BACKGROUND & PAGE WRAPPER
   ========================================= */
.page-catalog {
  background-color: var(--frontend-page-bg);
  flex: 1;
  /* padding and max-width handled by .pub-container applied on the element */
}

/* =========================================
   CATALOG LAYOUT (SIDEBAR + MAIN)
   ========================================= */
.catalog-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

/* Desktop sidebar: no sticky, no max-height, no overflow-y */
.catalog-sidebar {
  width: 272px;
  flex-shrink: 0;
  /* The sidebar grows with content. Page is the only vertical scroll container. */
  overflow: visible;
}

.catalog-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* =========================================
   UNIFIED FILTER PANEL
   One coherent white surface, not four boxes.
   ========================================= */
.filter-panel {
  background-color: var(--frontend-card-bg);
  border: 1px solid var(--frontend-border);
  border-radius: 15px;
  overflow: visible; /* never clip, never scroll */
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Panel title row */
.filter-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px 16px;
}

.filter-panel-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--frontend-text);
  margin: 0;
}

/* Separator between groups */
.filter-separator {
  border: none;
  border-top: 1px solid var(--frontend-border);
  margin: 0;
}

/* Individual filter group section */
.filter-section {
  padding: 12px 16px;
}

/* Group title */
.filter-group-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--frontend-text-muted);
  margin: 0 0 8px 0;
  display: block;
}

/* Radio row */
.filter-radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--frontend-text-secondary);
  font-weight: 600;
  min-height: 34px;
  padding: 1px 0;
  border-radius: 6px;
  transition: color 0.15s;
}

.filter-radio-row:hover {
  color: var(--frontend-text);
}

/* Native radio — keep accessible */
.filter-radio-row input[type="radio"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--frontend-primary);
  flex-shrink: 0;
}

/* "Tümünü Göster" subtle text button */
.btn-show-all {
  background: transparent;
  border: none;
  color: var(--frontend-primary);
  font-weight: 700;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.btn-show-all:hover {
  color: var(--frontend-primary-active);
  text-decoration: underline;
}

/* =========================================
   SEARCH PANEL
   ========================================= */
.search-panel {
  background-color: var(--frontend-card-bg);
  border: 1px solid var(--frontend-border);
  border-radius: 15px;
  padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
}

.search-panel-label {
  font-weight: 800;
  font-size: 14px;
  color: var(--frontend-text);
  display: block;
  margin-bottom: 8px;
}

.search-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  position: relative;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-input-icon {
  position: absolute;
  left: 12px;
  color: var(--frontend-text-muted);
  font-size: 14px;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.search-input {
  width: 100%;
  padding: 8px 38px 8px 34px;
  font-size: 14px;
  border: 1px solid #dde1ea;
  border-radius: 9px;
  background-color: #f8f9fb;
  color: var(--frontend-text);
  height: 40px;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
  outline: 3px solid var(--frontend-primary);
  outline-offset: -1px;
  border-color: var(--frontend-primary);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(27, 132, 255, 0.08);
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  color: var(--frontend-text-secondary);
  text-decoration: none;
  font-size: 18px;
  padding: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  width: 24px;
  line-height: 1;
}

.search-submit-btn {
  background-color: var(--frontend-primary);
  color: #ffffff;
  font-weight: 800;
  height: 40px;
  padding: 0 20px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  min-width: 76px;
  font-family: inherit;
}

.search-submit-btn:hover {
  background-color: var(--frontend-primary-active);
}

.search-helper {
  font-size: 12px;
  color: var(--frontend-text-muted);
  margin-top: 5px;
  display: block;
}

/* =========================================
   ACTIVE FILTERS STRIP
   ========================================= */
.active-filters-strip {
  padding: 10px 14px;
  background-color: var(--frontend-surface-secondary);
  border: 1px solid var(--frontend-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.active-filters-label {
  font-weight: 800;
  font-size: 12px;
  color: var(--frontend-text);
}

.active-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.active-filter-badge {
  background-color: var(--frontend-primary-light);
  color: var(--frontend-primary-text);
  border: 1px solid var(--frontend-border);
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.active-filter-badge:hover {
  text-decoration: none;
  opacity: 0.85;
}

.active-filter-clear-all {
  font-size: 12px;
  font-weight: 700;
  color: var(--frontend-danger-text);
  text-decoration: underline;
  margin-left: 4px;
}

/* =========================================
   RESULTS TOOLBAR
   ========================================= */
.results-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--frontend-border);
  padding-bottom: 10px;
  margin-bottom: 4px;
}

.results-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.results-count {
  font-weight: 800;
  font-size: 1rem;
  color: var(--frontend-text);
  white-space: nowrap;
}

/* Search query chip shown inside results toolbar */
.search-query-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--frontend-primary-light);
  color: var(--frontend-primary-text);
  border: 1px solid rgba(27, 132, 255, 0.2);
  border-radius: 9999px;
  padding: 3px 10px 3px 12px;
  font-size: 12px;
  font-weight: 700;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-query-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Remove-query button inside chip */
.search-query-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: rgba(27, 132, 255, 0.15);
  color: var(--frontend-primary-text);
  border: none;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  font-family: inherit;
  transition: background-color 0.15s;
}

.search-query-remove:hover {
  background-color: rgba(27, 132, 255, 0.3);
}

.search-query-remove:focus-visible {
  outline: 3px solid var(--frontend-primary);
  outline-offset: 2px;
}

/* =========================================
   MOBILE FILTER BUTTON (shown ≤ 1024px)
   ========================================= */
.mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--frontend-primary);
  border: 2px solid var(--frontend-primary);
  padding: 4px 12px;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  min-height: 40px;
  font-family: inherit;
}

/* =========================================
   BOOK GRID
   Desktop (≥1025px): Fixed 320px max-width cards, left-aligned.
   Tablet/Mobile (≤1024px): Full available width stretch grid.
   ========================================= */
/* =========================================
   BOOK GRID
   Wide Desktop (≥1600px): 4 fluid equal-width columns.
   Desktop (1280px-1599px): 3 fluid equal-width columns.
   Compact Desktop (1024px-1279px): 2 fluid columns (cards >= 235px).
   Tablet (768px-1023px): 2 fluid columns.
   Mobile (≤767px): 1 column.
   ========================================= */
.books-grid {
  display: grid;
  gap: 18px;
  width: 100%;
}

@media (min-width: 1600px) {
  .books-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
  }
}

@media (min-width: 1280px) and (max-width: 1599px) {
  .books-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }
}

@media (max-width: 767px) {
  .books-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }
}

/* Single/Two-result protection: prevent 1 or 2 cards from stretching across wide grid */
.books-grid.books-grid-sparse,
.books-grid[data-count="1"],
.books-grid[data-count="2"] {
  grid-template-columns: repeat(auto-fill, minmax(250px, 290px)) !important;
  justify-content: start !important;
}

/* =========================================
   BOOK CARD
   ========================================= */
.book-card {
  background-color: var(--frontend-card-bg);
  border: 1px solid var(--frontend-border);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease;
  text-decoration: none;
}

/* Hover: subtle elevation only, no scale/transform */
.book-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.09), 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Suppress underline on entire card links */
.book-card a {
  text-decoration: none !important;
}

/* Allow underline on inline text links only (e.g. "giriş yapın") */
.book-card .inline-link {
  text-decoration: underline !important;
  color: var(--frontend-text-secondary);
  font-weight: 700;
}

/* Focus ring — 3px, no underline */
.book-card a.focus-outline-ring:focus-visible,
.book-card a:focus-visible {
  outline: 3px solid var(--frontend-primary);
  outline-offset: 2px;
  text-decoration: none !important;
}

/* Card cover area */
.book-cover-header {
  background: linear-gradient(135deg, var(--frontend-primary) 0%, #0369a1 100%);
  height: 128px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  box-sizing: border-box;
  position: relative;
  border-bottom: 1px solid var(--frontend-border);
  color: #ffffff;
  user-select: none;
  flex-shrink: 0;
}

.book-cover-meta-top {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

.book-cover-icon {
  font-size: 2.8rem;
  text-align: center;
  opacity: 0.13;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.book-cover-meta-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 2;
  width: 100%;
  position: relative;
}

.book-category-badge {
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Card body */
.book-card-body {
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  text-align: left;
  box-sizing: border-box;
}

.book-card-top {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.book-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--frontend-text);
  margin: 0 0 5px 0;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-author {
  font-size: 13px;
  color: var(--frontend-text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-author strong {
  color: var(--frontend-text);
  font-weight: 700;
}

.book-meta-row {
  font-size: 12px;
  color: var(--frontend-text-secondary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.book-meta-dot {
  color: var(--frontend-text-muted);
}

/* Card actions */
.book-card-actions {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.btn-card-detail {
  background-color: var(--frontend-primary);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  text-align: center;
  padding: 0 12px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background-color 0.18s;
  height: 38px;
  box-sizing: border-box;
  width: 100%;
}

.btn-card-detail:hover {
  background-color: var(--frontend-primary-active);
  text-decoration: none !important;
}

.btn-card-detail:focus-visible {
  outline: 3px solid var(--frontend-primary);
  outline-offset: 2px;
}

.book-card-listen-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--frontend-success-text);
  margin-top: 5px;
  min-height: 18px;
  line-height: 1;
}

.book-card-locked-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--frontend-text-muted);
  margin-top: 5px;
  min-height: 18px;
  line-height: 1;
}

/* =========================================
   EMPTY / NO-RESULTS STATE
   Compact white panel — not a giant full-page box.
   ========================================= */
.catalog-empty-state {
  text-align: center;
  padding: 32px 24px;
  background-color: var(--frontend-card-bg);
  border: 1px solid var(--frontend-border);
  border-radius: 15px;
  margin-top: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  max-width: 560px; /* compact, not full-width */
}

/* =========================================
   PAGINATION
   ========================================= */
.pagination-btn {
  min-height: 44px;
  min-width: 44px;
}

.pagination-pages {
  display: flex !important;
}

.pagination-mobile-summary {
  display: none !important;
}

@media (max-width: 767px) {
  .pagination-pages {
    display: none !important;
  }
  .pagination-mobile-summary {
    display: inline-block !important;
  }
  .pagination-btn {
    min-height: 48px !important;
    min-width: 48px !important;
  }
}

/* =========================================
   RESPONSIVE: CATALOG LAYOUT
   ========================================= */

/* Tablet/Mobile: stack sidebar below or hide */
@media (max-width: 1024px) {
  .catalog-layout {
    flex-direction: column;
    gap: 12px;
  }

  /* Desktop sidebar hidden — mobile drawer handles filters */
  .catalog-sidebar {
    display: none;
  }

  .mobile-filter-btn {
    display: inline-flex;
  }
}

@media (min-width: 1025px) {
  .catalog-sidebar {
    display: block;
  }
  .mobile-filter-btn {
    display: none !important;
  }
  .catalog-layout {
    flex-direction: row;
  }
}

/* =========================================
   FOCUS RING OVERRIDE (catalog page)
   ========================================= */
.page-catalog .focus-outline-ring:focus,
.page-catalog input:focus,
.page-catalog button:focus,
.page-catalog [role="button"]:focus {
  outline: none !important;
}

.page-catalog .focus-outline-ring:focus-visible,
.page-catalog input:focus-visible,
.page-catalog button:focus-visible,
.page-catalog [role="button"]:focus-visible {
  outline: 2px solid #55c7e8 !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

/* =========================================
   REDUCED MOTION
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  .book-card {
    transition: none !important;
  }
  .book-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07) !important;
  }
}

.reduced-motion .book-card {
  transition: none !important;
}

/* =========================================
   SEARCH INPUT RESPONSIVE
   ========================================= */
@media (max-width: 600px) {
  .search-input-row {
    flex-direction: column;
    align-items: stretch !important;
  }
  .search-submit-btn {
    width: 100% !important;
    height: 44px !important;
  }
  .search-input {
    height: 44px !important;
  }
}

/* =========================================
   MOBILE FILTER DRAWER — override internal category/author scroll
   The drawer itself scrolls (acceptable as modal). Inner lists must NOT create
   nested scroll areas — they use flex-direction:column and grow naturally.
   ========================================= */
#mobile-filter-drawer-panel fieldset div.filter-list-inner {
  max-height: none;
  overflow-y: visible;
}

/* =========================================
   MOBILE RESPONSIVE OVERRIDES
   Target: ≤ 1024px. Desktop layout untouched.
   ========================================= */

/* ── Page bottom safe space (bottom nav = 64px) ────────── */
@media (max-width: 1024px) {
  .page-catalog {
    padding-bottom: calc(var(--bottom-nav-height, 64px) + env(safe-area-inset-bottom, 0px) + 20px) !important;
    padding-top: 12px !important;
  }
}

/* ── H1 + subtitle mobile typography ────────────────────── */
@media (max-width: 1024px) {
  .page-catalog h1 {
    font-size: 1.75rem !important;
    letter-spacing: -0.3px !important;
  }
  .page-catalog > div > p {
    font-size: 0.9rem !important;
  }
}

/* ── Compact search panel ────────────────────────────────── */
@media (max-width: 1024px) {
  .search-panel {
    padding: 12px 14px;
  }
  .search-panel-label {
    font-size: 13px;
    margin-bottom: 6px;
  }
  .search-helper {
    font-size: 12px;
    margin-top: 4px;
  }
}

/* At ≤ 430px: stack input and button vertically */
@media (max-width: 430px) {
  .search-input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .search-input-wrap {
    width: 100%;
  }
  .search-input {
    height: 48px !important;
    font-size: 16px !important; /* prevents iOS zoom-on-focus */
  }
  .search-submit-btn {
    width: 100% !important;
    height: 48px !important;
    font-size: 15px !important;
    border-radius: 10px !important;
  }
  .search-panel {
    padding: 10px 12px !important;
  }
}

/* At 431–600px: button sits beside input, both taller */
@media (min-width: 431px) and (max-width: 600px) {
  .search-input {
    height: 48px !important;
    font-size: 16px !important;
  }
  .search-submit-btn {
    height: 48px !important;
    min-width: 72px !important;
  }
}

/* ── Compact results toolbar ─────────────────────────────── */
@media (max-width: 1024px) {
  .results-toolbar {
    padding-bottom: 8px;
    gap: 6px;
  }
  .results-toolbar-left {
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
  }
  .results-count {
    font-size: 0.9rem;
  }
  .mobile-filter-btn {
    min-height: 48px !important;
    font-size: 13px;
    padding: 4px 14px;
    flex-shrink: 0;
  }
  .search-query-chip {
    max-width: 200px;
    font-size: 11px;
    padding: 2px 8px 2px 10px;
  }
}

@media (max-width: 430px) {
  /* Query chip wraps to own row below count + filter btn */
  .search-query-chip {
    max-width: calc(100vw - 40px);
    order: 3;
    flex-basis: 100%;
  }
}

/* ── Mobile card: shorter visual header ──────────────────── */
@media (max-width: 1024px) {
  .book-cover-header {
    height: 96px;       /* from 128px desktop */
    padding: 8px 12px;
  }
  .book-cover-icon {
    font-size: 2rem;
  }
  .book-card-body {
    padding: 10px 12px;
  }
  .book-card-top {
    margin-bottom: 8px;
  }
  .book-title {
    font-size: 1rem !important;
    margin-bottom: 3px;
  }
  .book-author {
    font-size: 13px;
    margin-bottom: 4px;
  }
  .book-meta-row {
    font-size: 12px;
    gap: 4px;
  }
  .btn-card-detail {
    height: 44px;
    font-size: 14px;
  }
  .book-card-listen-row,
  .book-card-locked-row {
    font-size: 11px;
    margin-top: 4px;
    min-height: 16px;
  }
}

/* Very small viewports: tighten further */
@media (max-width: 390px) {
  .book-cover-header {
    height: 88px;
    padding: 7px 10px;
  }
  .book-card-body {
    padding: 8px 10px;
  }
}

/* ── One-column card grid on mobile ──────────────────────── */
@media (max-width: 1024px) {
  .catalog-layout {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .catalog-main {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 10px;
  }
  .books-grid {
    width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-content: stretch !important;
    gap: 12px !important;
  }
  .book-card {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .search-panel {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .results-toolbar {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

/* ── Mobile pagination: compact Önceki / N/M / Sonraki ───── */
@media (max-width: 1024px) {
  .pagination-wrapper {
    padding-top: 12px !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }
  .pagination-btn {
    min-height: 48px !important;
    min-width: 80px !important;
    font-size: 13px !important;
    padding: 8px 14px !important;
  }
  .pagination-pages {
    display: none !important;
  }
  .pagination-mobile-summary {
    display: inline-block !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: var(--frontend-text) !important;
    padding: 0 4px;
    white-space: nowrap;
  }
}

/* ── Active filters strip: compact on mobile ─────────────── */
@media (max-width: 1024px) {
  .active-filters-strip {
    padding: 8px 12px;
    border-radius: 10px;
  }
  .active-filter-badge {
    font-size: 11px;
    padding: 3px 8px;
  }
  .active-filter-clear-all {
    font-size: 11px;
  }
}

/* ── Empty state: full-width on mobile ───────────────────── */
@media (max-width: 1024px) {
  .catalog-empty-state {
    max-width: 100% !important;
    padding: 24px 16px;
  }
}

/* ── Breadcrumb: hide on very small screens ──────────────── */
@media (max-width: 374px) {
  .page-catalog nav[aria-label="İçerik yolu"] {
    display: none;
  }
}

/* ── Filter drawer: body scroll lock ─────────────────────── */
body.drawer-open {
  overflow: hidden !important;
  touch-action: none;
}

/* ── 200% zoom / forced zoom stacking ───────────────────── */
@media (max-width: 768px) {
  .catalog-layout {
    flex-direction: column !important;
    gap: 10px !important;
  }
  /* Prevent any horizontal bleed at high zoom levels */
  .pub-container,
  .search-panel,
  .catalog-main,
  .books-grid {
    overflow-x: hidden;
    max-width: 100%;
  }
}

/* ── Horizontal overflow guard (all widths) ─────────────── */
@media (max-width: 1024px) {
  html, body {
    overflow-x: hidden;
    max-width: 100%;
  }
}

