@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap");

/* 색상 변수: 이 부분의 색상 코드만 바꾸면 전체 디자인 톤을 쉽게 변경할 수 있습니다. */
:root {
  --primary-color: #0d6efd; /* 사이트의 메인 파란색 */
  --secondary-color: #e7f0ff; /* 마우스 올렸을 때 연한 파란색 */
  --banner-bg-start: #2c3e50; /* 배너 배경 그라디언트 시작 색 */
  --banner-bg-end: #34495e; /* 배너 배경 그라디언트 끝 색 */
  --banner-text-color: #ffffff; /* 배너 텍스트 흰색 */
}

/* 전체 폰트를 부드러운 Noto Sans KR로 설정 */
body {
  font-family: "Noto Sans KR", sans-serif;
}

.product-header-container {
  width: 100%;
  /* background-color: #f8f9fa; */ /* 전체 섹션의 연한 회색 배경 */
  padding-bottom: 0; /* 터치 문제를 유발할 수 있는 하단 패딩 제거 */
}

/* --- 💎 배너 스타일 --- */
.product-banner {
  /* 세련된 그라디언트 배경 */
  background: linear-gradient(
    90deg,
    var(--banner-bg-start),
    var(--banner-bg-end)
  );
  color: var(--banner-text-color);
  text-align: center;
  padding: 60px 20px; /* 상하 여백을 늘려 시원한 느낌을 줍니다 */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 은은한 그림자 효과 */
}

.product-banner h1 {
  margin: 0;
  font-size: 2.8rem; /* 제목을 키워 주목도를 높입니다 */
  font-weight: 700; /* 굵은 글씨체 */
}

.product-banner p {
  margin: 10px 0 0;
  font-size: 1.1rem;
  opacity: 0.9; /* 부제목은 살짝 투명하게 처리 */
}

/* --- 🔘 버튼 필터 그룹 --- */
.product-filters {
  display: flex; /* 버튼들을 가로로 정렬 */
  justify-content: center; /* 가운데 정렬 */
  flex-wrap: wrap; /* 화면이 작아지면 버튼이 아래로 자동 줄바꿈 */
  gap: 12px; /* 버튼 사이의 간격 */
  padding: 40px 20px 0;
  position: relative; /* 다른 요소와의 z-index 관계 설정을 위해 추가 */
  z-index: 2; /* 메뉴 드롭다운(z-index: 6)보다 낮게 설정 */
}

/* --- 개별 버튼 스타일 --- */
.filter-btn {
  padding: 10px 24px; /* 버튼 내부 여백 */
  min-width: 160px; /* 버튼의 최소 너비를 지정하여 너비를 통일합니다. */
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 50px; /* 둥근 알약 형태의 버튼 */
  border: 1px solid var(--primary-color);
  background-color: #ffffff; /* 기본 상태는 흰색 배경 */
  color: var(--primary-color); /* 글자는 파란색 */
  cursor: pointer;
  transition: all 0.3s ease; /* 모든 효과를 0.3초 동안 부드럽게 전환 */
}

/* --- 💨 마우스 호버 & 활성 상태 --- */
.filter-btn:hover {
  background-color: var(
    --secondary-color
  ); /* 마우스를 올리면 연한 파란색 배경 */
  transform: translateY(-3px); /* 살짝 위로 떠오르는 효과 */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 그림자 효과 강화 */
}

/* 'active' 클래스가 붙은 버튼의 스타일 (선택된 버튼) */
.filter-btn.active {
  background-color: var(--primary-color); /* 진한 파란색 배경 */
  color: #ffffff; /* 글자는 흰색 */
  border-color: var(--primary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

@media screen and (max-width: 768px) {
  .product-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 20px; /* 상하 여백을 절반으로 줄입니다. */
  }
  .product-banner h1 {
    font-size: 2rem;
  }
  .product-banner p {
    font-size: 1rem;
  }
  .category {
    margin-top: 1rem; /* 버튼과 제목 사이의 여백을 절반으로 줄입니다. */
  }
}

.tabs {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.tab {
  width: 8rem;
  word-break: break-word;
  max-width: 25%;
  padding: 10px 5px;
  margin: 5px;
  background-color: #64b5f6;
  color: white;
  border: none;
  cursor: pointer;
}

.tab.active {
  background-color: #1976d2;
}

.category {
  text-align: center;
  width: 1000px;
  max-width: 80%;
  justify-self: center;
  margin-top: 2rem; /* 버튼과의 간격을 확보하기 위해 상단 마진 추가 */
}

.product-list {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px;
}

.product {
  /* text-align: center; */ /* Replaced by flex alignment */
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 10px;
  background: #ffffff;
  width: 200px;
  /* height: 300px; */ /* Remove fixed height, let content decide or use min-height */
  min-height: 240px; /* Reduce min-height by 20% */
  display: flex; /* Use flexbox for internal alignment */
  flex-direction: column; /* Stack image and text vertically */
  justify-content: space-between; /* Push text towards the bottom */
  align-items: center; /* Center items horizontally */
  cursor: pointer;
}

.product:hover {
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.12);
  transform: translateY(-4px) scale(1.03);
}

.product img {
  width: 100%;
  max-height: 200px; /* Limit image height to prevent overflow */
  height: auto;
  object-fit: contain;
  margin-bottom: 10px;
}

.product p {
  font-weight: 600;
  /* height: 3rem; */ /* Remove fixed height */
  margin: 0;
  /* align-content: center; */ /* Not needed with flex */
  text-align: center; /* Ensure text itself is centered */
  width: 100%; /* Ensure text takes full width for centering */
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  text-align: left;
  word-break: normal;
}

th,
td {
  padding: 10px;
  border: 1px solid #ddd;
}

th {
  background-color: #f4f4f4;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

#productListTable {
  /* display: flex; */
  overflow: auto;
  width: 80%;
  min-width: 580px;
  /* min-width: 900px; */
  justify-self: center;
  flex-wrap: nowrap;
  padding: 10px;
}

table,
th,
td {
  border: 1px solid black;
}

th,
td {
  padding: 0.5em 1em;
}

/* 가로 태블릿 환경 */
@media screen and (min-width: 601px) and (max-width: 1024px) {
  #productListTable {
    width: 95%;
    word-break: keep-all;

    th,
    td {
      padding: 0.5rem;
    }

    table {
      font-size: 0.6rem;
    }
  }
}

/* 가로 데스크톱 환경 */
@media screen and (min-width: 1025px) {
  /* 
    #productListTable {
        width: 75%;
    } */
}

@media screen and (max-width: 600px) {
  .product {
    width: calc(50% - 32px);
    /* height: 60vw; */ /* Remove viewport-based height */
    min-height: 200px; /* Reduce mobile min-height by 20% */
  }

  .product img {
    max-height: 150px; /* Adjust max image height for mobile */
  }

  .product p {
    /* height: 2rem; */
    font-size: 0.8rem;
  }

  .container {
    margin: 0 auto;
    margin-top: 100px;
    width: 500px;
    overflow: auto;
    background-color: #fff;
  }

  #productListTable {
    min-width: 280px;
    width: calc(100% - 10px);
    /* width: 280px; */
    word-break: keep-all;
    padding-right: 0;
    padding-left: 0;

    th,
    td {
      padding: 0.5rem;
    }

    table {
      font-size: 1rem;
      overflow-x: auto;
                  display: block;
            border: 0;
            
    }
  }
}

.modal {
  display: none;
  z-index: 1000;

  position: fixed;
  justify-content: center;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  background-color: rgba(0, 0, 0, 0.4);
}

.modal_body {
  position: absolute;
  top: 50%;
  left: calc(50% - 200px);

  width: 400px;
  /* height:600px;  */

  padding: 40px;

  text-align: center;

  background-color: rgb(255, 255, 255);
  border-radius: 10px;
  box-shadow: 0 2px 3px 0 rgba(34, 36, 38, 0.15);

  transform: translateY(-50%);
}

.modal_btn {
  display: none;
  padding: 0.5rem !important;
  margin-bottom: 0 !important;
}

.text-blue-600 {
  --tw-text-opacity: 1;
  color: rgb(37 99 235 / var(--tw-text-opacity, 1));
  margin-right: 0.5rem;
}

/* equipDetail */

.product-page {
  display: flex;
  place-self: center;
  min-width: 920px;
  /* max-width: 1200px; */
  width: calc(100% - 2rem);
  background-color: #faf7f5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

/* --- 왼쪽 이미지 섹션 (변경 없음) --- */
.image-section {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.image-carousel,
.thumbnail-nav {
  text-align: center;
  display: table !important;
}

.carousel-item,
.thumbnail-link {
  display: table-cell !important;
  vertical-align: middle;

  img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

.carousel-item {
  background: white;
}

/* ... (캐러셀, 썸네일 CSS 이전과 동일) ... */
.image-carousel-wrapper {
  width: 100%;
  overflow: hidden;
  margin-bottom: 15px;
  position: relative;
  aspect-ratio: 500 / 500;
  background-color: #eee;
  border-radius: 4px;
}

.image-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-item {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  font-size: 1.5em;
  font-weight: bold;
  color: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-item.active {
  display: flex;
  opacity: 1;
  z-index: 1;
}

/* .carousel-item:nth-child(1) { background-color: #FFD1DC; } .carousel-item:nth-child(2) { background-color: #ADD8E6; } .carousel-item:nth-child(3) { background-color: #FFFACD; } .carousel-item:nth-child(4) { background-color: #90EE90; } */

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 1.5em;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.carousel-button:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.carousel-button.prev {
  left: 10px;
}

.carousel-button.next {
  right: 10px;
}

@media (max-width: 768px) {
  .carousel-button {
    padding: 5px 10px;
  }

  /* .carousel-button { display: none; }  */
  .product img {
    height: auto;
    object-fit: contain;
  }
}

.thumbnail-nav {
  max-width: 530px;
  padding-bottom: 5px;
  display: flex !important;
  flex-wrap: wrap;
  justify-content: space-evenly;
}

.thumbnail-link {
  border: 3px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  border-radius: 6px;
  width: 80px;
  min-width: 80px !important;
  justify-items: center;
  background: white;
  height: 80px;
  outline: none;
  opacity: 0.7;
  text-decoration: none;
}

.thumb-box {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 2px;
  font-size: 0.75em;
  color: rgba(0, 0, 0, 0.5);
  font-weight: bold;
  cursor: pointer;
  box-sizing: border-box;
}

/* .thumbnail-nav a:nth-child(1) .thumb-box { background-color: #FFD1DC; } .thumbnail-nav a:nth-child(2) .thumb-box { background-color: #ADD8E6; } .thumbnail-nav a:nth-child(3) .thumb-box { background-color: #FFFACD; } .thumbnail-nav a:nth-child(4) .thumb-box { background-color: #90EE90; } */
.thumbnail-link.active-thumbnail {
  border-color: #007bff;
  opacity: 1;
}

/* --- 오른쪽 텍스트 섹션 --- */
.text-section {
  flex: 1;
  padding: 20px 30px 30px 30px;
  display: flex;
  flex-direction: column;
}

/* section-header 제거됨 */

/* 제품명 제목 */
.text-section h1 {
  font-size: 2.2em;
  margin: 0;
  color: #333;
  font-weight: bold;
  white-space: nowrap;
  margin-bottom: 8px;
  /* 아이콘 그룹과의 간격 */
}

/* 소셜 아이콘 영역 수정 (제목 아래 가로 배치) */
.social-icons {
  display: flex;
  /* 가로 배치 */
  flex-direction: row;
  /* 명시적 가로 방향 */
  align-items: center;
  /* 수직 중앙 정렬 */
  gap: 18px;
  /* 아이콘 그룹 간 가로 간격 */
  flex-shrink: 0;
  /* margin-left: auto; 제거 */
  margin-bottom: 20px;
  /* 아래 h2 태그와의 간격 */
  flex-wrap: wrap;
  /* 공간 부족 시 줄바꿈 허용 */
}

.social-icons a {
  display: inline-flex;
  /* 아이콘 + 텍스트 가로 배치 */
  align-items: center;
  /* 수직 중앙 정렬 */
  gap: 5px;
  /* 아이콘과 텍스트 간격 */
  color: #555;
  font-size: 1em;
  /* 기준 크기 */
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.social-icons a:hover {
  color: #007bff;
}

/* 소셜 아이콘 자체 스타일 */
.social-icons a i {
  font-size: 1.4em;
  /* 아이콘 크기 */
  /* width 제거 또는 조정 */
  text-align: center;
  vertical-align: middle;
}

/* 소셜 아이콘 텍스트 스타일 */
.icon-text {
  font-size: 0.7em;
  /* 작은 폰트 크기 */
  color: #666;
}

/* 나머지 텍스트 요소들 */
.text-section h2 {
  font-size: 1.5em;
  color: #555;
  /* margin-top 제거 또는 조정 */
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

.text-section h3 {
  font-size: 1.2em;
  color: #666;
  margin-top: 15px;
  margin-bottom: 8px;
}

.text-section p {
  font-size: 1em;
  line-height: 1.6;
  color: #444;
  margin-bottom: 15px;
}

/* --- 버튼 영역 (변경 없음) --- */
.button-area {
  display: flex;
  gap: 10px;
  margin-top: 25px;
  padding-top: 10px;
}

.cta-button {
  flex-grow: 1;
  flex-basis: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #007bff;
  color: white;
  padding: 10px 5px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  font-size: 0.9em;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.button-secondary {
  background-color: #6c757d;
}

.cta-button:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button-secondary:hover {
  background-color: #5a6268;
}

.cta-button i {
  font-size: 1.1em;
}

/* --- 반응형 --- */
/* @media (max-width: 992px) {
    .text-section h1 { font-size: 1.8em; }
    .social-icons { gap: 15px; } 
    .social-icons a i { font-size: 1.3em; }
    .icon-text { font-size: 0.65em; }

    .cta-button {
        font-size: 0.8em;
        padding: 8px 4px;
        gap: 5px;
    }
    .cta-button i { font-size: 1em; }
    .product-page{
        min-width: unset;
    }
} */

@media (max-width: 1190px) {
  .product-page {
    min-width: unset;
    flex-direction: column;
    width: 95%;
  }

  .image-section,
  .text-section {
    flex: none;
    width: auto;
  }

  /* section-header 관련 제거 */
  .text-section h1 {
    font-size: 1.6em;
    /* 모바일 제목 크기 */
    margin-bottom: 10px;
    /* 아이콘과의 간격 */
  }

  /* 모바일 소셜 아이콘 */
  .social-icons {
    gap: 12px;
    /* 아이콘 간 간격 조정 */
    margin-bottom: 15px;
    /* 아래 내용과의 간격 */
    justify-content: center;
    /* 가운데 정렬 시도 */
  }

  /* 모바일에서 아이콘 텍스트 숨김 유지 */
  .icon-text {
    display: none;
  }

  .social-icons a {
    gap: 0;
  }

  .social-icons a i {
    font-size: 1.6em;
    /* 아이콘 크기 조정 */
  }

  .text-section {
    padding: 20px;
  }

  .button-area {
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
  }

  .cta-button {
    font-size: 0.9em;
    padding: 10px;
    white-space: normal;
  }

  .cta-button i {
    font-size: 1.1em;
  }
}

.product-info h1 {
  color: #333;
  margin-bottom: 15px;
  /* font-size: 1.5em; */
  font-size: 1.5rem;
}

.related-products h2 {
  text-align: center;
  margin-bottom: 20px;
  /* font-size: 1.5em; */
  font-size: 1.5rem;
}

.related-product p {
  margin-top: 5px;
  color: #555;
  /* font-size: 0.75em; */
  font-size: 0.75rem;
}

.description-section h2 {
  color: #333;
  margin-bottom: 20px;
  /* font-size: 2.2em; */
  font-size: 2.2rem;
}

.info-item strong {
  display: block;
  margin-bottom: 5px;
  /* font-size: 1em; */
  font-size: 1rem;
}

.feature-item h4 {
  margin-bottom: 5px;
  color: #333;
  /* font-size: 1.4em; */
  font-size: 1.4rem;
}

.feature-item p {
  color: #666;
  /* font-size: 0.7em; */
  font-size: 0.7rem;
}

.feature-item h4 {
  margin-bottom: 5px;
  color: #333;
  /* font-size: 1.5em; */
  font-size: 1.5rem;
}

.additional-info h4 {
  margin-bottom: 10px;
  color: #333;
  /* font-size: 1.2em; */
  font-size: 1.2rem;
}

.additional-info ul li {
  margin-bottom: 8px;
  color: #666;
  /* font-size: 1em; */
  font-size: 1rem;
}

.additional-info p {
  color: #666;
  /* font-size: 0.9em; */
  font-size: 0.9rem;
}

.text-section h3 {
  color: #f35d26;
  margin-bottom: 10px;
  /* font-size: 1.1em; */
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-section h1 {
  /* font-size: 1.8em; */
  font-size: 1.8rem;
}

.social-icons a i {
  /* font-size: 1.3em; */
  font-size: 1.3rem;
}
.icon-text {
  /* font-size: 0.65em; */
  font-size: 0.65rem;
}

.cta-button i {
  /* font-size: 1em; */
  font-size: 1rem;
}

@media (max-width: 768px) {
  .product-info h1 {
    /* font-size: 1.6em; */
    font-size: 1.6rem;
  }

  .description-section h2 {
    /* font-size: 1.6em; */
    font-size: 1.6rem;
  }

  /* font-size: 0.9em; */
  /* font-size: 0.9rem; */ /* Linter error fix: Commented out potentially misplaced rule */
  /* } */ /* Closing brace might be missing or misplaced, commenting out */

  .text-section h3 {
    /* font-size: 1.1em; */
    font-size: 1.1rem;
  }
}

.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  background-color: #e3f2fd;
  color: #1976d2;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.chip:hover {
  background-color: #1976d2;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gov-table th,
.gov-table td {
  padding: 2px 16px;
  text-align: center; /* 이 한 줄로 모든 셀 중앙정렬 */
}

.gov-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.gov-table {
  min-width: 900px;
  border-collapse: collapse;
  width: 100%;
}

/* from product-detail.html */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}
.product-card {
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.2s, border 0.2s, transform 0.2s;
  min-height: 235px;
}
.product-card:hover {
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.12);
  transform: translateY(-4px) scale(1.03);
}
.product-card img {
  width: 70%;
  max-height: 160px;
  object-fit: contain;
  margin-bottom: 8px;
}
.product-card span {
  color: #222;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.product-card span:nth-child(3) {
  color: #f3a84a;
}
.product-info {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 100%;
  gap: 12px;
}
.specs {
  width: 30%;
  margin-top: 10px;
  margin-right: 15px;
}
.spec {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}
.spec-label {
  margin-right: 7px;
  font-size: 14px;
  font-weight: bold;
}
.bar-bg {
  flex: 1;
  background-color: #eee;
  border-radius: 8px;
  height: 14px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background-color: #4caf50;
  border-radius: 8px;
}
@media (max-width: 600px) {
  .product-info {
    flex-direction: column;
    align-items: center;
  }
  .spec-label {
    width: auto;
    text-align: center;
  }
}
