/* KHOME TOSTEM Series — 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-ts { color: var(--kh-dark); }
.kh-ts a { color: inherit; }
.kh-ts .kh-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.kh-ts .kh-section { padding: 100px 0; }
.kh-ts .kh-section--grey { background: var(--kh-light); }
/* Section header (h2/sub/section--head) is shared from khome-global.css */

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

/* === Unique Features: tabs === */
.kh-ts-tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-bottom: 40px;
}
.kh-ts-tab {
	border: 1px solid var(--kh-grey-200);
	background: #fff;
	color: var(--kh-grey-500);
	font-weight: 600;
	font-size: .92rem;
	padding: 11px 22px;
	border-radius: 999px;
	cursor: pointer;
	transition: all .15s ease;
}
.kh-ts-tab:hover {
	color: var(--kh-navy);
	border-color: var(--kh-grey-300);
}
.kh-ts-tab.is-active {
	background: var(--kh-navy);
	border-color: var(--kh-navy);
	color: #fff;
}
.kh-ts-panel { display: none; }
.kh-ts-panel.is-active { display: block; }

.kh-ts-feat-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	max-width: 1080px;
	margin: 0 auto;
}
.kh-ts-feat-grid--3 { grid-template-columns: repeat(3, 1fr); max-width: 810px; }
.kh-ts-feat-grid--2 { grid-template-columns: repeat(2, 1fr); max-width: 540px; }
.kh-ts-feat-grid--1 { grid-template-columns: 1fr; max-width: 270px; }
.kh-ts-feat {
	margin: 0;
	text-align: center;
}
.kh-ts-feat-img {
	aspect-ratio: 1 / 1;
	border-radius: var(--kh-radius);
	border: 1px solid var(--kh-grey-200);
	background-size: cover;
	background-position: center;
	background-color: var(--kh-grey-100);
}
.kh-ts-feat figcaption {
	margin-top: 12px;
	font-size: .9rem;
	color: #374151;
	line-height: 1.5;
}

/* === Frame colors === */
.kh-ts-color-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 20px;
	max-width: 1000px;
	margin: 0 auto;
}
.kh-ts-color {
	margin: 0;
	text-align: center;
}
.kh-ts-color-swatch {
	aspect-ratio: 1 / 1;
	border-radius: var(--kh-radius);
	border: 1px solid var(--kh-grey-200);
	background-size: cover;
	background-position: center;
	background-color: #fff;
	box-shadow: var(--kh-shadow-sm);
	transition: all .2s ease;
}
.kh-ts-color:hover .kh-ts-color-swatch {
	transform: translateY(-3px);
	box-shadow: var(--kh-shadow-md);
}
.kh-ts-color figcaption {
	margin-top: 10px;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--kh-grey-500);
}

/* === JIS standards (dark navy) === */
.kh-ts .kh-section--navy { background: var(--kh-navy); }
.kh-ts .kh-section--navy .kh-h2 { color: #fff; }
.kh-ts .kh-section--navy .kh-sub { color: rgba(255,255,255,.75); margin-left: 0; }
.kh-ts-jis-grid {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 80px;
	align-items: center;
}
.kh-ts-jis-copy h2 { margin-bottom: 16px; }
.kh-ts-jis-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px 40px;
}
.kh-ts-jis-list li { display: flex; gap: 16px; align-items: flex-start; }
.kh-ts-jis-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-ts-jis-icon i { font-size: 22px; line-height: 1; color: var(--kh-orange); }
.kh-ts-jis-list strong {
	color: #fff;
	display: block;
	font-size: 1rem;
	margin-bottom: 4px;
}
.kh-ts-jis-value {
	display: block;
	font-size: .92rem;
	color: rgba(255,255,255,.85);
	line-height: 1.5;
}
.kh-ts-jis-std {
	display: block;
	font-size: .78rem;
	color: rgba(255,255,255,.5);
	margin-top: 2px;
}

/* === Installation gallery === */
.kh-ts-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}
.kh-ts-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-ts-gallery-item:hover {
	transform: translateY(-3px);
	box-shadow: var(--kh-shadow-md);
}

/* Lightbox */
.kh-ts-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-ts-lightbox[hidden] { display: none; }
.kh-ts-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-ts-lb-close,
.kh-ts-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-ts-lb-close:hover,
.kh-ts-lb-nav:hover { background: var(--kh-orange); }
.kh-ts-lb-close { top: 20px; right: 20px; }
.kh-ts-lb-nav { top: 50%; transform: translateY(-50%); font-size: 2rem; }
.kh-ts-lb-prev { left: 20px; }
.kh-ts-lb-next { right: 20px; }

/* === Contact CTA === */
.kh-ts-cta { text-align: center; }
.kh-ts-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-ts-color-grid { grid-template-columns: repeat(3, 1fr); max-width: 560px; }
}
@media (max-width: 960px) {
	.kh-ts .kh-section { padding: 70px 0; }
	.kh-ts-feat-grid,
	.kh-ts-feat-grid--3 { grid-template-columns: 1fr 1fr; max-width: 540px; }
	.kh-ts-jis-grid { grid-template-columns: 1fr; gap: 50px; }
	.kh-ts-gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
	.kh-ts .kh-section { padding: 36px 0; }
	.kh-ts-jis-list { grid-template-columns: 1fr; gap: 24px; }
	.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; }
}
@media (max-width: 600px) {
	.kh-ts-feat-grid,
	.kh-ts-feat-grid--3,
	.kh-ts-feat-grid--2 { grid-template-columns: 1fr 1fr; gap: 14px; }
	.kh-ts-color-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
	.kh-ts-gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
	.kh-ts-lb-close,
	.kh-ts-lb-nav { width: 40px; height: 40px; }
	.kh-ts-lb-prev { left: 10px; }
	.kh-ts-lb-next { right: 10px; }
}

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