/*
Theme Name: Bible Study Guides Landing Page
Theme URI: https://biblestudyguides.com
Author: Your Name
Author URI: https://biblestudyguides.com
Description: A clean, conversion-focused landing page theme for Bible Study Guides digital product. Features an Etsy-style image gallery with thumbnail strip, lightbox zoom, and mobile swipe. Fully editable via Gutenberg blocks and WordPress Customizer.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bible-study-guides
Tags: landing-page, e-commerce, gutenberg, one-page
*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --color-bg: #f5f4f0;
  --color-surface: #ffffff;
  --color-border: #e2ddd8;
  --color-text: #1a1a1a;
  --color-text-muted: #6b6560;
  --color-accent: #2d5016;
  --color-accent-hover: #3d6b1f;
  --color-accent-light: #eef3e8;
  --color-btn-primary: #2d5016;
  --color-btn-primary-text: #ffffff;
  --color-btn-secondary-border: #1a1a1a;
  --color-price: #1a1a1a;
  --color-badge: #d4edda;
  --color-badge-text: #2d5016;
  --color-star: #c8a84b;
  --color-check: #2d5016;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui: 'DM Sans', system-ui, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 1px 4px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.12), 0 8px 32px rgba(0,0,0,0.08);
  --max-width: 1060px;
  --gutter: 24px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

button { cursor: pointer; font-family: var(--font-ui); border: none; background: none; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.btn-header-buy {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 22px;
  border: 2px solid var(--color-text);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: transparent;
  transition: background 0.18s, color 0.18s;
  text-decoration: none;
  display: inline-block;
}

.btn-header-buy:hover {
  background: var(--color-text);
  color: var(--color-surface);
}

/* ============================================================
   HERO / PRODUCT SECTION
   ============================================================ */
.product-hero {
  padding: 36px 0 40px;
}

.product-hero .container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* ============================================================
   GALLERY — ETSY STYLE
   ============================================================ */
.gallery-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.gallery-main {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f0ede8;
  cursor: zoom-in;
}

.gallery-main img,
.gallery-main video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.gallery-main:hover img { transform: scale(1.02); }

.gallery-zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  border-top: 1px solid var(--color-border);
  background: #faf9f7;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.gallery-thumb {
  flex: 0 0 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, opacity 0.15s;
  background: #f0ede8;
}

.gallery-thumb img,
.gallery-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb.active { border-color: var(--color-accent); }
.gallery-thumb:not(.active) { opacity: 0.65; }
.gallery-thumb:not(.active):hover { opacity: 0.9; }

.gallery-thumb.video-thumb { position: relative; }
.gallery-thumb.video-thumb::after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  background: rgba(0,0,0,0.35);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-overlay.open { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-inner img {
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: #fff;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 2rem;
  background: rgba(255,255,255,0.12);
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.22); }
.lightbox-nav.prev { left: -56px; }
.lightbox-nav.next { right: -56px; }

/* ============================================================
   PRODUCT INFO CARD
   ============================================================ */
.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 80px;
}

.product-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 16px;
}

.product-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.price-amount {
  font-family: var(--font-ui);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-price);
}

.price-badge {
  background: var(--color-badge);
  color: var(--color-badge-text);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.02em;
}

.btn-buy-now {
  display: block;
  width: 100%;
  padding: 15px 20px;
  background: var(--color-btn-primary);
  color: var(--color-btn-primary-text);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-align: center;
  letter-spacing: 0.01em;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  margin-bottom: 10px;
  text-decoration: none;
}

.btn-buy-now:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(45,80,22,0.25);
}

.btn-preview {
  display: block;
  width: 100%;
  padding: 13px 20px;
  border: 2px solid var(--color-btn-secondary-border);
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-align: center;
  background: transparent;
  transition: background 0.18s, color 0.18s;
  margin-bottom: 20px;
  text-decoration: none;
  cursor: pointer;
}

.btn-preview:hover {
  background: var(--color-text);
  color: var(--color-surface);
}

.product-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--color-border);
  padding-top: 18px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.feature-item .check-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-check);
}

/* ============================================================
   FEATURE STRIP
   ============================================================ */
.feature-strip {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 18px 0;
}

.feature-strip .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.strip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
}

.strip-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* ============================================================
   TWO-COLUMN SECTION (Included + FAQ)
   ============================================================ */
.two-col-section {
  padding: 52px 0;
}

.two-col-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 24px;
}

/* ============================================================
   WHAT'S INCLUDED GRID
   ============================================================ */
.included-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.included-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.included-item:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(45,80,22,0.10);
}

.included-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list { display: flex; flex-direction: column; gap: 0; }

.faq-item {
  border: 1px solid var(--color-border);
  border-bottom: none;
  background: var(--color-surface);
}

.faq-item:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.faq-item:last-child { border-bottom: 1px solid var(--color-border); border-radius: 0 0 var(--radius-md) var(--radius-md); }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  gap: 12px;
  transition: background 0.15s;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
}

.faq-question:hover { background: var(--color-bg); }

.faq-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  transition: transform 0.25s;
  color: var(--color-text-muted);
}

.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  padding: 0 18px;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 18px 16px;
}

/* ============================================================
   REVIEWS SECTION
   ============================================================ */
.reviews-section {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 52px 0;
}

.reviews-header {
  text-align: center;
  margin-bottom: 36px;
}

.reviews-header .section-title { margin-bottom: 8px; }

.stars-overall {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.star {
  width: 18px;
  height: 18px;
  color: var(--color-star);
}

.star.half { opacity: 0.4; }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.review-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.review-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 10px;
}

.review-stars .star { width: 14px; height: 14px; }

.reviewer-name {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.review-text {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: 22px 0;
  background: var(--color-bg);
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy,
.footer-links,
.footer-support {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.footer-links { display: flex; gap: 20px; }
.footer-links a:hover,
.footer-support a:hover { color: var(--color-text); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .product-hero .container {
    grid-template-columns: 1fr;
  }
  .product-card { position: static; }

  .two-col-section .container {
    grid-template-columns: 1fr;
    gap: 36px;
  }

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

  .feature-strip .container { gap: 20px; }

  .lightbox-nav.prev { left: -44px; }
  .lightbox-nav.next { right: -44px; }
}

@media (max-width: 540px) {
  :root { --gutter: 16px; }

  .product-title { font-size: 1.35rem; }
  .site-title { font-size: 0.9rem; }
  .included-grid { grid-template-columns: 1fr; }
  .feature-strip .container { justify-content: flex-start; gap: 16px; }

  .lightbox-nav { display: none; }
}

/* ============================================================
   SWIPE SUPPORT (touch devices)
   ============================================================ */
.gallery-main { touch-action: pan-y; }

/* ============================================================
   GUTENBERG EDITOR COMPATIBILITY
   ============================================================ */
.wp-block { max-width: 100%; }
