/* assets/css/main.css — theme-variable driven */

/* ── Brand color utilities (CSS var based, works alongside Tailwind) ── */
.site-btn-primary {
  background: var(--brand-dark);
  color: #fff;
  transition: background .15s;
}
.site-btn-primary:hover { background: var(--brand-mid); }

.site-text-brand  { color: var(--brand-dark); }
.site-bg-brand    { background: var(--brand-dark); }
.site-bg-brand-light { background: var(--brand-light); }
.site-border-brand   { border-color: var(--brand-dark); }

/* ── Nav links ── */
.nav-link {
  padding: .375rem .75rem;
  border-radius: .375rem;
  color: #44403c;
  transition: color .15s, background-color .15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--brand-dark); background-color: #f5f5f4; }
.nav-link.active { color: var(--brand-dark); background-color: #f5f5f4; }

/* ── Section label ── */
.section-label {
  font-size: .75rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand-dark);
}

/* ── Hero carousel ── */
.carousel-track { display: flex; transition: transform .5s ease; }
.carousel-slide { min-width: 100%; position: relative; }
.carousel-slide img { width: 100%; height: 520px; object-fit: cover; display: block; }
@media (max-width: 640px) { .carousel-slide img { height: 260px; } }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
  display: flex; align-items: center;
}

/* ── Inline news carousel (inside article body) ── */
.news-carousel-wrapper { position: relative; overflow: hidden; border-radius: .75rem; margin: 1.5rem 0; }
.news-carousel-track   { display: flex; transition: transform .45s ease; }
.news-carousel-slide   { min-width: 100%; }
.news-carousel-slide img { width: 100%; max-height: 420px; object-fit: cover; display: block; border-radius: .75rem; }
.news-carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.news-carousel-btn:hover { background: rgba(0,0,0,.7); }
.news-carousel-btn.prev { left: .625rem; }
.news-carousel-btn.next { right: .625rem; }
.news-carousel-dots { display: flex; gap: .375rem; justify-content: center; margin-top: .625rem; }
.news-carousel-dots button {
  width: .5rem; height: .5rem; border-radius: 50%; border: none; cursor: pointer;
  background: #d6d3d1; transition: background .15s;
}
.news-carousel-dots button.active { background: var(--brand-dark); }

/* ── Cards ── */
.product-card {
  border-radius: 1rem; overflow: hidden; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,.12); }

/* ── News card image ── */
.news-img { width: 100%; height: 200px; object-fit: cover; }

/* ── Prose (news article body) ── */
.prose h2, .prose h3 { font-weight: 700; margin-top: 1.5rem; margin-bottom: .5rem; }
.prose h2 { font-size: 1.25rem; }
.prose h3 { font-size: 1.05rem; color: #44403c; }
.prose p  { margin-bottom: 1rem; line-height: 1.7; }
.prose ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: .25rem; }
/* Inline images inserted by editor */
.prose .inline-img { margin: 1.5rem 0; border-radius: .75rem; max-width: 100%; display: block; box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.prose .inline-img-caption { text-align: center; font-size: .8rem; color: #78716c; margin-top: -.75rem; margin-bottom: 1.5rem; }

/* ── Stats ── */
.stat-card { text-align: center; padding: 1.5rem; }
.stat-card .val { font-size: 2.25rem; font-weight: 800; color: var(--brand-light); }
.stat-card .lbl { font-size: .8rem; color: var(--brand-light); margin-top: .25rem; text-transform: uppercase; letter-spacing: .05em; }

/* ── Contact form ── */
.form-field {
  width: 100%; padding: .625rem .875rem; border: 1px solid #d6d3d1;
  border-radius: .5rem; font-size: .925rem; color: #1c1917;
  transition: border-color .15s, box-shadow .15s; background: #fff;
}
.form-field:focus {
  outline: none;
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(var(--brand-mid-rgb), .15);
}

/* ── Lazy load ── */
img[loading="lazy"] { opacity: 0; transition: opacity .4s; }
img.loaded { opacity: 1; }

/* ── Alerts ── */
.alert-success { background:#dcfce7; border:1px solid #86efac; color:#166534; padding:.75rem 1rem; border-radius:.5rem; margin-bottom:1rem; }
.alert-error   { background:#fee2e2; border:1px solid #fca5a5; color:#991b1b; padding:.75rem 1rem; border-radius:.5rem; margin-bottom:1rem; }

/* ── Color swatch preview ── */
.swatch { width: 2rem; height: 2rem; border-radius: .375rem; border: 2px solid rgba(0,0,0,.1); display: inline-block; vertical-align: middle; }
