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

:root {
  --bg: #0a0a0f;
  --card-bg: #13131a;
  --gold: #c9a96e;
  --rose: #8b3a5a;
  --text: #f0ede8;
  --text-muted: #9a97a0;
  --border: #1e1e2a;
  --success: #4ade80;
  --error: #f87171;
  --radius: 10px;
  --radius-sm: 6px;
  --card-shadow: 0 4px 20px rgba(0,0,0,0.3);
  --max-width: 1080px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Authors Hero (autores page) ── */

.authors-hero {
  text-align: center;
  padding: 4rem 0 2rem;
}

.authors-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.authors-hero .subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ── Free Submission (autores page) ── */

.free-submission {
  padding: 3rem 0;
  text-align: center;
}

.free-submission h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  color: #fff;
  margin-bottom: 1rem;
}

.free-submission .subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1rem;
  line-height: 1.6;
}

.cta-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.cta-box p {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 1rem;
}

.cta-box .steps-list {
  list-style: decimal;
  padding-left: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.cta-box .steps-list li {
  margin-bottom: 0.75rem;
  line-height: 1.5;
  font-size: 0.9rem;
}

.cta-box .steps-list li strong {
  color: var(--text);
}

.cta-box .btn {
  display: block;
  text-align: center;
}

.steps-list {
  color: #d0ccc4;
  line-height: 1.8;
  padding-left: 1.5rem;
}

.steps-list li {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.steps-list li strong {
  color: #fff;
}

/* ── Benefits (autores page) ── */

.benefits {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.benefits h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  text-align: center;
}

.benefits p {
  color: #d0ccc4;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.gold-link {
  color: var(--gold);
  text-decoration: none;
}

.gold-link:hover {
  text-decoration: underline;
}

/* ── Hero ── */

.hero {
  padding: 4rem 0 2.5rem;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}

.logo-accent {
  color: var(--gold);
}

.tagline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
  text-align: center;
}

.lang-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem;
}

.lang-btn {
  background: none;
  border: none;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.2s;
  opacity: 0.5;
}

.lang-btn.active {
  background: rgba(201, 169, 110, 0.15);
  opacity: 1;
}

.lang-btn:hover {
  opacity: 0.8;
}

/* ── Hero Grid ── */

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.hero-form-col {
  min-width: 0;
}

.hero-covers-col {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 1rem;
}

.book-cover-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.book-cover-item {
  position: relative;
  width: fit-content;
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.2s;
}

.book-cover-item:hover {
  transform: translateY(-2px);
}

.book-cover-item:nth-child(2) {
  margin-left: 2rem;
}

.book-cover-item:nth-child(3) {
  margin-right: 1.5rem;
}

.book-cover-item img {
  display: block;
  border-radius: var(--radius-sm);
  width: 160px;
  height: 240px;
  object-fit: cover;
}

.price-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--gold);
  color: #0a0a0f;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  line-height: 1;
}

.deal-date {
  text-align: center;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.deal-card-date {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ── Trust Bar ── */

.trust-bar {
  text-align: center;
  padding: 1rem 0 2rem;
}

.trust-bar p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.trust-bar strong {
  color: var(--gold);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ── Signup ── */

.signup {
  padding: 2.5rem 0;
}

.signup h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.85rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
  color: #fff;
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.signup-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

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

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

input[type="email"],
input[type="text"],
select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: #1a1a28;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

input::placeholder {
  color: #555;
}

.error {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.35rem;
  display: block;
}

.genres {
  border: none;
  padding: 0;
}

.genres legend {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.checkbox-label {
  display: flex;
  align-items: center;
  font-weight: 400;
  margin-bottom: 0.4rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
}

.checkbox-label input[type="checkbox"] {
  margin-right: 0.6rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--gold);
}

/* ── Buttons ── */

.btn {
  display: block;
  width: 100%;
  padding: 0.9rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s, opacity 0.2s;
  font-family: 'Inter', sans-serif;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--gold);
  color: #0a0a0f;
}

.btn-primary:hover:not(:disabled) {
  background: #dbb978;
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.btn-secondary:hover {
  background: rgba(201, 169, 110, 0.1);
}

.disclosure {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1rem;
  line-height: 1.5;
}

/* ── Success ── */

.success-message {
  background: var(--card-bg);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
}

.success-message h3 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--success);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.success-message p {
  color: var(--text-muted);
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

/* ── Features ── */

.features {
  padding: 4rem 0;
}

.features h2 {
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: #fff;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature {
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.25rem;
}

.feature-icon {
  margin-bottom: 1rem;
}

.feature-icon svg {
  display: inline-block;
}

.feature h3 {
  font-family: 'Playfair Display', Georgia, serif;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #fff;
}

.feature p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ── Testimonials ── */

.testimonials {
  padding: 4rem 0;
}

.testimonials h2 {
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: #fff;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 0.2s;
}

.testimonial-card:hover {
  border-color: rgba(201, 169, 110, 0.3);
}

.testimonial-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 2px solid var(--gold);
}

.testimonial-card p {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.testimonial-card p::before {
  content: '\201C';
  color: var(--gold);
  font-size: 1.5rem;
  font-family: 'Playfair Display', Georgia, serif;
  margin-right: 0.1em;
}

.testimonial-card cite {
  display: block;
  font-style: normal;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ── Deals Preview ── */

.deals-preview {
  padding: 4rem 0;
}

.deals-preview h2 {
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: #fff;
}

.deals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.deal-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.deal-card:hover {
  border-color: rgba(201, 169, 110, 0.3);
  transform: translateY(-2px);
}

.deal-card img {
  width: 100%;
  max-width: 140px;
  height: auto;
  aspect-ratio: 6 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--card-shadow);
  margin-bottom: 0.75rem;
}

.deal-price {
  display: block;
  color: var(--gold);
  font-weight: 700;
  font-size: 1.1rem;
}

.deal-original {
  display: block;
  color: #555;
  font-size: 0.8rem;
  text-decoration: line-through;
}

/* ── Author CTA ── */

.author-cta {
  padding: 3rem 0;
  text-align: center;
}

.author-cta h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.author-cta p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.free-promo-notice {
  color: var(--gold);
  font-size: 0.9rem;
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.5;
  padding: 1rem;
  background: rgba(201, 169, 110, 0.08);
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 8px;
}

.author-cta .btn {
  display: inline-block;
  width: auto;
  padding: 0.75rem 2rem;
}

/* ── Deals Listing Page ── */

.deals-listing {
  padding: 2rem 0 4rem;
}

.deals-listing h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  color: #fff;
}

.deals-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.deals-filter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.deals-filter label {
  margin-bottom: 0;
  white-space: nowrap;
}

.deals-filter select {
  width: auto;
  min-width: 200px;
  padding: 0.5rem 0.75rem;
}

.deals-count {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.deals-count strong {
  color: var(--gold);
}

.deals-grid-detailed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.deal-card-detailed {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.deal-card-detailed:hover {
  border-color: rgba(201, 169, 110, 0.3);
  transform: translateY(-2px);
}

.deal-card-detailed.featured {
  border-color: var(--gold);
  position: relative;
}

.deal-card-detailed.featured::before {
  content: 'Destacado';
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--gold);
  color: #0a0a0f;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 1;
}

.deal-card-body {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  flex: 1;
}

.deal-card-cover {
  flex-shrink: 0;
  width: 100px;
  height: 150px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: var(--card-shadow);
}

.deal-card-info {
  flex: 1;
  min-width: 0;
}

.deal-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.deal-card-author {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.deal-card-genre {
  display: inline-block;
  background: rgba(139, 58, 90, 0.2);
  color: var(--rose);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
  text-transform: capitalize;
}

.deal-card-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deal-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}

.deal-card-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold);
  font-family: 'Playfair Display', Georgia, serif;
}

.deal-card-amazon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ff9900;
  color: #0a0a0f;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: opacity 0.2s;
}

.deal-card-amazon:hover {
  opacity: 0.85;
  color: #0a0a0f;
}

.deal-card-amazon svg {
  width: 14px;
  height: 14px;
}

.deals-loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.deals-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

/* ── Signup CTA on Deals Page ── */

.signup-cta {
  padding: 4rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.signup-cta h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #fff;
}

.signup-cta p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.signup-cta .btn {
  display: inline-block;
  width: auto;
  padding: 0.75rem 2rem;
}

/* ── Genre-specific styling for deal badges ── */

.deal-card-genre[data-genre="romance"] {
  background: rgba(201, 169, 110, 0.15);
  color: var(--gold);
}

.deal-card-genre[data-genre="thriller"] {
  background: rgba(139, 58, 90, 0.2);
  color: var(--rose);
}

.deal-card-genre[data-genre="scifi-fantasy"] {
  background: rgba(74, 120, 200, 0.15);
  color: #4a78c8;
}

.deal-card-genre[data-genre="literary-fiction"] {
  background: rgba(100, 200, 150, 0.15);
  color: #64c896;
}

.deal-card-genre[data-genre="non-fiction"] {
  background: rgba(200, 150, 100, 0.15);
  color: #c89664;
}

/* ── Footer ── */

.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
}

.footer-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 0.25rem;
}

.footer-tagline {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.footer nav {
  margin-bottom: 1rem;
}

.footer nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 0.75rem;
  font-size: 0.85rem;
  transition: color 0.2s;
}

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

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.footer-social a {
  color: var(--text-muted);
  transition: color 0.2s;
  line-height: 0;
}

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

.footer-social svg {
  width: 20px;
  height: 20px;
}

.footer-copy {
  color: #555;
  font-size: 0.75rem;
}

/* ── Responsive ── */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-covers-col {
    padding-top: 0;
  }

  .book-cover-stack {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }

  .book-cover-item:nth-child(2) {
    margin-left: 0;
  }

  .book-cover-item:nth-child(3) {
    margin-right: 0;
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .deals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 2.5rem 0 1.5rem;
  }

  .hero-top {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .logo {
    font-size: 2.25rem;
  }

  .tagline {
    font-size: 1.1rem;
  }

  .signup h2 {
    font-size: 1.4rem;
  }

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

  .signup-form {
    padding: 1.25rem;
  }

  .book-cover-stack {
    flex-direction: column;
    align-items: center;
  }

  .book-cover-item:nth-child(2),
  .book-cover-item:nth-child(3) {
    margin: 0;
  }

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

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

  .pricing-badges {
    flex-direction: column;
    align-items: center;
  }

  .pricing-tier {
    width: 100%;
    max-width: 260px;
  }

  .deals-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .deals-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .deals-filter select {
    width: 100%;
  }

  .deals-grid-detailed {
    grid-template-columns: 1fr;
  }

  .deal-card-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .deal-card-cover {
    width: 120px;
    height: 180px;
  }

  .deal-card-footer {
    flex-direction: column;
    gap: 0.75rem;
  }
}
