/* 리뷰 작성하기 버튼 */
.write-review-btn {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.write-review-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.reviews-header {
  text-align: center;
  margin-bottom: 40px;
}

/* 리뷰 섹션 */
.reviews-section {
  padding: 60px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* 리뷰 그리드 - 세로 스크롤 */
.reviews-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 20px !important;
  max-height: 600px;
  overflow-y: auto;
  padding: 20px;
  animation: none !important;
}

/* 스크롤바 스타일링 */
.reviews-grid::-webkit-scrollbar {
  width: 8px;
}

.reviews-grid::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.reviews-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: 10px;
}

.reviews-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #3730a3, #6b21a8);
}

/* 리뷰 카드 스타일 */
.reviews-section .review-card {
  background: white !important;
  border-radius: 16px !important;
  padding: 24px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.3s ease !important;
  border: 1px solid #e2e8f0 !important;
  position: relative !important;
  margin: 0 !important;
}

.reviews-section .review-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
  border-color: #4f46e5 !important;
}

.reviews-section .review-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  margin-bottom: 16px !important;
}

.reviews-section .reviewer-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.reviews-section .reviewer-name {
  font-weight: 600 !important;
  color: #1f2937 !important;
  margin: 0 !important;
  font-size: 1.1rem !important;
}

.reviews-section .review-rating {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.reviews-section .stars {
  color: #fbbf24 !important;
  font-size: 1rem !important;
}

.reviews-section .rating-score {
  font-weight: 600 !important;
  color: #4f46e5 !important;
  background: #eff6ff !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  font-size: 0.9rem !important;
}

.reviews-section .review-date {
  color: #6b7280 !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
}

.reviews-section .review-text {
  color: #374151 !important;
  line-height: 1.6 !important;
  font-size: 0.95rem !important;
  margin: 0 !important;
}

.reviews-section .review-images {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-top: 16px !important;
  align-items: center !important;
}

.review-image-thumbnail {
  width: 100px !important;
  height: 100px !important;
  object-fit: cover !important;
  border-radius: 12px !important;
  border: 2px solid #e5e7eb !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.review-image-thumbnail:hover {
  transform: scale(1.05) !important;
  border-color: #4f46e5 !important;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3) !important;
}

.more-images {
  width: 100px !important;
  height: 100px !important;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
  border: 2px dashed #9ca3af !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: #6b7280 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

.more-images:hover {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%) !important;
  color: #4b5563 !important;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .reviews-grid {
    max-height: 500px !important;
    padding: 15px !important;
    gap: 15px !important;
  }

  .reviews-section .review-card {
    padding: 20px !important;
  }

  .reviews-section .reviewer-name {
    font-size: 1rem !important;
  }

  .reviews-section .review-text {
    font-size: 0.9rem !important;
  }

  .reviews-section .review-rating {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }

  .reviews-section .stars {
    font-size: 0.9rem !important;
  }
}

/* 리뷰 모달 */
.review-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.review-modal-content {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.review-modal-header {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  padding: 25px 30px;
  border-radius: 20px 20px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.review-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.review-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.review-modal-body {
  padding: 30px;
}

/* 폼 스타일 */
.review-form-modal {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-section {
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #4f46e5;
}

.form-section h4 {
  margin: 0 0 15px 0;
  color: #374151;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* 별점 시스템 */
.rating-section {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.star-rating {
  display: flex;
  gap: 5px;
}

.star {
  font-size: 1.8rem;
  color: #d1d5db;
  cursor: pointer;
  transition: all 0.2s ease;
}

.star:hover,
.star.active {
  color: #fbbf24;
  transform: scale(1.1);
}

.rating-text {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

/* 이미지 업로드 */
.image-upload-section {
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  background: white;
}

.image-upload-section:hover {
  border-color: #4f46e5;
  background-color: #f8fafc;
}

.image-upload-section.dragover {
  border-color: #4f46e5;
  background-color: #eff6ff;
}

.upload-icon {
  font-size: 2.5rem;
  color: #9ca3af;
  margin-bottom: 10px;
}

.image-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.image-preview {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #f3f4f6;
}

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

.remove-image {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.remove-image:hover {
  background: rgba(220, 38, 38, 1);
}

/* 액션 버튼 */
.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  padding-top: 10px;
}

.submit-btn {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.submit-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cancel-btn {
  background: #f3f4f6;
  color: #374151;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
}

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

/* 메시지 */
.success-message,
.error-message {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
  text-align: center;
}

.success-message {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.error-message {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

/* 반응형 */
@media (max-width: 768px) {
  .review-modal {
    padding: 10px;
    align-items: flex-start;
    padding-top: 20px;
  }

  .review-modal-content {
    width: 100%;
    max-height: 95vh;
  }

  .review-modal-header {
    padding: 20px;
  }

  .review-modal-header h3 {
    font-size: 1.3rem;
  }

  .review-modal-body {
    padding: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .form-section {
    padding: 15px;
  }

  .star {
    font-size: 1.5rem;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .submit-btn,
  .cancel-btn {
    width: 100%;
  }
}

/* ============================================
   이미지 모달 스타일
   ============================================ */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.image-modal-content {
  position: relative;
  max-width: 50vw;
  max-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease;
}

.image-modal-close {
  display: none;
}

.image-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #333;
  z-index: 2001;
}

.image-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.image-nav.prev {
  left: -70px;
}

.image-nav.next {
  right: -70px;
}

.image-counter {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

/* 태블릿 크기 조정 */
@media (max-width: 1024px) and (min-width: 769px) {
  .image-modal-content {
    max-width: 75vw;
    max-height: 75vh;
  }
}

/* 모바일 반응형 - 이미지 모달 */
@media (max-width: 768px) {
  .image-modal-content {
    max-width: 85vw;
    max-height: 75vh;
  }

  .image-modal-close {
    top: -40px;
    right: 0;
    width: 35px;
    height: 35px;
    font-size: 20px;
  }

  .image-nav {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .image-nav.prev {
    left: -50px;
  }

  .image-nav.next {
    right: -50px;
  }

  .image-counter {
    bottom: -40px;
    font-size: 12px;
    padding: 6px 12px;
  }

  .review-image-thumbnail {
    width: 80px !important;
    height: 80px !important;
  }

  .more-images {
    width: 80px !important;
    height: 80px !important;
    font-size: 1rem !important;
  }
}

@media (max-width: 480px) {
  .image-nav.prev {
    left: 10px;
  }

  .image-nav.next {
    right: 10px;
  }

  .image-modal-close {
    top: 10px;
    right: 10px;
  }

  .image-counter {
    bottom: 10px;
  }
}

/* 애니메이션 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
