@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');
@import url('https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800&family=Lora:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #8B4513;
  --primary-dark: #5D2E0F;
  --primary-light: #A0522D;
  --secondary-color: #D4A574;
  --secondary-dark: #B8925F;
  --secondary-light: #E8D4B8;
  --accent-color: #C19A6B;
  --accent-dark: #9C7A4F;
  --text-primary: #2C1810;
  --text-secondary: #5C4033;
  --text-muted: #8B7355;
  --background: #FFF9F0;
  --background-alt: #F5EFE6;
  --paper: #FFFEF7;
  --border-color: #D4C4B0;
  --shadow-sm: 0 2px 8px rgba(139, 69, 19, 0.08);
  --shadow-md: 0 4px 16px rgba(139, 69, 19, 0.12);
  --shadow-lg: 0 8px 32px rgba(139, 69, 19, 0.16);
  --shadow-xl: 0 12px 48px rgba(139, 69, 19, 0.2);
  --transition-speed: 0.3s;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 8px;
  --border-radius-lg: 16px;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Lora', serif;
  --font-ui: 'Inter', sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--background);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--primary-color);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--background-alt);
  border-left: 1px solid var(--border-color);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-color), var(--primary-dark));
  border-radius: 6px;
  border: 2px solid var(--background-alt);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-speed) var(--transition-smooth);
}

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

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

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 249, 240, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed) var(--transition-smooth);
}

header.scrolled {
  background: rgba(255, 249, 240, 0.98);
  box-shadow: var(--shadow-md);
}

.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.02em;
  transition: transform var(--transition-speed) var(--transition-smooth);
}

.logo:hover {
  transform: translateY(-2px);
}

.logo i {
  font-size: 2rem;
  color: var(--accent-color);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
  font-family: var(--font-ui);
}

.nav-menu a {
  position: relative;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.5rem 0;
  transition: color var(--transition-speed) var(--transition-smooth);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width var(--transition-speed) var(--transition-smooth);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-color);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-smooth);
}

.nav-icon:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.nav-icon .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-color);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  font-family: var(--font-ui);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  padding: 5px;
}

.mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: all var(--transition-speed) var(--transition-smooth);
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--paper);
  padding: 6rem 2rem 2rem;
  transform: translateX(-100%);
  transition: transform 0.4s var(--transition-smooth);
  overflow-y: auto;
  z-index: 999;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu .nav-menu {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.mobile-menu .nav-menu li {
  width: 100%;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu .nav-menu a {
  display: block;
  padding: 1.25rem 0;
  font-size: 1.1rem;
}

.hero-section {
  position: relative;
  background: linear-gradient(135deg, var(--background) 0%, var(--secondary-light) 100%);
  padding: 5rem 0;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(139, 69, 19, 0.03) 2px, rgba(139, 69, 19, 0.03) 4px),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(139, 69, 19, 0.03) 2px, rgba(139, 69, 19, 0.03) 4px);
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-subtitle {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.hero-title {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-smooth);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--border-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.85rem;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.section {
  padding: 5rem 0;
  position: relative;
}

.section-alt {
  background: var(--background-alt);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-subtitle {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.card {
  background: var(--paper);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  border: 1px solid var(--border-color);
  transition: all var(--transition-speed) var(--transition-smooth);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-speed) var(--transition-smooth);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  transition: transform var(--transition-speed) var(--transition-smooth);
}

.card:hover .card-image {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--accent-color);
  color: white;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.card-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.card-price {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
}

.card-price-old {
  font-size: 1.25rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 0.5rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.book-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed) var(--transition-smooth);
  position: relative;
}

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

.book-cover {
  position: relative;
  width: 100%;
  padding-top: 150%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--secondary-light), var(--background-alt));
}

.book-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--transition-smooth);
}

.book-card:hover .book-cover img {
  transform: scale(1.1);
}

.book-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7));
  opacity: 0;
  transition: opacity var(--transition-speed) var(--transition-smooth);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.book-card:hover .book-overlay {
  opacity: 1;
}

.book-actions {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.book-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 0.625rem 1rem;
  font-size: 0.85rem;
}

.book-info {
  padding: 1.5rem;
}

.book-category {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.book-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-author {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.book-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stars {
  display: flex;
  gap: 0.125rem;
  color: var(--accent-color);
}

.rating-count {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.book-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.book-price {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.add-to-cart-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-smooth);
  border: none;
  font-size: 1.25rem;
}

.add-to-cart-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1) rotate(15deg);
  box-shadow: var(--shadow-md);
}

.category-filter {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.filter-btn {
  font-family: var(--font-ui);
  padding: 0.625rem 1.5rem;
  background: white;
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-smooth);
  font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.feature-box {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-speed) var(--transition-smooth);
}

.feature-box:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary-light), var(--accent-color));
  border-radius: 50%;
  color: var(--primary-color);
  font-size: 2.5rem;
  transition: all var(--transition-speed) var(--transition-smooth);
}

.feature-box:hover .feature-icon {
  transform: scale(1.1) rotate(10deg);
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.feature-description {
  color: var(--text-muted);
}

.testimonial-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed) var(--transition-smooth);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-family: var(--font-heading);
  font-size: 6rem;
  color: var(--secondary-light);
  line-height: 1;
  opacity: 0.5;
}

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

.testimonial-content {
  position: relative;
  z-index: 1;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--secondary-light);
}

.author-info h4 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.author-title {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: all var(--transition-speed) var(--transition-smooth);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(139, 69, 19, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.form-checkbox input {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.form-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-family: var(--font-ui);
}

.form-success {
  color: #16a34a;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-family: var(--font-ui);
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form .form-input {
  flex: 1;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  padding: 0.5rem;
  transition: all var(--transition-speed) var(--transition-smooth);
  max-width: 600px;
  margin: 0 auto;
}

.search-bar:focus-within {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  background: transparent;
}

.search-bar button {
  padding: 0.75rem 2rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  transition: all var(--transition-speed) var(--transition-smooth);
}

.search-bar button:hover {
  background: var(--primary-dark);
  transform: translateX(2px);
}

.accordion-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all var(--transition-speed) var(--transition-smooth);
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  cursor: pointer;
  background: var(--paper);
  transition: all var(--transition-speed) var(--transition-smooth);
  user-select: none;
}

.accordion-header:hover {
  background: var(--background-alt);
}

.accordion-title {
  font-family: var(--font-ui);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.accordion-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
  transition: transform var(--transition-speed) var(--transition-smooth);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--transition-smooth);
}

.accordion-item.active .accordion-content {
  max-height: 500px;
}

.accordion-body {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.tabs {
  margin-bottom: 2rem;
}

.tab-buttons {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.tab-button {
  padding: 1rem 2rem;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-smooth);
  white-space: nowrap;
}

.tab-button:hover {
  color: var(--primary-color);
}

.tab-button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s var(--transition-smooth);
}

.tab-content.active {
  display: block;
}

.badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: var(--primary-color);
  color: white;
}

.badge-secondary {
  background: var(--secondary-color);
  color: var(--text-primary);
}

.badge-success {
  background: #16a34a;
  color: white;
}

.badge-warning {
  background: #f59e0b;
  color: white;
}

.badge-info {
  background: #0ea5e9;
  color: white;
}

.alert {
  padding: 1.25rem 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  font-family: var(--font-ui);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.alert-icon {
  font-size: 1.5rem;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 24, 16, 0.8);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed) var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--paper);
  border-radius: var(--border-radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9);
  transition: transform var(--transition-speed) var(--transition-smooth);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.75rem;
  margin: 0;
  color: var(--text-primary);
}

.modal-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: all var(--transition-speed) var(--transition-smooth);
  border-radius: 50%;
}

.modal-close:hover {
  background: var(--background-alt);
  color: var(--primary-color);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-color);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 249, 240, 0.95);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--paper);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 9998;
  transform: translateY(100%);
  transition: transform 0.4s var(--transition-smooth);
}

.cookie-banner.active {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 250px;
  font-family: var(--font-ui);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.cookie-text a {
  color: var(--primary-color);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.page-link {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--text-secondary);
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-smooth);
}

.page-link:hover,
.page-link.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--transition-speed) var(--transition-smooth);
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.breadcrumb-separator {
  color: var(--border-color);
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed) var(--transition-smooth);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.social-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: all var(--transition-speed) var(--transition-smooth);
}

.social-link:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-3px) rotate(10deg);
  box-shadow: var(--shadow-md);
}

footer {
  background: linear-gradient(180deg, var(--text-primary), var(--primary-dark));
  color: var(--secondary-light);
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--accent-color);
}

.footer-section p {
  color: var(--secondary-light);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--secondary-light);
  transition: all var(--transition-speed) var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a:hover {
  color: white;
  transform: translateX(5px);
}

.footer-links a::before {
  content: '›';
  font-size: 1.25rem;
  color: var(--accent-color);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--secondary-light);
}

.contact-item i {
  color: var(--accent-color);
  font-size: 1.25rem;
  margin-top: 0.125rem;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(212, 165, 116, 0.2);
  text-align: center;
  color: var(--secondary-light);
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--accent-color);
  transition: color var(--transition-speed) var(--transition-smooth);
}

.footer-bottom a:hover {
  color: white;
}

.promo-banner {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 1rem 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.promo-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
}

.promo-banner a {
  color: var(--secondary-light);
  text-decoration: underline;
  margin-left: 0.5rem;
}

.stats-section {
  background: white;
  padding: 3rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 2rem;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="100" opacity="0.05" fill="white">📚</text></svg>');
  background-size: 150px;
  opacity: 0.3;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.cta-section h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--secondary-light);
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  to {
    left: 100%;
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s var(--transition-smooth);
}

.animate-slide-left {
  animation: slideInFromLeft 0.6s var(--transition-smooth);
}

.animate-slide-right {
  animation: slideInFromRight 0.6s var(--transition-smooth);
}

.animate-pulse {
  animation: pulse 2s infinite;
}

@media (max-width: 1024px) {
  .nav-menu {
    gap: 1.5rem;
  }

  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
  }

  .header-wrapper {
    padding: 0.75rem 0;
  }

  .hero-section {
    padding: 3rem 0;
  }

  .section {
    padding: 3rem 0;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
    justify-content: center;
  }

  .category-filter {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form .btn {
    width: 100%;
    justify-content: center;
  }

  .cookie-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-actions {
    width: 100%;
    flex-direction: column;
  }

  .cookie-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .tab-buttons {
    gap: 0.25rem;
  }

  .tab-button {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }

  .modal {
    margin: 1rem;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 1rem;
  }

  .logo {
    font-size: 1.5rem;
  }

  .logo i {
    font-size: 1.75rem;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  .nav-icon {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .card {
    padding: 1.5rem;
  }

  .book-info {
    padding: 1.25rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .search-bar {
    flex-direction: column;
    border-radius: var(--border-radius);
  }

  .search-bar button {
    width: 100%;
    border-radius: var(--border-radius);
  }
}

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

@media print {
  header,
  footer,
  .mobile-toggle,
  .nav-actions,
  .cookie-banner,
  .back-to-top,
  .promo-banner {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .section {
    padding: 1rem 0;
  }

  a {
    text-decoration: underline;
  }
}