/*
Theme Name: Yoyi Reviews
Theme URI: https://yoyi.pro/
Author: yoyi.pro
Description: Clean review blog theme for Amazon affiliate content — star ratings, pros & cons, "Check price on Amazon" buttons, photo galleries and video embeds, with automatic affiliate disclosure.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: yoyi-reviews
*/

:root {
	--bg: #fbfaf7;
	--surface: #ffffff;
	--text: #1f2328;
	--muted: #5f6670;
	--line: #e7e3da;
	--accent: #e8590c;
	--accent-dark: #c2410c;
	--amazon: #ffb703;
	--amazon-dark: #f59f00;
	--star: #f59f00;
	--good: #2b8a3e;
	--bad: #c92a2a;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.06);
	--wrap: 1140px;
	--read: 740px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--serif: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 17px/1.65 var(--font);
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--accent-dark); }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.25; margin: 1.6em 0 .6em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; width: auto; height: auto; clip: auto; background: #fff; padding: 8px 12px; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.brand img { max-height: 44px; width: auto; }
.brand .dot { color: var(--accent); }
.tagline { color: var(--muted); font-size: .85rem; margin: 0; }
.nav-toggle { margin-left: auto; display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 1rem; cursor: pointer; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-cat > a { background: #fff1e6; color: var(--accent-dark); }
.main-nav .sub-menu { display: none; }
.header-search { display: flex; }
.header-search input { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: .9rem; width: 180px; background: var(--bg); }

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.main-nav, .header-search { display: none; width: 100%; margin: 0; }
	.site-header.open .main-nav, .site-header.open .header-search { display: block; }
	.main-nav ul { flex-direction: column; padding-bottom: 8px; }
	.header-search { padding-bottom: 14px; }
	.header-search input { width: 100%; }
}

/* ---------- Disclosure bar ---------- */
.disclosure-bar { background: #fff8db; border-bottom: 1px solid #f3e3a0; font-size: .82rem; color: #6b5900; text-align: center; padding: 6px 16px; }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 24px; }
.hero h1 { margin: 0 0 8px; }
.hero p { color: var(--muted); font-size: 1.1rem; margin: 0; max-width: 640px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.cat-chips a { display: inline-block; padding: 6px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); font-size: .9rem; font-weight: 600; }
.cat-chips a:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ---------- Cards grid ---------- */
.section-title { font-size: 1.3rem; margin: 32px 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-bottom: 40px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s ease; }
.card:hover { transform: translateY(-3px); }
.card-thumb { display: block; aspect-ratio: 4 / 3; background: #f1ede4; overflow: hidden; position: relative; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-thumb .noimg { display: flex; height: 100%; align-items: center; justify-content: center; font-size: 2.5rem; color: #cfc8b8; }
.badge-video { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.72); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.badge-score { position: absolute; top: 10px; right: 10px; background: var(--surface); color: var(--text); font-size: .8rem; font-weight: 800; padding: 4px 9px; border-radius: 999px; box-shadow: var(--shadow); }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-dark); text-decoration: none; }
.card h2, .card h3 { font-size: 1.12rem; margin: 0; }
.card h2 a, .card h3 a { color: var(--text); text-decoration: none; }
.card h2 a:hover, .card h3 a:hover { color: var(--accent-dark); }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }
.card .btn-amazon { margin-top: auto; align-self: flex-start; }

/* ---------- Stars ---------- */
.stars { --pct: 0%; display: inline-block; font-size: 1.05rem; line-height: 1; letter-spacing: 2px; background: linear-gradient(90deg, var(--star) var(--pct), #d9d4c7 var(--pct)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rating-line { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.rating-line strong { color: var(--text); }

/* ---------- Buttons ---------- */
.btn-amazon, .wp-block-button.is-style-amazon .wp-block-button__link {
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--amazon); color: #111 !important; text-decoration: none;
	font-weight: 800; padding: 11px 20px; border-radius: 999px; border: 0;
	box-shadow: 0 2px 0 var(--amazon-dark); font-size: .95rem;
}
.btn-amazon:hover, .wp-block-button.is-style-amazon .wp-block-button__link:hover { background: var(--amazon-dark); color: #111; }
.btn-amazon.big { font-size: 1.1rem; padding: 14px 28px; }

/* ---------- Single review ---------- */
.single-wrap { max-width: var(--read); margin: 0 auto; padding: 0 20px; }
.entry-header { padding: 36px 0 8px; }
.entry-header h1 { margin: 6px 0 12px; }
.entry-meta { color: var(--muted); font-size: .9rem; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.entry-hero { margin: 20px auto; max-width: 980px; padding: 0 20px; }
.entry-hero img { width: 100%; border-radius: var(--radius); display: block; }
.entry-content { font-size: 1.07rem; }
.entry-content > * { margin-top: 0; margin-bottom: 1.2em; }
.entry-content blockquote { border-left: 4px solid var(--accent); margin-left: 0; padding: 4px 18px; color: var(--muted); font-style: italic; }
.entry-content .wp-block-embed, .entry-content .wp-block-video { margin: 1.6em 0; }
.entry-content .wp-block-embed__wrapper iframe, .entry-content iframe[src*="youtube"], .entry-content iframe[src*="vimeo"] { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: var(--radius); }
.entry-content video { border-radius: var(--radius); width: 100%; }
.entry-content .wp-block-gallery img, .entry-content .gallery img { border-radius: 10px; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px; text-align: left; }
.entry-content th { background: #f6f3ec; }

.inline-disclosure { font-size: .82rem; color: var(--muted); background: #f6f3ec; border-radius: 10px; padding: 10px 14px; margin: 0 0 24px; }

/* Verdict box */
.verdict { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin: 8px 0 30px; display: grid; gap: 18px; }
.verdict-top { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.score { width: 84px; height: 84px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 1.7rem; line-height: 1; flex: none; }
.score small { font-size: .65rem; font-weight: 600; opacity: .9; margin-top: 4px; }
.verdict-title { margin: 0 0 4px; font-size: 1.15rem; }
.verdict-summary { margin: 0; color: var(--muted); }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.proscons h3 { margin: 0 0 8px; font-size: 1rem; }
.proscons ul { margin: 0; padding: 0; list-style: none; }
.proscons li { padding: 4px 0 4px 26px; position: relative; font-size: .97rem; }
.pros li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 800; }
.cons li::before { content: "✕"; position: absolute; left: 0; color: var(--bad); font-weight: 800; }
.pros h3 { color: var(--good); }
.cons h3 { color: var(--bad); }
.verdict-cta { display: flex; justify-content: center; }
@media (max-width: 600px) { .proscons { grid-template-columns: 1fr; } }

/* Product box shortcode */
.product-box { display: flex; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 1.6em 0; flex-wrap: wrap; }
.product-box img { width: 120px; height: 120px; object-fit: contain; border-radius: 10px; background: #fff; }
.product-box .pb-body { flex: 1; min-width: 200px; }
.product-box .pb-title { font-weight: 800; margin: 0 0 6px; }

.entry-footer { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 18px; font-size: .9rem; color: var(--muted); }
.tags a { display: inline-block; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; margin: 0 6px 6px 0; text-decoration: none; color: var(--muted); font-size: .82rem; }

.related { max-width: var(--wrap); margin: 40px auto 0; padding: 0 20px; }

/* Pages */
.page-wrap { max-width: var(--read); margin: 0 auto; padding: 36px 20px 60px; }

/* Archive header */
.archive-header { padding: 40px 0 8px; }
.archive-header h1 { margin: 0 0 6px; }
.archive-header p { color: var(--muted); margin: 0; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 10px 0 50px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Comments */
.comments-area { max-width: var(--read); margin: 40px auto; padding: 0 20px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { background: var(--surface); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; }
.comment-form .submit { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 10px 22px; font-weight: 700; cursor: pointer; }

/* Footer */
.site-footer { background: #1f2328; color: #c9cdd2; margin-top: 60px; padding: 40px 0 28px; font-size: .9rem; }
.site-footer a { color: #fff; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.footer-cols h4 { color: #fff; margin: 0 0 10px; font-size: 1rem; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin: 4px 0; }
.footer-disclosure { border-top: 1px solid #343a40; margin-top: 28px; padding-top: 18px; font-size: .8rem; color: #9aa0a6; }

/* 404 / empty */
.empty { text-align: center; padding: 70px 20px; }

/* WP core alignment */
.alignwide { max-width: 980px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); text-align: center; }
