/* KHOME ShinkoLite Color — classic PHP template styles */

:root {
	--kh-orange:     #ff6b1a;
	--kh-orange-600: #e85a0c;
	--kh-navy:       #0c2340;
	--kh-navy-50:    #f3f6fb;
	--kh-dark:       #111827;
	--kh-grey:       #6B7280;
	--kh-grey-500:   #6b7280;
	--kh-grey-300:   #d1d5db;
	--kh-grey-200:   #e5e7eb;
	--kh-grey-100:   #f3f4f6;
	--kh-light:      #f8fafc;
	--kh-line:       #06C755;
	--kh-line-600:   #05A647;
	--kh-border:     rgba(0,0,0,.08);
	--kh-radius:     10px;
	--kh-radius-lg:  16px;
	--kh-shadow-sm:  0 1px 2px rgba(12,35,64,.06), 0 1px 3px rgba(12,35,64,.08);
	--kh-shadow-md:  0 6px 18px rgba(12,35,64,.08);
	--kh-shadow-lg:  0 18px 40px rgba(12,35,64,.12);
}

.kh-colorpage { color: var(--kh-dark); }
.kh-colorpage a { color: inherit; }
.kh-colorpage .kh-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.kh-colorpage .kh-section { padding: 100px 0; }
.kh-colorpage .kh-section--grey { background: var(--kh-light); }
/* Section header (h2/sub/section--head) is shared from khome-global.css */
/* Wider intro text under section headings on color pages (global caps at 720px) */
.kh-colorpage .kh-sub,
.kh-colorpage .kh-section--head .kh-sub { max-width: 850px; }

.kh-colorpage .kh-arrow-link {
	display: inline-flex;
	align-items: center;
	font-weight: 600;
	color: var(--kh-orange);
	text-decoration: none;
	transition: color .2s ease;
	font-size: .85rem;
}
.kh-colorpage .kh-arrow-link:hover { color: var(--kh-orange-600); }

/* Inline links typed into the editable text fields — same orange as .kh-arrow-link.
   Scoped to paragraphs so buttons, breadcrumbs, and cards are unaffected. */
.kh-colorpage p a:not(.kh-btn) {
	color: var(--kh-orange);
	font-weight: 600;
	text-decoration: none;
}
.kh-colorpage p a:not(.kh-btn):hover { color: var(--kh-orange-600); }

/* Hero rules live in khome-global.css under .kh-page-hero / .kh-page-hero-inner */

/* === Overview + Specs === */
.kh-cp-overview-grid {
	display: grid;
	grid-template-columns: 0.8fr 1.2fr;
	gap: 80px;
	align-items: center;
}
.kh-cp-swatch {
	aspect-ratio: 4 / 5;
	border-radius: var(--kh-radius-lg);
	background-size: cover;
	background-position: center;
	background-color: var(--kh-navy-50);
	box-shadow: var(--kh-shadow-lg);
}
.kh-cp-overview-copy h2 { margin-bottom: 20px; }
.kh-cp-overview-copy p { color: #374151; line-height: 1.7; margin: 0 0 14px; }
.kh-cp-specs {
	margin: 28px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 32px;
	border-top: 1px solid var(--kh-grey-200);
}
.kh-cp-spec {
	display: flex;
	align-items: baseline;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--kh-grey-200);
}
.kh-cp-spec dt {
	font-size: .88rem;
	color: var(--kh-grey-500);
	flex: 0 0 45%;
}
.kh-cp-spec dd {
	margin: 0;
	font-size: .95rem;
	font-weight: 700;
	color: var(--kh-navy);
	text-align: left;
}

/* === Sizes & Prices === */
/* Sheet image card beside the table; grid collapses to one column when the
   image is absent (single child) and stacks on tablet/mobile. */
.kh-cp-sizes-grid {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	gap: 32px;
	align-items: stretch;
}
.kh-cp-sizes-grid > .kh-cp-table-wrap:only-child { grid-column: 1 / -1; }
/* The img is absolutely positioned so the card adds no height of its own —
   the table's natural height defines the row, and the card stretches to it. */
.kh-cp-sizes-img {
	position: relative;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--kh-grey-200);
	border-radius: var(--kh-radius-lg);
	box-shadow: var(--kh-shadow-sm);
}
.kh-cp-sizes-img img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
.kh-cp-table-wrap {
	overflow-x: auto;
	background: #fff;
	border: 1px solid var(--kh-grey-200);
	border-radius: var(--kh-radius-lg);
	box-shadow: var(--kh-shadow-sm);
}
.kh-cp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .95rem;
	min-width: 640px;
}
.kh-cp-table th {
	background: var(--kh-navy);
	color: #fff;
	font-weight: 600;
	font-size: .88rem;
	text-align: center;
	padding: 16px 24px;
	white-space: nowrap;
}
.kh-cp-table td {
	padding: 16px 24px;
	border-top: 1px solid var(--kh-grey-200);
	color: #374151;
	text-align: center;
}
.kh-cp-table tbody tr:nth-child(even) { background: var(--kh-light); }
.kh-cp-table tbody tr:hover { background: var(--kh-navy-50); }
.kh-cp-td-size { font-weight: 600; color: var(--kh-navy); }
.kh-cp-td-price { font-weight: 800; color: var(--kh-orange); white-space: nowrap; }
.kh-cp-table-note {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	max-width: 820px;
	margin: 20px auto 0;
	color: var(--kh-grey-500);
	font-size: .88rem;
	line-height: 1.6;
	justify-content: center;
	text-align: left;
}
.kh-cp-table-note i { color: var(--kh-orange); line-height: 1.6; flex: none; }

/* === Comparison table (#compare) ===
   Inherits the full .kh-cp-table look; only the "our product" column is
   highlighted, striped in two orange tints to mirror the zebra rows. */
.kh-cp-cmp td.kh-cp-cmp-me { background: #fff6ef; font-weight: 700; }
.kh-cp-cmp tbody tr:nth-child(even) td.kh-cp-cmp-me { background: #fdeada; }

/* === Benefits (dark navy) === */
.kh-colorpage .kh-section--navy { background: var(--kh-navy); }
.kh-colorpage .kh-section--navy .kh-h2 { color: #fff; }
.kh-colorpage .kh-section--navy .kh-sub { color: rgba(255,255,255,.75); }
.kh-cp-benefit-grid {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 36px 40px;
}
.kh-cp-benefit-grid li { display: flex; gap: 16px; align-items: flex-start; }
.kh-cp-benefit-icon {
	flex: none;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,107,26,.15);
	color: var(--kh-orange);
	border-radius: 12px;
}
.kh-cp-benefit-icon i { font-size: 22px; line-height: 1; color: var(--kh-orange); }
.kh-cp-benefit-grid strong {
	color: #fff;
	display: block;
	font-size: 1rem;
	margin-bottom: 4px;
}
.kh-cp-benefit-grid li > div > span {
	font-size: .9rem;
	color: rgba(255,255,255,.72);
	line-height: 1.6;
}

/* === Installation gallery === */
.kh-cp-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}
.kh-cp-gallery-item {
	aspect-ratio: 4 / 3;
	border: 0;
	padding: 0;
	display: block;
	width: 100%;
	cursor: zoom-in;
	border-radius: var(--kh-radius);
	background-size: cover;
	background-position: center;
	background-color: var(--kh-grey-100);
	box-shadow: var(--kh-shadow-sm);
	transition: all .2s ease;
}
.kh-cp-gallery-item:hover {
	transform: translateY(-3px);
	box-shadow: var(--kh-shadow-md);
}

/* Lightbox */
.kh-cp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(12,35,64,.92);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.kh-cp-lightbox[hidden] { display: none; }
.kh-cp-lb-img {
	max-width: min(1100px, 92vw);
	max-height: 85vh;
	width: auto;
	height: auto;
	border-radius: var(--kh-radius);
	box-shadow: var(--kh-shadow-lg);
}
.kh-cp-lb-close,
.kh-cp-lb-nav {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.12);
	color: #fff;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	transition: background .15s;
}
.kh-cp-lb-close:hover,
.kh-cp-lb-nav:hover { background: var(--kh-orange); }
.kh-cp-lb-close { top: 20px; right: 20px; }
.kh-cp-lb-nav { top: 50%; transform: translateY(-50%); font-size: 2rem; }
.kh-cp-lb-prev { left: 20px; }
.kh-cp-lb-next { right: 20px; }
@media (max-width: 600px) {
	.kh-cp-lb-close,
	.kh-cp-lb-nav { width: 40px; height: 40px; }
	.kh-cp-lb-prev { left: 10px; }
	.kh-cp-lb-next { right: 10px; }
}

/* === Other colors === */
.kh-cp-other-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}
.kh-cp-other-card {
	background: #fff;
	border: 1px solid var(--kh-grey-200);
	border-radius: var(--kh-radius);
	overflow: hidden;
	transition: all .2s ease;
	display: flex;
	flex-direction: column;
	text-align: center;
	text-decoration: none;
}
.kh-cp-other-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--kh-shadow-md);
	border-color: transparent;
}
.kh-cp-other-img {
	aspect-ratio: 4 / 5;
	width: 70%;
	max-width: 160px; /* 4:5 ratio → image never taller than 200px */
	margin: 16px auto 0;
	border-radius: 6px;
	background-size: cover;
	background-position: center;
	background-color: var(--kh-grey-100);
}
.kh-cp-other-body { padding: 4px 16px 18px; }
.kh-cp-other-code {
	font-size: 1.15rem;
	color: var(--kh-navy);
	font-weight: 800;
	margin: 8px 0 0 !important;
	line-height: 1;
}
.kh-cp-other-name {
	color: var(--kh-grey-500);
	font-size: .88rem;
	margin: 4px 0 10px;
}

/* === Contact CTA === */
.kh-cp-cta { text-align: center; }
.kh-cp-cta .kh-sub { margin-left: auto; margin-right: auto; }
.kh-cta-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin-top: 32px;
}
.kh-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 28px;
	border-radius: 8px;
	color: #fff !important;
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
	box-sizing: border-box;
	transition: background .15s, transform .15s;
}
.kh-btn:hover { transform: translateY(-1px); }
.kh-btn i { font-size: 1.1em; line-height: 1; }
.kh-btn--phone { background: var(--kh-orange); }
.kh-btn--phone:hover { background: var(--kh-orange-600); }
.kh-btn--line { background: var(--kh-line); }
.kh-btn--line:hover { background: var(--kh-line-600); }

/* === Responsive === */
@media (max-width: 1024px) {
	.kh-cp-benefit-grid { grid-template-columns: 1fr 1fr; }
	.kh-cp-other-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
	.kh-colorpage .kh-section { padding: 70px 0; }
	.kh-cp-overview-grid { grid-template-columns: 1fr; gap: 50px; }
	.kh-cp-swatch { position: static; max-width: 420px; margin: 0 auto; width: 100%; }
	.kh-cp-sizes-grid { grid-template-columns: 1fr; gap: 24px; }
	.kh-cp-sizes-img { max-width: 260px; margin: 0 auto; width: 100%; }
	/* Stacked: absolute img would collapse the card — back to normal flow */
	.kh-cp-sizes-img img { position: static; height: auto; }
	.kh-cp-gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
	.kh-colorpage .kh-section { padding: 36px 0; }
	.kh-cp-benefit-grid { grid-template-columns: 1fr; gap: 24px; }
	.kh-cp-specs { grid-template-columns: 1fr; }
	.kh-cta-buttons { flex-wrap: nowrap; gap: 10px; }
	.kh-cta-buttons .kh-btn { flex: 1; min-width: 0; justify-content: center; padding: 13px 12px; font-size: .95rem; }
	/* Table fits the screen: drop the area + weight columns instead of scrolling */
	.kh-cp-table { min-width: 0; }
	.kh-cp-table th:nth-child(2),
	.kh-cp-table th:nth-child(3),
	.kh-cp-table td:nth-child(2),
	.kh-cp-table td:nth-child(3) { display: none; }
	.kh-cp-table th,
	.kh-cp-table td { padding: 14px 12px; white-space: normal; }
	/* Comparison table must keep all columns (col 2 is the product itself) — scroll instead */
	.kh-cp-cmp { min-width: 640px; }
	.kh-cp-cmp th:nth-child(2),
	.kh-cp-cmp th:nth-child(3),
	.kh-cp-cmp td:nth-child(2),
	.kh-cp-cmp td:nth-child(3) { display: table-cell; }
}
@media (max-width: 600px) {
	.kh-cp-gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
	.kh-cp-other-grid { grid-template-columns: 1fr 1fr; }
}

/* === CTA strip (under hero) === */
.kh-cp-cta-strip {
	background: var(--kh-light);
	border-bottom: 1px solid var(--kh-grey-200);
	padding: 26px 0;
}
.kh-cp-cta-strip-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px 32px;
	flex-wrap: wrap;
}
/* WP global styles force ":root :where(h1..h6) { margin-top: 2.5rem !important }" —
   only an !important of our own can zero it */
.kh-colorpage .kh-cp-cta-strip-copy h2 {
	color: var(--kh-navy);
	font-size: 1.25rem;
	font-weight: 800;
	margin: 0;
	margin-top: 0 !important;
	line-height: 1.4;
}
.kh-colorpage .kh-cp-cta-strip-copy p {
	color: var(--kh-grey-500);
	font-size: .95rem;
	margin: 6px 0 0;
}
.kh-cp-cta-strip .kh-cta-buttons { margin-top: 0; }
@media (max-width: 720px) {
	/* Mobile-only: shrink the hero title (global clamp() floor is 2.2rem) */
	.kh-colorpage .kh-page-hero h1 { font-size: 2rem; }
	/* Mobile-only: nudge spec labels off the edge */
	.kh-cp-specs dt { margin-left: 5px; }
	.kh-cp-cta-strip { padding: 22px 0; }
	.kh-cp-cta-strip-inner { flex-direction: column; align-items: stretch; text-align: center; }
	.kh-cp-cta-strip .kh-cta-buttons { width: 100%; }
}

/* v1.4.0 -- real <img> inside gallery tiles (media alt for SEO/a11y); bg-image kept as fallback */
.kh-cp-gallery-item { position: relative; overflow: hidden; }
.kh-cp-gallery-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
