/*
Theme Name: La Madera Recovery
Theme URI: https://thelamadera.com/
Description: Evidence-based WordPress recovery theme for La Madera.
Version: 1.0.0
*/

:root {
  --cream: #f2ead6;
  --paper: #fffdf8;
  --ink: #20211e;
  --muted: #777970;
  --red: #df4139;
  --green: #214a42;
  --line: #d8d1bf;
  --max: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Georgia, 'Times New Roman', serif; font-size: 16px; line-height: 1.55; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
.site-width { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }

.announcement { background: var(--red); color: #fff8e8; min-height: 58px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px 50px; font-size: 16px; }
.site-header { background: var(--cream); border-bottom: 1px solid rgba(32,33,30,.12); }
.header-inner { min-height: 280px; display: grid; grid-template-columns: 270px 1fr auto; gap: 32px; align-items: center; }
.brand img { width: 230px; max-height: 180px; object-fit: contain; }
.primary-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; font-family: Arial, sans-serif; font-size: 15px; }
.primary-nav a { text-decoration: none; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { text-decoration: underline; }
.header-actions { display: flex; align-items: center; gap: 16px; font-family: Arial, sans-serif; font-size: 14px; white-space: nowrap; }
.header-actions a { text-decoration: none; }
.menu-toggle { display: none; border: 0; background: transparent; font: inherit; font-size: 25px; cursor: pointer; }

.hero { min-height: 590px; position: relative; display: grid; align-items: center; overflow: hidden; background: #8a897e; color: white; }
.hero-media { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; opacity: .78; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: rgba(32,33,30,.27); }
.hero-content { position: relative; z-index: 1; width: min(100% - 40px, 800px); margin: 0 auto; text-align: center; padding: 80px 0; }
.hero h1, .hero h2 { margin: 0 0 14px; font-size: clamp(42px, 5vw, 76px); font-weight: 400; line-height: 1.08; }
.hero p { margin: 0 0 25px; font-size: 22px; }
.button-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.button, .wp-element-button, button, input[type=submit] { display: inline-block; border: 1px solid var(--ink); border-radius: 2px; padding: 12px 24px; background: #050d18; color: white; font-family: Arial, sans-serif; cursor: pointer; text-decoration: none; }
.button.alt { background: transparent; border-color: white; }
.button:hover, .wp-element-button:hover, button:hover, input[type=submit]:hover { opacity: .82; }

.section { padding: 75px 0; }
.section.cream { background: var(--cream); }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 { margin: 0 0 8px; font-size: 40px; font-weight: 400; }
.section-head p { margin: 0; color: var(--muted); font-size: 18px; }
.three-col, .product-grid, .feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-card, .product-card { min-width: 0; }
.feature-card { background: var(--paper); border: 1px solid var(--line); }
.feature-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.feature-card .card-body { padding: 22px; }
.feature-card h3, .product-card h2 { margin: 0 0 8px; font-size: 23px; font-weight: 400; }
.feature-card p { margin: 0 0 15px; color: var(--muted); }
.product-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #eee9dc; }
.product-card h2 { font-size: 18px; margin-top: 12px; }
.product-card .price { font-family: Arial, sans-serif; font-size: 14px; }
.product-card a { text-decoration: none; }
.product-card a:hover h2 { text-decoration: underline; }
.image-split { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.image-split img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.image-split .copy { display: flex; flex-direction: column; justify-content: center; padding: 55px; background: var(--cream); }
.image-split h2 { margin: 0 0 15px; font-weight: 400; font-size: 42px; }
.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; text-align: center; }
.mission-grid h3 { font-weight: 400; font-size: 23px; }
.mission-grid p { color: var(--muted); }

.page-wrap { padding: 70px 0; }
.page-wrap h1 { font-weight: 400; font-size: 48px; line-height: 1.1; }
.content-width { width: min(100%, 900px); margin: 0 auto; }
.content-width h2, .content-width h3 { font-weight: 400; line-height: 1.2; }
.content-width img { margin: 24px auto; }
.breadcrumbs { font-family: Arial, sans-serif; color: var(--muted); font-size: 13px; margin-bottom: 24px; }

.site-footer { background: var(--green); color: #f6f1e4; padding: 60px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 50px; }
.site-footer h2, .site-footer h3 { margin-top: 0; font-weight: 400; }
.site-footer a { color: inherit; }
.footer-nav { display: grid; gap: 7px; font-family: Arial, sans-serif; font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.3); margin-top: 45px; padding-top: 18px; font: 12px Arial, sans-serif; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.woocommerce .site-main { padding: 65px 0; }
.woocommerce ul.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { width: auto; float: none; margin: 0; }
.woocommerce ul.products li.product a img { aspect-ratio: 1/1; object-fit: cover; }
.woocommerce div.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 55px; }
.woocommerce div.product div.images, .woocommerce div.product div.summary { width: auto; float: none; }
.woocommerce div.product .product_title { font-size: 42px; font-weight: 400; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--ink); font: 22px Arial, sans-serif; }
.woocommerce div.product form.cart { margin-top: 30px; }
.woocommerce .quantity .qty { padding: 11px; border: 1px solid var(--line); }
.woocommerce button.button, .woocommerce a.button, .woocommerce input.button { border-radius: 2px; background: #050d18; color: white; font-weight: 400; padding: 13px 23px; }
.woocommerce span.onsale { background: var(--red); border-radius: 0; min-width: 0; min-height: 0; padding: 7px 10px; line-height: 1; }
.woocommerce .related h2 { font-size: 32px; font-weight: 400; }

@media (max-width: 850px) {
  .site-width { width: min(calc(100% - 28px), var(--max)); }
  .announcement { min-height: 48px; font-size: 13px; }
  .header-inner { min-height: 110px; grid-template-columns: 1fr auto; gap: 14px; }
  .brand img { width: 150px; max-height: 84px; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; grid-column: 1 / -1; padding: 8px 0 18px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .primary-nav.is-open { display: flex; }
  .header-actions { font-size: 12px; gap: 8px; }
  .header-actions .region { display: none; }
  .hero { min-height: 540px; }
  .hero-media { grid-template-columns: 1fr; }
  .hero-media img:first-child { display: none; }
  .hero h1, .hero h2 { font-size: 42px; }
  .hero p { font-size: 18px; }
  .section { padding: 52px 0; }
  .section-head h2 { font-size: 32px; }
  .three-col, .product-grid, .feature-grid, .mission-grid { grid-template-columns: 1fr; }
  .image-split { grid-template-columns: 1fr; }
  .image-split img { min-height: 280px; }
  .image-split .copy { padding: 38px 24px; }
  .image-split h2 { font-size: 34px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .woocommerce div.product { grid-template-columns: 1fr; gap: 25px; }
  .woocommerce div.product .product_title { font-size: 34px; }
}

@media (max-width: 480px) {
  .woocommerce ul.products { grid-template-columns: 1fr; }
  .button { width: 100%; text-align: center; }
}
