/* ===================================================
   LoBo Books — Main Stylesheet
   Aesthetic: Editorial / Magazine — Warm & Literary
   =================================================== */

:root {
  --cream: #fdf8f2;
  --warm-white: #fffdf9;
  --ink: #1a1209;
  --ink-light: #4a3f30;
  --ink-muted: #8a7a6a;
  --gold: #c8963c;
  --gold-light: #f4a261;
  --teal: #2a9d8f;
  --navy: #264653;
  --red-accent: #e76f51;
  --card-bg: #ffffff;
  --border: #e8e0d4;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(26,18,9,0.08);
  --shadow-md: 0 8px 32px rgba(26,18,9,0.12);
  --shadow-lg: 0 20px 60px rgba(26,18,9,0.16);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== UTILITIES ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.see-all {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  transition: color var(--transition);
  white-space: nowrap;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid transparent;
}
.see-all:hover {
  color: var(--red-accent);
  border-bottom-color: var(--red-accent);
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--ink);
  color: #fff;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: 2px solid var(--ink);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: 2px solid var(--border);
  transition: all var(--transition);
}
.btn-secondary:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(253,248,242,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-icon { font-size: 1.5rem; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo-text em {
  font-style: normal;
  color: var(--gold);
}

.nav-search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  background: var(--warm-white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nav-search:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,150,60,0.12);
}
.nav-search input {
  flex: 1;
  border: none;
  background: none;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-family: var(--font-body);
  color: var(--ink);
  outline: none;
}
.nav-search input::placeholder { color: var(--ink-muted); }
.search-btn {
  background: none;
  border: none;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.search-btn:hover { color: var(--gold); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-light);
  transition: color var(--transition);
}
.nav-link:hover { color: var(--gold); }

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--ink);
  padding: 0.4rem;
  border-radius: 8px;
  transition: background var(--transition);
}
.cart-btn:hover { background: var(--border); }
.cart-count {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--red-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all var(--transition);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid var(--border);
  gap: 0.5rem;
}
.mobile-menu a {
  padding: 0.6rem 0;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}

/* ===== HERO ===== */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fdf1e4 0%, #fdf8f2 60%, #e8f5f3 100%);
  padding: 5rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
  gap: 4rem;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(200,150,60,0.08) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(42,157,143,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  flex: 1;
  max-width: 580px;
  animation: fadeSlideUp 0.8s ease both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(200,150,60,0.12);
  color: var(--gold);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(200,150,60,0.25);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.hero-title-accent {
  color: var(--gold);
  display: block;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--ink-light);
  max-width: 460px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.btn-hero-primary {
  background: var(--ink);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font-body);
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
}
.btn-hero-primary:hover {
  background: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-hero-secondary {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink-light);
  border-bottom: 2px solid var(--border);
  padding-bottom: 2px;
  transition: all var(--transition);
}
.btn-hero-secondary:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink);
}
.stat span {
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 380px;
}

.book-stack {
  position: relative;
  width: 420px;
  height: 440px;
}

.book-card-float {
  position: absolute;
  width: 220px;
  height: 320px;
  background: var(--bg, #264653);
  border-radius: 12px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: floatBook 4s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.3s ease;
  background-size: cover;
  background-position: center;
}
.book-card-float:nth-child(1) { top: 40px; left: 20px;  z-index: 1; }
.book-card-float:nth-child(2) { top: 60px; left: 80px;  z-index: 2; }
.book-card-float:nth-child(3) { top: 10px; left: 140px; z-index: 10; transform: rotate(-2deg) scale(1.08); box-shadow: 0 30px 80px rgba(0,0,0,0.35); }
.book-card-float:hover { transform: rotate(0deg) scale(1.05) !important; z-index: 10; }

.book-spine {
  width: 16px;
  background: rgba(0,0,0,0.25);
  flex-shrink: 0;
}
.book-content {
  padding: 1.5rem 1rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.book-cat {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  font-weight: 600;
}
.book-ftitle {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-top: auto;
}
.book-auth {
  font-size: 0.75rem;
  opacity: 0.7;
  font-weight: 500;
}

@keyframes floatBook {
  0%, 100% { transform: rotate(var(--rot, 0deg)) translateY(0); }
  50% { transform: rotate(var(--rot, 0deg)) translateY(-12px); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.cat-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  display: block;
}
.cat-card:hover {
  border-color: var(--cat-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: color-mix(in srgb, var(--cat-color) 6%, white);
}
.cat-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.cat-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.cat-count {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* ===== BOOKS GRID ===== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.book-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.book-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.book-cover {
  aspect-ratio: 3/4;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}
.book-cover-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
}
.book-cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.book-badge {
  position: relative;
  z-index: 1;
  background: var(--red-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.book-badge.featured { background: var(--gold); }

.book-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.book-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
}
.book-title-card {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.book-author-card {
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.book-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--gold);
}
.book-rating span { color: var(--ink-muted); }

.book-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.book-price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}
.book-price-free { color: var(--teal); }
.add-to-cart-btn {
  background: var(--ink);
  color: #fff;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--transition);
}
.add-to-cart-btn:hover { background: var(--gold); }

/* ===== AUTHOR CTA ===== */
.author-cta-section {
  background: var(--ink);
  padding: 5rem 2rem;
}
.author-cta-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 5rem;
}
.author-cta-text {
  flex: 1;
  color: var(--cream);
}
.author-cta-text h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0.75rem 0 1rem;
}
.author-cta-text p {
  font-size: 1rem;
  color: rgba(253,248,242,0.75);
  max-width: 420px;
  line-height: 1.7;
}
.author-benefits {
  list-style: none;
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.author-benefits li {
  font-size: 0.95rem;
  color: rgba(253,248,242,0.9);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-cta-visual { flex: 0 0 340px; }
.dashboard-preview {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(8px);
}
.dp-header {
  font-weight: 700;
  font-size: 1rem;
  color: var(--cream);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.dp-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.dp-stat {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 0.75rem 0.5rem;
  text-align: center;
}
.dp-stat span {
  display: block;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.dp-stat strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-light);
}
.dp-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  height: 60px;
  margin-bottom: 1rem;
}
.dp-bar {
  flex: 1;
  background: linear-gradient(to top, var(--gold), var(--gold-light));
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}
.dp-footer {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
}
.dp-footer strong { color: var(--gold-light); }

/* ===== REVIEWS ===== */
.reviews-section { background: var(--warm-white); }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.review-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition);
}
.review-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(200,150,60,0.3);
  transform: translateY(-2px);
}
.review-stars { color: var(--gold); font-size: 1rem; letter-spacing: 0.05em; }
.review-card p {
  font-size: 0.95rem;
  color: var(--ink-light);
  line-height: 1.7;
  font-style: italic;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.review-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.review-author strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
}
.review-author span {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 4rem 2rem 0;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: rgba(253,248,242,0.6);
  max-width: 260px;
  line-height: 1.7;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-light);
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: rgba(253,248,242,0.65);
  margin-bottom: 0.5rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(253,248,242,0.4);
}
.payment-badges { display: flex; gap: 1rem; }
.payment-badges span {
  background: rgba(255,255,255,0.06);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
}

/* ===== BOOK LISTING PAGE ===== */
.page-header {
  background: var(--warm-white);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
}
.page-header p { color: var(--ink-muted); margin-top: 0.5rem; }

.books-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.filter-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.filter-group h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.filter-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ink-light);
  transition: color var(--transition);
}
.filter-option:hover { color: var(--gold); }
.filter-option input[type="checkbox"] { accent-color: var(--gold); }

.price-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.price-range input[type="range"] {
  flex: 1;
  accent-color: var(--gold);
}

.books-main { display: flex; flex-direction: column; gap: 1.5rem; }
.books-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.books-count { font-size: 0.9rem; color: var(--ink-muted); }
.sort-select {
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--card-bg);
  color: var(--ink);
  outline: none;
  cursor: pointer;
}
.sort-select:focus { border-color: var(--gold); }

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fdf1e4 0%, #fdf8f2 60%);
  padding: 2rem;
}
.auth-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
}
.auth-sub {
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--warm-white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,150,60,0.12);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-submit {
  width: 100%;
  padding: 0.85rem;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 0.5rem;
}
.form-submit:hover { background: var(--gold); transform: translateY(-1px); }
.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.auth-switch a { color: var(--gold); font-weight: 600; }

/* ===== DASHBOARD ===== */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 68px);
}
.dashboard-sidebar {
  background: var(--ink);
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
}
.sidebar-user {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1rem;
}
.sidebar-user .avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 700; color: #fff;
  margin-bottom: 0.75rem;
}
.sidebar-user strong {
  display: block;
  font-size: 0.95rem;
  color: var(--cream);
  font-weight: 700;
}
.sidebar-user span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-nav { flex: 1; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--cream);
  background: rgba(255,255,255,0.06);
  border-left-color: var(--gold);
}
.sidebar-nav a svg { flex-shrink: 0; }

.dashboard-content { padding: 2.5rem; background: var(--cream); overflow-y: auto; }
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.dashboard-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.stat-card-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink);
}
.stat-card-text span {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-weight: 500;
}
.stat-change {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.stat-change.up { color: var(--teal); }
.stat-change.down { color: var(--red-accent); }

/* ===== DATA TABLE ===== */
.data-table {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
}
.data-table-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.data-table-header h3 {
  font-size: 1rem;
  font-weight: 700;
}
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 0.75rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(200,150,60,0.04); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.badge-success { background: rgba(42,157,143,0.12); color: var(--teal); }
.badge-pending { background: rgba(200,150,60,0.12); color: var(--gold); }
.badge-danger { background: rgba(231,111,81,0.12); color: var(--red-accent); }

/* ===== CART PAGE ===== */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.cart-items { display: flex; flex-direction: column; gap: 1rem; }
.cart-item {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
  transition: all var(--transition);
}
.cart-item:hover { box-shadow: var(--shadow-sm); }
.cart-item-cover {
  width: 72px; height: 96px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.cart-item-author { font-size: 0.85rem; color: var(--ink-muted); }
.cart-item-price {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
}
.cart-remove {
  background: none; border: none;
  color: var(--ink-muted); cursor: pointer;
  padding: 0.4rem; border-radius: 6px;
  transition: all var(--transition);
  font-size: 1.2rem;
}
.cart-remove:hover { background: rgba(231,111,81,0.1); color: var(--red-accent); }

.cart-summary {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  height: fit-content;
  position: sticky;
  top: 88px;
}
.cart-summary h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  color: var(--ink-light);
}
.summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1rem 0 0;
  margin-top: 0.5rem;
  border-top: 2px solid var(--ink);
  color: var(--ink);
}
.checkout-btn {
  width: 100%;
  padding: 1rem;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  margin-top: 1.5rem;
  transition: all var(--transition);
}
.checkout-btn:hover { background: var(--gold); transform: translateY(-1px); }

/* ===== ALERTS / TOASTS ===== */
.toast {
  position: fixed;
  bottom: 2rem; right: 2rem;
  background: var(--ink);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--teal); }
.toast.error { background: var(--red-accent); }

/* ===== UPLOAD AREA ===== */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--gold);
  background: rgba(200,150,60,0.04);
}
.upload-area .upload-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.upload-area p { font-size: 0.9rem; color: var(--ink-muted); }
.upload-area strong { color: var(--gold); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .books-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .books-layout { grid-template-columns: 240px 1fr; }
  .author-cta-inner { gap: 2rem; }
  .author-cta-visual { flex: 0 0 280px; }
  .hero { flex-direction: column; min-height: auto; }
}

@media (max-width: 768px) {
  .nav-search { display: none; }
  .nav-actions { display: none; }
  .hamburger { display: flex; }

  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .books-layout { grid-template-columns: 1fr; }
  .filter-sidebar { display: none; }
  .reviews-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .author-cta-inner { flex-direction: column; gap: 2rem; }
  .author-cta-visual { display: none; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { display: none; }
  .cart-layout { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { flex-wrap: wrap; gap: 1rem; }
  .hero-visual { display: none; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

@media (max-width: 480px) {
  .books-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}
