/* === 기본 리셋 및 글로벌 변수 === */
:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --ai-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --ai-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #9333ea 50%, #db2777 100%);
  --text-main: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg-main: #f9fafb;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 20px 30px -10px rgba(99, 102, 241, 0.15), 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  overflow-x: hidden;
}

/* === 헤더 디자인 === */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo-icon {
  background: var(--ai-gradient);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.logo-text .highlight {
  background: var(--ai-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.4rem 0.95rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.nav-link.active {
  color: #ffffff;
  background: var(--ai-gradient);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
  transform: translateY(-1px);
}

/* 카드 페이드인 애니메이션 */
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.product-card.animate-fade-in {
  animation: cardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* 헤더 검색창 */
.search-box-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border-radius: 9999px;
  padding: 0.4rem 0.9rem;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  width: 230px;
}

.search-box-wrap:focus-within {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  width: 270px;
}

.search-inner-icon {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-right: 0.45rem;
}

.search-input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 0.88rem;
  width: 100%;
  color: var(--text-main);
}

.search-clear-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.15rem;
  display: none;
  transition: color 0.2s;
}

.search-clear-btn:hover {
  color: var(--text-main);
}

.search-clear-btn.active {
  display: block;
}

.icon-btn {
  background: #f3f4f6;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: #e5e7eb;
  transform: translateY(-2px);
}

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* === 히어로 섹션 (화면 상단 제목) === */
.hero-section {
  text-align: center;
  padding: 4.5rem 1.5rem 2.5rem;
  background: radial-gradient(circle at 50% 10%, rgba(99, 102, 241, 0.1) 0%, rgba(249, 250, 251, 0) 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.25;
  color: #111827;
  margin-bottom: 1rem;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
}

/* === 상품 섹션 & 그리드 === */
.products-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

.section-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* === 상품 카드 === */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(99, 102, 241, 0.3);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.95;
  overflow: hidden;
  background: #f3f4f6;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image {
  transform: scale(1.06);
}

.product-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  color: #fff;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}

.product-tag.best {
  background: #111827;
}

.product-tag.new {
  background: #2563eb;
}

.product-tag.hot {
  background: #dc2626;
}

.like-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4b5563;
  transition: all 0.2s ease;
}

.like-btn:hover {
  background: #fff;
  color: #ef4444;
  transform: scale(1.1);
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.category {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.product-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  letter-spacing: -0.3px;
}

.product-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: auto;
  margin-bottom: 1.25rem;
}

.discount {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ef4444;
}

.price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.original-price {
  font-size: 0.9rem;
  color: var(--text-light);
  text-decoration: line-through;
}

/* === 카드 액션 버튼 === */
.card-actions {
  display: flex;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  font-family: inherit;
}

/* AI 상품 설명 보기 버튼 (강조 디자인) */
.btn-ai {
  flex: 1;
  background: var(--ai-gradient);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.3);
}

.btn-ai::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: 0.6s;
}

.btn-ai:hover {
  background: var(--ai-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.45);
}

.btn-ai:hover::after {
  left: 100%;
}

.btn-ai i {
  font-size: 0.9rem;
  animation: pulse-sparkle 2s infinite;
}

@keyframes pulse-sparkle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.btn-cart {
  width: 46px;
  background: #f3f4f6;
  color: var(--text-main);
}

.btn-cart:hover {
  background: #111827;
  color: #fff;
}

/* === AI 설명 모달 팝업 === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95) translateY(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  background: var(--ai-gradient);
  color: #fff;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.modal-product-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  margin-bottom: 1.5rem;
  overflow-y: auto;
  padding-right: 0.25rem;
  flex: 1;
}

/* 커스텀 스크롤바 */
.modal-body::-webkit-scrollbar {
  width: 6px;
}
.modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}
.modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.ai-speech-bubble {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #6366f1;
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #334155;
}

.ai-speech-bubble h4 {
  color: #0f172a;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-speech-bubble h4:first-child {
  margin-top: 0;
}

.ai-speech-bubble p {
  margin-bottom: 0.75rem;
}

.ai-speech-bubble ul {
  margin: 0.5rem 0 1rem 1.25rem;
}

.ai-speech-bubble li {
  margin-bottom: 0.4rem;
}

.ai-speech-bubble strong {
  color: #1e293b;
}

/* 로딩 상태 */
.ai-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  text-align: center;
}

.ai-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(99, 102, 241, 0.15);
  border-top-color: #6366f1;
  border-right-color: #ec4899;
  border-radius: 50%;
  animation: spin 0.9s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
  margin-bottom: 1.25rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.ai-loading-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.35rem;
}

.ai-loading-desc {
  font-size: 0.85rem;
  color: #64748b;
}

/* 에러 박스 */
.ai-error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: #991b1b;
  font-size: 0.9rem;
}

.ai-error-box h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-error-box p {
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.ai-error-box code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
}
}

.ai-speech-bubble ul {
  margin: 0.75rem 0 0.5rem 1.25rem;
}

.ai-speech-bubble li {
  margin-bottom: 0.35rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-secondary {
  background: #f3f4f6;
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.btn-primary {
  background: #111827;
  color: #ffffff;
}

.btn-primary:hover {
  background: #000;
}

/* === 푸터 === */
.footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  background: #fff;
}

/* ============================================================
   상품 상세 페이지 (product.html) 스타일
============================================================ */
.detail-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .separator {
  color: var(--text-light);
  font-size: 0.8rem;
}

.breadcrumb .current {
  color: var(--text-main);
  font-weight: 600;
}

/* 상세 상단 2열 그리드 */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  margin-bottom: 4rem;
  align-items: start;
}

.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 90px;
}

.detail-main-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f3f4f6;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.detail-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.detail-main-img:hover {
  transform: scale(1.03);
}

.detail-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  color: #fff;
}

/* 상품 상세 정보 우측 영역 */
.detail-info {
  display: flex;
  flex-direction: column;
}

.detail-category {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.detail-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.detail-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.stars {
  color: #f59e0b;
}

.review-count {
  color: var(--text-muted);
}

.detail-price-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}

.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.detail-discount {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ef4444;
}

.detail-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
}

.detail-original {
  font-size: 1.05rem;
  color: var(--text-light);
  text-decoration: line-through;
}

/* AI 하이라이트 박스 */
.detail-ai-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}

.detail-ai-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #6366f1;
  margin-bottom: 0.5rem;
}

.detail-ai-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #334155;
}

/* 스펙 리스트 */
.spec-summary {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 0;
  margin-bottom: 1.75rem;
}

.spec-item {
  display: flex;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.spec-item:last-child {
  margin-bottom: 0;
}

.spec-label {
  width: 90px;
  color: var(--text-muted);
  font-weight: 500;
}

.spec-value {
  color: var(--text-main);
  font-weight: 600;
  flex: 1;
}

/* 옵션 선택 드롭다운 */
.option-selector-wrap {
  margin-bottom: 1.25rem;
}

.option-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.option-select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 0.95rem;
  background-color: #fff;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.option-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* 수량 및 총액 선택 */
.quantity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  background: #f9fafb;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-sm);
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-btn {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-main);
  transition: background 0.2s;
}

.qty-btn:hover {
  background: #f3f4f6;
}

.qty-input {
  width: 44px;
  height: 36px;
  text-align: center;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.total-price-wrap {
  text-align: right;
}

.total-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.total-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

/* 구매 버튼 그룹 */
.detail-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.btn-buy-now {
  flex: 1.5;
  background: #111827;
  color: #fff;
  padding: 1rem;
  font-size: 1rem;
}

.btn-buy-now:hover {
  background: #000;
  transform: translateY(-2px);
}

.btn-add-cart {
  flex: 1;
  background: #fff;
  border: 1px solid #111827;
  color: #111827;
  padding: 1rem;
  font-size: 1rem;
}

.btn-add-cart:hover {
  background: #f9fafb;
}

.btn-open-ai-modal {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--ai-gradient);
  color: #fff;
  border-radius: var(--radius-md);
  margin-top: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  font-family: inherit;
}

.btn-open-ai-modal::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: 0.6s;
}

.btn-open-ai-modal:hover {
  background: var(--ai-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

.btn-open-ai-modal:hover::after {
  left: 100%;
}

.btn-open-ai-modal i {
  font-size: 1.05rem;
  animation: pulse-sparkle 2s infinite;
}

/* 탭 섹션 */
.detail-tabs-section {
  border-top: 1px solid var(--border-color);
  padding-top: 3rem;
}

.tabs-nav {
  display: flex;
  gap: 1rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 2rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
}

.tab-content {
  display: none;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  line-height: 1.8;
  color: #374151;
}

.tab-content.active {
  display: block;
}

/* 스펙 테이블 */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table th, .spec-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  font-size: 0.95rem;
}

.spec-table th {
  background: #f8fafc;
  color: var(--text-muted);
  width: 25%;
  font-weight: 600;
}

.spec-table td {
  color: var(--text-main);
}

/* 상세 반응형 */
@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .detail-gallery {
    position: static;
  }
  .detail-title {
    font-size: 1.7rem;
  }
}

/* === 장바구니 및 바로구매 모달 스타일 === */
.cart-modal-card, .checkout-modal-card {
  max-width: 520px;
}

.cart-modal-title, .checkout-modal-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cart-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.checkout-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.cart-item-preview {
  display: flex;
  gap: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.1rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.cart-item-img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #fff;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.cart-item-option, .cart-item-qty {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.cart-item-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 0.35rem;
}

.cart-confirm-msg {
  font-size: 0.98rem;
  color: var(--text-main);
  text-align: center;
  margin: 1.25rem 0 0.5rem;
  font-weight: 600;
}

/* 주문 결제 모달 내용 */
.order-summary-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.order-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.order-row.total {
  border-top: 1px dashed var(--border-color);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.order-row.total .price-highlight {
  color: #ef4444;
}

.shipping-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  background: #ecfdf5;
  color: #059669;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}

.order-success-view {
  text-align: center;
  padding: 2rem 1rem;
}

.success-check-icon {
  width: 68px;
  height: 68px;
  background: #10b981;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem;
  animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.success-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.success-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* === 메인 검색 결과 없음 화면 === */
.no-results-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4.5rem 1.5rem;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
  margin-top: 1rem;
}

.no-results-icon {
  font-size: 3.2rem;
  color: #cbd5e1;
  margin-bottom: 1.25rem;
}

.no-results-box h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.no-results-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.btn-reset-search {
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
}

/* === 메인 장바구니 모달 아이템 리스트 === */
.main-cart-modal-card {
  max-width: 560px;
}

.cart-items-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.35rem;
  margin-bottom: 1.25rem;
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  transition: all 0.2s ease;
}

.cart-item-row:hover {
  background: #f1f5f9;
}

.cart-row-img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border-color);
}

.cart-row-info {
  flex: 1;
  min-width: 0;
}

.cart-row-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-row-option {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.cart-row-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
}

.cart-row-control {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cart-qty-ctrl {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}

.cart-qty-btn {
  background: none;
  border: none;
  width: 26px;
  height: 26px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
}

.cart-qty-btn:hover {
  background: #f1f5f9;
}

.cart-qty-val {
  width: 28px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.cart-row-delete-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.05rem;
  padding: 0.4rem;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-row-delete-btn:hover {
  color: #ef4444;
}

.cart-empty-view {
  text-align: center;
  padding: 3.5rem 1rem;
}

.cart-empty-icon {
  font-size: 3.5rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.cart-empty-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.cart-empty-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cart-summary-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

/* ============================================================
   반응형 웹 디자인 (모바일 & 태블릿 완벽 최적화)
============================================================ */

/* 태블릿 및 중간 화면 (1024px 이하) */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .detail-gallery {
    position: static;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }
}

/* 모바일 가로 & 태블릿 세로 (768px 이하) */
@media (max-width: 768px) {
  /* 헤더 모바일 앱 스타일 최적화 (2단 구조) */
  .header-container {
    flex-wrap: wrap;
    padding: 0.65rem 1rem;
    gap: 0.65rem 0.5rem;
  }

  .logo {
    font-size: 1.2rem;
  }

  .logo-icon {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  /* 모바일 네비게이션: 가로 스크롤형 탭바 */
  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem 0.1rem 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* 파이어폭스 스크롤바 숨김 */
  }

  .nav::-webkit-scrollbar {
    display: none; /* 크롬/사파리 스크롤바 숨김 */
  }

  .nav-link {
    flex-shrink: 0;
    font-size: 0.88rem;
    padding: 0.4rem 0.85rem;
    min-height: 38px;
  }

  .header-actions {
    margin-left: auto;
    gap: 0.5rem;
  }

  .search-box-wrap {
    width: 170px;
    padding: 0.35rem 0.75rem;
  }

  .search-box-wrap:focus-within {
    width: 190px;
  }

  /* 히어로 섹션 여백 및 폰트 */
  .hero-section {
    padding: 3rem 1rem 1.5rem;
  }

  .hero-title {
    font-size: 1.9rem;
    letter-spacing: -0.5px;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .products-section {
    padding: 1.5rem 1rem 4rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  /* 모달 팝업 모바일 최적화 (화면을 벗어나지 않도록 방지) */
  .modal-overlay {
    padding: 0.75rem;
    align-items: flex-end; /* 모바일에서는 하단 시트처럼 편안하게 팝업 */
  }

  .modal-card {
    max-width: 100%;
    width: 100%;
    max-height: 88vh;
    padding: 1.35rem 1.15rem;
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-md) var(--radius-md);
  }

  .modal-header {
    margin-bottom: 1rem;
  }

  .modal-close {
    font-size: 2rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .modal-product-title {
    font-size: 1.2rem;
  }

  .modal-body {
    margin-bottom: 1.25rem;
  }

  /* 상세 페이지 탭 네비게이션 가로 스크롤 */
  .tabs-nav {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    gap: 0.5rem;
  }

  .tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    flex-shrink: 0;
  }

  .tab-content {
    padding: 1.5rem 1.1rem;
  }

  .spec-table th, .spec-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.88rem;
  }
}

/* 모바일 스마트폰 전용 (480px 이하) */
@media (max-width: 480px) {
  /* 상품 카드 1열 전체 너비 정렬 */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .search-box-wrap {
    width: 135px;
  }

  .search-box-wrap:focus-within {
    width: 160px;
  }

  .search-input {
    font-size: 0.82rem;
  }

  /* 상품 카드 터치 타겟 최적화 */
  .card-body {
    padding: 1.25rem;
  }

  .product-name {
    font-size: 1.15rem;
  }

  .price {
    font-size: 1.25rem;
  }

  .btn {
    min-height: 46px; /* 모바일 권장 터치 영역 44px 이상 보장 */
    font-size: 0.9rem;
  }

  .btn-cart {
    width: 46px;
    height: 46px;
  }

  /* 상세 페이지 모바일 터치 최적화 */
  .detail-main {
    padding: 1rem 1rem 3.5rem;
  }

  .breadcrumb {
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
  }

  .detail-title {
    font-size: 1.5rem;
    line-height: 1.35;
  }

  .detail-price {
    font-size: 1.65rem;
  }

  .detail-discount {
    font-size: 1.35rem;
  }

  .quantity-row {
    padding: 0.75rem 1rem;
  }

  .qty-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .qty-input {
    width: 44px;
    height: 40px;
    font-size: 1rem;
  }

  .total-price {
    font-size: 1.3rem;
  }

  .detail-actions {
    flex-direction: column;
    gap: 0.6rem;
  }

  .btn-buy-now, .btn-add-cart {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
  }

  .btn-open-ai-modal {
    min-height: 48px;
    font-size: 0.95rem;
  }

  /* 장바구니 모달 내 행 최적화 */
  .cart-item-row {
    padding: 0.75rem 0.65rem;
    gap: 0.65rem;
  }

  .cart-row-img {
    width: 54px;
    height: 54px;
  }

  .cart-row-title {
    font-size: 0.88rem;
  }

  .cart-row-price {
    font-size: 0.9rem;
  }

  .cart-qty-btn {
    width: 28px;
    height: 28px;
  }

  .cart-qty-val {
    width: 24px;
    font-size: 0.8rem;
  }

  .cart-row-delete-btn {
    font-size: 1.15rem;
    padding: 0.5rem;
  }

  .modal-footer {
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-footer .btn {
    width: 100%;
  }
}



/* ============================================================
   세이프가이드 (SAFE GUIDE) 실무 정보 & 큐레이션 전용 스타일
   ============================================================ */
.guides-section {
  margin-bottom: 1.5rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.guide-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-lg, 16px);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.guide-tag {
  display: inline-block;
  width: fit-content;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary, #2563eb);
  background: rgba(37, 99, 235, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.guide-card h3 {
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--text-main, #0f172a);
}

.guide-card h3 a {
  text-decoration: none;
  color: inherit;
}

.guide-card h3 a:hover {
  color: var(--primary, #2563eb);
}

.guide-card p {
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-muted, #64748b);
  flex: 1;
}

.guide-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, #e2e8f0);
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
}

.guide-read-more {
  color: var(--primary, #2563eb);
  font-weight: 700;
  text-decoration: none;
}

.safety-visual-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 210px;
}

.safety-visual-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  height: 100%;
  text-decoration: none;
  padding: 1.5rem;
}

.safety-icon-badge {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  background: #ffffff;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.safety-icon-badge.large {
  width: 120px;
  height: 120px;
  border-radius: 32px;
  font-size: 3.2rem;
}

.safety-visual-law {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  background: rgba(255, 255, 255, 0.85);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.kcs-inline-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  margin: 0.75rem 0 1rem;
}

.kcs-inline-note i {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.modal-law-box,
.modal-kcs-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.modal-kcs-box {
  background: #f0fdfa;
  border-color: #ccfbf1;
  color: #115e59;
}

.modal-check-list {
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.92rem;
  line-height: 1.55;
}

.detail-visual-box {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
}

.detail-visual-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: var(--text-muted, #64748b);
}

.detail-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.detail-updated-pill {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  background: #f1f5f9;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.detail-summary-text {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted, #475569);
  margin: 0.75rem 0 1.25rem;
}

.checklist-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  margin-top: 1.25rem;
}

.checklist-card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.75rem;
  color: var(--text-main, #0f172a);
}

.detail-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.92rem;
  line-height: 1.55;
}

.detail-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.detail-check-list li i {
  color: #0f766e;
  margin-top: 0.25rem;
}

.affiliate-micro-note {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted, #64748b);
}

.article-main {
  max-width: 860px;
  margin: 2rem auto 4rem;
  padding: 0 1.25rem;
}

.article-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2.25rem;
  line-height: 1.75;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
  margin-bottom: 1rem;
}

.article-card h1 {
  font-size: 1.8rem;
  line-height: 1.35;
  margin-bottom: 1.5rem;
  color: var(--text-main, #0f172a);
}

.article-card h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--text-main, #0f172a);
}

.article-card p {
  margin-bottom: 0.9rem;
  color: #334155;
}

.article-notice-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  color: #92400e;
}

.article-notice-box p {
  margin: 0.35rem 0 0;
  color: #78350f;
}

.article-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: #334155;
}

.article-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.article-sources {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.9rem;
}

.article-sources h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.article-sources ul {
  padding-left: 1.2rem;
}

.site-footer-rich {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  padding: 2.25rem 1.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-links a {
  color: var(--text-main, #0f172a);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary, #2563eb);
}

.footer-disclaimer {
  max-width: 780px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-muted, #64748b);
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
}

.empty-search-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted, #64748b);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .article-card {
    padding: 1.35rem;
  }

  .article-card h1 {
    font-size: 1.4rem;
  }
}

.guide-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.guide-pill {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.guide-pill:hover {
  border-color: var(--primary, #2563eb);
  color: var(--primary, #2563eb);
}

.guide-pill.active {
  background: var(--primary, #2563eb);
  border-color: var(--primary, #2563eb);
  color: #ffffff;
}

.guide-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}


/* ============================================================
   데스크톱 4열 균형 & 모바일 가독성 최적화
   ============================================================ */
@media (min-width: 1025px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }

  .safety-visual-wrap {
    min-height: 170px;
  }
}

@media (max-width: 768px) {
  .article-card .spec-table {
    display: block;
    overflow-x: auto;
    font-size: 0.86rem;
  }

  .article-card .spec-table th,
  .article-card .spec-table td {
    padding: 0.65rem 0.75rem;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .article-card .spec-table th {
    width: 34%;
    min-width: 105px;
  }
}

@media (max-width: 480px) {
  .search-box-wrap {
    width: 140px;
    padding: 0.3rem 0.6rem;
  }

  .search-box-wrap:focus-within {
    width: 160px;
  }
}
