/* 기본 설정 및 변수 선언 */
:root {
  --primary-color: #ffb6c1; /* 베이비 핑크 */
  --secondary-color: #ffe4e1; /* 미스티 로즈 (더 연한 핑크) */
  --accent-color: #ff69b4; /* 핫핑크 포인트 */
  --text-main: #4a4a4a; /* 부드러운 다크 그레이 */
  --text-light: #8b7355; /* 부드러운 브라운 */
  --bg-color: #fffaf0; /* 플로럴 화이트 (따뜻한 배경) */
  --white: #ffffff;
  --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: radial-gradient(var(--secondary-color) 1px, transparent 1px);
  background-size: 30px 30px;
}

h1, h2, h3, .logo {
  font-family: 'Nanum Myeongjo', serif;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* 배경 장식 일러스트 스타일 */
.bg-blob {
  position: fixed;
  width: 400px;
  height: 400px;
  background: var(--secondary-color);
  filter: blur(100px);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.4;
  pointer-events: none;
}

#blob1 { top: -100px; right: -100px; }
#blob2 { bottom: 100px; left: -100px; background: #fff0f5; }

/* 스티키 헤더 - 글래스모피즘 효과 */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}

#header.scrolled {
  background: rgba(255, 250, 240, 0.85);
  padding: 15px 50px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 1px;
}

nav ul {
  display: flex;
  gap: 30px;
}

nav a {
  font-size: 1.1rem;
  font-weight: 500;
  position: relative;
  transition: var(--transition);
}

nav a:hover {
  color: var(--accent-color);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: var(--transition);
}

nav a:hover::after {
  width: 100%;
}

/* 메인 배너 (Hero Section) */
#hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(rgba(255, 228, 225, 0.3), rgba(255, 250, 240, 0.3)), 
              url('image/hero_bg.png');
  background-size: cover;
  background-position: center;
  position: relative;
  padding-top: 80px;
}

.hero-content h1 {
  font-size: clamp(3rem, 10vw, 5rem);
  line-height: 1.1;
  margin-bottom: 20px;
  color: #3d2b1f;
  text-shadow: 2px 2px 15px rgba(255, 255, 255, 0.9);
}

.hero-content p:not(.opening-hours) {
  font-size: 1.3rem;
  color: #3d2b1f;
  margin-bottom: 15px;
  font-weight: 500;
}

.opening-hours {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 40px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  color: var(--accent-color);
  font-weight: 700;
  letter-spacing: 1px;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-20px) translateX(-50%); }
  60% { transform: translateY(-10px) translateX(-50%); }
}

/* 공통 섹션 스타일 */
.section {
  padding: 120px 10vw;
  text-align: center;
  position: relative;
}

.section h2 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--accent-color);
}

/* 소개 영역 */
#intro p {
  font-size: 1.2rem;
  color: var(--text-light);
  line-height: 2;
  max-width: 700px;
  margin: 0 auto;
}

/* 메뉴 그리드 영역 */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.grid-item {
  background: var(--white);
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(255, 182, 193, 0.2);
  transition: var(--transition);
  cursor: pointer;
}

.grid-item:hover {
  transform: translateY(-15px);
  box-shadow: 0 25px 50px rgba(255, 182, 193, 0.4);
}

.image-box {
  width: 100%;
  height: 320px;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s ease;
}

.grid-item:hover .image-box {
  transform: scale(1.1);
}

#menu-img-1 { background-image: url('image/pink_latte.png'); }
#menu-img-2 { background-image: url('image/bear_choco.png'); }
#menu-img-3 { background-image: url('image/cloud_bread.png'); }
#menu-img-4 { background-image: url('image/einspanner.png'); }
#menu-img-5 { background-image: url('image/americano.png'); }
#menu-img-6 { background-image: url('image/croffle.png'); }
#menu-img-7 { background-image: url('image/matcha.png'); }
#menu-img-8 { background-image: url('image/lemonade.png'); }

.info {
  padding: 30px 20px;
  background: var(--white);
}

.info h3 {
  font-size: 1.4rem;
  color: #3d2b1f;
  margin-bottom: 10px;
}

.info p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* 하단 정보 영역 */
#footer {
  background-color: var(--white);
  padding: 80px 20px;
  text-align: center;
  border-top: 1px solid rgba(255, 182, 193, 0.3);
  color: var(--text-light);
}

#footer p {
  margin-bottom: 10px;
  font-size: 0.95rem;
}

/* 애니메이션 관련 */
.fade-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 반응형 */
@media (max-width: 768px) {
  #header {
    padding: 15px 20px;
  }
  .section {
    padding: 80px 5vw;
  }
}
/* 상세 보기 모달 스타일 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none; /* 초기에는 숨김 */
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  width: 100%;
  max-width: 800px;
  border-radius: 30px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2.5rem;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.close-btn:hover {
  color: var(--accent-color);
  transform: rotate(90deg);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.modal-image {
  width: 100%;
  height: 500px;
  background-size: cover;
  background-position: center;
}

.modal-text {
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-text h2 {
  font-size: 2.2rem;
  margin-bottom: 5px;
  color: #3d2b1f;
}

.modal-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 30px;
}

.modal-section {
  margin-bottom: 25px;
}

.modal-section h4 {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 10px;
  border-bottom: 2px solid var(--secondary-color);
  display: inline-block;
  padding-bottom: 3px;
}

.modal-section p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-main);
}

/* 애니메이션 효과 */
.fade-in {
  animation: fadeIn 0.4s ease-out;
}

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

/* 모달 반응형 */
@media (max-width: 768px) {
  .modal-body {
    grid-template-columns: 1fr;
    max-height: 85vh;
    overflow-y: auto;
  }
  .modal-image {
    height: 300px;
  }
  .modal-text {
    padding: 30px 20px;
  }
  .close-btn {
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  }
}

/* 상세 소개 섹션 스타일 */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.about-image {
  width: 100%;
  height: 450px;
  background-image: url('image/about_interior.png');
  background-size: cover;
  background-position: center;
  border-radius: 30px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.about-text {
  text-align: left;
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #3d2b1f;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--text-main);
}

/* 후기 섹션 스타일 */
.review-intro {
  margin-bottom: 40px;
  color: var(--text-light);
}

.review-form-container {
  background: var(--white);
  padding: 40px;
  border-radius: 30px;
  max-width: 800px; /* 원상복귀 */
  margin: 0 auto 50px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

#review-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  gap: 15px;
}

#review-name, #review-rating, #review-content {
  padding: 18px;
  border: 1px solid #eee;
  border-radius: 20px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

#review-name { flex: 2; }
#review-rating { flex: 1; }

#review-content {
  height: 120px; /* 원상복귀 */
  resize: vertical;
  min-height: 100px;
}

#review-name:focus, #review-rating:focus, #review-content:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(255, 126, 179, 0.1);
}

.submit-btn {
  background: var(--accent-color);
  color: var(--white);
  padding: 15px;
  border: none;
  border-radius: 15px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.submit-btn:hover {
  background: #ff5e9c;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 126, 179, 0.3);
}

/* 후기 목록 스타일 */
.review-list-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-card {
  background: rgba(255, 255, 255, 0.8);
  padding: 25px;
  border-radius: 20px;
  text-align: left;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  border-left: 5px solid var(--accent-color);
  animation: fadeIn 0.5s ease-out;
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.review-user {
  font-weight: 700;
  color: #3d2b1f;
}

.review-stars {
  color: #ffb400;
}

.review-body {
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.5;
}

.no-reviews {
  color: var(--text-light);
  font-style: italic;
  padding: 20px;
}

/* 앵커 이동 시 헤더 가림 방지 */
section {
  scroll-margin-top: 100px;
}

/* 상세 소개 반응형 */
@media (max-width: 768px) {
  .about-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .about-image {
    height: 250px;
  }
  .form-group {
    flex-direction: column;
  }
}

/* 베스트 리뷰 및 댓글형 시스템 스타일 */
.review-list-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 30px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.03);
}

.review-card {
  display: flex;
  gap: 20px;
  padding: 25px 15px;
  border-bottom: 1px solid #f0f0f0;
  transition: var(--transition);
  text-align: left;
  position: relative;
}

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

.review-card:hover {
  background: #fffcfc;
}

/* 프로필 아이콘 */
.review-avatar {
  width: 50px;
  height: 50px;
  background: var(--secondary-color);
  color: #3d2b1f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
  border: 2px solid var(--white);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.review-content-wrap {
  flex-grow: 1;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.review-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-user {
  font-weight: 700;
  color: #3d2b1f;
  font-size: 1.1rem;
}

.review-date {
  font-size: 0.85rem;
  color: #999;
  font-weight: 400;
}

.review-stars {
  color: #ffb400;
  font-size: 0.9rem;
}

.review-body {
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 12px;
  white-space: pre-wrap; /* 줄바꿈 유지 */
}

.review-footer {
  display: flex;
  justify-content: flex-start;
  gap: 15px;
  align-items: center;
}

.like-btn {
  background: transparent;
  border: 1px solid #eee;
  color: #777;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.like-btn:hover, .like-btn.active {
  background: #fff0f5;
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* 필터 버튼 스타일 */
.review-filter-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.filter-btn {
  background: var(--white);
  border: 1px solid #ddd;
  color: var(--text-light);
  padding: 10px 25px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--white);
  box-shadow: 0 5px 15px rgba(255, 126, 179, 0.2);
}

.filter-btn:hover:not(.active) {
  background: #fff0f5;
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* '나' 배지 스타일 */
.me-badge {
  background: #ffebf2;
  color: var(--accent-color);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #ffcada;
}

.review-card.is-me {
  background: #fffcfd; /* 내가 쓴 글은 아주 살짝 다른 배경색 */
}

/* 사진 첨부 전용 박스 */
.upload-section {
  background: #fffafa; /* 아주 연한 핑크 배경 */
  border: 2px dashed #ffcad4;
  padding: 25px;
  border-radius: 20px;
  margin-bottom: 25px;
  text-align: center;
}

.upload-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--accent-color);
  font-weight: 700;
  padding: 15px;
  transition: var(--transition);
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 5px;
}

.upload-label:hover {
  transform: scale(1.05);
}

.image-preview-container {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preview-item {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eee;
}

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

.remove-img {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0,0,0,0.5);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 후기 내 이미지 스타일 */
.review-image-wrap {
  margin-top: 15px;
  max-width: 100%;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
}

.review-attached-img {
  display: block;
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  cursor: zoom-in;
}

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

.form-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
}

/* 베스트 그리드 (메인 페이지용 유지) */
.best-reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  max-width: 1100px;
  margin: 0 auto 50px;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.best-reviews-grid .review-card {
  background: var(--white);
  border-radius: 25px;
  border: 2px solid var(--accent-color);
  padding: 25px;
  flex-direction: column; /* 메인에선 카드형 유지 */
}

.best-reviews-grid .review-avatar {
  display: none; /* 메인 카드형에선 숨김 */
}

/* 리뷰 페이지 유도 버튼 스타일 */
.review-cta {
  background: var(--secondary-color);
  padding: 60px 20px;
  border-radius: 40px;
  margin-top: 40px;
}

.review-cta p {
  font-size: 1.2rem;
  margin-bottom: 25px;
  color: #3d2b1f;
}

.cta-btn {
  display: inline-block;
  background: var(--accent-color);
  color: var(--white);
  padding: 18px 40px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 10px 20px rgba(255, 126, 179, 0.2);
}

.cta-btn:hover {
  background: #ff5e9c;
  transform: translateY(-3px) scale(1.05);
}

/* 리뷰 페이지 전용 스타일 */
.reviews-page {
  background: #fffafa; 
}

.page-title {
  font-size: 3rem;
  margin-bottom: 10px;
}

.back-link {
  display: block;
  margin-top: 20px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* 하이라이트 반응형 */
@media (max-width: 768px) {
  .highlights-grid {
    grid-template-columns: 1fr;
  }
}
