/* ═══════════════════════════════════════════════════════════════
   Components: buttons, hero, product, article, callout
   ═══════════════════════════════════════════════════════════════ */

/* ── Buttons ───────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--bloom);
  color: var(--white);
  border-color: var(--bloom);
}
.btn-primary:hover:not(:disabled) {
  background: var(--bloom-dark);
  border-color: var(--bloom-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 95, 59, 0.3);
}

.btn-secondary {
  background: var(--pine);
  color: var(--white);
  border-color: var(--pine);
}
.btn-secondary:hover:not(:disabled) {
  background: #153a29;
  border-color: #153a29;
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--pine);
  border-color: var(--pine);
}
.btn-outline:hover:not(:disabled) {
  background: var(--pine);
  color: var(--white);
}

.btn-lg {
  font-size: var(--text-base);
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  font-size: var(--text-xs);
  padding: 0.5rem 1rem;
}

/* Amazon-specific button styling */
.btn-amazon {
  background: var(--bloom);
  color: var(--white);
  border-color: var(--bloom);
  font-size: var(--text-base);
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
}
.btn-amazon:hover {
  background: var(--bloom-dark);
  border-color: var(--bloom-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 95, 59, 0.3);
}
.btn-amazon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ── Hero section ──────────────────────────────────────────── */

.hero {
  padding: var(--sp-16) 0;
  background: var(--white);
  border-bottom: 1px solid var(--stone-light);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: center;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--pine);
  margin-bottom: var(--sp-6);
}

.hero-text p {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--stone);
  line-height: 1.7;
  margin-bottom: var(--sp-8);
  max-width: 440px;
}

.hero-image {
  position: relative;
}

.hero-image-frame {
  background: var(--sprout);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--sp-6);
}

.hero-image-frame img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}

/* Placeholder for when no image is available yet */
.hero-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--fern-light);
  background: var(--sprout);
}

@media (max-width: 768px) {
  .hero { padding: var(--sp-10) 0; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
  .hero-text h1 { font-size: var(--text-3xl); }
  .hero-image { order: -1; }
}

/* ── Value props ───────────────────────────────────────────── */

.value-props {
  padding: var(--sp-16) 0;
}

.value-props-header {
  text-align: center;
  margin-bottom: var(--sp-12);
}

.value-props-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--pine);
  letter-spacing: -0.02em;
}

.props-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}

.prop-card {
  text-align: center;
  padding: var(--sp-8) var(--sp-6);
}

.prop-icon {
  width: 56px;
  height: 56px;
  background: var(--sprout);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-5);
  font-size: 1.5rem;
  color: var(--pine);
}

.prop-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--root);
  margin-bottom: var(--sp-2);
}

.prop-card p {
  font-size: var(--text-sm);
  color: var(--stone);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .props-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }
  .prop-card {
    display: flex;
    text-align: left;
    gap: var(--sp-4);
    padding: var(--sp-4);
  }
  .prop-icon { margin: 0; flex-shrink: 0; }
}

/* ── Article card (for homepage + learn index) ─────────────── */

.section-header {
  margin-bottom: var(--sp-8);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--pine);
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: var(--text-base);
  color: var(--stone);
  margin-top: var(--sp-2);
}

.article-card {
  background: var(--white);
  border: 1px solid var(--stone-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
  display: grid;
  grid-template-columns: 280px 1fr;
}
.article-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.article-card-image {
  background: var(--sprout);
  overflow: hidden;
}
.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-card-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--fern-light);
}

.article-card-body {
  padding: var(--sp-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-card-meta {
  font-size: var(--text-xs);
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: var(--sp-3);
}

.article-card-body h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--root);
  line-height: 1.3;
  margin-bottom: var(--sp-3);
}

.article-card-body p {
  font-size: var(--text-sm);
  color: var(--stone);
  line-height: 1.6;
  margin-bottom: var(--sp-5);
}

.article-card-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--fern);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}
.article-card-link:hover { color: var(--pine); }
.article-card-link::after { content: " →"; }

@media (max-width: 640px) {
  .article-card {
    grid-template-columns: 1fr;
  }
  .article-card-image-placeholder { min-height: 160px; }
}

/* ── Product page ──────────────────────────────────────────── */

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  padding: var(--sp-12) 0;
  align-items: start;
}

.product-gallery {
  position: sticky;
  top: 88px; /* header height + gap */
}

.product-gallery-main {
  background: var(--sprout);
  border-radius: var(--radius-lg);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: var(--sp-3);
}
.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--sp-6);
}

.product-gallery-thumbs {
  display: flex;
  gap: var(--sp-3);
}
.product-gallery-thumbs .thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  border: 2px solid var(--stone-light);
  overflow: hidden;
  cursor: pointer;
  background: var(--sprout);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s;
}
.product-gallery-thumbs .thumb.active,
.product-gallery-thumbs .thumb:hover {
  border-color: var(--pine);
}
.product-gallery-thumbs .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--sp-1);
}

.product-info h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--root);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-3);
}

.product-brand {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--fern);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-4);
}

.product-price {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--root);
  margin-bottom: var(--sp-6);
}

.product-description {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--stone);
  line-height: 1.7;
  margin-bottom: var(--sp-8);
}

.product-cta {
  margin-bottom: var(--sp-10);
}

.product-features {
  border-top: 1px solid var(--stone-light);
  padding-top: var(--sp-8);
}

.product-features h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--root);
  margin-bottom: var(--sp-6);
}

.feature-item {
  display: flex;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--sprout);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.feature-item h3 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--root);
  margin-bottom: var(--sp-1);
}

.feature-item p {
  font-size: var(--text-sm);
  color: var(--stone);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
    padding: var(--sp-8) 0;
  }
  .product-gallery { position: static; }
  .product-info h1 { font-size: var(--text-2xl); }
}

/* ── Article page ──────────────────────────────────────────── */

.article-header {
  padding: var(--sp-12) 0 var(--sp-8);
  text-align: center;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--root);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 640px;
  margin: 0 auto var(--sp-4);
}

.article-meta {
  font-size: var(--text-sm);
  color: var(--stone);
}

.article-meta span + span::before {
  content: "·";
  margin: 0 var(--sp-2);
}

.article-body {
  padding-bottom: var(--sp-16);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--root);
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-4);
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--root);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
}

.article-body p {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--root);
  line-height: 1.8;
  margin-bottom: var(--sp-5);
}

.article-body ul, .article-body ol {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.8;
  margin-bottom: var(--sp-5);
  padding-left: var(--sp-6);
  color: var(--root);
}
.article-body li { margin-bottom: var(--sp-2); }

.article-body strong { font-weight: 700; color: var(--root); }
.article-body em { font-style: italic; }

/* ── Product callout — the signature element ───────────────── */

.product-callout {
  background: var(--white);
  border: 1px solid var(--stone-light);
  border-left: 4px solid var(--pine);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: var(--sp-6);
  margin: var(--sp-10) 0;
  display: flex;
  gap: var(--sp-6);
  align-items: center;
}

.product-callout-image {
  width: 120px;
  height: 120px;
  background: var(--sprout);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-callout-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--sp-2);
}

.product-callout-body h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--root);
  margin-bottom: var(--sp-1);
}

.product-callout-body p {
  font-family: var(--font-ui) !important;
  font-size: var(--text-sm) !important;
  color: var(--stone);
  line-height: 1.5 !important;
  margin-bottom: var(--sp-3) !important;
}

@media (max-width: 480px) {
  .product-callout { flex-direction: column; text-align: center; }
  .product-callout-image { width: 100px; height: 100px; }
}

/* ── Table of contents ─────────────────────────────────────── */

.toc {
  background: var(--sprout);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-10);
}

.toc-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--pine);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-3);
}

.toc ol {
  list-style: none;
  padding: 0;
  counter-reset: toc;
}
.toc li {
  counter-increment: toc;
  margin-bottom: var(--sp-2);
}
.toc li::before {
  content: counter(toc) ".";
  color: var(--fern);
  font-weight: 600;
  font-size: var(--text-sm);
  margin-right: var(--sp-2);
}
.toc a {
  font-size: var(--text-sm);
  color: var(--root);
  font-weight: 500;
}
.toc a:hover { color: var(--fern); }

/* ── Blog listing ──────────────────────────────────────────── */

.learn-hero {
  padding: var(--sp-12) 0;
  text-align: center;
}

.learn-hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--pine);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-3);
}

.learn-hero p {
  font-size: var(--text-lg);
  color: var(--stone);
  max-width: 480px;
  margin: 0 auto;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  padding-bottom: var(--sp-16);
}

/* ── Related articles ──────────────────────────────────────── */

.related-section {
  border-top: 1px solid var(--stone-light);
  padding-top: var(--sp-10);
  margin-top: var(--sp-10);
}

.related-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--root);
  margin-bottom: var(--sp-6);
}

/* ── Breadcrumb ────────────────────────────────────────────── */

.breadcrumb {
  padding: var(--sp-4) 0;
  font-size: var(--text-sm);
  color: var(--stone);
}
.breadcrumb a { color: var(--stone); }
.breadcrumb a:hover { color: var(--fern); }
.breadcrumb span { margin: 0 var(--sp-2); color: var(--stone-light); }

/* ── Section spacing ───────────────────────────────────────── */

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

.section-alt {
  padding: var(--sp-16) 0;
  background: var(--white);
  border-top: 1px solid var(--stone-light);
  border-bottom: 1px solid var(--stone-light);
}
