/* Santa Fitness: layout, typography and site chrome. Components come from components.css. */

/* ---------- Base ---------- */
/* Light-only brand (no dark theme yet): stops browsers' forced/auto dark modes from turning hero text light over photos. */
:root { color-scheme: only light; }
/* Photo frames use the design system's --photo-ratio (2:3, components.css); images are never cropped. */
html { scroll-padding-top: 96px; }
body { min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
body.sf-lock { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.sf-content a, .woocommerce-info a, .woocommerce-message a, .woocommerce-error a { color: var(--brand-text); text-underline-offset: 3px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; top: var(--space-2); left: var(--space-2); z-index: 1000; width: auto; height: auto; clip: auto; padding: var(--space-3) var(--space-4); background: var(--inverse); color: var(--on-inverse); border-radius: var(--radius-md); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.sf-container { width: 100%; max-width: calc(1280px + 2 * var(--space-6)); margin-inline: auto; padding-inline: var(--space-6); }
.sf-main { flex: 1; padding-block: var(--space-6) var(--space-8); }
.sf-main--narrow { max-width: calc(800px + 2 * var(--space-6)); }
.sf-home { padding-top: 0; }

/* ---------- Type scale (tokens.json → type) ---------- */
.sf-display-xl { font: 700 64px/64px var(--font-display); letter-spacing: -.02em; margin: 0; }
.sf-display { font: 700 48px/52px var(--font-display); letter-spacing: -.02em; margin: 0; }
.sf-h1, .sf-content h1 { font: 600 36px/40px var(--font-display); letter-spacing: -.01em; margin: 0; }
.sf-h2, .sf-content h2 { font: 600 28px/34px var(--font-display); letter-spacing: -.01em; margin: 0; }
.sf-h3, .sf-content h3 { font: 600 22px/28px var(--font-display); margin: 0; }
.sf-lead { font-size: 18px; line-height: 28px; color: var(--ink-muted); margin: 0; }
.sf-overline { font: 600 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 var(--space-3); }
.sf-content { font-size: 16px; line-height: 26px; }
.sf-content > * + * { margin-top: var(--space-4); }
.sf-content h2, .sf-content h3 { margin-top: var(--space-6); }
.sf-content table { width: 100%; border-collapse: collapse; }
.sf-content th, .sf-content td { border-bottom: 1px solid var(--line); padding: var(--space-3); text-align: left; }
.sf-page-head { margin-bottom: var(--space-6); }

/* ---------- Header ---------- */
.sf-site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); }
.sf-site-header.is-stuck { box-shadow: var(--shadow-sm); }
.sf-site-header .sf-header { max-width: calc(1280px + 2 * var(--space-6)); margin-inline: auto; border-bottom: 0; }
.sf-site-header { border-bottom: 1px solid var(--line); }
.sf-header__logo { display: flex; align-items: center; flex: none; }
.sf-header__logo .sf-logo { height: 30px; width: auto; }
.sf-nav ul { display: flex; gap: var(--space-5); list-style: none; margin: 0; padding: 0; height: 100%; }
.sf-nav li { display: flex; }
.sf-menu-toggle { display: none; }
.sf-search { border-top: 1px solid var(--line); padding-block: var(--space-4); background: var(--bg); }
.sf-searchform { max-width: 640px; margin-inline: auto; }
.sf-searchform .sf-input { flex: 1; }

/* Mobile menu */
.sf-mobile-menu, .sf-drawer { position: fixed; inset: 0; z-index: 100; background: rgba(35, 31, 32, .45); }
.sf-mobile-menu__panel { position: absolute; inset: 0 auto 0 0; width: min(360px, 88vw); background: var(--bg); box-shadow: var(--shadow-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-5); overflow-y: auto; }
.sf-mobile-menu__head { display: flex; justify-content: space-between; align-items: center; }
.sf-mobile-menu__head .sf-logo { height: 24px; }
.sf-mobile-nav { list-style: none; margin: 0; padding: 0; }
.sf-mobile-nav a { display: block; padding: var(--space-4) 0; border-bottom: 1px solid var(--line); font: 600 18px/24px var(--font-sans); text-decoration: none; }
.sf-mobile-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand); padding-left: var(--space-3); }

/* Cart drawer */
.sf-drawer__panel { position: absolute; inset: 0 0 0 auto; width: min(420px, 100vw); background: var(--bg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; border-radius: var(--radius-xl) 0 0 var(--radius-xl); }
.sf-drawer__head { display: flex; justify-content: space-between; align-items: center; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--line); }
.sf-drawer__content { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sf-drawer__items { flex: 1; overflow-y: auto; padding: 0 var(--space-5); }
.sf-drawer__foot { padding: var(--space-4) var(--space-5) var(--space-5); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--space-3); }
.sf-drawer__foot .sf-shipbar { margin-top: 0; }
.sf-drawer__total { display: flex; justify-content: space-between; margin: 0; font-size: 16px; }
.sf-drawer__total strong { font: 600 20px/24px var(--font-display); }
.sf-drawer__empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); padding: var(--space-6); color: var(--ink-muted); text-align: center; }
.sf-drawer__empty .sf-icon { width: 40px; height: 40px; }
.sf-cart-item .sf-media img { width: 100%; height: 100%; object-fit: contain; }
.sf-cart-item__name a { text-decoration: none; }
.sf-cart-item__price { font-size: 16px; white-space: nowrap; }
.sf-cart-item__price del { display: none; }
.sf-drawer.is-loading .sf-drawer__content { opacity: .5; pointer-events: none; transition: opacity .15s ease; }

/* Toast */
.sf-toast { position: fixed; left: 50%; bottom: var(--space-5); transform: translateX(-50%); z-index: 120; background: var(--inverse); color: var(--on-inverse); padding: var(--space-3) var(--space-5); border-radius: var(--radius-pill); font: 600 14px/20px var(--font-sans); box-shadow: var(--shadow-md); }

/* ---------- Home ---------- */
/* Full-bleed hero: wide photo behind, text on the left (photos are composed with calm, light negative space there). */
/* Height follows the photos' 21:9 ratio, so they are (almost) never cropped: heads and feet stay in, and the
   scene's light left side stays under the text. Below 1200px the hero stacks (portrait photo, text below). */
.sf-hero { position: relative; display: flex; align-items: center; min-height: max(520px, calc(100vw / 2.36)); overflow: hidden; background: var(--surface); margin-bottom: var(--space-8); }
.sf-hero__media { position: absolute; inset: 0; }
.sf-hero__img { position: absolute; inset: 0; display: block; transition: opacity .8s ease; }
.sf-hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: 100% 50%; }
.sf-hero__img:not(.is-active) { opacity: 0; }
.sf-hero__inner { position: relative; z-index: 1; width: 100%; }
.sf-hero__text { display: flex; flex-direction: column; gap: var(--space-4); max-width: 520px; padding-block: var(--space-7); }
.sf-hero__text .sf-overline { margin: 0; color: var(--ink); }
.sf-hero__text .sf-lead { color: var(--ink); max-width: 30em; }
.sf-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-3); }
.sf-hero__btn2 { background: var(--surface-raised); }
.sf-hero__btn2:hover { background: var(--surface-raised); }
.sf-hero__pause { position: absolute; right: var(--space-6); bottom: var(--space-5); z-index: 2; background: var(--surface-raised); box-shadow: var(--shadow-sm); }
.sf-hero__pause:hover { background: var(--surface-raised); }
.sf-hero__pause .sf-hero__icon-play, .sf-hero__pause[aria-pressed="true"] .sf-hero__icon-pause { display: none; }
.sf-hero__pause[aria-pressed="true"] .sf-hero__icon-play { display: block; }
.sf-hero__pause .sf-icon { fill: currentColor; stroke: none; }

.sf-section { margin-bottom: var(--space-8); }
.sf-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.sf-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-5); }
.sf-cat { display: flex; flex-direction: column; gap: var(--space-3); text-decoration: none; }
.sf-cat .sf-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s ease; }
.sf-cat:hover .sf-media img { transform: scale(1.03); }
.sf-cat__name { display: flex; align-items: center; justify-content: space-between; font: 600 16px/24px var(--font-sans); }
.sf-promo__title { color: inherit; }

/* Benefits + footer */
.sf-benefits { border-top: 1px solid var(--line); background: var(--surface); }
.sf-benefits__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); padding-block: var(--space-6); }
.sf-benefits__grid > div { display: flex; gap: var(--space-3); align-items: flex-start; }
.sf-benefits__grid .sf-icon { width: 24px; height: 24px; color: var(--brand-text); }
.sf-benefits__grid p { margin: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 20px; }
.sf-benefits__grid span { color: var(--ink-muted); }

.sf-footer { background: var(--inverse); color: var(--on-inverse); padding-top: var(--space-8); }
.sf-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--space-6); padding-bottom: var(--space-7); }
.sf-footer__brand p { color: rgba(255, 255, 255, .72); font-size: 14px; line-height: 20px; max-width: 28em; }
.sf-footer__brand .sf-logo { height: 30px; width: auto; margin-bottom: var(--space-4); }
.sf-footer__social { display: flex; gap: var(--space-1); margin-left: calc(-1 * var(--space-3)); }
.sf-footer .sf-icon-btn { color: var(--on-inverse); }
.sf-footer .sf-icon-btn:hover { background: rgba(255, 255, 255, .1); }
.sf-footer__title { font: 600 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 var(--space-4); color: rgba(255, 255, 255, .6); }
.sf-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.sf-footer ul a { text-decoration: none; font-size: 14px; }
.sf-footer ul a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sf-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .14); padding-block: var(--space-5); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, .6); }
.sf-footer__bottom p { margin: 0; }
.sf-footer :focus-visible { outline-color: #fff; }

/* Misc */
.sf-404 { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-4); padding-block: var(--space-9); }
.sf-404 .sf-searchform { width: 100%; }
.sf-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.sf-post-card .sf-media img { width: 100%; height: 100%; object-fit: contain; }
.sf-post-card h2 a { text-decoration: none; }

/* Tablet and phone: portrait photo (2:3, shown whole) on top, text below on white. */
@media (max-width: 1199px) {
	.sf-hero { display: block; min-height: 0; background: var(--bg); margin-bottom: var(--space-7); }
	.sf-hero__media { position: relative; aspect-ratio: 2 / 3; width: min(100%, calc(62vh * 2 / 3)); margin: var(--space-4) auto 0; border-radius: var(--radius-lg); overflow: hidden; }
	.sf-hero__img img { object-position: 50% 50%; }
	.sf-hero__text { max-width: 640px; padding-block: var(--space-5) 0; }
	.sf-hero__inner { position: static; }
	.sf-hero__pause { top: calc(var(--space-4) + min(62vh, 150vw) - 56px); bottom: auto; right: calc((100vw - min(100vw, 62vh * 2 / 3)) / 2 + 12px); }
}

/* Desktop: larger hero type and actions, scaled with the viewport. */
@media (min-width: 1200px) {
	/* Keep the text inside the photo's light left side (left ~46%) at every width: start at the page's
	   left edge (aligned with the 1280px layout) but never further in than 8vw, and end by 46vw. */
	.sf-hero__inner { max-width: none; padding-inline-start: min(max(var(--space-6), calc((100vw - 1280px) / 2)), 8vw); padding-inline-end: 0; }
	.sf-hero__text { width: calc(46vw - min(max(var(--space-6), (100vw - 1280px) / 2), 8vw)); max-width: 720px; min-width: 480px; gap: var(--space-5); }
	.sf-hero__text .sf-display-xl { font-size: clamp(72px, 5.6vw, 96px); line-height: 1; }
	.sf-hero__text .sf-overline { font-size: 14px; line-height: 20px; }
	.sf-hero__text .sf-lead { font-size: clamp(20px, 1.5vw, 24px); line-height: 1.45; max-width: 28em; }
	.sf-hero__actions { gap: var(--space-4); margin-top: var(--space-4); }
	.sf-hero__actions .sf-btn { height: 64px; padding: 0 var(--space-6); font-size: 17px; line-height: 24px; }
	.sf-hero__actions .sf-icon { width: 22px; height: 22px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.sf-header { gap: var(--space-4); }
	.sf-nav ul { gap: var(--space-4); }
	.sf-cats { grid-template-columns: repeat(3, 1fr); }
	.sf-benefits__grid { grid-template-columns: repeat(2, 1fr); }
	.sf-footer__grid { grid-template-columns: 1fr 1fr; }
	.sf-display-xl { font-size: 52px; line-height: 54px; }
}
@media (max-width: 860px) {
	.sf-container { padding-inline: var(--space-4); }
	.sf-site-header .sf-header { height: 56px; padding: 0 var(--space-2); gap: var(--space-2); }
	.sf-menu-toggle { display: inline-grid; }
	.sf-nav, .sf-hide-mobile { display: none; }
	.sf-header__logo { margin-right: auto; }
	.sf-header__logo .sf-logo { height: 24px; }
	.sf-main { padding-block: var(--space-5) var(--space-7); }
	.sf-display-xl { font-size: 40px; line-height: 44px; }
	.sf-h1, .sf-content h1 { font-size: 28px; line-height: 34px; }
	.sf-h2 { font-size: 24px; line-height: 30px; }
	.sf-section { margin-bottom: var(--space-7); }
	.sf-cats { grid-template-columns: repeat(5, 62%); overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--space-4); padding-bottom: var(--space-2); }
	.sf-cat { scroll-snap-align: start; }
	.sf-promo { padding: var(--space-5); }
	.sf-promo__title { font-size: 36px; line-height: 40px; }
	.sf-promo__text { font-size: 16px; line-height: 24px; }
	.sf-promo__art { opacity: .6; }
	.sf-posts { grid-template-columns: 1fr; }
	.sf-drawer__panel { border-radius: 0; }
}
@media (max-width: 520px) {
	.sf-benefits__grid { grid-template-columns: 1fr; gap: var(--space-4); }
	.sf-footer__grid { grid-template-columns: 1fr; }
	.sf-hero__actions .sf-btn { flex: 1; }
	.sf-searchform .sf-btn { padding: 0 var(--space-4); }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
