/* ========================================
   Estimate Simulator Page
   ======================================== */

:root {
	--est-blue: #1651f0;
	--est-blue-light: #e8eeff;
	--est-dark: #0a0a0a;
	--est-gray-50: #fafafa;
	--est-gray-100: #f5f5f5;
	--est-gray-200: #e5e5e5;
	--est-gray-300: #d4d4d4;
	--est-gray-400: #a3a3a3;
	--est-gray-500: #737373;
	--est-gray-600: #525252;
	--est-gray-700: #404040;
	--est-white: #ffffff;
	--est-radius: 12px;
	--est-radius-sm: 8px;
}

* { box-sizing: border-box; }

body.page-estimate {
	margin: 0;
	padding: 0;
	font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
	color: var(--est-dark);
	background: var(--est-gray-50);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

.est-container {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ---- Header ---- */
.est-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255,255,255,0.92);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--est-gray-200);
}

.est-header .header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}

.est-header .logo {
	font-size: 20px;
	font-weight: 700;
	text-decoration: none;
	color: var(--est-dark);
	letter-spacing: 0.02em;
}

.est-header .logo em {
	font-style: normal;
	color: var(--est-blue);
}

.btn-header {
	display: inline-flex;
	align-items: center;
	padding: 8px 20px;
	font-size: 13px;
	font-weight: 600;
	color: var(--est-white);
	background: var(--est-dark);
	border-radius: 100px;
	text-decoration: none;
	transition: opacity 0.2s;
}

.btn-header:hover { opacity: 0.8; }

/* ---- Hero ---- */
.est-hero {
	padding: 80px 0 48px;
	background: linear-gradient(135deg, #f0f4ff 0%, var(--est-gray-50) 100%);
}

.est-hero-inner {
	/* max-width: 640px; */
}

.tag {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--est-blue);
	background: var(--est-blue-light);
	border-radius: 100px;
	margin-bottom: 16px;
}

.est-hero h1 {
	font-size: 40px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: -0.02em;
	margin: 0 0 16px;
}

.est-hero-desc {
	font-size: 15px;
	color: var(--est-gray-500);
	margin: 0;
	line-height: 1.8;
}

/* ---- Main Layout ---- */
.est-main {
	padding: 48px 0 120px;
}

.est-layout {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 32px;
	align-items: start;
}

/* ---- Category ---- */
.est-category {
	margin-bottom: 40px;
}

.est-category-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.est-cat-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 800;
	color: var(--est-white);
	background: var(--est-blue);
}

.est-category-header h2 {
	font-size: 20px;
	font-weight: 700;
	margin: 0;
}

/* ---- Card ---- */
.est-card-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.est-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: var(--est-white);
	border: 2px solid var(--est-gray-200);
	border-radius: var(--est-radius);
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
	user-select: none;
}

.est-card:hover {
	border-color: var(--est-gray-300);
}

.est-card.checked {
	border-color: var(--est-blue);
	background: #f8faff;
	box-shadow: 0 0 0 1px var(--est-blue);
}

.est-card--consult {
	cursor: default;
	background: var(--est-gray-100);
	border-color: var(--est-gray-200);
}

.est-card--consult:hover {
	border-color: var(--est-gray-200);
}

.est-card-left {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
}

.est-card-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.est-check {
	width: 20px;
	height: 20px;
	accent-color: var(--est-blue);
	cursor: pointer;
	flex-shrink: 0;
}

.est-card-info h3 {
	font-size: 15px;
	font-weight: 600;
	margin: 0;
	line-height: 1.4;
}

.est-card-note {
	font-size: 12px;
	color: var(--est-gray-400);
	margin: 4px 0 0;
	line-height: 1.5;
}

.est-card-price {
	font-size: 16px;
	font-weight: 700;
	color: var(--est-dark);
	white-space: nowrap;
	flex-shrink: 0;
}

.est-card-price--consult {
	font-size: 13px;
	color: var(--est-gray-500);
	font-weight: 600;
}

/* ---- Quantity ---- */
.est-qty-wrap {
	display: flex;
	align-items: center;
	gap: 4px;
}

.qty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 1px solid var(--est-gray-300);
	border-radius: 6px;
	background: var(--est-white);
	font-size: 16px;
	font-weight: 600;
	color: var(--est-gray-600);
	cursor: pointer;
	transition: background 0.15s;
	line-height: 1;
}

.qty-btn:hover {
	background: var(--est-gray-100);
}

.qty-input {
	width: 40px;
	height: 28px;
	border: 1px solid var(--est-gray-300);
	border-radius: 6px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: var(--est-dark);
	-moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.qty-unit {
	font-size: 12px;
	color: var(--est-gray-400);
	margin-left: 2px;
}

/* ---- Summary ---- */
.est-summary-wrap {
	position: sticky;
	top: 88px;
}

.est-summary {
	background: var(--est-white);
	border: 1px solid var(--est-gray-200);
	border-radius: var(--est-radius);
	padding: 28px 24px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.est-summary h2 {
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 20px;
}

.est-summary-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 320px;
	overflow-y: auto;
}

.est-summary-empty {
	font-size: 14px;
	color: var(--est-gray-400);
	margin: 0;
	padding: 12px 0;
	text-align: center;
}

.est-summary-item {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	font-size: 13px;
}

.est-si-name {
	color: var(--est-gray-600);
	flex: 1;
	min-width: 0;
}

.est-si-qty {
	font-size: 12px;
	color: var(--est-blue);
	font-weight: 600;
}

.est-si-price {
	font-weight: 600;
	color: var(--est-dark);
	white-space: nowrap;
}

.est-summary-divider {
	height: 1px;
	background: var(--est-gray-200);
	margin: 20px 0 16px;
}

.est-summary-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14px;
	margin-bottom: 8px;
}

.est-total-price {
	font-size: 18px;
	font-weight: 700;
}

.est-summary-tax {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
	color: var(--est-gray-500);
	margin-bottom: 16px;
}

.est-summary-grand {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 0;
	border-top: 2px solid var(--est-dark);
	margin-bottom: 20px;
}

.est-summary-grand span:first-child {
	font-size: 14px;
	font-weight: 700;
}

.est-grand-price {
	font-size: 24px;
	font-weight: 800;
	color: var(--est-blue);
}

.btn-estimate {
	display: block;
	width: 100%;
	padding: 14px;
	text-align: center;
	font-size: 15px;
	font-weight: 700;
	color: var(--est-white);
	background: var(--est-blue);
	border-radius: 100px;
	text-decoration: none;
	transition: opacity 0.2s;
}

.btn-estimate:hover { opacity: 0.85; }

.est-summary-note {
	font-size: 11px;
	color: var(--est-gray-400);
	margin: 16px 0 0;
	line-height: 1.6;
	text-align: center;
}

/* ---- Mobile Floating Total ---- */
.est-mobile-total {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: var(--est-white);
	border-top: 1px solid var(--est-gray-200);
	box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
	padding: 12px 16px;
	transform: translateY(100%);
	transition: transform 0.3s ease;
}

.est-mobile-total.visible {
	transform: translateY(0);
}

.est-mobile-total-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 600px;
	margin: 0 auto;
}

.est-mobile-total-info {
	display: flex;
	flex-direction: column;
}

.est-mobile-label {
	font-size: 11px;
	color: var(--est-gray-500);
}

.est-mobile-price {
	font-size: 20px;
	font-weight: 800;
	color: var(--est-blue);
}

.btn-mobile-estimate {
	display: inline-flex;
	align-items: center;
	padding: 10px 24px;
	font-size: 14px;
	font-weight: 700;
	color: var(--est-white);
	background: var(--est-blue);
	border-radius: 100px;
	text-decoration: none;
}

/* ---- Footer ---- */
.est-footer {
	background: var(--est-dark);
	color: var(--est-white);
	padding: 48px 0;
}

.est-footer .footer-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.est-footer .footer-logo {
	font-size: 18px;
	font-weight: 700;
	text-decoration: none;
	color: var(--est-white);
}

.est-footer .footer-logo em {
	font-style: normal;
	color: var(--est-blue);
}

.est-footer .footer-links {
	display: flex;
	gap: 24px;
}

.est-footer .footer-links a {
	font-size: 13px;
	color: rgba(255,255,255,0.6);
	text-decoration: none;
	transition: color 0.2s;
}

.est-footer .footer-links a:hover { color: var(--est-white); }

.est-footer .footer-copy {
	font-size: 12px;
	color: rgba(255,255,255,0.35);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 900px) {
	.est-layout {
		grid-template-columns: 1fr;
	}

	.est-summary-wrap {
		position: static;
		display: none;
	}

	.est-mobile-total {
		display: block;
	}

	.est-main {
		padding-bottom: 100px;
	}
}

@media (max-width: 600px) {
	.est-hero {
		padding: 60px 0 32px;
	}

	.est-hero h1 {
		font-size: 28px;
	}

	.est-hero-desc {
		font-size: 13px;
	}

	.est-card {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		padding: 14px 16px;
	}

	.est-card-right {
		width: 100%;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}

	.est-card-price {
		font-size: 14px;
	}

	.est-category-header h2 {
		font-size: 17px;
	}
}
