/*
 * TICTOC 쇼핑몰 아기자기한 파스텔 CSS 스타일시트 (style.css)
 * 모든 주석과 설명은 한글로 작성되었습니다.
 */

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

/* ══ 디자인 시스템 토큰 (CSS 변수) ══ */
:root {
  /* 아기자기한 라운드 폰트 */
  --font-eng: 'Quicksand', -apple-system, sans-serif;
  --font-kor: 'Noto Sans KR', sans-serif;
  
  --transition-smooth: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* 살짝 바운스되는 느낌 */
  --transition-fast: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  
  /* 조약돌처럼 둥글둥글한 모서리 */
  --border-radius-lg: 36px;
  --border-radius-md: 24px;
  --border-radius-sm: 14px;
}

/* 파스텔 라이트 모드 (화이트 배경 메인) */
[data-theme="light"] {
  --bg-primary: hsl(40, 50%, 98%); /* 따뜻한 크림빛 화이트 */
  --bg-secondary: hsl(40, 40%, 94%); /* 연한 바닐라 크림 */
  --bg-card: rgba(255, 255, 255, 0.92); /* 뽀얀 우유빛 글래스 카드 */
  --text-primary: hsl(220, 25%, 15%); /* 부드러운 딥 차콜 */
  --text-secondary: hsl(220, 15%, 35%);
  --text-muted: hsl(220, 10%, 55%);
  --border-color: rgba(220, 200, 180, 0.35); /* 따뜻하고 연한 베이지 선 */
  --border-glow: rgba(255, 255, 255, 0.5);
  
  /* 귀엽고 러블리한 파스텔 코랄 핑크 */
  --accent: hsl(350, 85%, 68%);
  --accent-rgb: 242, 108, 128;
  --accent-glow: rgba(242, 108, 128, 0.15);
  
  /* 푹신푹신한 구름 섀도우 */
  --shadow-premium: 0 20px 40px -10px rgba(180, 160, 140, 0.15);
  --glass-reflection: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.3) 100%);
  --nav-bg: rgba(255, 252, 245, 0.88);
  --price-color: hsl(350, 80%, 58%);
}

/* 파스텔 다크 모드 */
[data-theme="dark"] {
  --bg-primary: hsl(220, 24%, 12%); /* 아늑한 네이비 블랙 */
  --bg-secondary: hsl(220, 20%, 16%);
  --bg-card: rgba(30, 36, 48, 0.8); /* 부드러운 딥 블루 카드 */
  --text-primary: hsl(220, 20%, 90%);
  --text-secondary: hsl(220, 12%, 75%);
  --text-muted: hsl(220, 10%, 55%);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(255, 255, 255, 0.02);
  
  /* 귀엽고 통통 튀는 파스텔 피치 오렌지 */
  --accent: hsl(24, 90%, 65%);
  --accent-rgb: 250, 145, 95;
  --accent-glow: rgba(250, 145, 95, 0.22);
  
  /* 푹신푹신한 그림자 */
  --shadow-premium: 0 25px 50px -15px rgba(0, 0, 0, 0.5);
  --glass-reflection: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
  --nav-bg: rgba(22, 27, 36, 0.88);
  --price-color: hsl(24, 90%, 65%);
}

/* 기본 세팅 */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-kor);
  transition: background-color 0.8s ease, color 0.8s ease;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 스크롤바 커스텀 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ══ 조약돌 글래스모피즘 패널 ══ */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid var(--border-color); /* 테두리를 조금 더 굵고 동글게 */
  box-shadow: var(--shadow-premium);
  position: relative;
  z-index: 1;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  background: var(--glass-reflection);
  pointer-events: none;
  z-index: -1;
}

/* ══ 헤딩 타이포그래피 ══ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-eng);
  font-weight: 600; /* 동글동글 폰트이므로 두껍게 처리하여 귀여운 느낌 강조 */
  letter-spacing: -0.01em;
}

/* ══ 네비게이션 ══ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 60px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 2px solid var(--border-color);
  transition: var(--transition-smooth), border-color 0.4s;
}

nav.scrolled {
  padding: 15px 60px;
}

.nav-logo {
  font-family: var(--font-eng);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo::before {
  content: '⏰'; /* 아기자기한 이모티콘 로고 데코 */
  font-size: 18px;
}

.nav-right-container {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-menu {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-menu a {
  font-family: var(--font-eng);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-secondary);
  position: relative;
  padding: 5px 0;
  transition: var(--transition-fast);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent);
}

/* 테마 스위치 조약돌형 */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 48px;
  height: 26px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 4px;
  transition: var(--transition-fast);
}

.theme-toggle-dot {
  width: 18px;
  height: 18px;
  background: var(--text-primary);
  border-radius: 50%;
  position: absolute;
  left: 3px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-dot::before {
  content: '☀️';
  font-size: 11px;
}

[data-theme="dark"] .theme-toggle-dot {
  transform: translateX(20px);
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

[data-theme="dark"] .theme-toggle-dot::before {
  content: '🌙';
}

/* ══ 이미지 래퍼 ══ */
.img-block {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-md);
  border: 2px solid var(--border-color);
}

.img-block img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.img-block:hover img {
  transform: scale(1.05); /* 둥근 홉업 */
}

/* ══ 스크롤 애니메이션 ══ */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  transition: opacity 1s cubic-bezier(0.175, 0.885, 0.32, 1.1), transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ══════════════════════════════
   § SHOP HOME (상품 목록 격자 화면)
══════════════════════════════ */
#shop-home {
  padding: 140px 60px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.home-section-header {
  margin-bottom: 50px;
  text-align: center;
}

.home-section-header h2 {
  font-family: var(--font-eng);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.home-section-header p {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* 상품 그리드 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 40px;
}

/* 상품 아기자기한 카드 */
.product-card {
  padding: 24px;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 30px 50px rgba(180,160,140,0.25);
  border-color: var(--accent);
}

.prod-img-box {
  width: 100%;
  aspect-ratio: 1.1;
  border-radius: var(--border-radius-md);
  margin-bottom: 20px;
}

.prod-info-box {
  display: flex;
  flex-direction: column;
  padding: 0 5px;
}

.prod-brand {
  font-family: var(--font-eng);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 700;
}

.prod-title {
  font-family: var(--font-kor);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 12px;
  height: 50px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.prod-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 15px;
}

.prod-price-row .discount {
  font-family: var(--font-eng);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.prod-price-row .price {
  font-family: var(--font-eng);
  font-size: 22px;
  font-weight: 700;
  color: var(--price-color);
}

.prod-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.prod-meta .stars {
  color: #f2c94c;
}

.prod-meta .rating {
  font-family: var(--font-eng);
  font-weight: 700;
  color: var(--text-primary);
}

.prod-meta .reviews {
  color: var(--text-muted);
}


/* ══════════════════════════════
   § PRODUCT DETAIL VIEW (상세페이지 컨테이너)
══════════════════════════════ */
#product-detail-view {
  padding-top: 90px;
  animation: fadeInView 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

@keyframes fadeInView {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 뒤로가기 바 */
.detail-back-bar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 60px 10px;
}

.btn-back-home {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  transition: var(--transition-fast);
}

.btn-back-home .arrow {
  font-size: 18px;
  transition: transform 0.25s ease;
}

.btn-back-home:hover {
  color: var(--accent);
}

.btn-back-home:hover .arrow {
  transform: translateX(-6px);
}

/* 구매 패널 그리드 */
.shop-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 60px 60px;
}

/* 좌측 갤러리 */
.shop-gallery-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.main-image-box {
  width: 100%;
  aspect-ratio: 1.1;
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-premium);
}

.main-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 4열 대표 이미지 썸네일 리스트 */
.thumbnail-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.thumb-item {
  aspect-ratio: 1.1;
  border-radius: var(--border-radius-md);
  border: 2px solid var(--border-color);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-fast);
  opacity: 0.65;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-item:hover,
.thumb-item.active {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  transform: scale(1.03);
}

/* 우측 정보 패널 */
.shop-info-panel {
  padding: 40px;
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
}

.shop-brand {
  font-family: var(--font-eng);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}

.shop-title {
  font-family: var(--font-kor);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.shop-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 25px;
  font-size: 13px;
  font-weight: 500;
}

.shop-rating-row .stars {
  color: #f2c94c;
}

.shop-rating-row .rating-num {
  font-family: var(--font-eng);
  font-weight: 700;
  color: var(--text-primary);
}

.shop-rating-row .rating-count {
  color: var(--text-muted);
}

/* 가격 */
.shop-price-box {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 25px;
  margin-bottom: 25px;
}

.shop-price-box .discount-rate {
  font-family: var(--font-eng);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  margin-right: 10px;
}

.shop-price-box .original-price {
  font-family: var(--font-eng);
  font-size: 15px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.current-price-row {
  display: flex;
  align-items: baseline;
  margin-top: 5px;
}

.current-price-row .price {
  font-family: var(--font-eng);
  font-size: 38px;
  font-weight: 700;
  color: var(--price-color);
}

.current-price-row .won {
  font-size: 18px;
  font-weight: 700;
  margin-left: 2px;
}

/* 메타 정보 테이블 */
.shop-meta-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 25px;
  margin-bottom: 25px;
}

.meta-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  line-height: 1.5;
}

.meta-label {
  color: var(--text-muted);
  font-weight: 500;
}

.meta-value {
  color: var(--text-secondary);
}

/* 옵션 드롭다운 */
.shop-option-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.option-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.option-dropdown {
  width: 100%;
  padding: 15px 20px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}

.option-dropdown:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* 선택된 옵션 조약돌 카드 */
.selected-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.selected-option-card {
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.selected-opt-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-remove-opt {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
}

.btn-remove-opt:hover {
  color: hsl(350, 80%, 58%);
}

.card-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
  border-radius: 20px; /* 조약돌처럼 동글게 */
  overflow: hidden;
  padding: 0 4px;
}

.quantity-control button {
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  border-radius: 50%;
}

.quantity-control button:hover {
  background: var(--bg-secondary);
  color: var(--accent);
}

.quantity-control input {
  width: 32px;
  height: 26px;
  text-align: center;
  border: none;
  background: none;
  color: var(--text-primary);
  font-family: var(--font-eng);
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.opt-price-box {
  font-family: var(--font-eng);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

/* 합계 금액 */
.total-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid var(--border-color);
  padding-top: 25px;
  margin-bottom: 30px;
}

.total-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
}

.total-price-box {
  font-size: 16px;
  font-weight: 700;
}

.total-amount {
  font-family: var(--font-eng);
  font-size: 30px;
  font-weight: 700;
  color: var(--price-color);
  margin-right: 2px;
}

/* 동글동글 조약돌형 버튼 그룹 */
.shop-btn-group {
  display: grid;
  grid-template-columns: 2fr 1fr 54px;
  gap: 12px;
}

.btn-buy {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 50px; /* 완전히 둥근 조약돌 */
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 8px 20px var(--accent-glow);
}

.btn-buy:hover {
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.05);
  box-shadow: 0 12px 24px var(--accent-glow);
}

.btn-cart {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  padding: 16px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-cart:hover {
  background: var(--border-color);
  transform: translateY(-2px);
}

.btn-wish {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 50%; /* 완전 원형 */
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-wish:hover {
  transform: scale(1.1);
}

.btn-wish.active {
  color: #f26c80;
  border-color: rgba(242, 108, 128, 0.4);
  background: rgba(242, 108, 128, 0.15);
  transform: scale(1.15) rotate(15deg);
}

/* ══════════════════════════════
   § TABS SYSTEM (상세페이지 / 리뷰 / Q&A Sticky 바)
══════════════════════════════ */
.sticky-tabs-container {
  position: sticky;
  top: 68px;
  z-index: 900;
  margin-top: 40px;
}

.tabs-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-width: 2px 0;
}

.tab-btn {
  background: none;
  border: none;
  padding: 20px 0;
  color: var(--text-secondary);
  font-family: var(--font-kor);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  text-align: center;
}

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

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

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0;
  height: 3px;
  background: var(--accent);
  transition: var(--transition-smooth);
  transform: translateX(-50%);
  border-radius: 3px 3px 0 0;
}

.tab-btn.active::after {
  width: 30%;
}

.tabs-content-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 60px 100px;
}

.tab-content {
  display: none;
}

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

.tab-section-header {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.tab-section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.tab-section-header .total-reviews {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ══════════════════════════════
   § TAB 1 — 상세페이지 세로 이미지 나열
══════════════════════════════ */
.detail-intro-desc {
  max-width: 800px;
  margin: 0 auto 50px;
  text-align: center;
}

.detail-intro-desc h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.detail-intro-desc p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  font-weight: 400;
}

.vertical-detail-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 60px;
}

.vertical-detail-images img {
  width: 100%;
  max-width: 1000px;
  height: auto;
  margin-bottom: 2px;
  display: block;
  border-radius: 0;
  border: none;
}

.vertical-detail-images img:first-child {
  border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
  border-top: 2px solid var(--border-color);
  border-left: 2px solid var(--border-color);
  border-right: 2px solid var(--border-color);
}

.vertical-detail-images img:not(:first-child):not(:last-child) {
  border-left: 2px solid var(--border-color);
  border-right: 2px solid var(--border-color);
}

.vertical-detail-images img:last-child {
  border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
  border-bottom: 2px solid var(--border-color);
  border-left: 2px solid var(--border-color);
  border-right: 2px solid var(--border-color);
  margin-bottom: 0;
}

/* ══════════════════════════════
   § TAB 2 — 고객 리뷰 스타일
══════════════════════════════ */
.review-scoreboard {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  padding: 40px;
  border-radius: var(--border-radius-lg);
  margin-bottom: 50px;
}

.score-overall {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 2px solid var(--border-color);
}

.score-stars {
  font-size: 24px;
  color: #f2c94c;
  margin-bottom: 8px;
}

.score-val strong {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-primary);
}

.score-bars-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.score-bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 50px;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.score-bar-row .bar-bg {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.score-bar-row .bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
}

/* 리뷰 피드 */
.review-feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.review-card {
  padding: 30px;
  border-radius: var(--border-radius-md);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 15px;
  margin-bottom: 18px;
}

.user-info {
  display: flex;
  gap: 15px;
  font-size: 13px;
  font-weight: 500;
}

.user-info .user-id {
  color: var(--text-primary);
}

.user-info .purchase-option {
  color: var(--accent);
}

.review-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* ══════════════════════════════
   § TAB 3 — Q&A 게시판 스타일
══════════════════════════════ */
.qna-board {
  border-radius: var(--border-radius-md);
  overflow: hidden;
  margin-bottom: 30px;
}

.qna-header-row {
  display: grid;
  grid-template-columns: 100px 1fr 100px 100px;
  padding: 18px 24px;
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border-color);
  font-size: 13px;
  font-weight: 700;
}

.qna-row {
  display: grid;
  grid-template-columns: 100px 1fr 100px 100px;
  padding: 18px 24px;
  border-bottom: 2px solid var(--border-color);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.qna-row:hover {
  background: var(--bg-secondary);
}

.qna-col-status.answered {
  color: var(--accent);
  font-weight: 700;
}

.qna-col-title {
  font-weight: 500;
  color: var(--text-primary);
}

.qna-answer-box {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border-color);
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), padding 0.4s ease;
}

.qna-answer-box.open {
  max-height: 250px;
  padding: 20px 24px;
}

.qna-answer-box p {
  font-size: 14px;
  line-height: 1.8;
  position: relative;
  padding-left: 20px;
}

.qna-answer-box p::before {
  content: 'A';
  position: absolute;
  left: 0; top: 0;
  font-family: var(--font-eng);
  font-weight: 700;
  color: var(--accent);
}

.btn-write-qna {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-write-qna:hover {
  background: var(--border-color);
  color: var(--accent);
}

/* ══════════════════════════════
   § MODAL (네이버페이 결제 팝업)
══════════════════════════════ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 90%;
  max-width: 440px;
  padding: 30px;
  border-radius: var(--border-radius-lg);
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-logo {
  font-family: var(--font-eng);
  font-size: 22px;
  font-weight: 700;
  color: #03cf5d;
  margin-bottom: 25px;
}

.modal-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(3, 207, 93, 0.15);
  border-top: 4px solid #03cf5d;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(3, 207, 93, 0.1);
  color: #03cf5d;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.modal-success-box h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.receipt-info {
  width: 100%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 20px;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
}

.receipt-row .accent-text {
  color: var(--price-color);
  font-weight: 700;
}

.btn-modal-close {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-modal-close:hover {
  filter: brightness(1.05);
}

/* ══ 반응형 스토어 스타일 ══ */
@media (max-width: 1024px) {
  #shop-home {
    padding: 120px 30px 60px;
  }
  #product-detail-view {
    padding-top: 70px;
  }
  .detail-back-bar {
    padding: 20px 30px 10px;
  }
  .shop-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 20px 30px 60px;
  }
  .tabs-content-wrapper {
    padding: 40px 30px 80px;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 20px 30px;
  }
  .nav-menu {
    display: none;
  }
  .shop-info-panel {
    padding: 24px;
  }
  .shop-btn-group {
    grid-template-columns: 1.5fr 1fr;
  }
  .btn-wish {
    grid-column: span 2;
    padding: 12px;
  }
  .sticky-tabs-container {
    top: 58px;
  }
  .review-scoreboard {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 24px;
  }
  .score-overall {
    border-right: none;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 24px;
  }
  .qna-header-row {
    display: none;
  }
  .qna-row {
    grid-template-columns: 80px 1fr;
    row-gap: 8px;
    padding: 15px 20px;
  }
  .qna-col-author {
    grid-column: 1;
    text-align: left;
  }
  .qna-col-date {
    grid-column: 2;
    text-align: right;
  }
}
