/**
 * WordPress テーマとの共存用 オーバーライド・追加スタイル
 *
 * theme.css のあとに読み込まれる。テーマ固有の干渉を回避するための調整。
 */

/* WordPressテーマがcontainerなどに余白を付けることがあるので、mirais-themeでは中和 */
.mirais-theme {
	margin: 0 !important;
	padding: 0 !important;
}

/* mirais-theme 内のリスト・パラグラフのデフォルトマージンをクリーンに */
.mirais-theme ul,
.mirais-theme ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mirais-theme h1,
.mirais-theme h2,
.mirais-theme h3,
.mirais-theme h4,
.mirais-theme h5,
.mirais-theme h6 {
	margin: 0;
}

.mirais-theme p {
	margin: 0;
}

/* WPテーマがbuttonに枠線を付けることがあるので除去 */
.mirais-theme button {
	border: none;
	background: transparent;
	cursor: pointer;
	font-family: inherit;
}

/* WordPress テーマで wp-block-image などがあった場合の干渉を防ぐ */
.mirais-theme img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ===== モバイル ハンバーガーメニュー ===== */

.mirais-theme .hamburger {
	display: none;
}

@media (max-width: 900px) {
	.mirais-theme .hamburger {
		display: block;
		background: transparent;
		border: none;
		padding: 8px;
		font-size: 22px;
	}
	.mirais-theme .site-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		border-top: 1px solid var(--border);
		flex-direction: column;
		padding: 14px 20px;
		gap: 4px;
		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
	}
	.mirais-theme .site-nav.open {
		display: flex;
	}
	.mirais-theme .site-nav a {
		padding: 10px 0;
		border-bottom: 1px solid var(--bg-alt);
	}
	.mirais-theme .header-actions {
		gap: 6px;
	}
	.mirais-theme .lang-switcher,
	.mirais-theme .currency-switcher {
		display: none;
	}
}

/* ===== コンタクト・チャットボックス(下部チャネル選択) ===== */

.mirais-theme .contact-channels {
	max-width: 1200px;
	margin: 0 auto;
	padding: 60px 20px;
}

.mirais-theme .contact-channels-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}

.mirais-theme .contact-channel {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 22px 18px;
	text-align: center;
	transition: all 0.2s;
	cursor: pointer;
}

.mirais-theme .contact-channel:hover {
	border-color: var(--primary);
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.mirais-theme .contact-channel .icon {
	font-size: 32px;
	margin-bottom: 10px;
}

.mirais-theme .contact-channel .name {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 4px;
}

.mirais-theme .contact-channel .desc {
	font-size: 11px;
	color: var(--text-sub);
}

/* ===== ライブチャットフローティングボタン ===== */

.mirais-theme-chat-btn {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 56px;
	height: 56px;
	background: var(--accent, #00A3B4);
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 163, 180, 0.4);
	z-index: 9999;
	border: none;
	transition: transform 0.2s;
}

.mirais-theme-chat-btn:hover {
	transform: scale(1.08);
}

/* ===== ヒーロー検索フォームのスマホ調整 ===== */
@media (max-width: 768px) {
	.mirais-theme .hero {
		padding: 50px 16px 70px;
	}
	.mirais-theme .hero h1 {
		font-size: 28px;
	}
	.mirais-theme .hero .sub {
		font-size: 14px;
	}
	.mirais-theme .hero-search {
		padding: 18px;
	}
	.mirais-theme .search-row {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	.mirais-theme .search-btn {
		width: 100%;
	}
	.mirais-theme .section {
		padding: 50px 16px;
	}
	.mirais-theme .section-head h2 {
		font-size: 22px;
	}
	.mirais-theme .features-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
	.mirais-theme .car-grid {
		grid-template-columns: 1fr;
	}
	.mirais-theme .reviews-grid {
		grid-template-columns: 1fr;
	}
	.mirais-theme .cta-section {
		padding: 50px 16px;
	}
	.mirais-theme .cta-section h2 {
		font-size: 22px;
	}
	.mirais-theme .footer-cols {
		grid-template-columns: 1fr 1fr;
		gap: 24px;
	}
}

/* ===== 既存 .mirais-app CSS との共存 ===== */
/* 古い予約フォームUIは別CSS(reserve.css)で管理。.mirais-theme と .mirais-app は別系統で動く */


/* ===== v0.8.0 追加スタイル ===== */

/* FAQ details/summary をクリックしやすく */
.mirais-theme .faq-item {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 8px;
	margin-bottom: 10px;
	overflow: hidden;
}

.mirais-theme .faq-item summary {
	padding: 16px 20px;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 500;
	font-size: 14px;
	color: var(--text);
	list-style: none;
}

.mirais-theme .faq-item summary::-webkit-details-marker {
	display: none;
}

.mirais-theme .faq-item summary .arr {
	color: var(--primary);
	transition: transform 0.2s;
	flex-shrink: 0;
	font-size: 12px;
}

.mirais-theme .faq-item[open] summary .arr {
	transform: rotate(180deg);
}

.mirais-theme .faq-item summary:hover {
	background: var(--bg-alt);
}

.mirais-theme .faq-a {
	padding: 0 20px 18px;
	font-size: 13px;
	line-height: 1.85;
	color: var(--text-sub);
	border-top: 1px solid var(--bg-alt);
	padding-top: 14px;
	margin-top: 4px;
}

/* タブを a タグでも適用できるように */
.mirais-theme .car-class-tabs a {
	padding: 9px 18px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 24px;
	font-size: 13px;
	color: var(--text);
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	transition: all 0.2s;
}

.mirais-theme .car-class-tabs a.active {
	background: var(--primary);
	color: #fff;
	border-color: var(--primary);
}

.mirais-theme .car-class-tabs a:hover:not(.active) {
	border-color: var(--primary);
	color: var(--primary);
}

/* 会社概要テーブル */
.mirais-theme .company-table th {
	vertical-align: top;
}

@media (max-width: 768px) {
	.mirais-theme .company-table th {
		display: block;
		width: 100% !important;
		text-align: left;
		padding-bottom: 4px !important;
	}
	.mirais-theme .company-table td {
		display: block;
		width: 100%;
		padding-top: 0 !important;
	}
	.mirais-theme .store-grid {
		grid-template-columns: 1fr !important;
	}
}

/* ===== v1.3.0: オプション写真表示 ===== */
.mirais-theme .option-item.has-photo {
	padding: 10px 14px;
	min-height: 76px;
}

.mirais-theme .option-item .opt-photo {
	position: relative;
	width: 64px;
	height: 64px;
	border-radius: 6px;
	overflow: hidden;
	flex-shrink: 0;
	cursor: zoom-in;
	background: #fff;
	border: 1px solid var(--border);
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
	transition: transform 0.15s, box-shadow 0.15s;
}

.mirais-theme .option-item .opt-photo:hover {
	transform: scale(1.05);
	box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.mirais-theme .option-item .opt-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mirais-theme .option-item .opt-photo-count {
	position: absolute;
	bottom: 3px;
	right: 3px;
	background: rgba(15, 76, 129, 0.92);
	color: #fff;
	font-size: 10px;
	font-weight: 600;
	padding: 1px 6px;
	border-radius: 8px;
	min-width: 22px;
	text-align: center;
	pointer-events: none;
}

/* モバイル: 写真小さく */
@media (max-width: 480px) {
	.mirais-theme .option-item .opt-photo {
		width: 52px;
		height: 52px;
	}
}
