/* ========================================
   书香阁 BookStore — styles.css
   ======================================== */

/* ===== CSS Variables ===== */
:root {
  --brown-dark: #5C3D1E;
  --brown: #8B5E3C;
  --brown-light: #C9A27A;
  --cream: #FFF8ED;
  --cream-2: #F5EFE4;
  --cream-3: #FAF7F2;
  --orange: #D97757;
  --orange-light: #F5C5A8;
  --text-primary: #2C1A0E;
  --text-secondary: #6B4C2A;
  --text-muted: #9E8270;
  --border: #E8DDD0;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(92,61,30,0.08);
  --shadow-md: 0 4px 16px rgba(92,61,30,0.12);
  --shadow-lg: 0 8px 32px rgba(92,61,30,0.16);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--cream-3);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Noto Serif SC', 'STSong', serif;
  line-height: 1.3;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden { display: none !important; }

/* ===== Notice Bar ===== */
.notice-bar {
  background: var(--brown-dark);
  color: var(--cream);
  font-size: 13px;
  padding: 8px 0;
  text-align: center;
}

.notice-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sep { color: var(--brown-light); opacity: 0.5; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-text {
  font-family: 'Noto Serif SC', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--brown-dark);
  letter-spacing: 0.04em;
}

.logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* Search */
.search-wrap {
  flex: 1;
  max-width: 520px;
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-wrap:focus-within {
  border-color: var(--brown);
  box-shadow: 0 0 0 3px rgba(139,94,60,0.12);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 18px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--cream-3);
}

.search-input::placeholder { color: var(--text-muted); }

.search-btn {
  background: var(--brown);
  border: none;
  color: white;
  padding: 0 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background var(--transition);
}

.search-btn:hover { background: var(--brown-dark); }

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.action-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}

.action-link:hover { background: var(--cream-2); color: var(--brown); }

.cart-icon-wrap { position: relative; }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--orange);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--brown-dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* Category Nav */
.cat-nav {
  border-top: 1px solid var(--border);
  background: var(--white);
}

.cat-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.cat-nav-inner::-webkit-scrollbar { display: none; }

.cat-nav-link {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.cat-nav-link:hover { color: var(--brown); }
.cat-nav-link.active { color: var(--brown-dark); border-bottom-color: var(--brown); font-weight: 600; }
.cat-nav-link.promo-link { color: var(--orange); font-weight: 600; }

/* ===== Sections ===== */
.section { padding: 60px 0; }

.section-head { text-align: center; margin-bottom: 40px; }

.section-head--between {
  text-align: left;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 8px;
}

.section-sub {
  font-size: 15px;
  color: var(--text-muted);
}

/* ===== CAROUSEL ===== */
.carousel-section { overflow: hidden; background: var(--cream-2); }

.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Slide Base */
.slide {
  min-width: 100%;
  min-height: 480px;
  display: flex;
  align-items: center;
  padding: 60px max(24px, calc((100vw - 1280px) / 2 + 24px));
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.slide--1 { background: linear-gradient(135deg, #3D1F0A 0%, #8B5E3C 60%, #C9A27A 100%); }
.slide--2 { background: linear-gradient(135deg, #1A2E4A 0%, #2E5C8A 60%, #5B8DB8 100%); }
.slide--3 { background: linear-gradient(135deg, #1A2D1A 0%, #3A5C2A 60%, #6A9C4A 100%); }

.slide-content {
  flex: 1;
  max-width: 520px;
  z-index: 2;
}

.slide-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
}

.slide-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: white;
  line-height: 1.2;
  margin-bottom: 16px;
}

.slide-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 28px;
}

.slide-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.slide-stats {
  display: flex;
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat strong {
  font-size: 22px;
  font-weight: 700;
  color: white;
  font-family: 'Noto Serif SC', serif;
}

.stat span {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}

.slide-tags-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-chip {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.2);
}

/* Slide Visual — Book Stack */
.slide-visual {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-stack {
  position: relative;
  width: 260px;
  height: 320px;
}

.book {
  position: absolute;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 6px 20px rgba(0,0,0,0.35);
  transition: transform 0.4s ease;
}

.book span {
  font-family: 'Noto Serif SC', serif;
  font-size: 11px;
  color: rgba(255,255,255,0.9);
  writing-mode: vertical-rl;
  letter-spacing: 0.1em;
  padding: 0 6px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.b1 { width: 52px; height: 220px; background: linear-gradient(180deg,#F5E6C8,#D4B896); left: 40px; top: 40px; z-index: 5; }
.b2 { width: 50px; height: 200px; background: linear-gradient(180deg,#A8C4E0,#6A9BCC); left: 90px; top: 60px; z-index: 4; }
.b3 { width: 54px; height: 240px; background: linear-gradient(180deg,#5C8A5A,#3A6A38); left: 140px; top: 30px; z-index: 3; }
.b4 { width: 48px; height: 190px; background: linear-gradient(180deg,#C87941,#8B4D20); left: 192px; top: 70px; z-index: 2; }
.b5 { width: 46px; height: 210px; background: linear-gradient(180deg,#9B3A3A,#6B1A1A); left: 10px; top: 50px; z-index: 1; }

.book-stack:hover .b1 { transform: translateY(-8px) rotate(-2deg); }
.book-stack:hover .b3 { transform: translateY(-12px); }
.book-stack:hover .b2 { transform: translateY(-6px) rotate(1deg); }

/* Reading scene */
.reading-scene {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.rs-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: 12px;
  width: 110px;
  transition: transform 0.3s ease;
}

.rs-card:hover { transform: translateY(-8px); }

.rs-1 { transform: translateY(-16px); }
.rs-2 { transform: translateY(0); }
.rs-3 { transform: translateY(-8px); }

.rs-cover {
  width: 100%;
  height: 90px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.rs-card p {
  font-size: 11px;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}

.rs-card span { font-size: 11px; color: rgba(255,200,80,0.9); }

/* New badge scene */
.new-badge-scene { width: 280px; }

.nb-main {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.nb-cover {
  width: 60px;
  height: 80px;
  border-radius: 6px;
  background: linear-gradient(160deg,#C9823A,#8B5E3C);
  flex-shrink: 0;
}

.nb-info strong {
  display: block;
  font-size: 14px;
  color: white;
  margin-bottom: 4px;
}

.nb-info span {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  display: block;
  margin-bottom: 6px;
}

.nb-info em {
  font-style: normal;
  font-size: 11px;
  background: rgba(255,200,80,0.2);
  color: rgba(255,220,100,0.95);
  padding: 2px 8px;
  border-radius: 100px;
}

.nb-sub {
  display: flex;
  gap: 10px;
}

.nb-s {
  flex: 1;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}

.nb-s-cover {
  width: 100%;
  height: 50px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.nb-s span {
  font-size: 10px;
  color: rgba(255,255,255,0.8);
  line-height: 1.3;
}

/* Carousel buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  z-index: 10;
}

.carousel-btn:hover { background: rgba(255,255,255,0.3); }
.carousel-btn--prev { left: 20px; }
.carousel-btn--next { right: 20px; }

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background var(--transition), width var(--transition);
  padding: 0;
}

.dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
  font-family: inherit;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--orange);
  color: white;
  box-shadow: 0 4px 16px rgba(217,119,87,0.35);
}
.btn-primary:hover { background: #C86840; box-shadow: 0 6px 20px rgba(217,119,87,0.45); }

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.6);
  color: white;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: white; }

.btn-white {
  background: white;
  color: var(--brown-dark);
  font-size: 13px;
  padding: 9px 20px;
}
.btn-white:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.15); }

.btn-outline-dark {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-secondary);
  padding: 12px 32px;
}
.btn-outline-dark:hover {
  border-color: var(--brown);
  color: var(--brown);
  background: var(--cream-2);
}

/* ===== Categories ===== */
.categories-section { background: var(--white); }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.cat-card {
  background: var(--cat-bg, var(--cream-2));
  border: 1.5px solid transparent;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--cat-color);
}

.cat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 4px;
}

.cat-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Noto Serif SC', serif;
}

.cat-count {
  font-size: 12px;
  color: var(--text-muted);
}

.cat-arrow {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 18px;
  color: var(--cat-color);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--transition), transform var(--transition);
}

.cat-card:hover .cat-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ===== Promo ===== */
.promo-section { background: var(--cream-2); }

.countdown-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.countdown-label { font-size: 14px; color: var(--text-muted); }

.countdown {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cd-unit {
  background: var(--brown-dark);
  color: white;
  border-radius: var(--radius-sm);
  min-width: 48px;
  padding: 6px 10px;
  text-align: center;
}

.cd-unit span {
  display: block;
  font-size: 22px;
  font-weight: 700;
  font-family: 'Noto Serif SC', serif;
  line-height: 1;
}

.cd-unit label {
  font-size: 10px;
  opacity: 0.7;
  display: block;
  margin-top: 3px;
}

.cd-sep {
  font-size: 22px;
  font-weight: 700;
  color: var(--brown);
  padding-bottom: 12px;
}

.promo-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

.promo-card {
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  color: white;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.promo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.promo-card--big {
  grid-row: span 2;
  padding: 36px 32px;
  min-height: 280px;
}

.promo-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.promo-card h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  color: white;
}

.promo-card--big h3 { font-size: 22px; }

.promo-card big {
  font-size: 1.6em;
  font-weight: 700;
  display: block;
  line-height: 1.1;
  margin-top: 4px;
}

.promo-card p {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 18px;
}

.promo-deco {
  position: absolute;
  bottom: -10px;
  right: -10px;
  pointer-events: none;
}

.deco-book {
  position: absolute;
  border-radius: 3px;
  opacity: 0.15;
}

.db1 {
  width: 50px;
  height: 130px;
  background: white;
  bottom: 10px;
  right: 40px;
  transform: rotate(-12deg);
}

.db2 {
  width: 45px;
  height: 110px;
  background: white;
  bottom: 20px;
  right: 0px;
  transform: rotate(8deg);
}

/* ===== Hot Books ===== */
.hot-section { background: var(--white); }

/* Tabs */
.tab-group {
  display: flex;
  gap: 4px;
  background: var(--cream-2);
  padding: 4px;
  border-radius: 100px;
}

.tab {
  padding: 8px 18px;
  border: none;
  background: none;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), color var(--transition);
}

.tab.active {
  background: var(--white);
  color: var(--brown-dark);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* Books Grid */
.books-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

/* Book Card */
.book-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.book-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.book-cover {
  height: 180px;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  position: relative;
}

.book-spine {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 100%;
  background: rgba(0,0,0,0.25);
}

.book-title-on-cover {
  font-family: 'Noto Serif SC', serif;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  letter-spacing: 0.06em;
  position: relative;
  z-index: 2;
}

.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--orange);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}

.rank-2 { background: var(--brown); }

.editor-label {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg,var(--brown),var(--orange));
  color: white;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 5px;
  z-index: 10;
}

.editor-pick .book-cover { height: 166px; }

.book-info { padding: 16px; }

.book-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.book-cat {
  font-size: 11px;
  font-weight: 600;
  background: var(--cream-2);
  color: var(--brown);
  padding: 2px 10px;
  border-radius: 100px;
}

.book-rating {
  font-size: 12px;
  color: #C9823A;
  font-weight: 600;
}

.book-name {
  font-size: 15px;
  font-weight: 700;
  font-family: 'Noto Serif SC', serif;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.book-author {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.book-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.price {
  font-size: 18px;
  font-weight: 700;
  color: #C0392B;
  font-family: 'Noto Serif SC', serif;
}

.price-orig {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-badge {
  font-size: 11px;
  font-weight: 700;
  background: #FEF3EC;
  color: var(--orange);
  padding: 2px 8px;
  border-radius: 4px;
}

.add-cart-btn {
  width: 100%;
  background: var(--brown);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), transform var(--transition);
}

.add-cart-btn:hover { background: var(--brown-dark); transform: scale(1.01); }
.add-cart-btn:active { transform: scale(0.98); }

.load-more-wrap { text-align: center; padding: 8px 0 16px; }

/* ===== Brand Strip ===== */
.brand-strip {
  background: var(--brown-dark);
  padding: 28px 0;
}

.brand-items {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  flex-wrap: wrap;
}

.brand-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
}

.brand-item svg { color: var(--orange-light); flex-shrink: 0; }

.brand-item strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Noto Serif SC', serif;
}

.brand-item span { font-size: 12px; opacity: 0.65; }

/* ===== Footer ===== */
.footer {
  background: var(--brown-dark);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand .logo { margin-bottom: 16px; }

.footer-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  transition: background var(--transition), color var(--transition);
}

.footer-social a:hover { background: var(--orange); color: white; }

.footer-col h4 {
  font-family: 'Noto Serif SC', serif;
  font-size: 15px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-col ul { list-style: none; }

.footer-col ul li + li { margin-top: 10px; }

.footer-col ul li a {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}

.footer-col ul li a:hover { color: rgba(255,255,255,0.9); }

.footer-col--qr .qr-box { text-align: center; }

.footer-col--qr .qr-code {
  background: white;
  padding: 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 8px;
}

.footer-col--qr p {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  transition: color var(--transition);
}

.footer-links a:hover { color: rgba(255,255,255,0.7); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--brown-dark);
  color: white;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .books-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: span 3; }
}

@media (max-width: 860px) {
  .categories-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .promo-grid { grid-template-columns: 1fr 1fr; }
  .promo-card--big { grid-row: auto; grid-column: span 2; }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .slide { padding: 40px 24px; }
  .slide-visual { display: none; }
}

@media (max-width: 640px) {
  .header-inner { height: 58px; gap: 12px; }
  .search-wrap { max-width: 220px; }
  .header-actions { display: none; }
  .hamburger { display: flex; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .promo-grid { grid-template-columns: 1fr; }
  .promo-card--big { grid-column: auto; }
  .books-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .section { padding: 40px 0; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: span 2; }
  .footer-col--qr { display: none; }
  .brand-items { flex-direction: column; align-items: flex-start; padding: 0 24px; gap: 14px; }
  .section-head--between { flex-direction: column; align-items: flex-start; }
  .tab-group { align-self: flex-start; }
  .slide-title { font-size: 28px; }
}

@media (max-width: 420px) {
  .books-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Scroll animations ===== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.cat-card:nth-child(1) { transition-delay: 0ms; }
.cat-card:nth-child(2) { transition-delay: 60ms; }
.cat-card:nth-child(3) { transition-delay: 120ms; }
.cat-card:nth-child(4) { transition-delay: 180ms; }
.cat-card:nth-child(5) { transition-delay: 240ms; }
.cat-card:nth-child(6) { transition-delay: 300ms; }
.cat-card:nth-child(7) { transition-delay: 360ms; }
.cat-card:nth-child(8) { transition-delay: 420ms; }

.book-card:nth-child(1) { transition-delay: 0ms; }
.book-card:nth-child(2) { transition-delay: 60ms; }
.book-card:nth-child(3) { transition-delay: 120ms; }
.book-card:nth-child(4) { transition-delay: 180ms; }
.book-card:nth-child(5) { transition-delay: 240ms; }
.book-card:nth-child(6) { transition-delay: 300ms; }
.book-card:nth-child(7) { transition-delay: 360ms; }
.book-card:nth-child(8) { transition-delay: 420ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
