

/* ================================================
   COMPREHENSIVE RESPONSIVE — All Breakpoints
   Mobile-first, covering every section of the site
   ================================================ */

/* ── 1024px — Large tablet / small desktop ── */
@media (max-width: 1024px) {
  .featured-inner { gap: 3rem; }
  .about-grid { gap: 3.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .genre-inner { gap: 3rem; }
  .oklahoma-inner { gap: 2.5rem; }
}

/* ── 900px — Tablet ── */
@media (max-width: 900px) {
  /* Nav */
  .nav { padding: 0 1.25rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  /* Hero */
  .hero-logo { width: 200px; }
  .hero-headline { font-size: clamp(1.8rem, 6vw, 3rem); }

  /* Featured book */
  .featured-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .featured-book-cover { max-width: 280px; margin: 0 auto; }
  .featured-book-visual { text-align: center; }
  .featured-ornament { right: 0; }
  .featured-actions { flex-wrap: wrap; }

  /* About (homepage) */
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-logo-wrap { display: none; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }

  /* Book detail */
  .book-detail-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .book-sticky { position: static; }
}

/* ── 860px — Genre & Oklahoma sections ── */
@media (max-width: 860px) {
  .genre-inner { grid-template-columns: 1fr; gap: 2rem; }
  .genre-inner.reverse { direction: ltr; }
  .genre-strip { padding: 4rem 0; }
  .oklahoma-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .oklahoma-badge { text-align: left; }
}

/* ── 768px — Tablet portrait ── */
@media (max-width: 768px) {
  /* Section spacing */
  .section { padding: 4rem 0; }
  .section-inner { padding: 0 1.25rem; }

  /* Hero */
  .hero-content { padding-top: 100px; padding-left: 1.25rem; padding-right: 1.25rem; }
  .hero-sub { font-size: 1rem; }
  .hero-actions { flex-direction: column; align-items: center; gap: .75rem; }
  .hero-actions .btn { width: 100%; max-width: 280px; justify-content: center; }

  /* Shop grid — 2 columns on tablet */
  .shop-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 1.25rem; }
  .filter-bar { flex-wrap: wrap; gap: .5rem; }

  /* Cart sidebar — full width on mobile */
  .cart-sidebar { width: 100% !important; max-width: 100% !important; }

  /* Book detail */
  .format-selector { flex-direction: column; gap: .5rem; }
  .format-btn { width: 100%; justify-content: center; text-align: center; }

  /* Contact / form pages */
  .form-wrap { padding: 1.5rem 1.25rem; }
  .form-section { padding: 3rem 0; }
  .contact-grid { grid-template-columns: 1fr !important; gap: 2rem; }

  /* Submissions */
  .upload-area { padding: 1.25rem; }

  /* Shipping table */
  .rate-table th, .rate-table td { padding: .6rem .75rem; font-size: .85rem; }

  /* About page values grid */
  .values-grid { grid-template-columns: 1fr !important; }

  /* Oklahoma section */
  .genre-strip { padding: 3rem 0; }

  /* For smaller authors - 3 cards → 1 col */
  .authors-cards { grid-template-columns: 1fr !important; gap: 1rem !important; max-width: 100% !important; }

  /* Preview modal */
  .preview-modal { max-height: 100svh !important; border-radius: 0 !important; }
}

/* ── 600px — Mobile ── */
@media (max-width: 600px) {
  /* Base */
  body { font-size: 15px; }
  .section { padding: 3rem 0; }
  .section-inner { padding: 0 1rem; }

  /* Nav */
  .nav { padding: 0 1rem; height: 64px; }
  .nav-logo img { height: 36px; }
  .nav-cart .cart-label { display: none; }

  /* Hero */
  .hero { min-height: 85svh; }
  .hero-logo { width: 160px; margin-bottom: 1.25rem; }
  .hero-headline { font-size: clamp(1.6rem, 8vw, 2.4rem); margin-bottom: 1rem; }
  .hero-sub { font-size: .95rem; margin-bottom: 1.75rem; }

  /* Announcement strip */
  .strip { font-size: .7rem; }

  /* Featured section */
  .featured-book-cover { max-width: 220px; }
  .featured-text blockquote { font-size: .95rem; padding: 1rem 1.25rem; }

  /* Genre sections */
  .genre-body { font-size: .95rem; }
  .genre-card { padding: 1.5rem 1.25rem; }
  .genre-card-quote { font-size: .85rem; }

  /* Shop */
  .shop-grid { grid-template-columns: 1fr !important; }
  .book-card { padding: 1.25rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-brand img { height: 60px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: .75rem; }
  .footer-social { justify-content: center; }

  /* About stats */
  .about-stats { grid-template-columns: 1fr; gap: 1rem; padding: 1.25rem; }

  /* Cart */
  .cart-sidebar { padding-bottom: env(safe-area-inset-bottom, 0); }
  .cart-items { max-height: 45svh; }

  /* Forms */
  .form-wrap { padding: 1.25rem 1rem; }
  .form-group label { font-size: .78rem; }
  .form-group input, .form-group select, .form-group textarea {
    font-size: 16px; /* prevent iOS zoom */
  }
  input[type="text"], input[type="email"], input[type="password"],
  input[type="number"], select, textarea {
    font-size: 16px !important; /* prevent iOS zoom on focus */
  }

  /* Buttons — make sure they're tap-friendly */
  .btn { min-height: 44px; }

  /* Newsletter */
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { width: 100%; border-radius: 4px !important; }
  .newsletter-form button { width: 100%; border-radius: 4px !important; justify-content: center; }

  /* Sections with 3-col grids */
  .section-inner [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  .section-inner [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  /* Preview modal */
  .preview-overlay { padding: 0; }
  .preview-modal {
    border-radius: 0 !important;
    height: 100svh !important;
    max-height: 100svh !important;
  }

  /* Shipping table — horizontal scroll */
  .ship-table, .rate-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Book detail page */
  .book-page-inner { grid-template-columns: 1fr !important; }
  .carousel { max-width: 260px; margin: 0 auto; }
}

/* ── 400px — Small phones ── */
@media (max-width: 400px) {
  .hero-logo { width: 130px; }
  .hero-headline { font-size: clamp(1.4rem, 9vw, 2rem); }
  .btn { font-size: .7rem; padding: .75rem 1.25rem; }
  .nav-logo img { height: 32px; }
}

/* ── Safe area insets (iPhone notch/home bar) ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .footer { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .cart-footer { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
}
