/* =================================================================
   Самозвар і Сини — Vintage Bookstore Template
   Style: Warm sepia & cream · paper texture · ornamental · rustic
   ================================================================= */

:root {
  --cream: #f5ead4;
  --cream-light: #faf3e0;
  --cream-deep: #ebd9b4;
  --sepia: #c8a575;
  --sepia-deep: #9b7240;
  --sepia-darkest: #6b4a26;
  --brown: #3d2817;
  --brown-dark: #261810;
  --burgundy: #6b2c2c;
  --burgundy-deep: #4a1d1d;
  --gold: #b8893a;
  --gold-bright: #d4a548;
  --text: #3d2817;
  --text-soft: #6b4a26;
  --text-muted: #8a6a45;
  --paper: #f5ead4;
  --paper-edge: #d4b888;
  --line: #c8a575;
  --line-soft: #ddc499;
  --shadow: 0 6px 24px rgba(61, 40, 23, 0.18);
  --shadow-deep: 0 12px 40px rgba(61, 40, 23, 0.28);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'EB Garamond', serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

/* ============ PAPER TEXTURE BACKGROUND ============ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(200, 165, 117, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(155, 114, 64, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(212, 184, 136, 0.08) 0%, transparent 70%),
    var(--cream);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.3 0 0 0 0 0.15 0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

.serif-display { font-family: 'Playfair Display', serif; }
.serif-body { font-family: 'EB Garamond', serif; }
.serif-script { font-family: 'IM Fell English', serif; }
.serif-marcellus { font-family: 'Marcellus', serif; }

/* ============ ORNAMENTAL DIVIDER ============ */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--sepia-deep);
}

.ornament::before, .ornament::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sepia-deep), transparent);
}

.ornament-symbol {
  font-size: 24px;
  color: var(--gold);
}

/* ============ TOP STRIP ============ */
.top-strip {
  background: var(--brown-dark);
  color: var(--cream);
  padding: 8px 0;
  font-family: 'IM Fell English', serif;
  font-size: 13px;
  text-align: center;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--gold);
}

.top-strip span {
  color: var(--gold-bright);
  margin: 0 12px;
}

/* ============ HEADER ============ */
header {
  background:
    linear-gradient(180deg, rgba(245, 234, 212, 0.95), rgba(235, 217, 180, 0.95));
  border-bottom: 1px solid var(--line);
  padding: 28px 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(61, 40, 23, 0.08);
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}

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

.header-right { justify-content: flex-end; }

.header-link {
  font-family: 'Marcellus', serif;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.header-link:hover { color: var(--burgundy); }

.logo {
  text-align: center;
  text-decoration: none;
  color: var(--brown);
}

.logo-mark {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--sepia-deep);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.logo-name {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: 1px;
  line-height: 1;
  color: var(--brown);
}

.logo-name em {
  font-style: italic;
  color: var(--burgundy);
  font-weight: 600;
}

.logo-sub {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-top: 2px;
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--burgundy);
  color: var(--cream-light);
  text-decoration: none;
  font-family: 'Marcellus', serif;
  font-size: 13px;
  letter-spacing: 1px;
  border-radius: 2px;
  border: 1px solid var(--burgundy-deep);
  transition: all 0.3s ease;
}

.cart-btn:hover {
  background: var(--burgundy-deep);
  transform: translateY(-1px);
}

.cart-count {
  background: var(--gold-bright);
  color: var(--brown-dark);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'EB Garamond', serif;
}

/* ============ NAVIGATION ============ */
.nav-bar {
  background: var(--cream-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0;
}

.nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  justify-content: center;
  gap: 40px;
}

.nav-inner a {
  font-family: 'Marcellus', serif;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-inner a::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--burgundy);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-inner a:hover {
  color: var(--burgundy);
}

.nav-inner a:hover::after {
  width: 100%;
}

.nav-inner a.active {
  color: var(--burgundy);
}

.nav-inner a.active::after {
  width: 100%;
}

/* ============ HERO ============ */
.hero {
  max-width: 1320px;
  margin: 60px auto;
  padding: 0 48px;
  position: relative;
}

.hero-frame {
  background:
    linear-gradient(135deg, rgba(245, 234, 212, 0.6), rgba(235, 217, 180, 0.4)),
    var(--cream-light);
  border: 2px solid var(--sepia);
  border-radius: 4px;
  padding: 60px 64px;
  position: relative;
  box-shadow: var(--shadow-deep);
}

.hero-frame::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  pointer-events: none;
}

.hero-frame::after {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px dashed var(--line-soft);
  border-radius: 2px;
  pointer-events: none;
  opacity: 0.5;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--burgundy);
  letter-spacing: 1.5px;
}

.hero-eyebrow .star { color: var(--gold); }

.hero-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 1.05;
  color: var(--brown);
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.hero-title em {
  font-style: italic;
  color: var(--burgundy);
  font-weight: 600;
}

.hero-desc {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-soft);
  margin-bottom: 32px;
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
}

.hero-meta {
  display: flex;
  gap: 32px;
  margin-bottom: 36px;
  padding: 20px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.meta-item .label {
  font-family: 'IM Fell English', serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.meta-item .value {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--brown);
}

.hero-cta {
  display: flex;
  gap: 16px;
}

.btn {
  font-family: 'Marcellus', serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px 28px;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  background: var(--burgundy);
  color: var(--cream-light);
  border-color: var(--burgundy-deep);
}

.btn-primary:hover {
  background: var(--burgundy-deep);
  box-shadow: 0 6px 16px rgba(74, 29, 29, 0.3);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--brown);
  border-color: var(--sepia-deep);
}

.btn-ghost:hover {
  background: var(--brown);
  color: var(--cream-light);
  border-color: var(--brown);
}

/* ============ HERO BOOK DISPLAY ============ */
.book-display {
  position: relative;
  height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.book-stack {
  position: relative;
  width: 280px;
  height: 400px;
  transform-style: preserve-3d;
  transform: rotateY(-12deg) rotateX(4deg);
}

.book-cover {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--burgundy), var(--burgundy-deep));
  border: 2px solid var(--gold);
  border-radius: 2px 6px 6px 2px;
  box-shadow:
    0 20px 40px rgba(61, 40, 23, 0.4),
    inset 0 0 0 8px rgba(0,0,0,0.05),
    inset 0 0 0 12px var(--burgundy-deep);
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--cream);
  overflow: hidden;
}

.book-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(212, 184, 136, 0.15), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0,0,0,0.3), transparent 60%);
  pointer-events: none;
}

.book-cover::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  right: 8px;
  border: 1px solid var(--gold);
  opacity: 0.6;
  pointer-events: none;
}

.book-top-ornament {
  text-align: center;
  font-family: 'IM Fell English', serif;
  font-size: 18px;
  color: var(--gold-bright);
  letter-spacing: 3px;
}

.book-title-display {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  color: var(--cream-light);
  font-style: italic;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.book-author-display {
  text-align: center;
  font-family: 'IM Fell English', serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gold-bright);
  text-transform: uppercase;
}

.book-bottom-ornament {
  text-align: center;
  font-size: 16px;
  color: var(--gold-bright);
}

/* Books behind, stacked */
.book-back-1, .book-back-2 {
  position: absolute;
  border-radius: 2px 6px 6px 2px;
  box-shadow: 0 8px 20px rgba(61, 40, 23, 0.3);
}

.book-back-1 {
  inset: -12px 8px -8px -8px;
  background: linear-gradient(135deg, #4a3826, #2e1f10);
  border: 1px solid var(--gold);
  transform: rotateY(-6deg) translateZ(-30px);
  z-index: -1;
}

.book-back-2 {
  inset: -20px 16px -16px -16px;
  background: linear-gradient(135deg, #5a3a2a, #3a2418);
  border: 1px solid var(--sepia);
  transform: rotateY(-3deg) translateZ(-60px);
  z-index: -2;
}

/* Floating candle wax seal */
.wax-seal {
  position: absolute;
  width: 80px; height: 80px;
  bottom: 30px;
  right: -20px;
  background: radial-gradient(circle at 35% 35%, var(--burgundy), var(--burgundy-deep));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 28px;
  box-shadow: 0 6px 18px rgba(74, 29, 29, 0.4);
  transform: rotate(-12deg);
  z-index: 3;
}

.wax-seal::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed var(--gold-bright);
  border-radius: 50%;
  opacity: 0.6;
}

/* ============ SECTION HEAD ============ */
.section-head {
  max-width: 1320px;
  margin: 80px auto 40px;
  padding: 0 48px;
  text-align: center;
}

.section-eyebrow {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--burgundy);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 48px;
  color: var(--brown);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.section-title em {
  font-style: italic;
  color: var(--burgundy);
  font-weight: 600;
}

.section-desc {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--text-soft);
  max-width: 600px;
  margin: 0 auto;
}

/* ============ WOODEN SHELF + BOOK GRID ============ */
.shelf-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 48px 40px;
}

.shelf-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-bottom: 36px;
  align-items: end;
}

.book-card {
  background: var(--cream-light);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 20px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow);
}

/* Aged paper effect */
.book-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top left, rgba(155, 114, 64, 0.12), transparent 40%),
    radial-gradient(ellipse at bottom right, rgba(107, 74, 38, 0.15), transparent 50%);
  pointer-events: none;
  border-radius: 2px;
}

/* Foxing spots (aged paper spots) */
.book-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(155, 114, 64, 0.15) 0%, transparent 1.5%),
    radial-gradient(circle at 85% 60%, rgba(155, 114, 64, 0.12) 0%, transparent 1%),
    radial-gradient(circle at 45% 85%, rgba(155, 114, 64, 0.1) 0%, transparent 1.2%);
  pointer-events: none;
  border-radius: 2px;
}

.book-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-deep);
  border-color: var(--burgundy);
}

.book-image-wrap {
  aspect-ratio: 3/4;
  background: var(--cream-deep);
  border: 1px solid var(--line);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.book-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.35) contrast(0.95) saturate(0.85);
  transition: all 0.5s ease;
}

.book-card:hover .book-image-wrap img {
  filter: sepia(0.2) contrast(1) saturate(1);
  transform: scale(1.04);
}

.rarity-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--burgundy);
  color: var(--cream-light);
  padding: 4px 10px;
  font-family: 'IM Fell English', serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  z-index: 2;
  border: 1px solid var(--gold);
}

.rarity-badge.rare { background: var(--gold); color: var(--brown-dark); }
.rarity-badge.unique { background: var(--brown-dark); color: var(--gold-bright); }

.book-info {
  position: relative;
  z-index: 1;
}

.book-year {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.book-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.25;
  color: var(--brown);
  margin-bottom: 4px;
}

.book-author {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 12px;
}

.book-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 12px 0;
}

.book-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.book-price {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--burgundy);
}

.book-price .currency {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  margin-right: 2px;
}

.add-cart-btn {
  background: transparent;
  border: 1px solid var(--sepia-deep);
  color: var(--brown);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  font-family: 'Marcellus', serif;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-cart-btn:hover {
  background: var(--burgundy);
  color: var(--cream-light);
  border-color: var(--burgundy);
  transform: rotate(90deg);
}

/* Wooden shelf under each row */
.wood-shelf {
  height: 18px;
  background:
    linear-gradient(180deg, #6b4a26 0%, #4a3220 50%, #3d2817 100%);
  border-radius: 2px;
  margin: -10px -8px 32px;
  position: relative;
  box-shadow: 0 8px 16px rgba(61, 40, 23, 0.4);
}

.wood-shelf::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg,
      transparent 0,
      transparent 30px,
      rgba(0,0,0,0.15) 30px,
      rgba(0,0,0,0.15) 31px),
    repeating-linear-gradient(180deg,
      transparent 0,
      transparent 4px,
      rgba(0,0,0,0.08) 4px,
      rgba(0,0,0,0.08) 5px);
  border-radius: 2px;
}

.wood-shelf::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 220, 180, 0.2), transparent);
}

/* ============ FEATURED COLLECTION ============ */
.featured-collection {
  background: var(--cream-deep);
  margin: 80px 0;
  padding: 80px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.featured-collection::before,
.featured-collection::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background:
    repeating-linear-gradient(90deg,
      var(--sepia-deep) 0,
      var(--sepia-deep) 20px,
      var(--gold) 20px,
      var(--gold) 22px);
  opacity: 0.4;
}

.featured-collection::before { top: 0; }
.featured-collection::after { bottom: 0; }

.featured-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.featured-image-wrap {
  position: relative;
  aspect-ratio: 4/5;
  border: 2px solid var(--sepia);
  padding: 12px;
  background: var(--cream-light);
  box-shadow: var(--shadow-deep);
}

.featured-image-wrap::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid var(--line);
  pointer-events: none;
}

.featured-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.4) contrast(0.95) saturate(0.85);
}

.featured-content .section-eyebrow { text-align: left; }

.featured-content h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 44px;
  line-height: 1.1;
  color: var(--brown);
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.featured-content h3 em {
  font-style: italic;
  color: var(--burgundy);
}

.featured-content p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-soft);
  margin-bottom: 20px;
}

.featured-quote {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: var(--burgundy);
  padding: 20px 24px;
  border-left: 3px solid var(--gold);
  background: rgba(245, 234, 212, 0.6);
  margin: 24px 0;
}

.featured-quote::before {
  content: '"';
  font-size: 48px;
  line-height: 0.5;
  color: var(--gold);
  margin-right: 8px;
  vertical-align: -10px;
}

.featured-meta {
  display: flex;
  gap: 32px;
  margin: 28px 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ============ CATEGORIES ============ */
.categories {
  max-width: 1320px;
  margin: 80px auto;
  padding: 0 48px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.category-card {
  background: var(--cream-light);
  border: 1px solid var(--line);
  padding: 36px 28px;
  text-align: center;
  text-decoration: none;
  color: var(--brown);
  position: relative;
  transition: all 0.4s ease;
  box-shadow: var(--shadow);
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--line-soft);
  pointer-events: none;
  opacity: 0.6;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: var(--burgundy);
  box-shadow: var(--shadow-deep);
}

.category-icon {
  font-family: 'IM Fell English', serif;
  font-size: 36px;
  color: var(--gold);
  margin-bottom: 16px;
}

.category-name {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--brown);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.category-desc {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 12px;
  line-height: 1.5;
}

.category-count {
  font-family: 'IM Fell English', serif;
  font-size: 12px;
  color: var(--burgundy);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ============ TESTIMONIAL ============ */
.testimonial {
  max-width: 920px;
  margin: 100px auto;
  padding: 0 48px;
  text-align: center;
}

.testimonial-mark {
  font-family: 'Playfair Display', serif;
  font-size: 80px;
  line-height: 0.5;
  color: var(--gold);
  margin-bottom: 24px;
}

.testimonial-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 28px;
  line-height: 1.5;
  color: var(--brown);
  margin-bottom: 32px;
  font-weight: 500;
}

.testimonial-author {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--burgundy);
  letter-spacing: 0.5px;
}

.testimonial-role {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-top: 4px;
}

/* ============ NEWSLETTER ============ */
.newsletter {
  max-width: 1320px;
  margin: 100px auto;
  padding: 0 48px;
}

.newsletter-frame {
  background:
    linear-gradient(135deg, var(--brown-dark), var(--brown));
  color: var(--cream);
  padding: 60px;
  text-align: center;
  border: 2px solid var(--gold);
  position: relative;
  box-shadow: var(--shadow-deep);
}

.newsletter-frame::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--gold);
  opacity: 0.4;
  pointer-events: none;
}

.newsletter-frame::after {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px dashed var(--gold-bright);
  opacity: 0.3;
  pointer-events: none;
}

.newsletter h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 40px;
  color: var(--cream-light);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.newsletter h3 em {
  font-style: italic;
  color: var(--gold-bright);
}

.newsletter p {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--cream-deep);
  margin-bottom: 32px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 0;
  background: var(--cream-light);
  padding: 6px;
  border: 1px solid var(--gold);
  position: relative;
  z-index: 1;
}

.newsletter-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 20px;
  font-family: 'EB Garamond', serif;
  font-size: 15px;
  color: var(--brown);
  outline: none;
}

.newsletter-form input::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.newsletter-form button {
  background: var(--burgundy);
  color: var(--cream-light);
  border: none;
  padding: 14px 24px;
  font-family: 'Marcellus', serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease;
}

.newsletter-form button:hover { background: var(--burgundy-deep); }

/* ============ FOOTER ============ */
footer {
  background: var(--brown-dark);
  color: var(--cream);
  padding: 64px 0 24px;
  margin-top: 80px;
  border-top: 4px double var(--gold);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg,
    transparent, var(--burgundy), var(--gold), var(--burgundy), transparent);
  opacity: 0.6;
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 48px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo-name { color: var(--cream-light); }
.footer-brand .logo-name em { color: var(--gold-bright); }
.footer-brand .logo-sub { color: var(--cream-deep); }
.footer-brand .logo-mark { color: var(--gold-bright); }

.footer-brand p {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.7;
  color: var(--cream-deep);
  margin-top: 16px;
  max-width: 320px;
}

.footer-col h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--gold-bright);
  margin-bottom: 18px;
  letter-spacing: 1px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }

.footer-col a {
  color: var(--cream-deep);
  text-decoration: none;
  font-size: 14px;
  font-family: 'Cormorant Garamond', serif;
  transition: color 0.3s ease;
}

.footer-col a:hover { color: var(--gold-bright); }

.footer-bottom {
  border-top: 1px solid rgba(184, 137, 58, 0.3);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'IM Fell English', serif;
  font-size: 12px;
  color: var(--cream-deep);
  letter-spacing: 1px;
  flex-wrap: wrap;
  gap: 16px;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-frame { animation: fadeIn 0.8s ease; }
.book-card { animation: fadeIn 0.6s ease backwards; }
.shelf-row:nth-child(1) .book-card:nth-child(1) { animation-delay: 0.05s; }
.shelf-row:nth-child(1) .book-card:nth-child(2) { animation-delay: 0.1s; }
.shelf-row:nth-child(1) .book-card:nth-child(3) { animation-delay: 0.15s; }
.shelf-row:nth-child(1) .book-card:nth-child(4) { animation-delay: 0.2s; }
.shelf-row:nth-child(3) .book-card:nth-child(1) { animation-delay: 0.25s; }
.shelf-row:nth-child(3) .book-card:nth-child(2) { animation-delay: 0.3s; }
.shelf-row:nth-child(3) .book-card:nth-child(3) { animation-delay: 0.35s; }
.shelf-row:nth-child(3) .book-card:nth-child(4) { animation-delay: 0.4s; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .header-inner { grid-template-columns: 1fr auto 1fr; }
  .header-left { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-title { font-size: 48px; }
  .book-display { height: 380px; }
  .book-stack { width: 240px; height: 340px; }
  .shelf-row { grid-template-columns: repeat(2, 1fr); }
  .featured-inner { grid-template-columns: 1fr; gap: 40px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .top-strip { font-size: 11px; padding: 6px 16px; }
  .top-strip span { display: none; }
  .header-inner { padding: 0 24px; }
  .header-right { gap: 12px; }
  .logo-name { font-size: 22px; }
  .nav-inner { gap: 20px; padding: 0 24px; overflow-x: auto; }
  .nav-inner a { font-size: 11px; letter-spacing: 1px; }
  .hero { padding: 0 24px; margin: 32px auto; }
  .hero-frame { padding: 36px 24px; }
  .hero-title { font-size: 36px; }
  .hero-meta { flex-wrap: wrap; gap: 16px; }
  .section-head { padding: 0 24px; }
  .section-title { font-size: 32px; }
  .shelf-section { padding: 0 24px; }
  .shelf-row { grid-template-columns: 1fr; }
  .featured-collection { padding: 48px 0; }
  .featured-inner { padding: 0 24px; }
  .featured-content h3 { font-size: 30px; }
  .categories { padding: 0 24px; }
  .category-grid { grid-template-columns: 1fr; }
  .testimonial { padding: 0 24px; }
  .testimonial-text { font-size: 22px; }
  .newsletter { padding: 0 24px; }
  .newsletter-frame { padding: 36px 24px; }
  .newsletter h3 { font-size: 28px; }
  .newsletter-form { flex-direction: column; }
  .footer-inner { padding: 0 24px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
