/*
Theme Name: Sale100（セール100選ブログ）
Description: Amazonのセール商品を毎日紹介するブログ向けの軽量テーマ。トップページに「今日のセール人気100選」を表示し、PR表記・アソシエイト表記を自動で入れます。外観 → Sale100 セットアップ からサンプルサイトを1クリックで作成できます。
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: sale100
*/

:root {
	--c-text: #1f2328;
	--c-sub: #5b6470;
	--c-mute: #8a929c;
	--c-line: #e6e8eb;
	--c-bg: #f5f6f8;
	--c-card: #ffffff;
	--c-accent: #e8590c;
	--c-accent-soft: #fff1e7;
	--c-sale: #cc0c39;
	--c-navy: #1c2a44;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
	--font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
	--w-container: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.8;
	word-wrap: break-word;
}
img { max-width: 100%; height: auto; }
a { color: #0b63c5; }
a:hover { color: var(--c-accent); }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
	background: #fff; padding: 8px 12px; border-radius: 6px; box-shadow: var(--shadow);
}
.container { max-width: var(--w-container); margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--c-line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 10px; }
.site-brand { display: flex; align-items: center; gap: 10px; color: var(--c-navy); text-decoration: none; min-width: 0; }
.site-brand:hover { color: var(--c-navy); }
.brand-mark {
	flex: 0 0 38px; height: 38px; border-radius: 10px;
	background: linear-gradient(135deg, #ff8a3d, var(--c-accent));
	color: #fff; font-weight: 800; font-size: 20px; line-height: 38px; text-align: center;
	box-shadow: 0 2px 6px rgba(232, 89, 12, .35);
}
.custom-logo { max-height: 44px; width: auto; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.site-title { font-size: 20px; font-weight: 800; line-height: 1.3; letter-spacing: .02em; }
.site-tagline { font-size: 12px; color: var(--c-sub); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-search { flex: 0 1 260px; }
.header-search .search-form { display: flex; }
.header-search input[type="search"] {
	width: 100%; border: 1px solid var(--c-line); border-radius: 999px; padding: 7px 14px;
	font: inherit; font-size: 14px; background: var(--c-bg);
}
.header-search .search-submit { display: none; }

.global-nav { border-top: 1px solid #f0f1f3; }
.global-nav ul {
	list-style: none; margin: 0; padding: 0; display: flex; gap: 4px;
	overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.global-nav ul::-webkit-scrollbar { display: none; }
.global-nav li { flex: 0 0 auto; }
.global-nav a {
	display: block; padding: 10px 12px; color: var(--c-text); text-decoration: none;
	font-size: 14px; font-weight: 600; border-bottom: 3px solid transparent;
}
.global-nav a:hover, .global-nav .current-menu-item > a { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.global-nav .sub-menu { display: none; }

.update-bar { background: var(--c-navy); color: #dfe6f3; font-size: 13px; }
.update-bar .container { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding-top: 7px; padding-bottom: 7px; }
.update-bar .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; margin-right: 6px; box-shadow: 0 0 0 3px rgba(61, 220, 132, .2); }
.update-bar a { color: #fff; font-weight: 700; text-decoration: none; margin-left: auto; }
.update-bar a:hover { text-decoration: underline; color: #fff; }

/* ---------- Layout ---------- */
.site-main-wrap { padding: 20px 0 48px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 1024px) {
	.layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; }
	.header-inner { padding-top: 18px; padding-bottom: 14px; }
}
.main { min-width: 0; }
.panel { background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow); }
.entry { padding: 20px 16px 28px; }
@media (min-width: 640px) { .entry { padding: 32px 36px 40px; } }

/* ---------- Hero（トップ・100選ページ） ---------- */
.hero {
	background:
		radial-gradient(circle at 90% -20%, rgba(255, 255, 255, .18) 0, transparent 45%),
		linear-gradient(120deg, #e8590c 0%, #f08c00 55%, #f5a524 100%);
	color: #fff;
}
.hero .container { padding-top: 26px; padding-bottom: 28px; }
.hero-label {
	display: inline-block; margin: 0 0 8px; padding: 2px 10px; border-radius: 999px;
	background: rgba(255, 255, 255, .2); font-size: 12px; font-weight: 700; letter-spacing: .08em;
}
.hero-title { margin: 0; font-size: clamp(22px, 4.6vw, 34px); line-height: 1.35; font-weight: 800; }
.hero-meta { margin: 10px 0 0; font-size: 13px; opacity: .95; }
.hero-lead { margin: 8px 0 0; font-size: 14px; max-width: 720px; opacity: .95; }

/* ---------- Entry ---------- */
.breadcrumbs { font-size: 12px; color: var(--c-mute); margin: 0 0 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.breadcrumbs a { color: var(--c-sub); text-decoration: none; }
.breadcrumbs .sep { margin: 0 6px; }
.entry-header { margin-bottom: 18px; }
.entry-title { font-size: clamp(22px, 4vw, 28px); line-height: 1.45; margin: 6px 0 10px; font-weight: 800; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--c-mute); }
.cat-chip {
	display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
	background: var(--c-accent-soft); color: var(--c-accent); text-decoration: none;
}
.cat-chip:hover { background: var(--c-accent); color: #fff; }
.pr-notice {
	margin: 0 0 20px; padding: 8px 12px; font-size: 12px; line-height: 1.6; color: var(--c-sub);
	background: #f7f7f8; border: 1px solid var(--c-line); border-radius: 6px;
}
.entry-thumbnail { margin: 0 0 24px; }
.entry-thumbnail img { border-radius: 8px; display: block; }

.entry-content { font-size: 16px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.4em; }
.entry-content h2 {
	margin: 2.2em 0 1em; padding: 10px 14px; font-size: 20px; line-height: 1.5;
	background: var(--c-accent-soft); border-left: 5px solid var(--c-accent); border-radius: 4px;
}
.entry-content h3 { margin: 2em 0 .8em; padding-bottom: 6px; font-size: 18px; line-height: 1.5; border-bottom: 2px solid var(--c-line); }
.entry-content h4 { margin: 1.6em 0 .6em; font-size: 16px; }
.entry-content ul, .entry-content ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.entry-content li { margin-bottom: .3em; }
.entry-content blockquote { margin: 0 0 1.4em; padding: 12px 16px; background: var(--c-bg); border-left: 4px solid #cfd4da; color: var(--c-sub); }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 14px; }
.entry-content th, .entry-content td { border: 1px solid var(--c-line); padding: 8px 10px; text-align: left; vertical-align: top; }
.entry-content th { background: var(--c-bg); white-space: nowrap; }
.entry-content .wp-block-table { overflow-x: auto; margin: 0 0 1.4em; }
.entry-content .has-background { padding: 14px 18px; border-radius: 8px; }
.entry-content hr { border: 0; border-top: 1px solid var(--c-line); margin: 2em 0; }
.entry-content .point-box {
	margin: 0 0 1.6em; padding: 14px 18px; border: 2px solid #ffd8a8; background: #fffaf3; border-radius: 8px;
}
.entry-content .point-box > :last-child { margin-bottom: 0; }
/* ツールが書き込む100選リストの見出しは少し控えめに */
.entry-content .sale100 h2 { font-size: 19px; }
/* ジャンル切り替え(スマホでは折り返さず横スクロール) */
.sale100-genres .sale100-genre { flex: 0 0 auto; }
@media (max-width: 639px) {
	.sale100-genres > div:last-child {
		flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none;
		padding-bottom: 2px; -webkit-overflow-scrolling: touch;
	}
	.sale100-genres > div:last-child::-webkit-scrollbar { display: none; }
}

/* ---------- Share / Profile / Related ---------- */
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--c-line); }
.share-label { font-size: 13px; color: var(--c-sub); margin-right: 4px; }
.share a {
	display: inline-flex; align-items: center; justify-content: center; min-width: 88px; padding: 7px 14px;
	border-radius: 999px; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none;
}
.share .x { background: #111; }
.share .line { background: #06c755; }
.share .hatena { background: #00a4de; }
.share a:hover { opacity: .85; color: #fff; }

.profile-box { display: flex; gap: 14px; align-items: flex-start; margin-top: 28px; padding: 16px; background: var(--c-bg); border-radius: var(--radius); }
.profile-avatar {
	flex: 0 0 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #ffb46b, var(--c-accent));
	color: #fff; font-weight: 800; font-size: 22px; line-height: 56px; text-align: center;
}
.profile-name { font-weight: 800; margin: 0 0 2px; }
.profile-text { margin: 0; font-size: 13px; color: var(--c-sub); line-height: 1.7; }

.section-title { font-size: 18px; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 6px; height: 20px; border-radius: 3px; background: var(--c-accent); }
.related, .home-posts { margin-top: 28px; }
.home-posts .more { text-align: center; margin: 18px 0 0; }
.btn {
	display: inline-block; padding: 10px 24px; border-radius: 999px; background: var(--c-navy); color: #fff;
	font-weight: 700; font-size: 14px; text-decoration: none;
}
.btn:hover { background: var(--c-accent); color: #fff; }
.btn--accent { background: var(--c-accent); }
.btn--accent:hover { background: #c94d0a; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.card-link:hover { color: inherit; }
.card-link:hover .card-title { color: var(--c-accent); }
.card-thumb { aspect-ratio: 16 / 9; background: #eee; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-thumb.is-placeholder {
	display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center;
	background: linear-gradient(135deg, hsl(var(--hue, 24), 78%, 56%), hsl(calc(var(--hue, 24) - 12), 72%, 44%));
	color: #fff; font-weight: 800; font-size: 17px; line-height: 1.45; text-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
.card-body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--c-mute); }
.card-title { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 700; }
.card-excerpt { margin: 0; font-size: 13px; color: var(--c-sub); line-height: 1.7; }

.archive-header { margin: 0 0 18px; }
.archive-title { font-size: 22px; margin: 0; }
.archive-description { color: var(--c-sub); font-size: 14px; margin-top: 4px; }
.pagination { margin-top: 28px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pagination .page-numbers {
	display: inline-block; min-width: 40px; padding: 6px 12px; text-align: center; border-radius: 8px;
	background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--c-text);
}
.pagination .current { background: var(--c-accent); color: #fff; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.widget { background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; font-size: 14px; }
.widget-title { font-size: 15px; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--c-accent-soft); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 7px 0; border-bottom: 1px dashed var(--c-line); line-height: 1.5; }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--c-text); text-decoration: none; }
.widget a:hover { color: var(--c-accent); }
.widget-cta { text-align: center; background: linear-gradient(160deg, #fff4ea, #fff); border: 1px solid #ffe0c4; }
.widget-cta p { margin: 0 0 10px; font-size: 13px; color: var(--c-sub); }
.widget .profile-box { margin: 0; padding: 0; background: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-navy); color: #c9d2e3; font-size: 13px; padding: 28px 0 22px; }
.footer-disclosure { margin: 0 0 16px; padding: 12px 14px; border-radius: 8px; background: rgba(255, 255, 255, .06); line-height: 1.8; }
.footer-nav ul { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-nav a { color: #fff; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; color: #fff; }
.copyright { margin: 0; color: #8e9ab1; font-size: 12px; }

/* ---------- Misc ---------- */
.notice-empty { padding: 24px; text-align: center; color: var(--c-sub); }
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; padding: 8px 12px; border: 1px solid var(--c-line); border-radius: 8px; font: inherit; }
.search-form .search-submit { padding: 8px 16px; border: 0; border-radius: 8px; background: var(--c-navy); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.comments-area { margin-top: 28px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 12px 0; border-bottom: 1px solid var(--c-line); font-size: 14px; }
@media (max-width: 639px) {
	.header-search { display: none; }
	.site-title { font-size: 18px; }
	.container { padding: 0 12px; }
	.entry { padding: 18px 14px 24px; }
	.entry--sale { padding: 12px 12px 20px; }
}
