/* ===========================
   product.css  (제품 섹션 전용)
   기준 팔레트/톤은 기존 페이지 스타일과 동일 (#00B4A6 계열)
=========================== */

:root {
  --brand: #00B4A6;
  --brand-2: #50E3C2;
  --ink-900: #1e293b;
  --ink-600: #64748b;
  --border: rgba(0, 180, 166, 0.12);
  --card-shadow: 0 8px 30px rgba(0, 180, 166, 0.1);
  --card-shadow-hover: 0 20px 40px rgba(0, 180, 166, 0.18);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

/* 섹션 루트 */
.products {
  padding: 6rem 0;
  /* background: #f8fffe; */
}

/* 그리드: product-gid(원문) + product-grid(보호) 모두 지원 */
.product-gid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* 카테고리 카드 */
.product-category {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.product-category::before {
  /* 상단 라인 */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.product-category:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
}

.product-category > h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 1.25rem;
}

/* 제조사 카드(내부 섹션) */
.product-vendor {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  margin-top: 1rem;
  box-shadow: 0 4px 16px rgba(0, 180, 166, 0.08);
  transition: border-color .2s ease, box-shadow .2s ease;
}

/* 나중에 '제조사 페이지로 이동' 링크 버튼을 감쌀 수 있도록 a로도 보기 좋게 */
.product-vendor a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.product-vendor:hover {
  border-color: rgba(0, 180, 166, 0.22);
  box-shadow: 0 10px 24px rgba(0, 180, 166, 0.12);
}

/* 제조사 제목(텍스트 노드로만 쓰면 굵기 강조) */
.product-vendor::first-line {
  font-weight: 700;
  color: var(--ink-900);
}

/* 제품 아이템 리스트 */
.product-item {
  margin-top: .75rem;
  color: var(--ink-600);
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}

/* 제품 범주 텍스트(예: DRM, 방화벽 등)를 볼드로 */
.product-item b,
.product-item strong {
  color: var(--ink-900);
}

/* 제품명 배지 */
.product-name {
  display: inline-block;
  padding: .28rem .6rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  box-shadow: 0 6px 18px rgba(0, 180, 166, 0.22);
  white-space: nowrap;
}

/* "카테고리 > 제조사 > 제품" 구조를 더 또렷하게 구분 */
.product-item .product-name {
  margin-left: .25rem;
}

/* 키보드 접근성 & 클릭 가능 상태 (제조사/아이템을 링크로 바꿔도 좋도록) */
.product-vendor:focus-within,
.product-item:focus-within {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 3px rgba(0, 180, 166, 0.28);
  border-color: rgba(0, 180, 166, 0.28);
}

.product-vendor a:focus-visible,
.product-item a:focus-visible {
  outline: 3px solid rgba(0, 180, 166, 0.45);
  border-radius: var(--radius-sm);
}

/* 아이템을 링크로 쓸 때 버튼처럼 보이는 보조 스타일 */
.product-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink-900);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}

.product-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 180, 166, 0.12);
  border-color: rgba(0, 180, 166, 0.22);
}

/* 작은 캡션/부연 텍스트 */
.product-meta {
  font-size: .85rem;
  color: var(--ink-600);
}


/* ========== Accordion (details/summary) ========== */
.p-acc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 180, 166, 0.08);
  padding: 0; /* 내부는 product-list가 채움 */
  margin-top: 1rem;
  overflow: hidden;
}

.p-acc + .p-acc { margin-top: .75rem; }

.p-acc > summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.25rem;
  font-weight: 800;
  color: var(--ink-900);
  position: relative;
  user-select: none;
}

.p-acc > summary::-webkit-details-marker { display: none; }

.p-acc > summary::after {
  content: "▾";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform .2s ease;
  font-weight: 700;
  color: var(--brand);
}

.p-acc[open] > summary::after { transform: translateY(-50%) rotate(180deg); }

.product-list {
  padding: .5rem 1rem 1rem;
  display: grid;
  gap: .5rem;
}

/* ========== Item row 링크 ========== */
.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 180, 166, 0.06);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.product-row:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 180, 166, 0.22);
  box-shadow: 0 12px 26px rgba(0, 180, 166, 0.12);
  background: linear-gradient(180deg, rgba(0,180,166,0.03), #fff);
}

.product-row:focus-visible {
  outline: 3px solid rgba(0, 180, 166, 0.45);
}

/* 제품명 배지 재활용 */
.product-row .product-name {
  margin: 0;
  font-size: .9rem;
  padding: .35rem .65rem;
}

/* 제조사 표시(후순위) */
.maker {
  color: var(--ink-600);
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
}

/* 카테고리 카드 상단 라인 유지 */
.product-category::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

/* 반응형 미세 조정 */
@media (max-width: 480px) {
  .product-row { padding: .65rem .75rem; }
  .maker { font-size: .85rem; }
}


/* 반응형 조정 */
@media (max-width: 1024px) {
  .product-gid,
  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

@media (max-width: 768px) {
  .product-gid,
  .product-grid {
    grid-template-columns: 1fr;
  }
  .product-category {
    padding: 1.5rem;
  }
}

/* 모션 최소화 환경 */
@media (prefers-reduced-motion: reduce) {
  .product-category,
  .product-vendor,
  .product-link {
    transition: none;
  }
}
