/* =============================================================
 *  トップページ専用 CSS
 *  読み込み: is_front_page() のみ
 * =========================================================== */

/* ── カラートークン ─────────────────────────────────────── */
:root {
	--tp-navy:   #103194;
	--tp-navy-d: #0a1f63;
	--tp-navy-l: #2a4bb0;
	--tp-navy-50:#f3f6ff;
	--tp-yellow: #ffd400;
	--tp-yellow-d:#f0c000;
	--tp-red:    #c0392b;
	--tp-ink:    #1a1f2e;
	--tp-ink-2:  #475066;
	--tp-ink-3:  #8a93a8;
	--tp-line:   #d8dee9;
	--tp-line-2: #e9edf3;
	--tp-bg:     #f5f7fb;
	--tp-container: 1240px;
	--tp-font-jp: "Noto Sans JP", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

/* ── SWELL コンテナ解除（トップページのみ） ──────────────── */
/*
 * SWELLは body_class() を <body> ではなく <div id="body_wrap"> に適用する。
 * そのためセレクターは body.home ではなく #body_wrap.home で指定する。
 */

/* ページ全体の背景色 */
#body_wrap.home {
	background: var(--tp-bg);
}

/* #content の幅制限を解除 */
#body_wrap.home #content.l-content {
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
	width: 100% !important;
	background: var(--tp-bg);
	font-family: var(--tp-font-jp);
	-webkit-font-smoothing: antialiased;
}

/* SWELL の padding-top: 1em !important（style.css 86行目）も解除 */
#body_wrap.home #content.l-content.l-container {
	padding-top: 0 !important;
}

/* SWELLのお知らせ・ピックアップバナーを非表示 */
#body_wrap.home .announce,
#body_wrap.home .p-pickupBanner,
#body_wrap.home .l-pickupBanner {
	display: none !important;
}

/* ── 基本要素（スコープ: #content 内） ──────────────────── */
#body_wrap.home #content img {
	max-width: 100%;
	display: block;
}
#body_wrap.home #content a {
	color: var(--tp-navy);
	text-decoration: none;
}
#body_wrap.home #content a:hover {
	text-decoration: underline;
}

/* ── レイアウトコンテナ ─────────────────────────────────── */
.tp-layout {
	max-width: var(--tp-container);
	margin: 14px auto 30px;
	padding: 0 16px;
}
.tp-main {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

/* ── お知らせバー ───────────────────────────────────────── */
.tp-notice {
	max-width: var(--tp-container);
	margin: 14px auto 0;
	padding: 10px 14px;
	background: #fff;
	border: 1px solid var(--tp-red);
	border-radius: 4px;
	color: #222;
	font-size: .9rem;
	text-align: center;
}
.tp-notice strong {
	color: var(--tp-red);
}

/* ── セクション見出し ──────────────────────────────────── */
.tp-section-h {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	padding-left: 12px;
	border-left: 5px solid var(--tp-navy);
}
.tp-section-h h2 {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--tp-ink);
}
.tp-section-h .tp-more {
	font-size: .85rem;
	color: var(--tp-navy);
}
.tp-en-sub {
	font-size: .7em;
	font-weight: 400;
	color: var(--tp-ink-2);
	letter-spacing: .04em;
	margin-left: 6px;
}

/* ── Coverflow スライダー ────────────────────────────── */
.tp-cf-section {
	position: relative;
	background: linear-gradient(135deg, var(--tp-navy-50) 0%, #fff 50%, var(--tp-navy-50) 100%);
	border: 1px solid var(--tp-line);
	border-radius: 10px;
	padding: 16px 0 10px;
	overflow: hidden;
}
.tp-cf-section::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at center, rgba(16,49,148,.04) 0%, transparent 70%);
	pointer-events: none;
}
.tp-cf-stage-wrap {
	position: relative;
	height: 160px;
	overflow: hidden;
}
.tp-cf-stage {
	position: relative;
	height: 160px;
	display: flex;
	align-items: center;
	justify-content: center;
	perspective: 1100px;
	transform-style: preserve-3d;
}
.tp-cf-stage-wrap::before,
.tp-cf-stage-wrap::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: 80px;
	z-index: 10;
	pointer-events: none;
}
.tp-cf-stage-wrap::before {
	left: 0;
	background: linear-gradient(to right, rgba(245,247,251,.9), transparent);
}
.tp-cf-stage-wrap::after {
	right: 0;
	background: linear-gradient(to left, rgba(245,247,251,.9), transparent);
}
.tp-cf-card {
	position: absolute;
	width: 62%;
	height: 158px;
	transition: all .52s cubic-bezier(.25,.46,.45,.94);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--tp-line);
	cursor: pointer;
}
.tp-cf-card img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.tp-cf-card--active {
	transform: translateX(0) scale(1) rotateY(0deg);
	z-index: 3;
	opacity: 1;
	box-shadow: 0 10px 32px rgba(16,49,148,.22), 0 2px 8px rgba(0,0,0,.08);
	border-color: rgba(16,49,148,.2);
}
.tp-cf-card--active:hover {
	transform: translateX(0) scale(1.03) rotateY(0deg);
	box-shadow: 0 14px 40px rgba(16,49,148,.3);
	transition-duration: .2s;
}
.tp-cf-card--left {
	transform: translateX(-68%) scale(0.78) rotateY(30deg);
	z-index: 2;
	opacity: 0.5;
	box-shadow: none;
}
.tp-cf-card--left:hover {
	opacity: 0.78;
	transform: translateX(-68%) scale(0.82) rotateY(26deg);
	transition-duration: .2s;
}
.tp-cf-card--right {
	transform: translateX(68%) scale(0.78) rotateY(-30deg);
	z-index: 2;
	opacity: 0.5;
	box-shadow: none;
}
.tp-cf-card--right:hover {
	opacity: 0.78;
	transform: translateX(68%) scale(0.82) rotateY(-26deg);
	transition-duration: .2s;
}
.tp-cf-card--hidden {
	opacity: 0;
	z-index: 1;
	pointer-events: none;
	transform: translateX(0) scale(0.4);
}
.tp-cf-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 8px 0 2px;
}
.tp-cf-btn {
	background: var(--tp-navy);
	color: #fff;
	border: 0;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	font-size: 1.15rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s, transform .15s;
	padding: 0;
	line-height: 1;
}
.tp-cf-btn:hover {
	background: var(--tp-navy-d);
	transform: scale(1.08);
}
.tp-cf-dots {
	display: flex;
	gap: 6px;
	align-items: center;
}
.tp-cf-dot {
	width: 8px;
	height: 8px;
	border-radius: 4px;
	background: rgba(16,49,148,.22);
	border: 0;
	cursor: pointer;
	padding: 0;
	transition: all .25s;
}
.tp-cf-dot.is-on {
	width: 22px;
	background: var(--tp-navy);
}

/* ── おすすめ商品グリッド ───────────────────────────────── */
.tp-campaign-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
}
.tp-campaign {
	display: block;
	border: 1px solid var(--tp-line);
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	color: var(--tp-ink);
	text-decoration: none;
}
.tp-campaign img {
	display: block;
	width: 100%;
	aspect-ratio: 4/3;
	object-fit: cover;
}
.tp-campaign__body {
	padding: 8px 10px;
	font-size: .8rem;
	font-weight: 700;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.tp-campaign:hover {
	box-shadow: 0 4px 14px rgba(16,49,148,.12);
	text-decoration: none;
	border-color: var(--tp-navy-l);
}

/* ── 新着商品 ───────────────────────────────────────────── */
.tp-newprod-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}
.tp-newprod-head__label {
	background: var(--tp-navy);
	color: #fff;
	font-size: .6rem;
	font-weight: 700;
	letter-spacing: .14em;
	padding: 4px 10px;
	border-radius: 3px;
	white-space: nowrap;
}
.tp-newprod-head__title {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--tp-ink);
}
.tp-newprod-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}
.tp-newprod-card {
	background: #fff;
	border: 1px solid var(--tp-line);
	border-radius: 8px;
	overflow: hidden;
	text-decoration: none;
	color: var(--tp-ink);
	display: flex;
	flex-direction: column;
	position: relative;
	transition: box-shadow .22s, transform .22s;
}
.tp-newprod-card:hover {
	box-shadow: 0 8px 22px rgba(16,49,148,.15);
	transform: translateY(-3px);
	text-decoration: none;
	border-color: var(--tp-navy-l);
}
.tp-newprod-card img {
	display: block;
	width: 100%;
	aspect-ratio: 4/3;
	object-fit: cover;
}
.tp-newprod-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	background: var(--tp-red);
	color: #fff;
	font-size: .6rem;
	font-weight: 700;
	letter-spacing: .06em;
	padding: 2px 7px;
	border-radius: 3px;
	z-index: 2;
}
.tp-newprod-card__body {
	padding: 10px 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}
.tp-newprod-card__brand {
	font-size: .68rem;
	font-weight: 700;
	color: var(--tp-ink-3);
	letter-spacing: .05em;
}
.tp-newprod-card__name {
	margin: 0;
	font-size: .84rem;
	font-weight: 700;
	color: var(--tp-ink);
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.tp-newprod-card__price {
	margin: 4px 0 0;
	font-size: .9rem;
	font-weight: 700;
	color: var(--tp-red);
}
.tp-newprod-card__btn {
	display: inline-block;
	margin-top: auto;
	padding-top: 10px;
	font-size: .76rem;
	color: var(--tp-navy);
	font-weight: 700;
}

/* ── タブボタン（カテゴリー / おすすめ情報）─────────────── */
.tp-tabs {
	display: flex;
	gap: 0;
	border-bottom: 2px solid var(--tp-navy);
	margin-bottom: 14px;
}
.tp-tabs__btn {
	background: #e9edf3;
	border: 1px solid var(--tp-line);
	border-bottom: 0;
	padding: 10px 22px;
	font-size: .95rem;
	font-weight: 700;
	color: var(--tp-ink-2);
	cursor: pointer;
	border-top-left-radius: 6px;
	border-top-right-radius: 6px;
	font-family: var(--tp-font-jp);
}
.tp-tabs__btn.is-active {
	background: var(--tp-navy);
	color: #fff;
	border-color: var(--tp-navy);
}

/* ── カテゴリーセクション ───────────────────────────────── */
.tp-cat-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px;
}
.tp-cat-pills a {
	display: inline-block;
	padding: 6px 12px;
	font-size: .85rem;
	border: 1px solid var(--tp-line);
	border-radius: 999px;
	background: #fff;
	color: var(--tp-navy);
	font-weight: 700;
	text-decoration: none;
}
.tp-cat-pills a:hover {
	background: var(--tp-navy);
	color: #fff;
	text-decoration: none;
}
.tp-cat-section {
	background: #fff;
	border: 1px solid var(--tp-line);
	border-radius: 6px;
	margin-bottom: 14px;
	overflow: hidden;
}
.tp-cat-section__head {
	background: #eef2fb;
	padding: 9px 14px;
	font-weight: 700;
	font-size: .95rem;
	border-bottom: 1px solid var(--tp-line);
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--tp-navy);
	text-decoration: none;
}
a.tp-cat-section__head:hover {
	background: #dce6fc;
	color: var(--tp-navy-d);
}
.tp-cat-section__head::before {
	content: "";
	width: 5px;
	height: 18px;
	background: var(--tp-navy);
	border-radius: 2px;
	flex-shrink: 0;
}
.tp-cat-section__body {
	padding: 6px;
}
.tp-subcat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 6px;
}
.tp-subcat {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 4px;
	color: var(--tp-ink);
	text-decoration: none;
	border: 1px solid transparent;
}
.tp-subcat:hover {
	background: var(--tp-navy-50);
	border-color: var(--tp-line);
	text-decoration: none;
}
.tp-subcat__ico {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 4px;
	background: #f1f3f7;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: .6rem;
	color: #8a93a8;
	overflow: hidden;
}
.tp-subcat__ico img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 4px;
}
.tp-subcat__name {
	font-size: .88rem;
	font-weight: 500;
}

/* ── おすすめ情報 ───────────────────────────────────────── */
.tp-info-tabs {
	display: flex;
	border-bottom: 1px solid var(--tp-line);
	margin-bottom: 10px;
}
.tp-info-tabs button {
	background: transparent;
	border: 0;
	padding: 10px 16px;
	font-size: .92rem;
	color: var(--tp-ink-2);
	cursor: pointer;
	border-bottom: 3px solid transparent;
	font-weight: 700;
	font-family: var(--tp-font-jp);
}
.tp-info-tabs button.is-active {
	color: var(--tp-navy);
	border-bottom-color: var(--tp-navy);
}
.tp-info-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.tp-info-item {
	display: grid;
	grid-template-columns: 80px 1fr auto;
	gap: 14px;
	align-items: center;
	background: #fff;
	border: 1px solid var(--tp-line);
	border-radius: 6px;
	padding: 10px 12px;
	text-decoration: none;
	color: var(--tp-ink);
}
.tp-info-item:hover {
	box-shadow: 0 4px 14px rgba(16,49,148,.10);
	text-decoration: none;
}
.tp-info-item img {
	display: block;
	width: 80px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
}
.tp-info-item__body strong {
	display: block;
	color: var(--tp-navy);
	margin-bottom: 2px;
}
.tp-info-item__body p {
	margin: 0;
	font-size: .85rem;
	color: var(--tp-ink-2);
}
.tp-info-item__arrow {
	color: var(--tp-navy);
	font-weight: 700;
	white-space: nowrap;
}

/* ── 解説記事 ───────────────────────────────────────────── */
.tp-article-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}
.tp-article-card {
	background: #fff;
	border: 1px solid var(--tp-line);
	border-radius: 8px;
	overflow: hidden;
	text-decoration: none;
	color: var(--tp-ink);
	display: flex;
	flex-direction: column;
	transition: box-shadow .2s, border-color .2s;
}
.tp-article-card:hover {
	box-shadow: 0 4px 14px rgba(16,49,148,.12);
	text-decoration: none;
	border-color: var(--tp-navy-l);
}
.tp-article-card img {
	display: block;
	width: 100%;
	aspect-ratio: 16/9;
	object-fit: cover;
}
.tp-article-card__body {
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	flex: 1;
}
.tp-article-card__cat {
	font-size: .68rem;
	font-weight: 700;
	color: var(--tp-navy);
	background: var(--tp-navy-50);
	padding: 2px 8px;
	border-radius: 99px;
	align-self: flex-start;
}
.tp-article-card__title {
	margin: 0;
	font-size: .86rem;
	font-weight: 700;
	line-height: 1.5;
	color: var(--tp-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.tp-article-card__date {
	margin: 4px 0 0;
	font-size: .7rem;
	color: var(--tp-ink-3);
}

/* ── タブパネル（非表示状態） ──────────────────────────── */
[data-panel][hidden] {
	display: none !important;
}

/* ── 解説記事 カルーセル（7件以上） ──────────────────── */
.tp-article-carousel-wrap {
	position: relative;
}
.tp-article-carousel {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding-bottom: 4px;
}
.tp-article-carousel::-webkit-scrollbar {
	display: none;
}
.tp-article-carousel .tp-article-card {
	flex: 0 0 calc(33.333% - 10px);
	scroll-snap-align: start;
}
.tp-carousel-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: var(--tp-navy);
	color: #fff;
	border: 0;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	font-size: 1.3rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: background .2s, transform .15s;
	padding: 0;
	line-height: 1;
}
.tp-carousel-btn:hover {
	background: var(--tp-navy-d);
	transform: translateY(-50%) scale(1.08);
}
.tp-carousel-btn--prev { left: -18px; }
.tp-carousel-btn--next { right: -18px; }

/* ── バナー ─────────────────────────────────────────── */
.tp-banner-row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}
.tp-banner-item {
	flex: 1 1 200px;
	display: block;
	border-radius: 6px;
	overflow: hidden;
	line-height: 0;
}
.tp-banner-item img {
	width: 100%;
	height: auto;
	display: block;
	transition: opacity .2s;
}
.tp-banner-item:hover img {
	opacity: .88;
}

/* ═══════════════════════════════════════════════════════════
 *  レスポンシブ
 * ═════════════════════════════════════════════════════════*/
@media (max-width: 760px) {
	/* カルーセル: モバイルは2列幅 */
	.tp-article-carousel .tp-article-card {
		flex: 0 0 calc(50% - 7px);
	}
	.tp-carousel-btn--prev { left: -12px; }
	.tp-carousel-btn--next { right: -12px; }
	.tp-layout {
		padding: 0 12px;
		margin-top: 10px;
	}
	/* スライダー */
	.tp-cf-card {
		width: 80%;
	}
	.tp-cf-card--left {
		transform: translateX(-80%) scale(0.75) rotateY(20deg);
	}
	.tp-cf-card--right {
		transform: translateX(80%) scale(0.75) rotateY(-20deg);
	}
	/* キャンペーングリッド */
	.tp-campaign-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}
	/* 新着商品: 2列 */
	.tp-newprod-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	/* サブカテゴリグリッド */
	.tp-subcat-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	}
	/* おすすめ情報 */
	.tp-info-item {
		grid-template-columns: 60px 1fr;
		gap: 10px;
		padding: 8px 10px;
	}
	.tp-info-item img {
		width: 60px;
		height: 45px;
	}
	.tp-info-item__arrow {
		display: none;
	}
	.tp-info-item__body p {
		font-size: .78rem;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
	/* 解説記事: 2列 */
	.tp-article-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
