/**
 * 店舗詳細（single-introduce / introduce CPT）専用スタイル。
 *
 * - 黄色ヒーロー：ロゴカード（"正規認定店"バッジ）＋ 外観写真。
 * - Bento カード：基本情報・アクセスマップ／店舗情報／施工車写真集。
 * - 既存 dm-* トークン（tokens.css）を継承し、明るいトーン・赤アクセント。
 *
 * 命名規則は dm-shop-* / dm-shop-card-* / dm-shop-gallery-* で統一。
 */

:root {
	/* hero 用の追加トークン（既存トークンと衝突しない接頭辞）。 */
	--dm-shop-yellow:        #fed500;
	--dm-shop-yellow-edge:   #f4c500;
	--dm-shop-checker:       #fff5a8;
	--dm-shop-tel-red:       #d4242b;
	--dm-shop-map-blue:      #1f4ec0;
	--dm-shop-map-blue-edge: #16409c;
}

.dm-shop-detail-outer {
	background: var(--dm-color-bg, #fff);
}

.dm-shop-detail {
	max-width: 1140px;
	margin: 0 auto;
	padding: clamp(16px, 2.4vw, 28px) clamp(12px, 3vw, 24px) clamp(40px, 5vw, 64px);
	color: var(--dm-color-text, #1f2937);
}

/* ---------- Hero ---------- */
.dm-shop-hero {
	margin: 0 0 clamp(20px, 3vw, 32px);
	border-radius: 0;
	overflow: hidden;
	background:
		linear-gradient(135deg, var(--dm-shop-yellow) 0%, var(--dm-shop-yellow-edge) 100%);
	box-shadow: var(--dm-shadow-card, 0 1px 2px rgba(17,24,39,.04), 0 6px 16px rgba(17,24,39,.06));
}

.dm-shop-hero__inner {
	display: grid;
	grid-template-columns: minmax(176px, 39%) 1fr;
	align-items: stretch;
	min-height: clamp(190px, 25vw, 270px);
}

.dm-shop-hero__media {
	display: contents;
}

.dm-shop-hero__logo-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0;
	grid-column: 1;
	grid-row: 1;
	align-self: end;
	margin: clamp(16px, 2.4vw, 24px) clamp(18px, 3vw, 28px) 0;
	padding: 0;
	background: transparent;
	border: 4px solid #fff;
	border-radius: 0;
	box-shadow: none;
	min-height: 0;
}

.dm-shop-hero__logo-img {
	display: block;
	max-width: min(78%, 230px);
	width: 100%;
	height: auto;
	object-fit: contain;
	margin: 0 auto;
	padding: clamp(10px, 1.7vw, 16px) 0 clamp(8px, 1.2vw, 12px);
}

.dm-shop-hero__badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	padding: clamp(8px, 1.4vw, 12px) 10px;
	border: 0;
	border-top: 4px solid #fff;
	border-radius: 0;
	color: #fff;
	font-weight: 800;
	font-size: clamp(16px, 2.1vw, 24px);
	letter-spacing: .04em;
	background: transparent;
	white-space: nowrap;
	text-shadow: 0 1px 0 rgba(0,0,0,.1);
}

.dm-shop-hero__exterior {
	grid-column: 2;
	grid-row: 1 / span 2;
	margin: 0;
	overflow: hidden;
	background: #1f1f1f;
}

.dm-shop-hero__exterior-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	min-height: clamp(190px, 25vw, 270px);
}

.dm-shop-hero__exterior-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: clamp(190px, 25vw, 270px);
	background: repeating-linear-gradient(45deg, #fff5a8 0 18px, var(--dm-shop-yellow) 18px 36px);
	color: #6b7280;
	font-weight: 600;
	font-size: 14px;
}

.dm-shop-hero__caption {
	grid-column: 1;
	grid-row: 2;
	align-self: start;
	background: var(--dm-shop-yellow);
	padding: 10px clamp(16px, 2.5vw, 24px) clamp(14px, 2vw, 20px);
	text-align: center;
}

.dm-shop-hero__name {
	margin: 0 0 2px;
	font-size: clamp(12px, 1.45vw, 16px);
	font-weight: 800;
	color: #111;
	letter-spacing: .02em;
	line-height: 1.25;
}

.dm-shop-hero__company {
	margin: 0 0 7px;
	font-size: clamp(11px, 1.25vw, 14px);
	color: #111;
	font-weight: 800;
	line-height: 1.25;
}

.dm-shop-hero__tel {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #fff;
	font-weight: 800;
	font-size: clamp(16px, 2.25vw, 25px);
	letter-spacing: .02em;
	text-decoration: none;
	font-feature-settings: "tnum" 1;
	text-shadow: 0 1px 0 rgba(0,0,0,.18);
}

.dm-shop-hero__tel:hover,
.dm-shop-hero__tel:focus-visible {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.dm-shop-hero__tel-icon {
	flex: 0 0 auto;
	width: clamp(20px, 2.4vw, 24px);
	height: clamp(20px, 2.4vw, 24px);
	filter: drop-shadow(0 1px 0 rgba(0,0,0,.18));
}

.dm-shop-hero__tel-num {
	font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
	.dm-shop-hero__inner {
		grid-template-columns: minmax(150px, 43%) 1fr;
		min-height: 178px;
	}
	.dm-shop-hero__logo-card {
		margin: 14px 16px 0;
		border-width: 3px;
	}
	.dm-shop-hero__badge {
		border-top-width: 3px;
		font-size: clamp(14px, 4vw, 18px);
	}
	.dm-shop-hero__caption {
		padding-inline: 12px;
	}
	.dm-shop-hero__exterior-img,
	.dm-shop-hero__exterior-fallback {
		min-height: 178px;
	}
}

/* ---------- Bento カード ---------- */
.dm-shop-bento {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(16px, 2.4vw, 24px);
}

@media (min-width: 900px) {
	.dm-shop-bento {
		grid-template-columns: 1fr 1fr;
		grid-auto-flow: dense;
	}
	.dm-shop-card--basic {
		grid-column: span 1;
	}
	.dm-shop-card--info {
		grid-column: span 1;
	}
	.dm-shop-card--gallery {
		grid-column: 1 / -1;
	}
}

.dm-shop-card {
	background: var(--dm-color-surface, #fff);
	border: 1px solid var(--dm-color-border, #e5e7eb);
	border-radius: var(--dm-radius-md, 14px);
	box-shadow: var(--dm-shadow-card, 0 1px 2px rgba(17,24,39,.04), 0 6px 16px rgba(17,24,39,.06));
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.dm-shop-card__head {
	position: relative;
	padding: 14px 16px 12px 22px;
	border-bottom: 1px solid var(--dm-color-border, #e5e7eb);
	background: var(--dm-color-surface-2, #f7f8fa);
}

.dm-shop-card__head::before {
	content: "";
	position: absolute;
	left: 10px;
	top: 14px;
	bottom: 12px;
	width: 4px;
	border-radius: 3px;
	background: var(--dm-color-accent, #d4242b);
}

.dm-shop-card__title {
	margin: 0;
	font-size: clamp(14px, 1.5vw, 16px);
	font-weight: 800;
	color: #0f172a;
	letter-spacing: .02em;
}

.dm-shop-card__body {
	padding: clamp(14px, 2vw, 20px);
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: clamp(12px, 1.6vw, 16px);
}

/* ---------- 基本情報テーブル ---------- */
.dm-shop-info {
	margin: 0;
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--dm-color-border, #e5e7eb);
}

.dm-shop-info__row {
	display: grid;
	grid-template-columns: minmax(96px, 28%) 1fr;
	border-bottom: 1px solid var(--dm-color-border, #e5e7eb);
}

.dm-shop-info__label {
	margin: 0;
	padding: 10px 12px;
	background: var(--dm-color-surface-2, #f7f8fa);
	color: #475569;
	font-size: 13px;
	font-weight: 600;
	display: flex;
	align-items: center;
}

.dm-shop-info__value {
	margin: 0;
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.6;
	color: #111827;
	font-weight: 700;
}

.dm-shop-info__tel {
	color: #111827;
	text-decoration: none;
	font-feature-settings: "tnum" 1;
}

.dm-shop-info__tel:hover,
.dm-shop-info__tel:focus-visible {
	color: var(--dm-color-accent, #d4242b);
}

/* ---------- アクションボタン ---------- */
.dm-shop-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.dm-shop-actions__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	border: 1px solid transparent;
	transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.dm-shop-actions__btn--map {
	color: #fff;
	background: var(--dm-shop-map-blue);
	border-color: var(--dm-shop-map-blue-edge);
	box-shadow: 0 1px 0 var(--dm-shop-map-blue-edge), 0 6px 14px rgba(31,78,192,.18);
}

.dm-shop-actions__btn--map:hover,
.dm-shop-actions__btn--map:focus-visible {
	background: var(--dm-shop-map-blue-edge);
	transform: translateY(-1px);
}

.dm-shop-actions__btn--ghost {
	color: #0f172a;
	background: #fff;
	border-color: var(--dm-color-border, #e5e7eb);
}

.dm-shop-actions__btn--ghost:hover,
.dm-shop-actions__btn--ghost:focus-visible {
	background: var(--dm-color-surface-2, #f7f8fa);
}

.dm-shop-actions__icon {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}

.dm-shop-actions__caret {
	margin-left: 4px;
	font-size: 18px;
	line-height: 1;
}

/* ---------- 店舗情報本文 ---------- */
.dm-shop-card__body--info {
	gap: 14px;
}

.dm-shop-catch {
	margin: 0;
	font-size: clamp(15px, 1.6vw, 17px);
	font-weight: 700;
	color: #0f172a;
}

.dm-shop-prose {
	margin: 0;
	font-size: 14px;
	line-height: 1.8;
	color: #1f2937;
}

.dm-shop-prose p { margin: 0 0 .9em; }
.dm-shop-prose p:last-child { margin-bottom: 0; }

.dm-shop-prose--placeholder {
	color: var(--dm-color-text-mute, #6b7280);
	font-style: italic;
}

.dm-shop-note {
	margin: 0;
	padding: 10px 12px;
	background: var(--dm-color-surface-2, #f7f8fa);
	border-radius: var(--dm-radius-sm, 8px);
	font-size: 13px;
	color: #475569;
	line-height: 1.7;
}

.dm-shop-figure {
	margin: 0;
	border-radius: var(--dm-radius-sm, 8px);
	overflow: hidden;
	background: var(--dm-color-surface-2, #f7f8fa);
}

.dm-shop-figure__img {
	display: block;
	width: 100%;
	height: auto;
}

/* ---------- 施工車写真集 ---------- */
.dm-shop-card__body--gallery {
	gap: 0;
	padding: clamp(14px, 2vw, 20px);
}

.dm-shop-gallery {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: clamp(12px, 1.6vw, 16px);
}

.dm-shop-gallery__item {
	margin: 0;
}

.dm-shop-gallery__link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	color: inherit;
	text-decoration: none;
	border-radius: var(--dm-radius-sm, 8px);
	padding: 8px;
	transition: background-color .12s ease, transform .12s ease;
}

.dm-shop-gallery__link:hover,
.dm-shop-gallery__link:focus-visible {
	background: var(--dm-color-surface-2, #f7f8fa);
	transform: translateY(-1px);
}

.dm-shop-gallery__figure {
	margin: 0;
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f3f4f6;
	border-radius: var(--dm-radius-sm, 8px);
	overflow: hidden;
}

.dm-shop-gallery__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dm-shop-gallery__icon {
	width: 60%;
	height: auto;
	max-width: 140px;
}

.dm-shop-gallery__caption {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 12px;
	line-height: 1.5;
	color: #475569;
	text-align: center;
}

.dm-shop-gallery__date {
	font-weight: 700;
	color: #0f172a;
	font-feature-settings: "tnum" 1;
}

.dm-shop-gallery__model {
	color: #475569;
}

.dm-shop-gallery__empty {
	margin: 0;
	padding: 18px 12px;
	text-align: center;
	color: var(--dm-color-text-mute, #6b7280);
	font-size: 14px;
}

/* ---------- 親テーマ干渉の打ち消し（最小） ---------- */
body.dm-shop-single #main_col,
body.dm-shop-single #left_col,
body.dm-shop-single #article {
	float: none;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

body.dm-shop-single #post_title,
body.dm-shop-single #post_image,
body.dm-shop-single #post_meta_top,
body.dm-shop-single #post_date,
body.dm-shop-single .post_content,
body.dm-shop-single #related_post,
body.dm-shop-single #single_share,
body.dm-shop-single #sidebar {
	display: none !important;
}

/* タッチ前提のスマホ向け微調整。 */
@media (max-width: 600px) {
	.dm-shop-info__row {
		grid-template-columns: 96px 1fr;
	}
}
