/* Product Detail Page - Redesign */
/* CSS Variables inherited from home.css */

/* Product Detail Container */
.product-detail-container {
  width: 100%;
  max-width: 100vw;
  margin: 0 auto;
  background-color: var(--bg-white);
  min-height: 100vh;
  position: relative;
  padding-bottom: 80px; /* Space for fixed purchase button */
}

/* 1. Product Hero Section (Image + Badge) */
.product-hero {
  width: 100%;
  background-color: var(--bg-white);
  position: relative;
}

/* 이미지 컨테이너 - 피그마 디자인 (360x360) */
.product-image-container {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: hidden;
  background-color: #f5f5f5;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Image Slider */
.image-slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.image-track {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease;
}

.image-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
}

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

/* 이미지 인디케이터 - 피그마 디자인 (정확히 일치) */
.image-indicator {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 47px;
  height: 25px;
  background: rgba(17, 17, 17, 0.6);
  color: #ffffff;
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.24px;
  line-height: 17px;
  padding: 4px 8px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Reward Badge - Same as home page */
.reward-badge {
  position: absolute;
  right: clamp(10px, 2.5vw, 14px);
  bottom: clamp(10px, 2.5vw, 14px);
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.5vw, 8px);
  background: linear-gradient(180deg, #744AFF 0%, #00ABDA 100%);
  border-radius: 10px;
  padding: clamp(8px, 2vw, 10px) clamp(12px, 3vw, 16px);
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 101, 255, 0.3);
}

.reward-icon {
  background: #FFFFFF;
  color: #0065FF;
  font-size: clamp(12px, 3vw, 14px);
  font-weight: 900;
  width: clamp(24px, 6vw, 28px);
  height: clamp(24px, 6vw, 28px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reward-content {
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 0.5vw, 4px);
}

.reward-text {
  color: #FFFFFF;
  font-size: clamp(10px, 2.5vw, 12px);
  font-weight: 500;
  letter-spacing: -0.1px;
  line-height: 1.2;
}

.reward-amount {
  color: #FFFFFF;
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.1;
}

/* 2. Product Info Section - 피그마 디자인 */
.product-info-section {
  padding: 16px;
  background: #ffffff;
}

.product-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 상품명 - 피그마: 16px Bold #171717 */
.product-name {
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #171717;
  margin: 0;
  line-height: 24px;
  letter-spacing: -0.32px;
}

/* 상품 설명 - 피그마: 16px Regular #404040 */
.product-description {
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #404040;
  margin: 4px 0 0;
  line-height: 24px;
  letter-spacing: -0.32px;
}

/* 상품 가격 - 피그마: 20px Bold #171717 */
.product-price {
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #171717;
  line-height: 30px;
  letter-spacing: -0.4px;
  margin-top: 8px;
}

/* Product Benefits Section */
.product-benefits-section {
  padding: 0 20px;
  background: #ffffff;
}

.benefit-divider {
  height: 1px;
  background: #EEEEEE;
  margin: 0;
}

/* 최대 적립 포인트 - 피그마 디자인 (정확히 일치) */
.reward-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  margin-bottom: 12px;
  height: 21px;
}

.reward-label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.reward-icon-placeholder {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.reward-icon-placeholder img {
  width: 20px;
  height: 20px;
}

.reward-label-text {
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #171717;
  letter-spacing: -0.28px;
  line-height: 21px;
}

.reward-value {
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #171717;
  letter-spacing: -0.28px;
  line-height: 21px;
}

/* Legacy styles 제거됨 - 피그마 디자인 적용 완료 */

/* Hwajukdan Benefit Button - 피그마 디자인 (정확히 일치) */
.hwajukdan-benefit-btn {
  width: 100%;
  height: 55px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 8px 16px;
  background: #FFFFFF;
  border: 1px solid #3F51B5;
  border-radius: 4px;
  cursor: pointer;
  margin: 12px 0;
}

.hwajukdan-btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 21px;
}

.hwajukdan-btn-title {
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #3F51B5;
  letter-spacing: -0.28px;
  line-height: 21px;
  text-align: center;
}

.hwajukdan-btn-arrow {
  width: 16px;
  height: 16px;
}

.hwajukdan-btn-desc {
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #111111;
  letter-spacing: -0.24px;
  line-height: 18px;
  margin: 0;
  text-align: center;
}

.hwajukdan-benefit-btn:hover {
  background: #F5F7FF;
}

/* Delivery Info - 피그마 디자인 (정확히 일치) */
.delivery-info-row-new {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-top: 12px;
  margin-bottom: 16px;
}

.delivery-icon-new {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delivery-icon-new img {
  width: 20px;
  height: 20px;
}

/* 배송 텍스트 - 피그마 디자인 (304x84, 14px Regular) */
.delivery-text-new {
  flex: 1;
  max-width: 304px;
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.28px;
  line-height: 21px;
}

/* 배송 제목 - Bold #171717 */
.delivery-title {
  font-weight: 700;
  color: #171717;
}

/* 배송 설명 - Regular #737373 */
.delivery-desc {
  color: #737373;
}

/* 3. Recommendation Prompt */
.recommendation-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(10px, 2.5vw, 14px) clamp(20px, 5vw, 30px);
  background: #fafafa;
  border-top: 1px solid #f2f5f8;
  border-bottom: 1px solid #f2f5f8;
}

.prompt-text {
  font-size: clamp(14px, 3.5vw, 15px);
  font-weight: 700;
  color: #2d2d2d;
  letter-spacing: -0.28px;
}

.prompt-link {
  display: inline-flex;
  align-items: center;
  gap: clamp(4px, 1vw, 6px);
  font-size: clamp(13px, 3.2vw, 14px);
  font-weight: 600;
  color: #0065ff;
  background: #e8f4fd;
  padding: clamp(6px, 1.5vw, 8px) clamp(16px, 4vw, 20px);
  border-radius: clamp(6px, 1.5vw, 8px);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  letter-spacing: -0.28px;
}

.prompt-link:hover {
  background: #d0e7f9;
}

.prompt-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.prompt-arrow {
  width: clamp(14px, 3.5vw, 18px);
  height: clamp(14px, 3.5vw, 18px);
  fill: #0065ff;
}

/* 4. Detail Section Title */
.detail-section-title {
  font-size: clamp(14px, 3.5vw, 18px);
  font-weight: 900;
  color: #405469;
  padding: 0 clamp(20px, 5vw, 30px);
  margin: clamp(20px, 5vw, 30px) 0 clamp(15px, 4vw, 25px);
  letter-spacing: -0.30px;
  line-height: clamp(21px, 5vw, 27px);
  text-align: center;
}

/* 5. Detail Images Section */
.detail-images-section {
  width: 100%;
  background: #ffffff;
  max-height: 400px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.detail-images-section.expanded {
  max-height: none;
}

.detail-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Expand Detail Button - 피그마 디자인 */
.expand-detail-btn {
  width: calc(100% - 32px);
  margin: 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #FFFFFF;
  border: 1px solid #3F51B5;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: #3F51B5;
}

.expand-detail-btn .expand-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.expand-detail-btn:hover {
  background: #F5F7FF;
}

/* Section Divider */
.section-divider {
  height: 8px;
  background: #f5f5f5;
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.tab-btn {
  flex: 1;
  padding: 16px;
  font-size: 14px;
  font-weight: 500;
  color: #999999;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: #3F51B5;
  font-weight: 700;
  border-bottom-color: #3F51B5;
}

/* Tab Content */
.tab-content {
  display: none;
  background: #ffffff;
}

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

/* Review Section Styles */

/* 리뷰 탭 요약 - 피그마 디자인 (평균 별점만 표시) */
.review-summary-simple {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 16px;
  background: #ffffff;
}

.rating-score-inline {
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #171717;
  line-height: 30px;
  letter-spacing: -0.4px;
}

.rating-stars-inline {
  display: flex;
  gap: 0;
}

.rating-stars-inline .star {
  font-size: 20px;
  color: #E0E0E0;
}

.rating-stars-inline .star.filled {
  color: #3F51B5;
}

/* 기존 리뷰 요약 스타일 (하위 호환) */
.review-summary {
  padding: 24px 20px;
  text-align: center;
  border-bottom: 1px solid #f2f5f8;
}

.review-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.rating-score {
  font-size: 48px;
  font-weight: 700;
  color: #1F1F1F;
  line-height: 1;
}

.rating-stars {
  display: flex;
  gap: 4px;
}

.rating-stars .star {
  font-size: 24px;
  color: #E0E0E0;
}

.rating-stars .star.filled {
  color: #3F51B5;
}

.rating-stars .star.half {
  background: linear-gradient(90deg, #3F51B5 50%, #E0E0E0 50%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Review Images Grid */
.review-images-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 16px 20px;
  background: #ffffff;
}

.review-image-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  background: #f5f5f5;
}

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

.review-images-more {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Review List Header - 피그마 디자인 */
.review-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #ffffff;
}

.review-list-count {
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #171717;
  letter-spacing: -0.28px;
  line-height: 21px;
}

.review-sort-options {
  display: flex;
  gap: 16px;
}

.sort-btn {
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #171717;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  letter-spacing: -0.28px;
  line-height: 21px;
}

.sort-btn.active {
  color: #3F51B5;
  font-weight: 700;
}

/* Review Divider */
.review-divider {
  height: 1px;
  background: #eeeeee;
  margin: 0 16px;
}

/* Review List - 피그마 디자인 */
.review-list {
  padding: 0 16px 16px;
}

.review-item {
  padding: 16px 0;
  border-bottom: 1px solid #f5f5f5;
}

.review-item:last-child {
  border-bottom: none;
}

/* 리뷰 헤더: 별점 + 작성자 이름 (피그마 디자인) */
.review-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.review-rating-small {
  display: flex;
  gap: 0;
}

.review-rating-small .star {
  font-size: 16px;
  color: #E0E0E0;
}

.review-rating-small .star.filled {
  color: #3F51B5;
}

.review-author {
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #171717;
  letter-spacing: -0.28px;
  line-height: 21px;
}

/* 리뷰 메타: 날짜 | 장례식장 (피그마 디자인) */
.review-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #171717;
  letter-spacing: -0.28px;
  line-height: 21px;
}

.review-funeral {
  padding-left: 8px;
  border-left: 1px solid #e0e0e0;
}

/* 리뷰 내용 (피그마 디자인) */
.review-content {
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #737373;
  line-height: 21px;
  letter-spacing: -0.28px;
  margin: 0;
}

/* Review Item Images */
.review-images {
  margin-top: 12px;
}

/* 리뷰 이미지: 360px 기준 328px - 반응형 (부모 너비 100% 사용) */
.review-single-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
}

.review-images-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.review-images-slider:active {
  cursor: grabbing;
}

.review-images-track {
  display: flex;
  transition: transform 0.3s ease;
}

.review-image-slide {
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 1;
}

.review-image-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-images-indicator {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
}

/* 리뷰 이미지 클릭 가능 표시 */
.review-single-image,
.review-image-slide img {
  cursor: pointer;
}

/* 이미지 전체화면 오버레이 */
.image-fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #171717;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.image-fullscreen-overlay .close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-fullscreen-overlay .close-btn::before,
.image-fullscreen-overlay .close-btn::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: #ffffff;
}

.image-fullscreen-overlay .close-btn::before {
  transform: rotate(45deg);
}

.image-fullscreen-overlay .close-btn::after {
  transform: rotate(-45deg);
}

.image-fullscreen-overlay .fullscreen-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Review Loading & Error States */
.review-loading,
.review-error,
.no-reviews {
  padding: 40px 20px;
  text-align: center;
  color: #999999;
  font-size: 14px;
}

.review-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.retry-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #3F51B5;
  background: #f5f5f5;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Review View All Button - 피그마 디자인 (상세정보 펼치기와 동일) */
.review-view-all-container,
.review-view-all-container-standalone {
  padding: 16px;
  text-align: center;
}

.review-view-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
  color: #3F51B5;
  background: #FFFFFF;
  border: 1px solid #3F51B5;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.review-view-all-btn:hover {
  background: #F5F7FF;
  text-decoration: none;
}

/* 6. Accordion Section - 피그마 디자인 */
.accordion-section {
  background: #ffffff;
}

.accordion-item {
  border-bottom: 1px solid #f5f5f5;
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: #ffffff;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.accordion-header:hover {
  background: #fafafa;
}

.accordion-title {
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #171717;
  text-align: left;
  letter-spacing: -0.32px;
  line-height: 24px;
}

.accordion-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.accordion-icon.rotated {
  transform: rotate(90deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-content.expanded {
  max-height: 2000px;
}

.accordion-inner {
  padding: clamp(15px, 4vw, 25px) clamp(20px, 5vw, 30px);
  font-size: clamp(12px, 3vw, 16px);
  font-weight: 400;
  color: #405469;
  line-height: 1.6;
  letter-spacing: -0.27px;
}

.accordion-inner h4 {
  font-size: clamp(13px, 3.2vw, 17px);
  font-weight: 900;
  color: #2d2d2d;
  margin: 0 0 clamp(10px, 2.5vw, 14px) 0;
  letter-spacing: -0.28px;
}

.accordion-inner h4:not(:first-child) {
  margin-top: clamp(15px, 4vw, 25px);
}

.accordion-inner p {
  margin: 0 0 clamp(8px, 2vw, 12px) 0;
}

.accordion-inner .indent {
  padding-left: clamp(15px, 4vw, 25px);
}

.accordion-inner ul {
  list-style: none;
  padding: 0;
  margin: 0 0 clamp(12px, 3vw, 16px) 0;
}

.accordion-inner li {
  position: relative;
  padding-left: clamp(16px, 4vw, 20px);
  margin-bottom: clamp(8px, 2vw, 12px);
  line-height: 1.6;
}

.accordion-inner li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: #744AFF;
  font-weight: 700;
  font-size: clamp(14px, 3.5vw, 18px);
}

.accordion-inner .sub-item {
  margin-top: clamp(4px, 1vw, 6px);
  padding-left: clamp(12px, 3vw, 16px);
  color: #7090b0;
  font-size: clamp(11px, 2.8vw, 14px);
}

/* 7. Bottom Sheet */
.bottom-sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 199;
  transition: background 0.3s ease;
  pointer-events: none;
}

.bottom-sheet-overlay.active {
  background: rgba(0, 0, 0, 0.5);
  pointer-events: all;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: clamp(16px, 4vw, 22px) clamp(16px, 4vw, 22px) 0 0;
  box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 200;
  padding: clamp(20px, 5vw, 30px) clamp(20px, 5vw, 30px);
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  max-width: 420px;
  margin: 0 auto;
}

.bottom-sheet.active {
  transform: translateY(0);
}

.bottom-sheet-header {
  margin-bottom: clamp(18px, 4.5vw, 24px);
}

.bottom-sheet-title {
  font-size: clamp(16px, 4vw, 22px);
  font-weight: 900;
  color: #0065ff;
  margin: 0;
  letter-spacing: -0.38px;
}

.bottom-sheet-content {
  display: flex;
  flex-direction: column;
}

.bottom-sheet-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(15px, 4vw, 25px) 0;
  font-size: clamp(14px, 3.5vw, 18px);
  font-weight: 600;
  color: #405469;
  text-decoration: none;
  border-bottom: 1px solid #f2f5f8;
  transition: background-color 0.2s ease;
  letter-spacing: -0.30px;
}

.bottom-sheet-option:last-child {
  border-bottom: none;
}

.bottom-sheet-option:hover,
.bottom-sheet-option:active {
  background: #fafafa;
}

/* 8. Review Section Standalone (피그마 디자인) */
.review-section-standalone {
  background: #ffffff;
  padding: 16px 16px 20px;
}

.review-rating-summary {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.rating-score-large {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
}

.rating-stars-large {
  display: flex;
  gap: 0;
}

.rating-stars-large .star {
  font-size: 20px;
  color: #E0E0E0;
}

.rating-stars-large .star.filled {
  color: #3F51B5;
}

.review-images-grid-standalone {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.review-images-grid-standalone .review-image-thumb {
  width: 76px;
  height: 76px;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f5;
}

.review-images-grid-standalone .review-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-images-grid-standalone .review-images-more-btn {
  width: 76px;
  height: 76px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border: none;
  cursor: pointer;
}

.review-images-grid-standalone .review-images-more-btn .more-text {
  font-size: 12px;
  font-weight: 700;
}

.review-divider-full {
  height: 1px;
  background: #eeeeee;
  margin: 12px 0;
}

.review-list-standalone {
  padding: 0;
}

.review-list-standalone .review-item {
  padding: 12px 0;
  border-bottom: 1px solid #eeeeee;
}

.review-list-standalone .review-item:last-child {
  border-bottom: none;
}

.review-list-standalone .review-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.review-list-standalone .review-stars-small {
  display: flex;
  gap: 0;
}

.review-list-standalone .review-stars-small .star {
  font-size: 16px;
  color: #E0E0E0;
}

.review-list-standalone .review-stars-small .star.filled {
  color: #3F51B5;
}

.review-list-standalone .review-author {
  font-size: 14px;
  font-weight: 400;
  color: #000000;
}

.review-list-standalone .review-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #000000;
}

.review-list-standalone .review-content-wrapper {
  display: flex;
  gap: 8px;
}

.review-list-standalone .review-text {
  flex: 1;
  font-size: 14px;
  color: #000000;
  line-height: 1.5;
}

.review-list-standalone .review-thumb {
  width: 76px;
  height: 76px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.review-list-standalone .review-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-view-all-container-standalone {
  padding: 16px 0 0;
}

/* 9. Recommendation Section - 2열 그리드 (피그마 디자인) */
.recommendation-section {
  background: #FFFFFF;
  padding: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin: 0 0 12px 0;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.recommendation-card-new {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.recommendation-card-new:hover {
  text-decoration: none;
}

.recommendation-image-wrapper {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f5;
  margin-bottom: 8px;
}

.recommendation-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recommendation-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recommendation-text .recommendation-name {
  font-size: 14px;
  font-weight: 700;
  color: #333333;
  margin: 0;
  text-align: left;
}

.recommendation-text .recommendation-desc {
  font-size: 12px;
  font-weight: 400;
  color: #6a6a6a;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recommendation-price-info {
  margin-top: 4px;
}

.recommendation-price-info .original-price {
  font-size: 12px;
  font-weight: 400;
  color: #a3a3a3;
  text-decoration: line-through;
  display: block;
}

.recommendation-price-info .discount-price-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.recommendation-price-info .discount-rate {
  font-size: 16px;
  font-weight: 700;
  color: #3F51B5;
}

.recommendation-price-info .sale-price {
  font-size: 16px;
  font-weight: 700;
  color: #333333;
}

.recommendation-tags {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.recommendation-tags .tag {
  font-size: 10px;
  font-weight: 400;
  padding: 4px 4px;
  border-radius: 4px;
}

.recommendation-tags .tag-today {
  background: rgba(63, 81, 181, 0.2);
  color: #3F51B5;
}

.recommendation-tags .tag-free-shipping {
  background: #f5f5f5;
  color: #6a6a6a;
}

/* 9. Fixed Purchase Button */
.fixed-purchase-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-white);
  box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.1);
}

.fixed-purchase-btn {
  width: 100%;
  max-width: 420px;
  height: 56px;
  margin: 0 auto;
  display: block;
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  color: #FFFFFF;
  background: #0065FF;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.fixed-purchase-btn:hover {
  background: #0052CC;
}

.fixed-purchase-btn:active {
  background: #0052CC;
}

.fixed-purchase-btn:disabled {
  background: #CCCCCC;
  cursor: not-allowed;
}

/* 10. Responsive Design */
@media (max-width: 480px) {
  .product-detail-container {
    max-width: 100%;
  }
  
  .recommendation-slider {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .product-detail-container {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  }
  
  .fixed-purchase-container {
    max-width: 480px;
    margin: 0 auto;
  }
}

@media (min-width: 769px) {
  .product-detail-container {
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
  }
  
  .fixed-purchase-container {
    max-width: 420px;
    margin: 0 auto;
  }
  
  .recommendation-slider::-webkit-scrollbar {
    display: block;
    height: 4px;
  }
  
  .recommendation-slider::-webkit-scrollbar-thumb {
    background: #CCCCCC;
    border-radius: 2px;
  }
}

/* 11. Accessibility */
.accordion-header:focus,
.bottom-sheet-option:focus,
.recommendation-card:focus,
.fixed-purchase-btn:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* 12. Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* 13. Image Loading States */
.product-image[loading="eager"],
.detail-image[loading="lazy"],
.recommendation-image[loading="lazy"] {
  background: #F0F0F0;
}

/* 14. 모바일/터치 디바이스에서 hover 비활성화 */
@media (hover: none) and (pointer: coarse) {
  .review-view-all-btn:hover,
  .expand-detail-btn:hover,
  .hwajukdan-benefit-btn:hover,
  .accordion-header:hover,
  .tab-btn:hover,
  .sort-btn:hover,
  .fixed-purchase-btn:hover,
  .bottom-sheet-option:hover,
  .prompt-link:hover {
    background: inherit;
  }
  
  .review-view-all-btn:hover {
    background: #FFFFFF;
  }
  
  .expand-detail-btn:hover {
    background: #FFFFFF;
  }
  
  .hwajukdan-benefit-btn:hover {
    background: #FFFFFF;
  }
  
  .accordion-header:hover {
    background: #ffffff;
  }
  
  .fixed-purchase-btn:hover {
    background: #0065FF;
  }
}
