.sdx1:hover { border-color:#14161A !important }
.sdx2:hover { background:#fff !important }
.sdx3:hover { background:rgba(255,255,255,0.12) !important }
.sdx4:hover { background:#F7F5F2 !important }
.sdx5:hover { background:#2A2E34 !important }
.sdx6:focus { border-bottom-color:#4E7B93 !important }
.sdx7:focus { border-color:#4E7B93 !important }

.gtab { flex-shrink: 0; border: 1px solid rgba(20,22,26,0.16); padding: 14px 18px; min-height: 46px; font-size: 12.5px; letter-spacing: 0.02em; cursor: pointer; white-space: nowrap; background: none; color: #3A3E44; }
.gtab-on { background: #14161A; color: #F7F5F2; border-color: #14161A; }


/* 셀 경계선 — 빈 칸에 배경이 비치지 않도록 각 셀에 직접 그립니다 */
.hairgrid > * { box-shadow: 0 0 0 1px rgba(20,22,26,0.12); }
.hairgrid-dark > * { box-shadow: 0 0 0 1px rgba(255,255,255,0.12); }


/* 항목 그리드 — 균형 있게 줄 맞춤 */
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)) !important; }
@media (max-width: 1000px) {
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}
@media (max-width: 560px) {
  .g2, .g3, .g4 { grid-template-columns: minmax(0,1fr) !important; }
}


/* 한글 줄바꿈 — 단어 중간에서 끊기지 않게 */
body, p, li, dt, dd, h1, h2, h3, div, span, a, figcaption {
  word-break: keep-all;
  overflow-wrap: break-word;
}
p, li, dd, h1, h2, h3 { text-wrap: pretty; }

/* 종합 카탈로그 제품 그리드 — 품목 수에 맞춰 열 수 */
.catgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.catgrid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.catgrid.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.catgrid > a { background: #fff; box-shadow: 0 1px 3px rgba(20,22,26,0.06); }
@media (max-width: 1200px) { .catgrid.c5 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1080px) { .catgrid, .catgrid.c3, .catgrid.c5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .catgrid, .catgrid.c3, .catgrid.c5 { grid-template-columns: 1fr; } }

/* 제품 사진 갤러리 — 사진 수에 맞춰 줄 균형 */
@media (max-width: 900px) { .photogrid.c3, .photogrid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 560px) { .photogrid { grid-template-columns: 1fr !important; } }

/* 주요 거래처 — 5열 × 2줄 */
.clientgrid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
@media (max-width: 1080px) { .clientgrid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 720px) { .clientgrid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* 특징 · 시공순서 카드 — 개수에 맞춰 줄 균형 */
.feat3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.feat2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
@media (max-width: 900px) { .feat3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 560px) { .feat3, .feat2 { grid-template-columns: 1fr !important; } }
