/* ==========================================
   ChapterOne — Shop CSS
   ========================================== */

/* ── Nav active state ── */
nav a.nav-active {
  color: var(--green);
  font-weight: 600;
}

.logo {
  text-decoration: none;
}

/* ── Shop Hero ── */
.shop-hero {
  padding: 4rem 0 3.5rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.shop-hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--green);
  margin-bottom: 0.75rem;
}

.shop-hero-sub {
  font-size: 1.1rem;
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

.stack-nav-pills {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stack-pill {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.2s, transform 0.2s;
}

.stack-pill:hover { opacity: 0.85; transform: translateY(-1px); }

.stack-pill--life    { background: #2d5240; color: #faf8f5; }
.stack-pill--health  { background: #8b5e3c; color: #faf8f5; }
.stack-pill--money   { background: #1e3a2e; color: #faf8f5; }

/* ── Shop Sections ── */
.shop-section {
  padding: 4rem 0;
  background: var(--bg);
}

.shop-section + .shop-section {
  border-top: 1px solid var(--border);
}

/* ── Books Grid (featured) ── */
.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}

.book-card:hover {
  box-shadow: 0 8px 32px rgba(30, 58, 46, 0.12);
  transform: translateY(-4px);
}

.book-card-cover {
  height: 180px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 1.25rem;
  overflow: hidden;
}

.book-card-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 12px;
  background: rgba(0,0,0,0.2);
}

.book-card-title-overlay {
  position: relative;
  z-index: 1;
}

.book-cover-title {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(250,248,245,0.95);
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  max-width: 180px;
}

.book-cover-author {
  display: block;
  font-size: 0.75rem;
  color: rgba(250,248,245,0.75);
  margin-top: 0.25rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.book-card-info {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.book-stack-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.book-card-title {
  font-size: 1rem;
  color: var(--green);
  font-family: 'Playfair Display', serif;
  line-height: 1.25;
}

.book-card-author {
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.book-card-desc {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.book-price {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green);
}

.book-price--lg {
  font-size: 1.1rem;
}

.book-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
}

/* ── Shop Stacks Section ── */
.shop-stacks-section {
  padding: 4rem 0;
  background: var(--white);
  border-top: 1px solid var(--border);
}

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

.shop-stack-card {
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow 0.25s, transform 0.25s;
}

.shop-stack-card:hover {
  box-shadow: 0 10px 40px rgba(30, 58, 46, 0.15);
  transform: translateY(-4px);
}

.shop-stack-header {
  height: 120px;
  display: flex;
  align-items: flex-end;
  padding: 1rem 1.5rem;
}

.shop-stack-spine-group {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.mini-spine {
  width: 20px;
  border-radius: 2px 4px 4px 2px;
}

.shop-stack-body {
  padding: 1.5rem;
  background: var(--white);
}

.shop-stack-body h3 {
  font-size: 1.3rem;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.shop-stack-body p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.stack-browse-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
}

/* ── Stack Hero ── */
.stack-hero {
  padding: 4rem 0 3rem;
  color: var(--cream);
}

.stack-hero .breadcrumb-link {
  display: inline-block;
  color: rgba(250,248,245,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  transition: color 0.2s;
}

.stack-hero .breadcrumb-link:hover { color: var(--cream); }

.stack-hero .section-label {
  color: rgba(250,248,245,0.65);
  margin-bottom: 0.5rem;
}

.stack-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--cream);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.stack-hero-desc {
  font-size: 1.05rem;
  color: rgba(250,248,245,0.8);
  max-width: 620px;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.stack-book-count {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: rgba(250,248,245,0.15);
  border: 1px solid rgba(250,248,245,0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(250,248,245,0.85);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Books List (stack page) ── */
.books-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.book-list-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}

.book-list-item:hover { background: var(--bg-alt); margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; }

.book-list-cover {
  width: 72px;
  height: 100px;
  border-radius: 3px 6px 6px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 12px rgba(0,0,0,0.18);
  flex-shrink: 0;
}

.book-list-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(250,248,245,0.5);
}

.book-list-title {
  font-size: 1.15rem;
  color: var(--green);
  font-family: 'Playfair Display', serif;
  margin-bottom: 0.25rem;
}

.book-list-author {
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.book-list-subtitle {
  font-size: 0.85rem;
  color: var(--fg-muted);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.book-list-desc {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.55;
}

.book-list-meta {
  text-align: right;
  flex-shrink: 0;
}

.book-list-cta {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}

/* ── Product Detail ── */
.product-hero {
  padding: 3rem 0 5rem;
  background: var(--bg);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.breadcrumb a {
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--green); }

.breadcrumb span { color: var(--border); }

.product-detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 5rem;
  align-items: start;
}

/* 3D Book Cover */
.product-cover-3d {
  position: relative;
  width: 200px;
  margin: 0 auto 1.5rem;
}

.product-cover-face {
  width: 200px;
  min-height: 280px;
  border-radius: 0 8px 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  box-shadow: 6px 8px 28px rgba(0,0,0,0.25), -2px 0 10px rgba(0,0,0,0.1);
}

.product-cover-content {
  text-align: center;
}

.product-cover-line {
  height: 2px;
  background: rgba(250,248,245,0.3);
  margin: 1rem auto;
  width: 40px;
}

.product-cover-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(250,248,245,0.95);
  line-height: 1.25;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.product-cover-author {
  font-size: 0.8rem;
  color: rgba(250,248,245,0.75);
  margin-top: 0.5rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.product-cover-spine {
  position: absolute;
  left: -10px;
  top: 4px;
  width: 12px;
  height: calc(100% - 8px);
  border-radius: 2px 0 0 2px;
}

.product-meta-chips {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.meta-chip {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--fg-muted);
}

/* Product Info */
.product-stacks-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.stack-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: rgba(250,248,245,0.9);
  letter-spacing: 0.04em;
}

.product-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--green);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.product-subtitle {
  font-size: 1rem;
  color: var(--fg-muted);
  font-style: italic;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.product-author-line {
  font-size: 1rem;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}

.product-author-line strong {
  color: var(--green);
}

.product-description {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--green);
  line-height: 1.55;
  border-left: 3px solid var(--gold);
  padding-left: 1.25rem;
  margin-bottom: 1.75rem;
}

.product-long-desc {
  margin-bottom: 2.5rem;
}

.product-long-desc p {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.product-buy-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.product-price-block {}

.product-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--green);
}

.btn-buy {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--green);
  color: var(--cream);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.2s;
}

.btn-buy:hover {
  background: var(--green-light);
  transform: translateY(-2px);
}

.product-disclaimer {
  font-size: 0.78rem;
  color: var(--fg-muted);
  opacity: 0.7;
}

/* ── Responsive ── */
@media (max-width: 1000px) {
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .shop-stacks-grid {
    grid-template-columns: 1fr;
  }

  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .product-cover-3d {
    margin: 0 auto;
  }

  .book-list-item {
    grid-template-columns: 80px 1fr;
    gap: 1.25rem;
  }

  .book-list-meta {
    display: none;
  }
}

@media (max-width: 700px) {
  .books-grid {
    grid-template-columns: 1fr;
  }

  .stack-nav-pills {
    flex-direction: column;
    align-items: flex-start;
  }
}
