/* Font pre Latinčinu a nadpisy */
.font-cinzel {
  font-family: "Cinzel", serif;
}
.font-playfair {
  font-family: "Playfair Display", serif;
}

/* Font pre Gréčtinu */
.font-greek {
  font-family: "Times New Roman", Times, serif;
}

/* Font pre Hlaholiku */
.font-glagolitic {
  font-family:
    "Noto Sans Glagolitic", "Segoe UI Historic", "Code2000", sans-serif;
}

.paper-texture {
  background-color: #f4f1ea;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
}

:root {
  --card-ink: #1e293b;
  --card-paper: #fffdf7;
  --card-muted: #475569;
  --card-accent: #b45309;
  --card-accent-soft: rgba(180, 83, 9, 0.1);
}

/* UI Enhancements */
.book-card {
  transition: all 0.3s ease;
  border: 1px solid rgba(51, 65, 85, 0.16);
}

.book-card-inner {
  position: relative;
  z-index: 10;
  transition: all 0.3s ease;
  background: linear-gradient(
    165deg,
    rgba(255, 253, 247, 0.98),
    rgba(244, 241, 234, 0.95)
  );
}

.book-card:hover {
  background-color: rgba(255, 251, 239, 1);
}

.catalog-shell {
  position: relative;
}

.catalog-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at top left,
      rgba(148, 163, 184, 0.16),
      transparent 32%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(30, 41, 59, 0.08),
      transparent 26%
    );
  pointer-events: none;
}

.catalog-hero {
  position: relative;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.74),
      rgba(244, 241, 234, 0.95)
    ),
    linear-gradient(120deg, rgba(30, 41, 59, 0.08), transparent 52%);
}

.catalog-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 18rem;
  height: 18rem;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.12), transparent 68%);
  transform: translate(25%, 25%);
  pointer-events: none;
}

.catalog-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
}

.catalog-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
}

.catalog-kicker::before {
  content: "";
  width: 3rem;
  height: 1px;
  background: rgba(71, 85, 105, 0.45);
}

.catalog-intro {
  max-width: 42rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.catalog-chip-row,
.book-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.catalog-chip,
.book-meta-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.55rem 0.9rem;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.catalog-stat-panel {
  display: grid;
  gap: 1rem;
}

.catalog-stat-card {
  border-radius: 1.5rem;
  padding: 1.4rem;
  background: rgba(30, 41, 59, 0.92);
  color: #f8fafc;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.22);
}

.catalog-stat-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.76);
}

.catalog-stat-value {
  display: block;
  margin-top: 0.5rem;
  font-family: "Cinzel", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.08em;
}

.catalog-stat-copy {
  margin-top: 0.75rem;
  color: rgba(226, 232, 240, 0.8);
  line-height: 1.7;
  font-size: 0.95rem;
}

.catalog-toolbar {
  position: relative;
  z-index: 1;
}

.catalog-toolbar-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1.75rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 38px rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(16px);
}

.catalog-search-input,
.catalog-select {
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.catalog-summary {
  line-height: 1.7;
}

.catalog-cover-fallback {
  background:
    linear-gradient(155deg, rgba(15, 23, 42, 0.88), rgba(51, 65, 85, 0.96)),
    radial-gradient(
      circle at top left,
      rgba(148, 163, 184, 0.12),
      transparent 30%
    );
}

.catalog-card-header {
  background:
    linear-gradient(
      140deg,
      rgba(255, 251, 235, 0.95),
      rgba(255, 247, 237, 0.92)
    ),
    linear-gradient(120deg, rgba(251, 191, 36, 0.18), transparent 62%);
}

.catalog-card-header {
  position: relative;
  overflow: hidden;
}

.catalog-card-header::after {
  content: "";
  position: absolute;
  right: -2.8rem;
  top: -2.8rem;
  width: 8rem;
  height: 8rem;
  border-radius: 9999px;
  background: radial-gradient(
    circle,
    rgba(251, 191, 36, 0.28),
    transparent 72%
  );
  pointer-events: none;
}

.catalog-card-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24 48%, #f59e0b);
}

.catalog-card-kicker {
  font-weight: 700;
  letter-spacing: 0.24em;
  color: #7c2d12;
  text-shadow: none;
}

.catalog-card-content {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.64),
      rgba(244, 241, 234, 0.25)
    ),
    radial-gradient(
      circle at top right,
      var(--card-accent-soft),
      transparent 48%
    );
}

.catalog-title-block {
  position: relative;
}

.catalog-title-block::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 0.3rem;
  bottom: 0.25rem;
  width: 3px;
  border-radius: 9999px;
  background: linear-gradient(180deg, var(--card-accent), rgba(15, 23, 42, 0));
}

.book-title-link {
  text-decoration-thickness: 2px;
  color: var(--card-ink);
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}

.book-title-link:hover {
  color: #7c2d12;
  text-shadow: 0 1px 0 rgba(245, 158, 11, 0.15);
}

.book-author {
  letter-spacing: 0.01em;
  color: #334155;
}

.book-meta-pill {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(180, 83, 9, 0.28);
  color: #7c2d12;
  font-size: 0.67rem;
  letter-spacing: 0.14em;
  padding: 0.5rem 0.82rem;
  box-shadow: 0 8px 14px -12px rgba(124, 45, 18, 0.35);
}

.book-meta-strip {
  border-top-color: rgba(100, 116, 139, 0.25);
}

.catalog-isbn {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: #334155;
  font-weight: 600;
}

.book-lang-chip {
  border: 1px solid rgba(180, 83, 9, 0.25);
  background: rgba(255, 255, 255, 0.95);
  color: #7c2d12;
}

.catalog-links {
  gap: 0.55rem;
}

.catalog-link-button {
  border-color: rgba(30, 41, 59, 0.45);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  color: #1e293b;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 9999px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.catalog-link-button:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #d97706;
  color: #fff7ed;
  transform: translateY(-2px);
  box-shadow: 0 14px 22px -12px rgba(217, 119, 6, 0.55);
}

.book-item:nth-child(3n + 1) .catalog-title-block::before {
  background: linear-gradient(
    180deg,
    rgba(30, 64, 175, 0.75),
    rgba(30, 64, 175, 0.08)
  );
}

.book-item:nth-child(3n + 2) .catalog-title-block::before {
  background: linear-gradient(
    180deg,
    rgba(180, 83, 9, 0.75),
    rgba(180, 83, 9, 0.08)
  );
}

.book-item:nth-child(3n + 3) .catalog-title-block::before {
  background: linear-gradient(
    180deg,
    rgba(21, 128, 61, 0.75),
    rgba(21, 128, 61, 0.08)
  );
}

@media (max-width: 767px) {
  .catalog-title-block::before {
    left: -0.45rem;
  }

  .book-meta-pill {
    letter-spacing: 0.13em;
  }

  .catalog-link-button {
    letter-spacing: 0.16em;
  }
}

.catalog-description {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-link-button {
  box-shadow: 0 10px 18px -12px rgba(15, 23, 42, 0.26);
}

.catalog-isbn {
  word-break: break-word;
}

.book-card {
  position: relative;
  isolation: isolate;
}

.book-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 33%),
    linear-gradient(135deg, rgba(251, 191, 36, 0.06), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.book-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow:
    0 26px 36px -20px rgba(15, 23, 42, 0.26),
    0 0 0 1px rgba(180, 83, 9, 0.12);
}

@media (min-width: 768px) {
  .catalog-hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.9fr);
    align-items: end;
  }

  .catalog-toolbar-main {
    flex-direction: row;
    align-items: center;
  }
}

html {
  scroll-behavior: smooth;
}
