/*
Theme Name: Weighted & Well
Theme URI: https://weightedandwell.com
Author: Weighted & Well
Description: A warm, friendly block theme for Weighted & Well, honest guides to weighted walking and rucking for women 40+. Includes a Products section, product card blocks and "best of" list patterns for Amazon affiliate content.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: weighted-well
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
:where(a) { text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--wp--preset--color--sage); outline-offset: 3px; border-radius: 6px; }
img { height: auto; }

/* ---------- Disclosure bar ---------- */
.ww-disclosure-bar { font-size: 0.8125rem; }
.ww-disclosure-bar p { margin: 0; }

/* ---------- Header ---------- */
.ww-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .ww-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ww-header { top: 0; } }
.ww-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.ww-logo-mark { width: 40px; height: 40px; border-radius: 999px; background: var(--wp--preset--color--sage); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ww-logo-mark svg { width: 22px; height: 22px; }
.ww-amp { color: var(--wp--preset--color--terracotta); font-style: italic; font-weight: 400; }
.ww-header .wp-block-site-title a { text-decoration: none; }
.ww-header .wp-block-search__button { border-radius: 999px; }
@media (max-width: 781px) { .ww-header-cta { display: none !important; } }

/* ---------- Cards / hover ---------- */
.ww-card-link { transition: transform .2s ease, box-shadow .2s ease; }
.ww-card-link:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(60, 50, 30, .10); }
.ww-goal-card a { text-decoration: none; }
.ww-goal-card .wp-block-heading a { color: inherit; }
.ww-goal-card .wp-block-heading a::after { content: ""; position: absolute; inset: 0; }
.ww-goal-card { position: relative; }
.ww-icon-chip { width: 52px; height: 52px; border-radius: 16px; background: var(--wp--preset--color--card); display: inline-flex; align-items: center; justify-content: center; }
.ww-icon-chip svg { width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.ww-hero-media img { border-radius: 32px 32px 32px 160px; aspect-ratio: 4 / 4.2; object-fit: cover; width: 100%; }
.ww-hero-media .ww-photo-placeholder { border-radius: 32px 32px 32px 160px; }
.ww-checks { list-style: none; padding: 0; margin-bottom: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.ww-checks li { display: flex; gap: 8px; align-items: center; }
.ww-checks li::before { content: ""; width: 18px; height: 18px; flex-shrink: 0; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234F6B50' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
.ww-photo-placeholder { background: var(--wp--preset--color--sand); color: #7A7266; display: flex; align-items: center; justify-content: center; text-align: center; padding: 32px; min-height: 420px; }

/* ---------- Product card (block) ---------- */
.ww-products { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ww-products > .ww-product:only-child { max-width: 420px; }
.ww-product { background: var(--wp--preset--color--card); border: 1px solid var(--wp--preset--color--line); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; color: var(--wp--preset--color--ink); }
.ww-product__media { position: relative; aspect-ratio: 4 / 3; background: var(--wp--preset--color--sand); display: flex; align-items: center; justify-content: center; }
.ww-product__media img { width: 100%; height: 100%; object-fit: contain; padding: 18px; box-sizing: border-box; background: #fff; }
.ww-product__noimg { color: #7A7266; font-size: .875rem; }
.ww-badge { position: absolute; top: 16px; left: 16px; padding: 7px 14px; border-radius: 999px; background: var(--wp--preset--color--sage); color: #fff; font-size: .8125rem; font-weight: 600; line-height: 1.2; }
.ww-product__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.ww-product__meta { font-size: .875rem; color: var(--wp--preset--color--muted); margin: 0; }
.ww-product__title { font-family: var(--wp--preset--font-family--fraunces); font-size: 1.5rem; font-weight: 600; line-height: 1.2; margin: 0; }
.ww-product__title a { color: inherit; text-decoration: none; }
.ww-product__desc { margin: 0; color: var(--wp--preset--color--body); font-size: 1rem; line-height: 1.55; }
.ww-score { display: flex; gap: 8px; align-items: center; font-size: .875rem; color: var(--wp--preset--color--muted); }
.ww-score b { padding: 4px 10px; border-radius: 8px; background: var(--wp--preset--color--sage-tint); color: var(--wp--preset--color--sage-dark); }
.ww-proscons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .9375rem; color: var(--wp--preset--color--body); }
.ww-proscons li { display: flex; gap: 10px; line-height: 1.45; }
.ww-proscons li::before { font-weight: 700; flex-shrink: 0; width: 12px; }
.ww-pro::before { content: "+"; color: var(--wp--preset--color--sage); }
.ww-con::before { content: "\2212"; color: var(--wp--preset--color--terracotta-dark); }
.ww-product__actions { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.ww-btn-amazon { display: block; padding: 15px 18px; border-radius: 14px; background: var(--wp--preset--color--terracotta); color: #fff !important; text-align: center; font-weight: 600; text-decoration: none !important; transition: background .2s ease; }
.ww-btn-amazon:hover { background: var(--wp--preset--color--terracotta-dark); }
.ww-review-link { text-align: center; font-weight: 600; font-size: .9375rem; }

/* Horizontal layout (inside list posts) */
.ww-product.is-row { flex-direction: row; }
.ww-product.is-row .ww-product__media { width: 38%; aspect-ratio: auto; min-height: 280px; flex-shrink: 0; }
@media (max-width: 700px) { .ww-product.is-row { flex-direction: column; } .ww-product.is-row .ww-product__media { width: 100%; aspect-ratio: 4/3; min-height: 0; } }
.ww-rank { font-family: var(--wp--preset--font-family--fraunces); font-size: 1rem; font-weight: 600; color: var(--wp--preset--color--terracotta-dark); margin: 0; }

/* Compact numbered list */
.ww-toplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: ww; }
.ww-toplist li { counter-increment: ww; display: flex; gap: 16px; align-items: center; padding: 14px 18px; border-radius: 18px; background: var(--wp--preset--color--card); border: 1px solid var(--wp--preset--color--line); }
.ww-toplist li::before { content: counter(ww); font-family: var(--wp--preset--font-family--fraunces); font-size: 1.75rem; font-weight: 600; width: 30px; color: var(--wp--preset--color--sage); }
.ww-toplist img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: #fff; }
.ww-toplist .ww-tl-text { display: flex; flex-direction: column; flex-grow: 1; }
.ww-toplist .ww-tl-name { font-weight: 600; }
.ww-toplist .ww-tl-best { font-size: .875rem; color: var(--wp--preset--color--muted); }
.ww-toplist .ww-tl-go { font-weight: 600; font-size: .9375rem; white-space: nowrap; color: var(--wp--preset--color--terracotta-dark); }
.has-sage-background-color .ww-toplist li { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); color: #fff; }
.has-sage-background-color .ww-toplist li::before, .has-sage-background-color .ww-toplist .ww-tl-best, .has-sage-background-color .ww-toplist .ww-tl-go { color: #E8EFE4; }

/* Comparison table */
.ww-compare-wrap { overflow-x: auto; border-radius: 20px; border: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--card); }
.ww-compare { width: 100%; border-collapse: collapse; font-size: .9375rem; min-width: 620px; }
.ww-compare th, .ww-compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--wp--preset--color--line); vertical-align: middle; }
.ww-compare thead th { background: var(--wp--preset--color--sand); font-weight: 700; }
.ww-compare tr:last-child td { border-bottom: 0; }
.ww-compare img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 10px; }
.ww-compare .ww-btn-amazon { padding: 10px 14px; font-size: .875rem; border-radius: 10px; white-space: nowrap; }

/* Inline post disclosure */
.ww-post-disclosure { font-size: .875rem; color: var(--wp--preset--color--muted); background: var(--wp--preset--color--sand); padding: 12px 18px; border-radius: 14px; }

/* Newsletter / forms */
.ww-newsletter input[type=email] { height: 54px; padding: 0 20px; border-radius: 999px; border: 1.5px solid #C9BBA3; background: #fff; font: inherit; }

/* Post content comfort */
.single .wp-block-post-content > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.single .wp-block-post-content > .alignwide { max-width: 1100px; }
.single .wp-block-post-content > .alignfull { max-width: none; }
.wp-block-post-content h2 { margin-top: 2.2em; }

/* Footer */
.ww-footer a { color: #D4CCBE; text-decoration: none; }
.ww-footer a:hover { color: #fff; text-decoration: underline; }
.ww-footer .wp-block-navigation__container { gap: 10px; }

/* Query cards */
.ww-post-card .wp-block-post-featured-image img { border-radius: 22px; aspect-ratio: 3/2; object-fit: cover; }
.ww-post-card .wp-block-post-title a { text-decoration: none; color: inherit; }
.ww-post-card .wp-block-post-title a:hover { color: var(--wp--preset--color--sage); }

/* ---------- Small pieces from the patterns ---------- */
.ww-logo-text { font-family: var(--wp--preset--font-family--fraunces); font-size: 1.5625rem; font-weight: 600; color: var(--wp--preset--color--ink); line-height: 1; white-space: nowrap; }
.ww-logo--light .ww-logo-text { color: #fff; }
.ww-logo--light .ww-amp { color: #E0936F; }
.ww-header-row { border-bottom: 1px solid var(--wp--preset--color--line); }
.ww-btn-small .wp-block-button__link { padding: 11px 20px; font-size: .9375rem; }
.ww-search .wp-block-search__button { width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--wp--preset--color--card); color: var(--wp--preset--color--ink); border: 1px solid #D9CDB8; margin-left: 0; }
.ww-search .wp-block-search__button svg { width: 22px; height: 22px; }
.ww-search .wp-block-search__input { border-radius: 999px; border-color: #D9CDB8; padding: 0 16px; }
.ww-pill { display: inline-block; align-self: flex-start; padding: 8px 16px; border-radius: 999px; background: var(--wp--preset--color--sage-tint); color: var(--wp--preset--color--sage-dark); font-size: .875rem; font-weight: 600; }
.ww-accent { font-style: italic; font-weight: 400; color: var(--wp--preset--color--sage); }
.ww-eyebrow, .ww-eyebrow a { font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--terracotta-dark); text-decoration: none; }
.ww-eyebrow--light { color: #DCE6D6; }
.ww-banner a:not(.wp-element-button) { color: #fff; }
.ww-footer hr.wp-block-separator { opacity: .18; border-color: currentColor; }
.ww-footer hr.wp-block-separator { width: 100%; max-width: none; }
.ww-footer .wp-block-column { display: flex; flex-direction: column; gap: 12px; }
.ww-card-more { margin-top: auto !important; }
.ww-goal-card { height: 100%; box-sizing: border-box; }
.ww-hero-cols { gap: clamp(2rem, 5vw, 4rem); }
.wp-block-post-content .wp-block-weighted-well-products, .wp-block-post-content .wp-block-weighted-well-product { margin-top: 1.5rem; margin-bottom: 2rem; }
.single-ww_product .wp-block-weighted-well-product { max-width: 1100px; margin-left: auto; margin-right: auto; }
.ww-search-page { max-width: 560px; }
@media (max-width: 1100px) { .ww-header-cta { display: none !important; } }
@media (max-width: 781px) {
	.ww-header { position: static; }
	.ww-logo-text { font-size: 1.3rem; }
	.ww-hero-media img { border-radius: 24px 24px 24px 80px; aspect-ratio: 4 / 3; }
}
.ww-footer .wp-block-separator { width: 100% !important; }
