/*
Theme Name: Leanmax Category Landing
Theme URI: https://leanmax.store/
Author: Codex
Description: A ready-to-use WordPress landing theme with three large homepage category panels and conversion-focused product story views.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: leanmax-category
*/

:root {
  --ink: #17211d;
  --muted: #62726b;
  --paper: #fbf8f0;
  --white: #ffffff;
  --line: #dfe7df;
  --green: #123c34;
  --green-2: #1c6b57;
  --mint: #e8f5df;
  --coral: #ef6f55;
  --gold: #c99632;
  --shadow: 0 22px 60px rgba(18, 60, 52, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.announcement {
  display: grid;
  min-height: 36px;
  place-items: center;
  background: #102e29;
  color: #fff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(23, 33, 29, .08);
  background: rgba(251, 248, 240, .94);
  padding: 0 clamp(20px, 4vw, 54px);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 950;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
}

.desktop-nav {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

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

.icon-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 112px;
  right: 20px;
  z-index: 50;
  min-width: 210px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 10px;
}

.mobile-nav.is-open { display: grid; }

.mobile-nav a {
  border-radius: 7px;
  padding: 12px;
  font-weight: 850;
}

.mobile-nav a:hover { background: var(--mint); }

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.narrow { width: min(820px, calc(100% - 40px)); }

.home-view,
.product-view { display: none; }

.home-view.is-active,
.product-view.is-active { display: block; }

.category-panel {
  position: relative;
  min-height: calc(100vh - 112px);
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
}

.category-panel::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(90deg, rgba(12, 28, 25, .78), rgba(12, 28, 25, .18));
}

.category-panel img {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 112px);
  object-fit: cover;
  transition: transform .7s ease;
}

.category-panel:hover img { transform: scale(1.04); }

.category-overlay {
  position: absolute;
  top: 50%;
  left: clamp(22px, 8vw, 116px);
  z-index: 2;
  width: min(650px, calc(100% - 44px));
  color: #fff;
  transform: translateY(-50%);
}

.category-overlay.light { color: var(--ink); }

.eyebrow {
  margin: 0 0 14px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.category-overlay h1,
.product-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(54px, 9vw, 118px);
  line-height: .9;
}

.category-overlay p,
.lede {
  max-width: 620px;
  color: currentColor;
  font-size: 19px;
  line-height: 1.65;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: var(--coral);
  color: #fff;
  padding: 0 24px;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(239, 111, 85, .28);
  cursor: pointer;
}

.button:hover {
  filter: brightness(.95);
  transform: translateY(-1px);
}

.button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.back-link {
  margin: 0 0 22px;
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 0;
  font-weight: 900;
  cursor: pointer;
}

.product-hero {
  padding: 58px 0;
  background:
    radial-gradient(circle at 84% 15%, rgba(239, 111, 85, .18), transparent 30%),
    linear-gradient(135deg, #fff 0%, #f6fbf0 48%, #eef5e8 100%);
}

.wc-product-hero {
  padding: 64px 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(239, 111, 85, .14), transparent 30%),
    linear-gradient(135deg, #fff 0%, #f6fbf0 48%, #eef5e8 100%);
}

.wc-product-grid {
  display: grid;
  grid-template-columns: minmax(380px, .98fr) minmax(420px, .92fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.wc-product-images {
  display: grid;
  gap: 14px;
  align-self: start;
}

.wc-main-image {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(18, 60, 52, .12);
  border-radius: 10px;
  background: #fff;
  padding: 18px;
  box-shadow: var(--shadow);
}

.wc-main-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  object-fit: cover;
}

.product-slider {
  display: grid;
}

.product-slide {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity .55s ease;
}

.product-slide.is-active {
  opacity: 1;
}

.wc-thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.wc-thumb-grid img {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
  cursor: pointer;
  opacity: .72;
  transition: opacity .2s ease, border-color .2s ease, transform .2s ease;
}

.wc-thumb-grid img.is-active {
  border-color: var(--coral);
  opacity: 1;
  transform: translateY(-2px);
}

.wc-cart-panel {
  position: sticky;
  top: 112px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow);
  align-self: start;
  min-height: min(620px, calc(100vh - 150px));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wc-cart-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1;
}

.wc-buy-button {
  width: 100%;
  margin: 6px 0 18px;
}

.wc-trust {
  grid-template-columns: 1fr;
  margin-top: 4px;
}

.wc-cart-panel .lede {
  margin-bottom: 18px;
}

.wc-cart-panel .rating-row {
  margin: 12px 0 4px;
}

.wc-cart-panel .price-row {
  margin: 20px 0 16px;
}

.product-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, .9fr);
  gap: 54px;
  align-items: center;
}

.product-hero h1 { font-size: clamp(44px, 6vw, 82px); }
.lede { color: var(--muted); }

.rating-row,
.trust-row,
.mini-proof-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-weight: 800;
}

.stars { color: var(--gold); letter-spacing: 1px; }

.price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 22px 0;
}

.price {
  font-size: 38px;
  font-weight: 950;
}

.old-price {
  color: #8c9791;
  font-size: 18px;
  text-decoration: line-through;
}

.discount,
.ribbon {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(239, 111, 85, .14);
  color: #a33725;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 950;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.trust-row,
.mini-proof-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.trust-row span,
.mini-proof-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  padding: 12px;
  font-size: 13px;
  text-align: center;
}

.product-image-card {
  position: relative;
  border: 1px solid rgba(18, 60, 52, .12);
  border-radius: 10px;
  background: #fff;
  padding: 18px;
  box-shadow: var(--shadow);
}

.product-image-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  object-fit: cover;
}

.floating-card {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: grid;
  gap: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  padding: 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .15);
}

.mini-proof-grid { margin-top: 12px; }

.section { padding: 74px 0; }
.section-head { margin-bottom: 32px; }

.section-head.centered {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section h2,
.offer-band h2,
.final-cta h2 {
  margin: 0;
  font-size: clamp(32px, 4.8vw, 56px);
  line-height: 1.04;
}

.section-head p,
.formula-section p,
.faq p {
  color: var(--muted);
  line-height: 1.7;
}

.video-section,
.reviews-section { background: #fff; }

.bundle-grid,
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.video-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #102622;
  box-shadow: 0 12px 28px rgba(18, 60, 52, .12);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
  max-width: 100%;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(18, 60, 52, .18);
}

.video-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.video-card button {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  transform: translate(-50%, -50%);
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  background: rgba(8, 18, 16, .78);
  padding: 24px;
}

.video-modal.is-open {
  display: grid;
}

.video-modal-frame {
  width: min(420px, 92vw);
  max-height: 86vh;
  overflow: hidden;
  border-radius: 12px;
  background: #102622;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

.video-modal-frame img {
  width: 100%;
  max-height: 86vh;
  object-fit: contain;
}

.video-modal-close {
  position: fixed;
  top: 18px;
  right: 20px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 28px;
  cursor: pointer;
}

.product-video-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-video-content > * {
  margin: 0;
}

.product-video-content iframe,
.product-video-content video,
.product-video-content .wp-block-embed__wrapper {
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #102622;
  box-shadow: 0 12px 28px rgba(18, 60, 52, .12);
}

.product-video-content .wp-block-embed__wrapper iframe {
  height: 100%;
}

.split,
.formula-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 44px;
  align-items: start;
}

.problem-list { display: grid; gap: 14px; }

.problem-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 20px;
}

.problem-card span {
  color: var(--green-2);
  font-size: 22px;
  font-weight: 950;
}

.problem-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.offer-band {
  padding: 74px 0;
  background: #123c34;
  color: #fff;
}

.offer-band .eyebrow { color: #d7f49b; }

.bundle-card,
.review-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 28px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .10);
}

.bundle-card.featured {
  transform: translateY(-12px);
  border-color: var(--coral);
}

.bundle-card h3 {
  margin: 18px 0 8px;
  font-size: 26px;
}

.bundle-card strong {
  display: block;
  margin: 18px 0;
  font-size: 34px;
}

.formula-image img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 10px;
  color: var(--muted);
}

.check-list li::before {
  content: "✓";
  color: var(--green-2);
  font-weight: 950;
}

.review-card p {
  color: var(--muted);
  line-height: 1.7;
}

.faq { display: grid; gap: 12px; }

.faq details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 18px 20px;
}

.faq summary {
  cursor: pointer;
  font-weight: 950;
}

.final-cta {
  padding: 78px 0;
  background:
    linear-gradient(135deg, rgba(18, 60, 52, .96), rgba(28, 107, 87, .96)),
    var(--green);
  color: #fff;
  text-align: center;
}

.final-cta p {
  max-width: 620px;
  margin: 16px auto 26px;
  color: rgba(255, 255, 255, .78);
}

.site-footer {
  background: #111c1a;
  color: rgba(255,255,255,.72);
  padding: 28px 20px;
  text-align: center;
  font-size: 13px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .desktop-nav { display: none; }
  .icon-button { display: block; }

  .category-panel,
  .category-panel img { min-height: 68vh; }

  .category-panel::after {
    background: linear-gradient(0deg, rgba(12, 28, 25, .78), rgba(12, 28, 25, .08));
  }

  .category-overlay {
    top: auto;
    bottom: 34px;
    transform: none;
  }

  .product-hero-grid,
  .wc-product-grid,
  .split,
  .formula-grid { grid-template-columns: 1fr; }

  .wc-cart-panel {
    position: static;
  }

  .video-grid,
  .product-video-content,
  .bundle-grid,
  .review-grid,
  .trust-row,
  .mini-proof-grid,
  .wc-thumb-grid { grid-template-columns: 1fr; }

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

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

  .bundle-card.featured { transform: none; }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 68px;
    padding: 0 18px;
  }

  .mobile-nav {
    top: 104px;
    right: 14px;
    left: 14px;
  }

  .container,
  .narrow { width: min(100% - 28px, 1180px); }

  .category-overlay h1,
  .product-hero h1 {
    font-size: clamp(42px, 16vw, 70px);
  }

  .section,
  .product-hero,
  .offer-band,
  .final-cta { padding: 52px 0; }

  .button,
  .hero-actions { width: 100%; }

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

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