/* ===================================
   EMUNAH EDITORA - ESTILOS GLOBAIS
   =================================== */

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

:root {
  --primary-blue: #2563eb;
  --primary-dark: #1e3a8a;
  --dark-bg: #0f172a;
  --card-bg: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --accent-red: #ef4444;
  --accent-yellow: #fbbf24;
  --border-color: #334155;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0f172a 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 2rem;
}

.hero-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2rem;
  display: inline-block;
  background: rgba(37, 99, 235, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-title .highlight {
  color: var(--primary-blue);
  display: block;
}

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

.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary-blue) 0%, #1e40af 100%);
  color: white;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.hero-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(37, 99, 235, 0.4);
}

.hero-button svg {
  width: 20px;
  height: 20px;
}

/* ===================================
   SEÇÃO DE DESTAQUE
   =================================== */

.featured-section {
  padding: 5rem 2rem;
  background-color: var(--dark-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ===================================
   CARDS DE LIVROS
   =================================== */

.book-card {
  position: relative;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.book-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-blue);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

.book-image-container {
  position: relative;
  width: 100%;
  padding-top: 133.33%;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.book-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.book-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent-red);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 2;
}

.book-featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent-yellow);
  color: #000;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.book-featured-badge::before {
  content: '★';
}

.book-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.book-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.book-author {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.book-prices {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

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

.book-price-original {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: line-through;
}

/* ===================================
   SEÇÃO DE CATÁLOGO
   =================================== */

.catalog-section {
  padding: 5rem 2rem;
  background-color: var(--dark-bg);
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: white;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ===================================
   FOOTER
   =================================== */

footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0f172a 100%);
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-color);
  margin-top: 5rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
}

.footer-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-description {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 50%;
  color: var(--primary-blue);
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 1.2rem;
}

.social-link:hover {
  background: var(--primary-blue);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ===================================
   RESPONSIVO
   =================================== */

@media (max-width: 900px) {
  .modal-body {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
  }

  .modal-book-image {
    max-width: 250px;
  }

  .modal-book-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .featured-grid,
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
  }

  .filter-buttons {
    gap: 0.75rem;
  }

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

  .featured-section,
  .catalog-section {
    padding: 3rem 1rem;
  }

  .modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .modal-close {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.75rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .featured-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    flex-direction: column;
  }

  .filter-btn {
    width: 100%;
  }

  .featured-section,
  .catalog-section {
    padding: 2rem 1rem;
  }

  .modal-body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1rem;
  }

  .modal-book-title {
    font-size: 1.5rem;
  }

  .modal-price-current {
    font-size: 1.5rem;
  }

  .modal-actions {
    flex-direction: column;
  }

  .btn-buy,
  .btn-back {
    width: 100%;
  }
}

/* ===================================
   ANIMAÇÕES
   =================================== */

/* ===================================
   MODAL - DETALHES DO LIVRO
   =================================== */

.book-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.book-modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.modal-content {
  position: relative;
  z-index: 1001;
  background: var(--card-bg);
  border-radius: 16px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s ease-out;
}

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

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 3rem;
}

.modal-image-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-book-image {
  width: 100%;
  max-width: 350px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

.modal-info-section {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.modal-book-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.modal-book-author {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.modal-prices {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-price-current {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-blue);
}

.modal-price-original {
  font-size: 1rem;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.modal-category {
  margin-bottom: 1.5rem;
}

.category-badge {
  display: inline-block;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-blue);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: capitalize;
}

.modal-description {
  margin-bottom: 2rem;
}

.modal-description h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.modal-description p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  flex-direction: column;
}

.btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-blue) 0%, #1e40af 100%);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(37, 99, 235, 0.4);
}

.btn-back {
  background: transparent;
  color: var(--text-primary);
  padding: 1rem 2rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

/* ===================================
   ANIMAÇÕES
   =================================== */

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

.book-card {
  animation: fadeInUp 0.6s ease-out forwards;
  cursor: pointer;
}

.book-card:nth-child(1) { animation-delay: 0.1s; }
.book-card:nth-child(2) { animation-delay: 0.2s; }
.book-card:nth-child(3) { animation-delay: 0.3s; }
.book-card:nth-child(4) { animation-delay: 0.4s; }
.book-card:nth-child(5) { animation-delay: 0.5s; }
