/*
Theme Name: FetchIt
Theme URI: https://fetchit.shop
Author: FetchIt
Description: Custom theme for the FetchIt shopping decision engine — homepage, category and product chrome designed around the FetchIt Decision Engine plugin.
Version: 1.1.3
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: fetchit-theme
*/

:root {
	--sde-brand-black: #14161a;
	--sde-brand-green: #1f8a3b;
	--sde-brand-green-dark: #14602a;
	--sde-brand-green-light: #e5f6ea;
	--sde-brand-yellow: #ffc60a;
	--sde-text: #1c1c1e;
	--sde-muted: #6b7280;
	--sde-border: #e5e7eb;
	--sde-bg-soft: #f7f8f9;
	--sde-danger: #d63638;
	--sde-radius: 10px;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--sde-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.ft-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.ft-topbar { border-bottom: 1px solid var(--sde-border); padding: 14px 0; }
.ft-topbar-inner { display: flex; align-items: center; gap: 24px; }
.ft-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; text-decoration: none; color: var(--sde-text); flex-shrink: 0; }
.ft-logo .ft-logo-icon { color: var(--sde-brand-yellow); font-size: 22px; }
.ft-logo .ft-logo-sub { display: block; font-size: 10px; font-weight: 500; color: var(--sde-muted); }

.ft-search-form { flex: 1; display: flex; align-items: center; gap: 8px; max-width: 640px; }
.ft-search-form input[type="search"] {
	flex: 1; padding: 10px 14px; border: 1px solid var(--sde-border); border-radius: 6px; font-size: 14px;
}
.ft-search-form button { white-space: nowrap; }
.ft-paste-link { display: inline-flex; align-items: center; gap: 6px; }

.ft-topbar-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; font-size: 12px; color: var(--sde-muted); }
.ft-topbar-actions a { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--sde-muted); }
.ft-topbar-actions .ft-icon { font-size: 16px; }

/* ---------- Nav bar ---------- */
.ft-navbar { background: var(--sde-brand-green); }
.ft-navbar-inner { display: flex; align-items: center; justify-content: space-between; }
.ft-nav { display: flex; flex-wrap: wrap; gap: 26px; padding: 12px 0; }
.ft-nav a { color: #fff; text-decoration: none; font-size: 14px; font-weight: 500; opacity: .95; position: relative; }
.ft-nav a::after { content:''; display:block; height:2px; background:#fff; transform:scaleX(0); transition:transform .2s ease; transform-origin:left; margin-top:2px; }
.ft-nav a:hover { opacity: 1; }
.ft-nav a:hover::after { transform:scaleX(1); }
.ft-nav-cta {
	background: var(--sde-brand-yellow); color: var(--sde-brand-black) !important; font-weight: 700 !important;
	padding: 7px 16px; border-radius: 20px; opacity: 1 !important; text-decoration: none !important;
	white-space: nowrap; transition: transform .15s ease, box-shadow .15s ease !important;
}
.ft-nav-cta:hover { transform:translateY(-1px); box-shadow:0 4px 12px rgba(255,198,10,.4); }
.ft-nav-cta::after { display:none !important; }

/* ---------- Buttons ---------- */
.ft-btn { display: inline-block; padding: 10px 18px; border-radius: 6px; font-weight: 600; font-size: 14px; text-decoration: none; text-align: center; cursor: pointer; border: none; }
.ft-btn-cta { background: var(--sde-brand-yellow); color: var(--sde-brand-black); transition: background .18s, transform .15s, box-shadow .18s; }
.ft-btn-cta:hover { background: #f0b900; transform:translateY(-2px); box-shadow:0 7px 20px rgba(255,198,10,.35); }
.ft-btn-green { background: var(--sde-brand-green); color: #fff; transition: background .18s, transform .15s, box-shadow .18s; }
.ft-btn-green:hover { background: var(--sde-brand-green-dark); transform:translateY(-2px); box-shadow:0 7px 20px rgba(31,138,59,.28); }
.ft-btn-lg { padding: 14px 28px; font-size: 16px; }
.ft-btn-outline { background: transparent; border: 1px solid var(--sde-border); color: var(--sde-text); }

/* ---------- Hero ---------- */
.ft-hero { padding: 56px 0; }
.ft-hero-inner { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media (min-width: 900px) { .ft-hero-inner { grid-template-columns: 1.1fr 1fr; } }

.ft-hero h1 { font-size: 44px; line-height: 1.15; margin: 0 0 18px; font-weight: 800; }
.ft-hero h1 .ft-accent { color: var(--sde-brand-green); position: relative; display: inline-block; }
.ft-hero h1 .ft-accent::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 4px; background: var(--sde-brand-yellow); border-radius: 2px;
}
.ft-hero-sub { font-size: 16px; color: var(--sde-muted); max-width: 480px; margin-bottom: 24px; }

.ft-trust-badges { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 24px; }
.ft-trust-badge { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; transition: transform .18s ease; }
.ft-trust-badge:hover { transform: translateY(-2px); }
.ft-trust-badge .ft-check { width: 24px; height: 24px; border-radius: 50%; background: var(--sde-brand-green-light); color: var(--sde-brand-green); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }

.ft-hero-search { display: flex; gap: 10px; background: #fff; border: 1px solid var(--sde-border); border-radius: 40px; padding: 6px 6px 6px 18px; margin-bottom: 28px; max-width: 560px; box-shadow: 0 4px 16px rgba(0,0,0,.05); }
.ft-hero-search input { flex: 1; border: none; outline: none; font-size: 14px; font-family: inherit; }
.ft-hero-search button { border-radius: 30px; }

.ft-steps { display: flex; flex-wrap: wrap; gap: 28px; }
.ft-step { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--sde-muted); }
.ft-step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--sde-bg-soft); border: 1px solid var(--sde-border); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--sde-text); flex-shrink: 0; }

/* Hero visual */
.ft-hero-visual { position: relative; aspect-ratio: 1.1/1; border-radius: 32px; background: radial-gradient(circle at 30% 30%, #eafff0, #f4f7f2 60%, #fff); overflow: hidden; }
.ft-hero-visual::before {
	content: ""; position: absolute; inset: 12%; border-radius: 24px;
	background: linear-gradient(135deg, var(--sde-brand-black), #2c3440 60%, var(--sde-brand-green-dark));
	box-shadow: 0 30px 60px rgba(0,0,0,.18);
}
.ft-hero-visual .ft-ribbon {
	position: absolute; top: 8%; left: 8%; background: var(--sde-brand-black); color: #fff; padding: 12px 18px; border-radius: 12px;
	font-size: 12px; font-weight: 700; text-align: center; box-shadow: 0 10px 24px rgba(0,0,0,.2); z-index: 2;
}
.ft-hero-visual .ft-ribbon .ft-ribbon-big { display: block; font-size: 26px; color: var(--sde-brand-yellow); margin: 2px 0; }
.ft-hero-visual .ft-tag {
	position: absolute; background: #fff; padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 700;
	box-shadow: 0 8px 20px rgba(0,0,0,.12); z-index: 2; display: flex; align-items: center; gap: 6px;
}
.ft-hero-visual .ft-tag.ft-tag-1 { top: 22%; right: 6%; color: var(--sde-brand-green-dark); }
.ft-hero-visual .ft-tag.ft-tag-2 { bottom: 14%; left: 10%; color: var(--sde-brand-green-dark); }
.ft-hero-visual .ft-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sde-brand-green); display: inline-block; }

/* ---------- Stats bar ---------- */
.ft-stats { background: var(--sde-brand-black); color: #fff; padding: 26px 0; margin: 40px 0; }
.ft-stats-inner { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; text-align: center; }
@media (min-width: 760px) { .ft-stats-inner { grid-template-columns: repeat(5, 1fr); } }
.ft-stats-inner > div { display: flex; flex-direction: column; align-items: center; }
.ft-stat-icon { display: flex; justify-content: center; align-items: center; margin-bottom: 8px; }
.ft-stat-icon svg { width: 26px; height: 26px; color: var(--sde-brand-yellow); }
.ft-stat-num { font-size: 22px; font-weight: 800; color: var(--sde-brand-yellow); }
.ft-stat-label { font-size: 12px; color: #c7cbd1; margin-top: 4px; }

/* ---------- Section headings ---------- */
.ft-section { padding: 40px 0; }
.ft-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.ft-section-head h2 { font-size: 26px; margin: 0; }
.ft-section-head h2 .ft-accent { color: var(--sde-brand-green); }
.ft-section-head a { font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid var(--sde-border); padding: 8px 14px; border-radius: 6px; transition: background .18s; }
.ft-section-head a:hover { background: var(--sde-bg-soft); }

/* ---------- Featured comparison ---------- */
.ft-compare-wrap { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) { .ft-compare-wrap { grid-template-columns: 220px 1fr; } }
.ft-compare-product { text-align: center; }
.ft-compare-product .ft-thumb { background: var(--sde-bg-soft); border-radius: var(--sde-radius); aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; overflow: hidden; }
.ft-compare-product h3 { font-size: 16px; margin: 0 0 4px; }
.ft-compare-product .ft-rating { font-size: 12px; color: var(--sde-muted); }
.ft-compare-product .ft-variant { font-size: 12px; color: var(--sde-muted); }

.ft-compare-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px) { .ft-compare-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .ft-compare-grid { grid-template-columns: repeat(5, 1fr); } }

.ft-compare-card { border: 1px solid var(--sde-border); border-radius: var(--sde-radius); padding: 16px; position: relative; background: #fff; transition: box-shadow .22s ease, transform .22s ease; }
.ft-compare-card:hover { transform:translateY(-4px); box-shadow:0 12px 28px rgba(0,0,0,.09); }
.ft-compare-card.is-best { border-color: var(--sde-brand-green); box-shadow: 0 0 0 1px var(--sde-brand-green); }
.ft-compare-card .ft-best-ribbon {
	position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--sde-brand-green); color: #fff;
	font-size: 10px; font-weight: 800; text-transform: uppercase; padding: 3px 10px; border-radius: 10px; white-space: nowrap;
}
.ft-retailer-logo { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-bottom: 10px; }
.ft-rl { max-height: 38px; width: auto; overflow: visible; display: block; }
.ft-rl-rdigital { text-align: center; line-height: 1.3; }
.ft-rl-rdigital .rd-r { display: block; font-size: 13px; font-weight: 800; color: #003087; letter-spacing: .5px; font-family: inherit; }
.ft-rl-rdigital .rd-d { display: block; font-size: 10px; font-weight: 700; color: #e20012; letter-spacing: 1.5px; text-transform: uppercase; font-family: inherit; }
.ft-rl-default { font-size: 13px; font-weight: 700; color: var(--sde-text); }
.ft-compare-card .ft-price-now { font-size: 20px; font-weight: 800; }
.ft-compare-card .ft-price-was { font-size: 12px; color: var(--sde-muted); text-decoration: line-through; margin-left: 6px; }
.ft-compare-card .ft-save { color: var(--sde-brand-green); font-size: 12px; font-weight: 700; margin: 4px 0 12px; }
.ft-compare-card .ft-line { font-size: 12px; color: var(--sde-muted); margin-bottom: 6px; }
.ft-compare-card .ft-line strong { color: var(--sde-text); }
.ft-compare-card .ft-stock { font-size: 12px; font-weight: 700; color: var(--sde-brand-green); margin-bottom: 10px; }
.ft-compare-card .ft-btn { width: 100%; }
.ft-compare-footnote { font-size: 12px; color: var(--sde-muted); margin-top: 16px; }

/* ---------- Savings banner ---------- */
.ft-savings-banner { display: grid; grid-template-columns: 1fr; gap: 14px; background: var(--sde-brand-green-light); border-radius: var(--sde-radius); padding: 20px; margin: 40px 0; }
@media (min-width: 900px) { .ft-savings-banner { grid-template-columns: 1.2fr repeat(3, 1fr) auto; } }
.ft-savings-headline { display: flex; align-items: center; gap: 12px; }
.ft-savings-headline .ft-icon-circle { width: 44px; height: 44px; border-radius: 50%; background: var(--sde-brand-green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.ft-savings-headline strong { display: block; font-size: 16px; }
.ft-savings-headline span { font-size: 12px; color: var(--sde-muted); }
.ft-bank-chip { background: #fff; border-radius: 8px; padding: 12px 14px; font-size: 12px; display: flex; align-items: center; gap: 10px; transition: box-shadow .2s ease; }
.ft-bank-chip:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.ft-bank-chip .ft-bank-logo { width: 30px; height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11px; color: #fff; flex-shrink: 0; }
.ft-bank-chip strong { display: block; }
.ft-more-offers { background: var(--sde-brand-black); color: #fff; border-radius: 8px; padding: 12px 14px; font-size: 12px; }
.ft-more-offers a { color: var(--sde-brand-yellow); font-weight: 700; text-decoration: none; display: block; margin-top: 4px; }

/* ---------- Best deals grid ---------- */
.ft-deals-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (min-width: 700px) { .ft-deals-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .ft-deals-grid { grid-template-columns: repeat(5, 1fr); } }

.ft-deal-card { border: 1px solid var(--sde-border); border-radius: var(--sde-radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; text-decoration: none; color: var(--sde-text); transition: box-shadow .22s ease, transform .22s ease; }
.ft-deal-card:hover { transform:translateY(-5px); box-shadow:0 14px 32px rgba(0,0,0,.1); }
.ft-deal-media { position: relative; aspect-ratio: 1/1; background: var(--sde-bg-soft); }
.ft-deal-media img { width: 100%; height: 100%; object-fit: contain; }
.ft-off-ribbon { position: absolute; top: 8px; left: 8px; background: var(--sde-brand-green); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 6px; }
.ft-deal-body { padding: 12px 14px 16px; flex: 1; }
.ft-deal-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; line-height: 1.3; min-height: 34px; }
.ft-deal-price strong { font-size: 16px; }
.ft-deal-retailer { font-size: 12px; color: var(--sde-muted); margin-top: 4px; }

/* ---------- Footer trust section ---------- */
.ft-trust-section { background: var(--sde-brand-black); color: #fff; padding: 40px 0; }
.ft-trust-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 760px) { .ft-trust-grid { grid-template-columns: repeat(4, 1fr); } }
.ft-trust-item { display: flex; align-items: flex-start; gap: 12px; }
.ft-trust-item .ft-icon-circle { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--sde-brand-green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ft-trust-item strong { display: block; font-size: 14px; }
.ft-trust-item span { font-size: 12px; color: #9aa0a8; }

/* ---------- Newsletter bar ---------- */
.ft-newsletter { background: var(--sde-brand-yellow); padding: 24px 0; }
.ft-newsletter-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between; }
.ft-newsletter-copy strong { display: block; font-size: 16px; }
.ft-newsletter-copy span { font-size: 12px; color: #5a4600; }
.ft-newsletter-form { display: flex; gap: 10px; flex: 1; max-width: 480px; }
.ft-newsletter-form input { flex: 1; padding: 10px 14px; border: none; border-radius: 6px; font-size: 14px; font-family: inherit; }
.ft-newsletter-note { font-size: 11px; color: #5a4600; }

/* ---------- Footer bottom ---------- */
.ft-footer-bottom { text-align: center; padding: 22px 0; font-size: 13px; color: var(--sde-muted); }
.ft-footer-bottom .ft-stars { color: var(--sde-brand-yellow); margin: 0 8px; }

/* ---------- Responsive nav toggle ---------- */
.ft-nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; }
@media (max-width: 760px) {
	.ft-nav-toggle { display: block; }
	.ft-nav { display: none; flex-direction: column; gap: 12px; width: 100%; }
	.ft-nav.is-open { display: flex; }
	.ft-navbar-inner { flex-wrap: wrap; padding: 10px 0; }
	.ft-hero h1 { font-size: 32px; }
	.ft-topbar-inner { flex-wrap: wrap; }
	.ft-search-form { order: 3; width: 100%; max-width: none; }
}

/* ---------- Keyframe animations ---------- */
@keyframes ft-fadeInUp    { from { opacity:0; transform:translateY(28px); } to { opacity:1; transform:translateY(0); } }
@keyframes ft-fadeInLeft  { from { opacity:0; transform:translateX(-36px);} to { opacity:1; transform:translateX(0); } }
@keyframes ft-fadeInRight { from { opacity:0; transform:translateX(36px); } to { opacity:1; transform:translateX(0); } }
@keyframes ft-pulse       { 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.06); } }
@keyframes ft-float       { 0%,100%{ transform:translateY(0); }  50%{ transform:translateY(-8px); } }
@keyframes ft-dotBlink    { 0%,100%{ opacity:1; } 50%{ opacity:.25; } }

/* Hero entry */
.ft-hero-copy  { animation: ft-fadeInLeft  .65s ease both; }
.ft-hero-visual { animation: ft-fadeInRight .65s .12s ease both; }

/* Hero floating elements */
.ft-ribbon       { animation: ft-pulse   2.8s ease-in-out infinite; }
.ft-tag.ft-tag-1 { animation: ft-float   3.2s ease-in-out infinite; }
.ft-tag.ft-tag-2 { animation: ft-float   3.8s ease-in-out infinite .5s; }
.ft-tag .dot     { animation: ft-dotBlink 1.6s ease-in-out infinite; }

/* Scroll-triggered animations */
[data-anim] { opacity:0; transform:translateY(24px); transition: opacity .5s ease, transform .5s ease; }
[data-anim].is-vis { opacity:1; transform:none; }

/* Stagger children */
[data-stagger] > * { opacity:0; transform:translateY(18px); transition: opacity .4s ease, transform .4s ease; }
[data-stagger].is-vis > * { opacity:1; transform:none; }
[data-stagger].is-vis > *:nth-child(1) { transition-delay:.05s; }
[data-stagger].is-vis > *:nth-child(2) { transition-delay:.11s; }
[data-stagger].is-vis > *:nth-child(3) { transition-delay:.17s; }
[data-stagger].is-vis > *:nth-child(4) { transition-delay:.23s; }
[data-stagger].is-vis > *:nth-child(5) { transition-delay:.29s; }
[data-stagger].is-vis > *:nth-child(6) { transition-delay:.35s; }

/* Stats entry stagger */
.ft-stats-inner > *:nth-child(1) { animation: ft-fadeInUp .5s .08s ease both; }
.ft-stats-inner > *:nth-child(2) { animation: ft-fadeInUp .5s .16s ease both; }
.ft-stats-inner > *:nth-child(3) { animation: ft-fadeInUp .5s .24s ease both; }
.ft-stats-inner > *:nth-child(4) { animation: ft-fadeInUp .5s .32s ease both; }
.ft-stats-inner > *:nth-child(5) { animation: ft-fadeInUp .5s .40s ease both; }