/* =============================================
   WELLSHOWER - 공통 스타일
   ============================================= */

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

/* === CSS 변수 === */
:root {
  --primary: #1a73e8;
  --primary-dark: #1558b0;
  --primary-light: #4a9eff;
  --accent: #0095ff;
  --text-dark: #222222;
  --text-gray: #555555;
  --text-light: #888888;
  --bg-white: #ffffff;
  --bg-light: #f5f5f5;
  --bg-section: #eeeeee;
  --footer-bg: #3a3a3a;
  --footer-text: #cccccc;
  --sale-color: #e53935;
  --best-color: #e53935;
  --border: #e0e0e0;
  --shadow: 0 2px 12px rgba(0,0,0,0.1);
  --radius: 4px;
  --transition: 0.25s ease;
  --max-width: 1200px;
}

/* === 리셋 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: color var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible { outline: 3px solid rgba(26,115,232,0.45); outline-offset: 3px; }

/* === 상단 유틸리티 바 === */
.util-bar {
  background: #f9f9f9;
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-gray);
}
.util-bar .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}
.util-bar a:hover { color: var(--primary); }
.util-bar a[href="login.html"], .util-bar a[href="signup.html"] { display: none; }
.util-bar .search-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 3px;
  overflow: hidden;
  padding: 2px 6px;
}
.util-bar .search-wrap input {
  border: none;
  outline: none;
  font-size: 13px;
  width: 130px;
  padding: 2px 4px;
}
.util-bar .search-wrap button {
  color: var(--text-gray);
  font-size: 14px;
  padding: 0 2px;
}
.util-bar .cart-link { position: relative; }
.util-bar .cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === 헤더 === */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.site-header .header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
/* 로고 */
.logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
}
.logo .logo-drop {
  color: var(--primary);
  font-size: 28px;
}

/* 메인 내비게이션 */
.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 2px;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); }

/* 모바일 햄버거 */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text-dark); transition: var(--transition); }

/* === 컨테이너 === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* === 섹션 헤딩 === */
.section-heading {
  text-align: center;
  margin-bottom: 40px;
}
.section-heading h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.section-heading p {
  font-size: 14px;
  color: var(--text-gray);
  margin-bottom: 12px;
}
.section-divider {
  width: 50px;
  height: 3px;
  background: var(--text-dark);
  margin: 0 auto;
}

/* === 배지 === */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  margin-right: 3px;
}
.badge-sale { background: var(--sale-color); color: #fff; }
.badge-best { background: var(--best-color); color: #fff; }
.badge-md { background: #fff; color: #333; border: 1px solid #999; }

/* === 버튼 === */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  text-align: center;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-dark {
  background: var(--text-dark);
  color: #fff;
}
.btn-dark:hover { background: #444; color: #fff; }
.btn-block { width: 100%; display: block; }

/* === 상품 카드 === */
.product-card {
  display: block;
  background: #fff;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-card .thumb {
  position: relative;
  overflow: hidden;
  background: var(--bg-light);
  aspect-ratio: 1 / 1;
}
.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .info { padding: 12px 4px 0; }
.product-card .prod-name {
  font-size: 13px;
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .price-wrap { margin-bottom: 6px; }
.product-card .sale-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-right: 6px;
}
.product-card .origin-price {
  font-size: 12px;
  color: var(--text-light);
  text-decoration: line-through;
}

/* === 리뷰 카드 === */
.review-card {
  cursor: pointer;
  text-align: left;
  border-radius: 4px;
}
.review-card:focus-visible { outline: 3px solid rgba(26,115,232,0.45); outline-offset: 5px; }
.review-card .review-img {
  background: var(--bg-light);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 2px;
}
.review-card .review-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.review-card:hover .review-img img { transform: scale(1.04); }
.review-card .review-content { padding: 10px 0; }
.review-card .review-text {
  font-size: 13px;
  color: var(--text-gray);
  line-height: 1.6;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review-card .reviewer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.reviewer-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-section);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-gray);
  overflow: hidden;
  flex-shrink: 0;
}
.review-card .review-product {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.review-card .review-product img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  flex-shrink: 0;
}
.stars { color: #e53935; font-size: 12px; letter-spacing: 1px; }
.review-modal-box h2 { font-size: 20px; margin-bottom: 18px; padding-right: 32px; }
.review-modal-image { width: 100%; max-height: 280px; object-fit: contain; background: var(--bg-light); border-radius: 6px; }
.review-modal-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 16px; color: var(--text-light); font-size: 13px; }
.review-modal-stars { margin: 8px 0 12px; font-size: 15px; }
.review-modal-text { font-size: 15px; line-height: 1.75; color: var(--text-dark); white-space: pre-line; }
.review-modal-product { margin-top: 18px; padding: 12px; background: var(--bg-light); color: var(--text-gray); font-size: 12px; border-radius: 4px; }
.review-source-link { display: inline-block; margin-top: 16px; color: var(--primary-dark); font-size: 13px; text-decoration: underline; }

/* === 페이지 배너 === */
.page-banner {
  position: relative;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.page-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.page-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}
.page-banner-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
}
.page-banner-content h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 2px;
}

/* === 모달 === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; visibility: visible; }
.modal-box {
  background: #fff;
  border-radius: 8px;
  max-width: 480px;
  width: 92%;
  padding: 32px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s;
  max-height: min(92vh, 760px);
  overflow-y: auto;
}
.modal-overlay.active .modal-box { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 22px;
  color: var(--text-gray);
  cursor: pointer;
  background: none;
  border: none;
}

/* === 폼 === */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-gray);
  margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
}

/* === 카카오 채팅 버튼 === */
.kakao-float {
  position: fixed;
  bottom: 30px;
  right: 24px;
  z-index: 900;
}
.kakao-float a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: #FEE500;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: transform var(--transition), box-shadow var(--transition);
}
.kakao-float a:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.kakao-float svg { width: 28px; height: 28px; }
.kakao-float span {
  font-size: 8px;
  font-weight: 700;
  color: #3b1e08;
  margin-top: 1px;
}

/* === 푸터 === */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 13px;
  line-height: 1.9;
  padding-top: 36px;
}
.footer-info {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-info p { margin: 0; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 16px 0;
}
.footer-links a { font-size: 13px; color: var(--footer-text); }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  text-align: center;
  padding: 16px 20px 24px;
  font-size: 12px;
  color: #888;
}

/* === 슬라이더 도트 === */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
}
.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  border: none;
  transition: background var(--transition);
}
.slider-dot.active { background: #fff; }

/* === 페이지네이션 === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 40px 0;
}
.pagination a, .pagination span, .pagination button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 13px;
  color: var(--text-gray);
  transition: all var(--transition);
}
.pagination a:hover, .pagination button:hover:not(:disabled) { background: var(--bg-light); }
.pagination button:disabled { cursor: default; opacity: 0.35; }
.pagination .active {
  background: var(--text-dark);
  color: #fff;
  font-weight: 700;
}
.legal-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 16px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-gray);
}
.legal-consent input { margin-top: 3px; flex: 0 0 auto; }
.legal-consent a { color: var(--primary-dark); text-decoration: underline; }

/* === 토스트 === */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === 반응형 === */
@media (max-width: 1024px) {
  :root { --max-width: 100%; }
}

@media (max-width: 768px) {
  .main-nav { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0; background: #fff; padding: 20px; border-bottom: 1px solid var(--border); gap: 16px; }
  .main-nav.open { display: flex; }
  .hamburger { display: flex; }
  .section-heading h2 { font-size: 24px; }
  .logo { font-size: 22px; }
}

@media (max-width: 480px) {
  .util-bar { display: none; }
  .site-header .header-inner { height: 56px; }
}
