/*
Theme Name: Savings Pro Magazine
Theme URI: https://example.com/
Description: Magazine-style child theme for Savings Pro. Editorial homepage (front-page.php), six category archives and article pages, while the parent theme keeps powering stores, coupons, codes and affiliate links. Requires the Savings Pro parent theme.
Author: Custom
Template: savings-pro
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: savings-pro-magazine
Tags: blog, news, magazine, custom-logo, featured-images, translation-ready
*/

:root {
	--spm-ink: #14110f;
	--spm-muted: #6b6762;
	--spm-line: #e9e6e0;
	--spm-soft: #f7f5f1;
	--spm-bg: #ffffff;
	--spm-accent: #b4472f;
	--spm-serif: Georgia, "Times New Roman", "Noto Serif", serif;
	--spm-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--spm-wrap: 1200px;
	--spm-radius: 4px;
}

/* ---------- base helpers ---------- */
.spm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spm-skip { position: absolute; left: -9999px; top: 0; background: #fff; color: #000; padding: 8px 14px; z-index: 1000; }
.spm-skip:focus { left: 8px; top: 8px; }
.spm-container { max-width: var(--spm-wrap); margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.spm-container-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.spm-site, .spm-site * { box-sizing: border-box; }
.spm-site img { max-width: 100%; height: auto; }
.spm-site a { color: inherit; }
.spm-home, .spm-archive, .spm-single { font-family: var(--spm-sans); color: var(--spm-ink); background: var(--spm-bg); }
/* Neutralise the parent theme's global typography inside magazine areas only (store pages keep the parent's look). */
.spm-header *, .spm-footer *, .spm-home *, .spm-archive *, .spm-single * { font-family: inherit; }
.spm-header :is(h1,h2,h3,h4,h5,h6), .spm-home :is(h1,h2,h3,h4,h5,h6), .spm-archive :is(h1,h2,h3,h4,h5,h6), .spm-single :is(h1,h2,h3,h4,h5,h6) { color: inherit; }

:where(.spm-home, .spm-archive, .spm-single, .spm-footer, .spm-header) :is(p, li, span, time, label, blockquote, figcaption) { color: inherit; }

/* ---------- header ---------- */
.spm-header { background: #fff; border-bottom: 1px solid var(--spm-line); font-family: var(--spm-sans); position: relative; z-index: 50; }
.spm-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.spm-logo { flex: 0 0 auto; line-height: 1; }
.spm-logo img, .spm-logo .custom-logo { max-height: 52px; width: auto; display: block; }
.spm-logo-text { font-family: var(--spm-serif); font-size: 28px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; color: var(--spm-ink); }
.spm-nav { flex: 1 1 auto; }
.spm-menu { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 28px; }
.spm-menu li { margin: 0; padding: 0; }
.spm-menu a { display: block; padding: 8px 0; text-decoration: none; color: var(--spm-ink); font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; border-bottom: 2px solid transparent; }
.spm-menu a:hover, .spm-menu .current-menu-item > a, .spm-menu .current-cat > a { border-bottom-color: var(--spm-accent); }
.spm-search-toggle, .spm-menu-toggle { background: none; border: 0; padding: 10px; cursor: pointer; color: var(--spm-ink); line-height: 0; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.spm-menu-toggle { display: none; }
.spm-burger, .spm-burger::before, .spm-burger::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; content: ""; }
.spm-burger::before { position: absolute; top: -7px; }
.spm-burger::after { position: absolute; top: 7px; }
.spm-search-panel { border-top: 1px solid var(--spm-line); background: var(--spm-soft); padding: 16px 0; }
.spm-search-panel[hidden] { display: none; }
.spm-search-form { display: flex; gap: 8px; }
.spm-search-form input[type=search] { flex: 1; padding: 12px 14px; border: 1px solid #cfcac2; border-radius: var(--spm-radius); font-size: 16px; background: #fff; }
.spm-search-form button { padding: 12px 22px; border: 0; background: var(--spm-ink); color: #fff; font-weight: 600; border-radius: var(--spm-radius); cursor: pointer; min-height: 44px; }

/* ---------- shared pieces ---------- */
.spm-cat-label { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--spm-accent); text-decoration: none; margin-bottom: 8px; }
.spm-cat-label:hover { text-decoration: underline; }
.spm-date, .spm-readtime { font-size: 13px; color: var(--spm-muted); }
.spm-btn { display: inline-block; padding: 12px 22px; background: var(--spm-ink); color: #fff !important; text-decoration: none; font-weight: 600; border-radius: var(--spm-radius); }
.spm-more { font-weight: 600; text-decoration: none; color: var(--spm-ink); border-bottom: 1px solid currentColor; }
.spm-section { padding-top: 48px; padding-bottom: 8px; }
.spm-section-head { display: flex; align-items: center; margin-bottom: 24px; border-bottom: 1px solid var(--spm-line); }
.spm-section-title { font-family: var(--spm-serif); font-size: 26px; margin: 0; padding: 0 0 12px; position: relative; }
.spm-section-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 3px; background: var(--spm-accent); }
.spm-empty { text-align: center; padding: 80px 20px; }
.spm-empty h2 { font-family: var(--spm-serif); font-size: 28px; margin: 0 0 8px; }
.spm-empty p { color: var(--spm-muted); }

/* ---------- cards & grids ---------- */
.spm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 28px; }
.spm-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.spm-card { margin: 0; min-width: 0; }
.spm-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--spm-soft); border-radius: var(--spm-radius); margin-bottom: 14px; }
.spm-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.spm-card:hover .spm-card-media img { transform: scale(1.03); }
.spm-card-placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #efeae1, #e2dccf); }
.spm-card-title { font-family: var(--spm-serif); font-size: 21px; line-height: 1.28; margin: 0 0 8px; font-weight: 700; }
.spm-card-title a { text-decoration: none; color: var(--spm-ink); }
.spm-card-title a:hover { color: var(--spm-accent); }
.spm-card-excerpt { margin: 0 0 10px; color: #4b4741; font-size: 15px; line-height: 1.55; }

/* ---------- hero ---------- */
.spm-hero-wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 36px; padding-top: 36px; }
.spm-hero { margin: 0; min-width: 0; }
.spm-hero-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--spm-soft); border-radius: var(--spm-radius); }
.spm-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spm-hero-body { padding: 20px 0 0; }
.spm-hero-title { font-family: var(--spm-serif); font-size: 40px; line-height: 1.12; margin: 0 0 12px; letter-spacing: -.01em; }
.spm-hero-title a { text-decoration: none; color: var(--spm-ink); }
.spm-hero-title a:hover { color: var(--spm-accent); }
.spm-hero-excerpt { font-size: 18px; line-height: 1.55; color: #4b4741; margin: 0 0 14px; }
.spm-secondary { display: flex; flex-direction: column; gap: 22px; }
.spm-card-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: start; padding-bottom: 22px; border-bottom: 1px solid var(--spm-line); }
.spm-card-row:last-child { border-bottom: 0; padding-bottom: 0; }
.spm-card-row .spm-card-media { margin: 0; aspect-ratio: 1 / 1; }
.spm-card-row .spm-card-title { font-size: 17px; margin-bottom: 6px; }

/* ---------- categories grid ---------- */
.spm-cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.spm-cat-card { position: relative; display: flex; align-items: flex-end; min-height: 200px; padding: 20px; border-radius: var(--spm-radius); overflow: hidden; background: #2b2622 center / cover no-repeat; text-decoration: none; color: #fff !important; isolation: isolate; }
.spm-cat-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,.05) 70%); z-index: -1; transition: opacity .25s; }
.spm-cat-card:hover::before { opacity: .85; }
.spm-cat-card--plain { background-image: linear-gradient(135deg, #3a322c, #7a5a48); }
.spm-cat-card-name { font-family: var(--spm-serif); font-size: 26px; font-weight: 700; }

/* ---------- trending ---------- */
.spm-trending { list-style: none; counter-reset: spm; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.spm-trending li { counter-increment: spm; display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--spm-line); align-items: start; }
.spm-trending li::before { content: counter(spm, decimal-leading-zero); grid-row: 1 / span 2; font-family: var(--spm-serif); font-size: 30px; color: #cfc8bc; line-height: 1; }
.spm-trending .spm-cat-label { margin: 0 0 4px; grid-column: 2; }
.spm-trending-title { grid-column: 2; font-family: var(--spm-serif); font-size: 19px; line-height: 1.3; font-weight: 700; text-decoration: none; color: var(--spm-ink); }
.spm-trending-title:hover { color: var(--spm-accent); }

/* ---------- optional deals strip ---------- */
.spm-deals-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.spm-deals-list a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px; border: 1px solid var(--spm-line); border-radius: var(--spm-radius); text-decoration: none; text-align: center; background: var(--spm-soft); }
.spm-deals-list a:hover { border-color: var(--spm-accent); }
.spm-deal-logo { width: 64px; height: 64px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.spm-deal-logo img { max-width: 80%; max-height: 80%; object-fit: contain; }
.spm-deal-initial { font-family: var(--spm-serif); font-size: 26px; font-weight: 700; }
.spm-deal-name { font-weight: 700; }
.spm-deal-cta { font-size: 13px; color: var(--spm-accent); }

/* ---------- archive ---------- */
.spm-cat-banner { background: var(--spm-soft) center / cover no-repeat; padding: 56px 0 44px; border-bottom: 1px solid var(--spm-line); position: relative; isolation: isolate; font-family: var(--spm-sans); }
.spm-cat-banner.has-image { color: #fff; padding: 90px 0 56px; }
.spm-cat-banner.has-image::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.5); z-index: -1; }
.spm-cat-banner.has-image a { color: #fff; }
.spm-cat-title { font-family: var(--spm-serif); font-size: 46px; line-height: 1.1; margin: 8px 0 10px; }
.spm-cat-desc { max-width: 640px; font-size: 18px; line-height: 1.55; color: inherit; opacity: .85; }
.spm-cat-desc p { margin: 0; }
.spm-pills { display: flex; flex-wrap: wrap; gap: 8px; padding: 22px 0 8px; }
.spm-pills a { padding: 8px 16px; border: 1px solid var(--spm-line); border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--spm-ink); min-height: 40px; display: inline-flex; align-items: center; }
.spm-pills a:hover, .spm-pills a.is-current { background: var(--spm-ink); color: #fff; border-color: var(--spm-ink); }
.spm-hero--archive { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 36px; align-items: center; padding: 28px 0 8px; }
.spm-hero--archive .spm-hero-body { padding: 0; }
.spm-hero--archive .spm-hero-title { font-size: 34px; }
.spm-cat-label--static { cursor: default; }
.spm-archive .spm-grid { padding-bottom: 8px; }
.spm-archive .spm-section { padding-top: 28px; padding-left: 0; padding-right: 0; }

/* ---------- pagination ---------- */
.spm-pagination { margin: 40px 0 56px; }
.spm-pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0; padding: 0; }
.spm-pagination a, .spm-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--spm-line); border-radius: var(--spm-radius); text-decoration: none; color: var(--spm-ink); font-weight: 600; }
.spm-pagination .current, .spm-pagination a:hover { background: var(--spm-ink); color: #fff; border-color: var(--spm-ink); }

/* ---------- breadcrumbs ---------- */
.spm-breadcrumbs { font-size: 13px; color: var(--spm-muted); margin-bottom: 14px; }
.spm-breadcrumbs a { text-decoration: none; }
.spm-breadcrumbs a:hover { text-decoration: underline; }
.spm-cat-banner.has-image .spm-breadcrumbs { color: rgba(255,255,255,.8); }

/* ---------- single article ---------- */
.spm-article-head { padding-top: 36px; text-align: left; }
.spm-article-title { font-family: var(--spm-serif); font-size: 46px; line-height: 1.12; margin: 0 0 18px; letter-spacing: -.01em; }
.spm-article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 26px; font-size: 14px; color: var(--spm-muted); }
.spm-author { display: inline-flex; align-items: center; gap: 10px; }
.spm-author img { border-radius: 50%; }
.spm-author a { color: var(--spm-ink); font-weight: 600; text-decoration: none; }
.spm-article-image { max-width: 1100px; margin: 0 auto 36px; padding: 0 20px; }
.spm-article-image img { width: 100%; height: auto; border-radius: var(--spm-radius); display: block; }
.spm-article-image figcaption { font-size: 13px; color: var(--spm-muted); margin-top: 8px; }
.spm-article-content { font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.75; color: #1f1c19; }
.spm-article-content h2, .spm-article-content h3, .spm-article-content h4 { font-family: var(--spm-serif); line-height: 1.25; margin: 1.8em 0 .6em; }
.spm-article-content h2 { font-size: 30px; } .spm-article-content h3 { font-size: 24px; }
.spm-article-content p { margin: 0 0 1.4em; }
.spm-article-content a { color: var(--spm-accent); }
.spm-article-content img, .spm-article-content figure { max-width: 100%; height: auto; }
.spm-article-content blockquote { margin: 1.6em 0; padding-left: 20px; border-left: 3px solid var(--spm-accent); font-style: italic; }
.spm-article-content ul, .spm-article-content ol { margin: 0 0 1.4em 1.2em; }
.spm-article-content table { display: block; overflow-x: auto; max-width: 100%; }
.spm-article-foot { padding-top: 12px; padding-bottom: 8px; font-family: var(--spm-sans); }
.spm-tags { margin: 18px 0; font-size: 14px; } .spm-tags span { font-weight: 700; margin-right: 8px; }
.spm-tags a { display: inline-block; margin: 0 6px 6px 0; padding: 4px 12px; background: var(--spm-soft); border-radius: 999px; text-decoration: none; }
.spm-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px 0; border-top: 1px solid var(--spm-line); border-bottom: 1px solid var(--spm-line); margin: 18px 0; }
.spm-share-label { font-weight: 700; margin-right: 6px; }
.spm-share a, .spm-copy-link { padding: 8px 14px; border: 1px solid var(--spm-line); border-radius: var(--spm-radius); text-decoration: none; font-size: 14px; background: #fff; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; color: var(--spm-ink); font-family: inherit; }
.spm-share a:hover, .spm-copy-link:hover { border-color: var(--spm-ink); }
.spm-copy-link[hidden] { display: none; }
.spm-authorbox { display: flex; gap: 16px; padding: 20px; background: var(--spm-soft); border-radius: var(--spm-radius); margin: 24px 0; }
.spm-authorbox img { border-radius: 50%; flex: 0 0 auto; }
.spm-authorbox p { margin: 4px 0 0; color: #4b4741; }
.spm-related { padding-bottom: 24px; }
.spm-comments { padding-top: 24px; padding-bottom: 48px; font-family: var(--spm-sans); }
.spm-page-links { margin: 20px 0; }

/* ---------- footer ---------- */
.spm-footer { background: var(--spm-soft); color: #4b4741; font-family: var(--spm-sans); margin-top: 64px; border-top: 1px solid var(--spm-line); }
.spm-footer a { color: #4b4741; text-decoration: none; }
.spm-footer a:hover { color: var(--spm-accent); text-decoration: underline; }
.spm-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-top: 52px; padding-bottom: 36px; }
.spm-footer-brand p { max-width: 420px; line-height: 1.6; margin: 14px 0; }
.spm-logo-footer .spm-logo-text { color: var(--spm-ink); }
.spm-logo-footer img { max-height: 44px; }
.spm-footer .spm-footer-title { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--spm-ink); margin: 0 0 14px; font-weight: 700; }
.spm-footer ul { list-style: none; margin: 0; padding: 0; }
.spm-footer li { margin: 0 0 9px; }
.spm-social { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.spm-footer-bottom { border-top: 1px solid var(--spm-line); }
.spm-footer-bottom-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 18px; padding-bottom: 22px; font-size: 13px; }
.spm-allstores { opacity: .7; font-size: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
	.spm-hero-wrap { grid-template-columns: 1fr; }
	.spm-secondary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
	.spm-card-row { grid-template-columns: 1fr; border-bottom: 0; padding-bottom: 0; }
	.spm-card-row .spm-card-media { aspect-ratio: 16 / 10; margin-bottom: 10px; }
	.spm-grid, .spm-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.spm-hero-title { font-size: 34px; }
}
@media (max-width: 900px) {
	.spm-header-inner { min-height: 64px; gap: 8px; }
	.spm-menu-toggle { display: inline-flex; order: 1; }
	.spm-logo { order: 2; flex: 1 1 auto; text-align: center; }
	.spm-logo img, .spm-logo .custom-logo { margin: 0 auto; max-height: 42px; }
	.spm-search-toggle { order: 3; }
	.spm-logo-text { font-size: 24px; }
	.spm-nav { order: 4; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--spm-line); display: none; padding: 8px 20px 16px; box-shadow: 0 12px 20px rgba(0,0,0,.06); }
	.spm-nav.is-open { display: block; }
	.spm-menu { flex-direction: column; justify-content: flex-start; gap: 0; }
	.spm-menu a { padding: 14px 0; border-bottom: 1px solid var(--spm-line); min-height: 44px; }
	.spm-footer-grid { grid-template-columns: 1fr 1fr; }
	.spm-footer-brand { grid-column: 1 / -1; }
	.spm-hero--archive { grid-template-columns: 1fr; }
	.spm-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.spm-secondary, .spm-trending { grid-template-columns: 1fr; }
	.spm-grid, .spm-grid--3 { grid-template-columns: 1fr; }
	.spm-hero-title { font-size: 28px; }
	.spm-hero-excerpt { font-size: 16px; }
	.spm-article-title, .spm-cat-title { font-size: 32px; }
	.spm-article-content { font-size: 18px; }
	.spm-cat-card { min-height: 150px; }
	.spm-section { padding-top: 36px; }
	.spm-search-form { flex-direction: column; }
	.spm-footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
	.spm-card-media img, .spm-cat-card::before { transition: none; }
}

/* Article body: win over the parent's global text colours. */
.spm-single .spm-article-content :is(p, li, span, blockquote, td, th, figcaption) { color: inherit; }
.spm-single .spm-article-content :is(h2, h3, h4, h5) { color: var(--spm-ink); }

/* Specific colours that must beat the parent's global paragraph colour. */
body.spm-magazine .spm-card-excerpt, body.spm-magazine .spm-hero-excerpt { color: #4b4741; }
body.spm-magazine .spm-empty p, body.spm-magazine .spm-authorbox p { color: var(--spm-muted); }
body.spm-magazine .spm-cat-desc, body.spm-magazine .spm-cat-desc p { color: inherit; }
body.spm-magazine .spm-footer-brand p { color: #4b4741; }

/* =====================================================================
   VibeInYou-style homepage + header/footer refinements (v1.1)
   ===================================================================== */
:root { --spm-band: #f4ffe6; }
.spm-site { --spm-body: #1a1a1a; }

/* header: logo left, small nav + search right, no border */
.spm-header { border-bottom: 0; }
.spm-header-inner { min-height: 72px; }
.spm-nav { flex: 1 1 auto; }
.spm-menu { justify-content: flex-end; gap: 4px 30px; }
.spm-menu a { font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; padding: 6px 0; }
.spm-logo-text { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-family: var(--spm-sans); }

/* bands */
.spm-band { background: var(--spm-band); }
.spm-band--top { padding: 8px 0 40px; }
.spm-block { padding-top: 36px; padding-bottom: 12px; }
.spm-band .spm-block { padding-top: 36px; padding-bottom: 40px; }
.spm-h-title { font-family: var(--spm-sans); font-size: 22px; font-weight: 700; margin: 0 0 20px; padding: 0 0 12px; border-bottom: 1px solid var(--spm-line); line-height: 1.2; }
.spm-band .spm-h-title { border-bottom-color: #dfeccc; }
.spm-h-hero .spm-h-title { border-bottom: 0; padding-bottom: 0; }
.spm-h-title--ghost { visibility: hidden; }

/* meta line */
.spm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 6px; font-size: 11px; line-height: 1.4; position: relative; z-index: 2; }
.spm-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; color: var(--spm-ink); }
.spm-tag:hover { color: var(--spm-accent); }
.spm-by { color: var(--spm-muted); font-size: 11.5px; }

/* stack (image on top) */
.spm-stack { margin: 0 0 22px; min-width: 0; }
.spm-stack-media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #e8efe0; margin-bottom: 10px; }
.spm-stack-media img, .spm-row-media img, .spm-side-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spm-stack-title { font-family: var(--spm-sans); font-size: 17px; font-weight: 700; line-height: 1.3; margin: 0; }
.spm-stack-title a, .spm-row-title a, .spm-side-title a { color: var(--spm-ink); text-decoration: none; }
.spm-stack-title a:hover, .spm-row-title a:hover, .spm-side-title a:hover { color: var(--spm-accent); }
.spm-ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #e9efe0, #d8e3c9); }

/* small rows */
.spm-rows { display: flex; flex-direction: column; gap: 14px; }
.spm-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: start; margin: 0; }
.spm-row-media { display: block; width: 64px; height: 64px; overflow: hidden; background: #e8efe0; }
.spm-row-title { font-family: var(--spm-sans); font-size: 13.5px; font-weight: 700; line-height: 1.3; margin: 0; }
.spm-row-excerpt { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: #4b4741; }

/* hero band: 3 columns */
.spm-h-hero { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 36px; padding-top: 28px; align-items: start; }
.spm-h-col { min-width: 0; }
.spm-stacks { display: flex; flex-direction: column; }
.spm-stacks .spm-stack-media { aspect-ratio: 16 / 10; }
.spm-sides { display: flex; flex-direction: column; gap: 26px; padding-top: 0; }
.spm-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; margin: 0; }
.spm-side-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e8efe0; order: 2; }
.spm-side-title { font-family: var(--spm-sans); font-size: 20px; font-weight: 700; line-height: 1.25; margin: 0 0 8px; }
.spm-side-excerpt { margin: 0 0 4px; font-size: 13px; line-height: 1.5; color: #4b4741; }

/* overlay cards */
.spm-ov { position: relative; overflow: hidden; background: #26302a; color: #fff; isolation: isolate; margin: 0; min-width: 0; }
.spm-ov-img { position: absolute; inset: 0; z-index: -2; }
.spm-ov-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spm-ov::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.15) 55%, rgba(0,0,0,.35) 100%); }
.spm-ov-top { position: absolute; top: 12px; left: 14px; right: 14px; }
.spm-ov-top .spm-meta { margin: 0; }
.spm-ov .spm-tag, .spm-ov .spm-by { color: #fff; }
.spm-ov .spm-tag { text-decoration-color: rgba(255,255,255,.7); }
.spm-ov-title { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 16px; font-family: var(--spm-sans); font-size: 20px; line-height: 1.25; font-weight: 700; z-index: 1; }
.spm-ov-title a { color: #fff; text-decoration: none; }
.spm-ov-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.spm-ov .spm-meta a { position: relative; z-index: 3; }
.spm-ov--wide { aspect-ratio: 16 / 9; }
.spm-ov--portrait { aspect-ratio: 4 / 5; }
.spm-ov--tall { aspect-ratio: 1 / 1; height: 100%; }
.spm-ov--tall .spm-ov-title { font-size: 26px; }

/* slider */
.spm-slider { position: relative; margin-top: 36px; padding: 0 0 26px; }
.spm-slider-track { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.spm-slider-track::-webkit-scrollbar { display: none; }
.spm-slide { flex: 0 0 33.3333%; padding: 0 0.5px; scroll-snap-align: start; box-sizing: border-box; }
.spm-slide .spm-ov { height: 100%; }
.spm-slider-btn { position: absolute; top: calc(50% - 20px); z-index: 5; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.spm-slider-btn:hover { background: #000; }
.spm-slider-prev { left: 8px; } .spm-slider-next { right: 8px; }
.spm-slider-dots { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 8px; }
.spm-slider-dots span { width: 7px; height: 7px; border-radius: 50%; background: #c6d4b0; display: block; }
.spm-slider-dots span.is-active { background: #1a1a1a; }

/* grids */
.spm-g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
.spm-g4--ov { gap: 14px; }
.spm-g4--rows { gap: 22px 28px; }
.spm-g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.spm-g2--rows { margin-top: 28px; gap: 26px 32px; }
.spm-g2--rows .spm-row { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
.spm-g2--rows .spm-row-media { width: 120px; height: 90px; }
.spm-g2--rows .spm-row-title { font-size: 16px; }

/* Don't Miss */
.spm-h-disc { display: grid; grid-template-columns: 2.1fr 1.1fr 1fr; gap: 28px; align-items: stretch; }
.spm-disc-mid { display: flex; flex-direction: column; gap: 18px; }
.spm-disc-mid .spm-stack { margin: 0; }

.spm-viewall { text-align: center; padding-top: 36px; padding-bottom: 8px; }
.spm-cat-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.spm-cat-grid--6 .spm-cat-card { min-height: 130px; padding: 14px; }
.spm-cat-grid--6 .spm-cat-card-name { font-size: 19px; font-family: var(--spm-sans); }

/* footer: white, black top rule, like the reference */
.spm-footer { background: #fff; border-top: 3px solid #111; margin-top: 56px; color: #333; }
.spm-footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
.spm-footer-bottom { border-top: 0; }
.spm-footer-bottom-inner { justify-content: center; text-align: center; gap: 6px 28px; }
.spm-footer .spm-logo-text { font-size: 30px; font-weight: 800; }

/* ----- responsive ----- */
@media (max-width: 1100px) {
	.spm-h-hero { grid-template-columns: 1fr 1fr; }
	.spm-h-right { grid-column: 1 / -1; }
	.spm-sides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
	.spm-side { grid-template-columns: 1fr; }
	.spm-side-media { order: -1; }
	.spm-h-title--ghost { display: none; }
	.spm-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.spm-h-disc { grid-template-columns: 1fr 1fr; }
	.spm-disc-big { grid-column: 1 / -1; }
	.spm-ov--tall { aspect-ratio: 16 / 10; height: auto; }
	.spm-slide { flex-basis: 50%; }
	.spm-cat-grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.spm-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
	.spm-menu { justify-content: flex-start; }
	.spm-menu a { font-size: 15px; }
}
@media (max-width: 640px) {
	.spm-h-hero { grid-template-columns: 1fr; gap: 28px; padding-top: 20px; }
	.spm-sides { display: flex; flex-direction: column; gap: 22px; }
	.spm-side { grid-template-columns: minmax(0, 1fr) 120px; gap: 14px; }
	.spm-side-media { order: 2; aspect-ratio: 1 / 1; }
	.spm-side-title { font-size: 17px; }
	.spm-side-excerpt { display: none; }
	.spm-g4--ov, .spm-g4--top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.spm-g4--rows { grid-template-columns: 1fr; }
	#top-picks .spm-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
	#top-picks .spm-stack-title { font-size: 14px; }
	.spm-h-disc { grid-template-columns: 1fr; }
	.spm-g2 { grid-template-columns: 1fr; }
	.spm-g2--rows { grid-template-columns: 1fr; }
	.spm-g2--rows .spm-row { grid-template-columns: 96px minmax(0, 1fr); }
	.spm-g2--rows .spm-row-media { width: 96px; height: 76px; }
	.spm-slide { flex-basis: 88%; }
	.spm-slider-btn { display: none; }
	.spm-ov-title { font-size: 17px; }
	.spm-ov--tall .spm-ov-title { font-size: 22px; }
	.spm-cat-grid--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.spm-footer-grid { grid-template-columns: 1fr 1fr; }
	.spm-footer-brand { grid-column: 1 / -1; }
}

.spm-site .spm-logo-text, .spm-site .spm-logo-link { color: var(--spm-ink); }
@media (max-width: 640px) {
	.spm-logo-text { font-size: 22px; white-space: nowrap; }
	.spm-logo { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
