/* テイクアウト・宅配 事前注文 フロント */

.tdpo-header-bar {
	background: #f7f7f7;
	border-bottom: 1px solid #e5e5e5;
	padding: 8px 16px;
	text-align: center;
}

.tdpo-switcher {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.tdpo-switcher__label {
	font-size: 0.9em;
	color: #555;
}

.tdpo-switcher__btn {
	border: 1px solid #c00;
	background: #fff;
	color: #c00;
	padding: 6px 18px;
	border-radius: 999px;
	cursor: pointer;
	font-size: 0.95em;
	line-height: 1.2;
	transition: background 0.15s, color 0.15s;
}

.tdpo-switcher__btn:hover {
	background: #fbeaea;
}

.tdpo-switcher__btn.is-active {
	background: #c00;
	color: #fff;
	font-weight: 700;
}

.tdpo-switcher__btn:disabled {
	opacity: 0.6;
	cursor: default;
}

/* カート上部 */
.tdpo-cart-selector {
	margin: 0 0 1.5em;
	padding: 12px 16px;
	background: #fafafa;
	border: 1px solid #eee;
	border-radius: 6px;
}

/* チェックアウト */
.tdpo-checkout-service {
	margin: 0 0 1.5em;
	padding: 12px 16px;
	background: #fafafa;
	border: 1px solid #eee;
	border-radius: 6px;
}

.tdpo-checkout-service__current {
	margin: 0 0 8px;
}

.tdpo-datetime {
	margin: 1em 0 1.5em;
	padding: 16px;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	background: #fff;
}

.tdpo-datetime__title {
	margin-top: 0;
	font-size: 1.05em;
}

.tdpo-datetime select:disabled,
.tdpo-datetime option:disabled {
	color: #aaa;
}

/* --- 商品ごとの「ご用途」選択欄 --- */
.tdpo-item-purpose {
	margin: 0 0 16px;
}

.tdpo-item-purpose__label {
	display: block;
	margin-bottom: 5px;
	font-size: 0.95em;
	font-weight: 600;
}

.tdpo-item-purpose__label .required {
	margin-left: 2px;
	color: #b3261e;
	border: 0;
	text-decoration: none;
}

.tdpo-item-purpose__select {
	width: 100%;
	max-width: 320px;
	padding: 9px 11px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.95em;
	background-color: #fff;
}

.tdpo-item-purpose__select:focus {
	border-color: #8c1c1c;
	outline: none;
}

.tdpo-item-purpose__note {
	display: block;
	margin-top: 4px;
	color: #777;
	font-size: 0.8em;
	line-height: 1.6;
}

/* --- 商品ごとの「ご要望」記入欄 --- */
.tdpo-item-request {
	margin: 0 0 18px;
}

.tdpo-item-request__label {
	display: block;
	margin-bottom: 5px;
	font-size: 0.95em;
	font-weight: 600;
}

.tdpo-item-request__input {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.95em;
	line-height: 1.6;
	resize: vertical;
}

.tdpo-item-request__input:focus {
	border-color: #8c1c1c;
	outline: none;
}

.tdpo-item-request__note {
	display: block;
	margin-top: 4px;
	color: #777;
	font-size: 0.8em;
	line-height: 1.6;
}

/* --- 合計欄の「配達エリア」行 --- */
.tdpo-delivery-row__area {
	font-weight: 600;
}

.tdpo-delivery-row__free {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 8px;
	border-radius: 3px;
	background: #e8f3ea;
	color: #2b6b3a;
	font-size: 0.8em;
	font-weight: 600;
}

.tdpo-delivery-row__note {
	display: block;
	margin-top: 3px;
	color: #666;
	font-size: 0.85em;
	line-height: 1.6;
}

.tdpo-delivery-row--error .tdpo-delivery-row__area,
.tdpo-delivery-row--error .tdpo-delivery-row__note {
	color: #b3261e;
}

/* 受け渡し日時の注意書き（当日締切・準備時間など） */
.tdpo-datetime__notice {
	margin: 0 0 14px;
	padding: 10px 12px;
	border-left: 3px solid #c9a227;
	border-radius: 0 4px 4px 0;
	background: #fdf8ec;
	color: #5a4a1f;
	font-size: 0.9em;
	line-height: 1.7;
}

.tdpo-datetime__notice p {
	margin: 0 0 0.5em;
}

.tdpo-datetime__notice p:last-child {
	margin-bottom: 0;
}

/* --- 対応サービス バッジ（情報表示・押せない） --- */
.tdpo-badges {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin: 6px 0;
}

.tdpo-badges--single {
	margin: 10px 0 14px;
}

.tdpo-badges__label {
	font-size: 0.85em;
	color: #666;
}

.tdpo-badge {
	display: inline-block;
	font-size: 0.78em;
	font-weight: 600;
	line-height: 1;
	padding: 4px 9px;
	border-radius: 4px;
	border: 1px solid transparent;
	white-space: nowrap;
}

/* ヘッダーの操作ピル（丸・赤）とは別物に見えるよう、角丸タグ＋淡色で差別化 */
.tdpo-badge--takeout {
	background: #eef6ff;
	color: #1c5fa8;
	border-color: #cfe2f7;
}

.tdpo-badge--delivery {
	background: #fdf0ec;
	color: #b24a25;
	border-color: #f6d6c9;
}

/* --- 一覧上部の絞り込みドロップダウン（カテゴリーと同じ見た目） --- */
.tdpo-menu-filter {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 12px;
}

.tdpo-menu-filter__label {
	font-size: 0.9em;
	color: #555;
}

.tdpo-menu-select {
	padding: 6px 10px;
}

/* --- 専用ショップページ [tdpo_shop] --- */
.tdpo-shop {
	margin: 0 auto;
}

/*
 * テーマ(basara/TCD)対応：固定ページ本文 .l-inner02 は max-width:800px の
 * 細幅。ショップページだけサイト標準幅(.l-inner=1100px/左右40px)に合わせ、
 * 左右の余白を解消する。
 */
.tdpo-shop-page .l-main-inner .l-inner02 {
	max-width: 1100px;
	padding-left: 40px;
	padding-right: 40px;
	box-sizing: border-box;
}

@media ( max-width: 768px ) {
	.tdpo-shop-page .l-main-inner .l-inner02 {
		padding-left: 20px;
		padding-right: 20px;
	}
}

.tdpo-shop .tdpo-menu-filter {
	margin-bottom: 18px;
}

/* PC：グリッド（4列）*/
.tdpo-shop__grid {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	display: grid;
	/* minmax(0,1fr)：中の画像の最小幅で列が広がるのを防ぐ */
	grid-template-columns: repeat( var( --tdpo-cols, 4 ), minmax( 0, 1fr ) );
	gap: 24px 20px;
}

/* タブレット：3列 */
@media ( max-width: 1024px ) {
	.tdpo-shop__grid {
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	}
}

/* 「もっと見る」ボタン */
.tdpo-shop-more {
	display: none; /* PCでは全件表示のため非表示。スマホのみ表示 */
	margin: 4px 0 28px;
	text-align: center;
}

.tdpo-shop-more__btn {
	display: inline-block;
	padding: 13px 34px;
	border: 1px solid #c00;
	border-radius: 4px;
	background: #fff;
	color: #c00;
	font-size: 0.95em;
	font-weight: 700;
	letter-spacing: 0.06em;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.tdpo-shop-more__btn:hover {
	background: #c00;
	color: #fff;
}

/* スマホ：2カラム。初期は4商品まで表示し、「もっと見る」で追加表示 */
@media ( max-width: 768px ) {
	.tdpo-shop__grid {
		/* minmax(0,1fr) にしないと、中の画像の最小幅で列が広がり画面からはみ出す */
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
		gap: 20px 12px;
	}
	.tdpo-shop__grid > .tdpo-shop__item {
		min-width: 0;
	}

	/* 折りたたみ中は5件目以降を隠す */
	.tdpo-shop-cat.is-collapsed .tdpo-shop__item:nth-child( n + 5 ) {
		display: none;
	}

	/* 隠す対象がある場合のみボタンを表示 */
	.tdpo-shop-cat.has-more .tdpo-shop-more {
		display: block;
	}
}

.tdpo-shop__item {
	margin: 0 !important;
	padding: 0;
	width: auto !important;
	float: none !important;
	display: flex;
	flex-direction: column;
	text-align: left;
}

.tdpo-shop__thumb {
	display: block;
	margin-bottom: 10px;
}

.tdpo-shop__thumb img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 6px;
}

.tdpo-shop__title {
	font-weight: 600;
	line-height: 1.4;
	margin-bottom: 6px;
	text-decoration: none;
}

.tdpo-shop__badges {
	margin-bottom: 6px;
}

.tdpo-shop__price {
	display: block;
	margin-bottom: 10px;
	font-size: 1.02em;
}

.tdpo-shop__cart {
	margin-top: auto;
	min-width: 0;
}

/*
 * テーマ(basara/TCD)の .p-button は min-width:280px（スマホ250px）が
 * 指定されており、カード幅を超えてはみ出す。カード内のボタンは
 * 常に親要素の幅に収める。
 */
.tdpo-shop__cart .button,
.tdpo-shop__cart .p-button,
.tdpo-shop__cart a,
.tdpo-shop__cart button {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	padding-left: 8px;
	padding-right: 8px;
	text-align: center;
	overflow-wrap: break-word;
}

.tdpo-shop__pagination {
	text-align: center;
}

.tdpo-shop__empty {
	padding: 24px 0;
	color: #777;
}

/* カテゴリナビ（ショップ上部のアンカー） */
.tdpo-shop-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 24px;
	padding-bottom: 14px;
	border-bottom: 1px solid #eee;
}

.tdpo-shop-nav__item {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid #d8d8d8;
	border-radius: 999px;
	font-size: 0.9em;
	text-decoration: none;
	color: #333;
	background: #fff;
}

.tdpo-shop-nav__item:hover {
	background: #c00;
	border-color: #c00;
	color: #fff;
}

/* カテゴリ見出しセクション */
.tdpo-shop-cat {
	margin: 0 0 40px;
	scroll-margin-top: 80px; /* ヘッダー固定ぶんのアンカー調整 */
}

.tdpo-shop-cat__title {
	margin: 0 0 14px;
	padding: 0 0 8px;
	font-size: 1.3em;
	border-bottom: 2px solid #c00;
}

.tdpo-shop-cat__desc {
	margin: -6px 0 14px;
	color: #666;
	font-size: 0.92em;
}

/* カテゴリタイル（トップページ等の誘導） */
.tdpo-cat-tiles {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 14px;
	margin: 0 0 24px;
}

@media ( max-width: 768px ) {
	.tdpo-cat-tiles {
		grid-template-columns: repeat( 2, 1fr );
		gap: 10px;
	}
}

.tdpo-cat-tile {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 64px;
	padding: 14px 12px;
	text-align: center;
	text-decoration: none;
	font-weight: 700;
	color: #333;
	background: #faf6f2;
	border: 1px solid #ead9cc;
	border-radius: 8px;
	transition: background 0.15s, color 0.15s;
}

.tdpo-cat-tile:hover {
	background: #c00;
	border-color: #c00;
	color: #fff;
}

/* --- 商品ページ：現在のご利用方法で買えない場合の案内 --- */
.tdpo-availability-notice {
	margin: 10px 0 16px;
	padding: 12px 14px;
	background: #fff8e5;
	border: 1px solid #f3e2a8;
	border-radius: 6px;
}

.tdpo-availability-notice p {
	margin: 0 0 8px;
}

.tdpo-availability-notice__switch {
	cursor: pointer;
}

/* Keep the purpose field separate from the theme's select wrapper decoration. */
.p-entry-product-cart .tdpo-item-purpose {
	display: block;
	width: 100%;
	margin: 0 0 18px;
}
.p-entry-product-cart .tdpo-item-purpose::after {
	content: none;
}
.p-entry-product-cart .tdpo-item-purpose__label {
	display: block;
	margin: 0 0 5px;
}
.p-entry-product-cart .tdpo-item-purpose__select {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding: 12px 16px;
	background-color: #fff;
	-webkit-appearance: auto;
	-moz-appearance: auto;
	appearance: auto;
}
.p-entry-product-cart .tdpo-item-purpose__note {
	display: block;
	margin: 6px 0 0;
	line-height: 1.6;
}

/* 当日など受付対象外の日を押したときの電話案内モーダル */
.tdpo-phone-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba( 0, 0, 0, 0.55 );
}
.tdpo-phone-modal {
	box-sizing: border-box;
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: 10px;
	padding: 26px 24px 20px;
	box-shadow: 0 12px 40px rgba( 0, 0, 0, 0.3 );
	text-align: center;
}
.tdpo-phone-modal__title {
	margin: 0 0 12px;
	font-size: 1.15em;
	font-weight: bold;
}
.tdpo-phone-modal__body {
	margin: 0 0 20px;
	line-height: 1.8;
	text-align: left;
}
.tdpo-phone-modal__tel.button {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 10px;
	padding: 14px 16px;
	font-size: 1.05em;
	text-align: center;
}
.tdpo-phone-modal__close {
	display: block;
	width: 100%;
	padding: 10px 16px;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	color: #333;
	cursor: pointer;
}
