/* ========================================
   Croqui Studio — Main Stylesheet
   ======================================== */

:root {
  --color-bg: #FAFAF8;
  --color-surface: #FFFFFF;
  --color-text: #1A1A1A;
  --color-text-muted: #6B6B6B;
  --color-accent: #2C2C2C;
  --color-accent-hover: #000000;
  --color-gold: #C4A265;
  --color-gold-light: #D4B87A;
  --color-border: #E8E6E1;
  --color-bg-warm: #F5F0EB;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1200px;
  --section-pad: 100px;
}

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

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

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

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

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

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Navigation
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: 0.3s;
}

/* ========================================
   Hero
   ======================================== */

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-warm) 100%);
}

.hero-content {
  max-width: 720px;
}

.hero-tag {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-gold);
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 4px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  border-color: var(--color-text);
}

/* ========================================
   Sections
   ======================================== */

.section {
  padding: var(--section-pad) 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-align: center;
}

.section-sub {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 60px;
  font-size: 1.05rem;
}

/* ========================================
   Books
   ======================================== */

.book-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  background: var(--color-surface);
  border-radius: 12px;
  padding: 48px;
  border: 1px solid var(--color-border);
}

.book-placeholder {
  background: var(--color-bg-warm);
  border-radius: 8px;
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  color: var(--color-text-muted);
}

.book-placeholder span {
  font-size: 3rem;
  margin-bottom: 12px;
}

.book-info h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.book-author {
  color: var(--color-gold);
  font-weight: 500;
  margin-bottom: 16px;
}

.book-desc {
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.book-features {
  list-style: none;
  margin-bottom: 28px;
}

.book-features li {
  padding: 4px 0;
  font-size: 0.95rem;
}

/* Book Image & Preview Strip */
.book-image {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.book-image > #bookMainImage {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  transition: opacity 0.2s;
}

.preview-strip {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: center;
}

.preview-thumb {
  width: 56px;
  height: 72px;
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}

.preview-thumb:hover,
.preview-thumb.active {
  opacity: 1;
  border-color: var(--color-gold);
  transform: scale(1.05);
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 40px;
}

.lightbox-image-wrap {
  position: relative;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  user-select: none;
}

.lightbox-caption {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  margin-top: 12px;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  padding: 8px;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: #fff;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 3rem;
  cursor: pointer;
  padding: 12px 18px;
  border-radius: 8px;
  z-index: 10;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

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

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.lightbox-cta {
  position: absolute;
  bottom: 16px;
  right: 20px;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.8rem;
}

@media (max-width: 968px) {
  .lightbox-prev { left: 8px; padding: 8px 12px; font-size: 2rem; }
  .lightbox-next { right: 8px; padding: 8px 12px; font-size: 2rem; }
  .lightbox-content { padding: 20px; }
  .preview-thumb { width: 48px; height: 62px; }
}

@media (max-width: 640px) {
  .lightbox-cta { display: none; }
  .preview-thumb { width: 42px; height: 54px; }
  .preview-strip { gap: 6px; }
}

.books-coming {
  text-align: center;
  margin-top: 60px;
  padding: 40px;
  background: var(--color-bg-warm);
  border-radius: 12px;
}

.books-coming h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.books-coming a {
  color: var(--color-gold);
  font-weight: 600;
}

/* ========================================
   Supplies
   ======================================== */

.supplies {
  background: var(--color-bg-warm);
}

/* Legacy supply grid (kept for reference) */
.supply-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.supply-card {
  background: var(--color-surface);
  padding: 36px 28px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.supply-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

.supply-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.supply-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.supply-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.supply-products {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-link {
  display: block;
  padding: 8px 12px;
  background: var(--color-bg);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  transition: background 0.2s, color 0.2s;
}

.product-link:hover {
  background: var(--color-gold);
  color: #fff;
}

/* Visual Product Cards */
.supply-category-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-top: 40px;
  margin-bottom: 6px;
  color: var(--color-text);
}

.supply-category-title:first-of-type {
  margin-top: 0;
}

.supply-category-desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

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

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.product-img-wrap {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 200px;
}

.product-img-wrap img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
}

.product-info {
  padding: 16px 20px 20px;
}

.product-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.product-rating {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.product-reviews {
  color: var(--color-text-muted);
  opacity: 0.7;
}

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

.supply-link {
  color: var(--color-gold);
  font-weight: 600;
  font-size: 0.9rem;
}

.supply-link:hover {
  color: var(--color-gold-light);
}

/* ========================================
   Blog
   ======================================== */

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

.blog-card {
  background: var(--color-surface);
  padding: 36px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  transition: transform 0.2s;
}

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

.blog-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  margin-bottom: 16px;
}

.blog-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.4;
  margin-bottom: 12px;
}

.blog-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.blog-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ========================================
   Newsletter
   ======================================== */

.newsletter {
  background: var(--color-accent);
  color: #FFFFFF;
}

.newsletter-inner {
  text-align: center;
  max-width: 560px;
}

.newsletter h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 12px;
}

.newsletter p {
  opacity: 0.8;
  margin-bottom: 32px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  background: rgba(255,255,255,0.12);
  color: #FFFFFF;
  outline: none;
}

.newsletter-form input::placeholder {
  color: rgba(255,255,255,0.5);
}

.newsletter-form input:focus {
  background: rgba(255,255,255,0.18);
}

.newsletter-form .btn-primary {
  background: var(--color-gold);
  color: var(--color-text);
}

.newsletter-form .btn-primary:hover {
  background: var(--color-gold-light);
}

/* ========================================
   About
   ======================================== */

.about {
  background: var(--color-bg-warm);
}

.about-inner {
  max-width: 680px;
  margin: 0 auto;
}

.about-text .section-title {
  text-align: left;
}

.about-text p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.about-social {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.about-social a {
  font-weight: 600;
  color: var(--color-gold);
}

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

/* ========================================
   Footer
   ======================================== */

.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-brand .logo-text {
  font-size: 1.2rem;
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-legal {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.footer-disclosure {
  margin-top: 8px;
  font-size: 0.75rem;
  font-style: italic;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 968px) {
  .book-card {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px;
  }

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

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

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

@media (max-width: 640px) {
  :root {
    --section-pad: 64px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    min-height: 70vh;
    padding-top: 100px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

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

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

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

  .book-card {
    padding: 24px;
  }
}
