/* 기본 리셋 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1px;
}

/* 헤더 스타일 */
.header {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-main {
  padding: 10px 20px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  position: relative;
  min-height: 50px;
  height: 50px; /* 고정 높이 추가 */
}

/* 햄버거 메뉴 버튼을 제일 왼쪽에 배치 */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  order: -1; /* 제일 왼쪽에 배치 */
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background-color: #333;
  margin: 2px 0;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.logo {
  font-family: "Edu NSW ACT Cursive", cursive;
  font-size: 1.6rem;
  text-decoration: none;
  color: #333;
  transition: color 0.3s;
  white-space: nowrap; /* 줄바꿈 방지 */
  flex-shrink: 0; /* 축소 방지 */
}

.logo:hover {
  color: #007bff;
}

.logo-plus {
  color: #007bff;
}

.logo-subtitle {
  font-size: 0.7rem;
  color: #666;
  font-weight: normal;
}

.search-bar {
  flex: 1;
  max-width: 500px;
  display: flex;
  position: relative;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

.search-input:focus {
  border-color: #007bff;
}

.search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  transition: background 0.3s;
}

.search-btn:hover {
  background: #0056b3;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0; /* 축소 방지 */
}

.cart-icon {
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}

.cart-icon:hover {
  background: #e9ecef;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -9px;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* 데스크톱 네비게이션 */
.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

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

.nav-link {
  font-family: "Playfair Display", serif;
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  color: #000;
  font-weight: 500;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-link:hover,
.nav-link.active {
  color: #007bff;
  border-bottom-color: #007bff;
}

/* 모바일 메뉴 오버레이 */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 모바일 사이드 메뉴 */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100%;
  background: white;
  z-index: 1999;
  transition: left 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  left: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
}

.mobile-menu-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.2rem;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s;
}

.mobile-menu-close:hover {
  background: #e9ecef;
  color: #333;
}

.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-list li {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-link {
  display: block;
  padding: 20px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
  position: relative;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: #f8f9fa;
  color: #007bff;
  padding-left: 30px;
}

.mobile-nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #007bff;
}

/* 네비게이션 */
.nav {
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

/* 인증 관련 스타일 */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.username {
  color: #333;
  font-weight: 600;
  font-size: 14px;
}

.user-dropdown {
  display: flex;
  gap: 8px;
}

.mypage-btn {
  padding: 6px 12px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.3s;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap; /* 줄바꿈 방지 */
}

.mypage-btn:hover {
  background: #0056b3;
}

.logout-btn {
  padding: 6px 12px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.3s;
  white-space: nowrap; /* 줄바꿈 방지 */
}

.logout-btn:hover {
  background: #545b62;
}

.auth-links {
  display: flex;
  gap: 10px;
}

.login-btn,
.signup-btn {
  padding: 8px 16px;
  border: 2px solid #007bff;
  border-radius: 25px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap; /* 줄바꿈 방지 */
  min-width: 60px; /* 최소 너비 설정 */
}

.login-btn {
  background: white;
  color: #007bff;
}

.login-btn:hover {
  background: #007bff;
  color: white;
}

.signup-btn {
  background: #007bff;
  color: white;
}

.signup-btn:hover {
  background: #0056b3;
}

/* 메인 콘텐츠 */
.main-content {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
}

/* 히어로 섹션 */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
  margin-bottom: 60px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-btn {
  display: inline-block;
  background: white;
  color: #667eea;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* 섹션 */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: #333;
  font-weight: 700;
}

/* 카테고리 */
.categories {
  padding: 60px 0;
  background: white;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.category-card {
  background: white;
  border-radius: 15px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  border: 1px solid #f1f3f4;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.category-name {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #333;
  font-weight: 600;
}

.category-card p {
  color: #666;
  line-height: 1.6;
}

/* 상품 그리드 */
.items {
  padding: 2px 0;
}

.item-grid,
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
}

/* 상품 카드 */
.item-card {
  background: white;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  border: 1px solid #f1f3f4;
}

.item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.item-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3; /* 416:616 비율에 맞춤 */
  overflow: hidden;
  background-color: #f8f9fa;
}

.item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.item-image-full {
  width: 100%;
  height: 100%; /* 이미지 전체가 보이도록 변경 */
  object-position: center;
  transition: transform 0.3s;
  display: block;
  background-color: transparent;
}

.item-card:hover .item-image {
  transform: scale(1.05);
}

.item-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #007bff;
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}

.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.wishlist-btn:hover {
  background: white;
  transform: scale(1.1);
}

.wishlist-btn.active {
  background: #ff6b6b;
  color: white;
}

.item-info {
  padding: 20px;
  border-radius: 0 0 15px 15px; /* 하단만 둥글게 */
  transition: background-color 0.3s ease;
}

.item-category {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
}

.item-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.item-description {
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
  line-height: 1.5;
}

.item-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #007bff;
  margin-bottom: 10px;
}

.item-stock {
  font-size: 14px;
  margin-bottom: 15px;
}

.item-stock.out {
  color: #dc3545;
}

.item-stock.low {
  color: #ffc107;
}

.item-actions {
  display: flex;
  gap: 10px;
}

.quick-add-btn,
.view-detail-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.quick-add-btn {
  background: #007bff;
  color: white;
}

.quick-add-btn:hover:not(:disabled) {
  background: #0056b3;
}

.quick-add-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.view-detail-btn {
  background: #f8f9fa;
  color: #333;
  border: 1px solid #e9ecef;
}

.view-detail-btn:hover {
  background: #e9ecef;
}

/* 모달 스타일 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-content.large {
  max-width: 800px;
}

.modal-content-large {
  background: white;
  border-radius: 15px;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
  padding: 25px 30px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

.close-btn,
.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s;
}

.close-btn:hover,
.modal-close-btn:hover {
  color: #333;
  background: #f8f9fa;
}

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

/* 폼 스타일 */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: #007bff;
}

.form-help {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #666;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.form-checkbox input[type="checkbox"] {
  width: auto;
}

.submit-btn {
  width: 100%;
  background: #007bff;
  color: white;
  padding: 15px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.submit-btn:hover:not(:disabled) {
  background: #0056b3;
}

.submit-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.form-error {
  color: #dc3545;
  font-size: 14px;
  margin-top: 10px;
}

.field-feedback {
  font-size: 12px;
  margin-top: 4px;
}

.field-feedback.success {
  color: #28a745;
}

.field-feedback.error {
  color: #dc3545;
}

.switch-form {
  text-align: center;
  margin-top: 20px;
  color: #666;
}

.switch-form a {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.switch-form a:hover {
  text-decoration: underline;
}

/* 소셜 로그인 */
.social-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.social-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e9ecef;
}

.social-divider span {
  background: white;
  padding: 0 15px;
  color: #666;
  font-size: 14px;
}

.social-login a {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s;
  margin-bottom: 8px;
}

.social-login a[onclick*="kakao"] {
  background-color: #fee500;
  color: #000000;
  border: 1px solid #fee500;
}

.social-login a[onclick*="kakao"]:hover {
  background-color: #fdd835;
}

.social-login a[onclick*="naver"] {
  background-color: #03c75a;
  color: white;
  border: 1px solid #03c75a;
}

.social-login a[onclick*="naver"]:hover {
  background-color: #02b351;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
  .hamburger-btn {
    display: flex;
  }

  .nav-center {
    display: none;
  }

  .header-content {
    gap: 15px;
  }

  .logo {
    font-size: 1.6rem;
  }

  .logo-subtitle {
    font-size: 0.65rem;
  }

  .header-actions {
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .header-content {
    gap: 10px;
  }

  .logo {
    font-size: 1.5rem;
  }

  .logo-subtitle {
    font-size: 0.6rem;
  }

  .header-actions {
    gap: 10px;
  }

  .cart-icon {
    padding: 8px;
  }

  .search-bar {
    order: 3;
    max-width: 100%;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .category-grid,
  .product-grid,
  .items-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }

  .modal-content,
  .modal-content-large {
    width: 95%;
    margin: 20px;
  }

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

  .user-dropdown {
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 480px) {
  .header-main {
    padding: 8px 12px; /* 패딩 더 줄임 */
  }

  .header-content {
    gap: 8px; /* 간격 더 줄임 */
    height: 50px; /* 작은 화면에서 높이 줄임 */
    min-height: 50px;
  }

  .logo {
    font-size: 1.1rem; /* 로고 크기 더 줄임 */
  }

  .logo-subtitle {
    font-size: 0.5rem; /* 서브타이틀 더 작게 */
  }

  .auth-buttons {
    flex-direction: row; /* 가로 배치 유지 */
    gap: 4px; /* 간격 최소화 */
  }

  .auth-links {
    flex-direction: row; /* 가로 배치 유지 */
    gap: 4px; /* 간격 최소화 */
  }

  .login-btn,
  .signup-btn {
    padding: 6px 10px; /* 더 작은 패딩 */
    font-size: 11px; /* 더 작은 폰트 */
    min-width: 50px; /* 최소 너비 줄임 */
  }

  .mypage-btn,
  .logout-btn {
    padding: 4px 8px; /* 더 작은 패딩 */
    font-size: 11px; /* 더 작은 폰트 */
  }

  .cart-icon {
    padding: 6px; /* 카트 아이콘 패딩 줄임 */
    font-size: 14px; /* 아이콘 크기 줄임 */
  }

  .search-icon {
    font-size: 14px; /* 검색 아이콘 크기 줄임 */
  }
}

/* 매우 작은 화면을 위한 추가 조정 */
@media (max-width: 360px) {
  .logo {
    font-size: 1rem;
  }

  .logo-subtitle {
    display: none; /* 매우 작은 화면에서는 서브타이틀 숨김 */
  }

  .login-btn,
  .signup-btn {
    padding: 4px 8px;
    font-size: 10px;
    min-width: 45px;
  }
}

/* 로딩 스타일 */
.loading-auth,
.loading-items,
.loading-orders,
.loading-wishlist {
  text-align: center;
  padding: 20px;
  color: #666;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

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

/* 메시지 토스트 */
.message-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  z-index: 10000;
  animation: slideIn 0.3s ease;
  max-width: 300px;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 빈 상태 */
.no-items,
.no-orders,
.no-wishlist {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state {
  text-align: center;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  margin-bottom: 10px;
  color: #333;
}

.empty-state p {
  margin-bottom: 20px;
  color: #666;
}

.shop-btn {
  background: #007bff;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.shop-btn:hover {
  background: #0056b3;
}

/* 상품 상세 모달 */
.item-detail-modal {
  background: rgba(0, 0, 0, 0.8);
}

.item-detail-modal .modal-content-large {
  background: #333;
  color: white;
}

.item-detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 30px;
}

.item-detail-image {
  width: 100%;
  border-radius: 15px;
}

.item-detail-info {
  display: flex;
  flex-direction: column;
}

.item-detail-category {
  color: #ccc;
  font-size: 14px;
  margin-bottom: 10px;
}

.item-detail-title {
  font-size: 2rem;
  margin-bottom: 15px;
  color: white;
}

.item-detail-description {
  color: #ccc;
  margin-bottom: 20px;
  line-height: 1.6;
}

.item-detail-price {
  font-size: 2rem;
  font-weight: 700;
  color: #007bff;
  margin-bottom: 15px;
}

.item-detail-stock {
  margin-bottom: 20px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  border: 1px solid #555;
  border-radius: 8px;
  overflow: hidden;
}

.quantity-btn {
  background: #555;
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  transition: background 0.3s;
}

.quantity-btn:hover {
  background: #666;
}

.quantity-input {
  width: 60px;
  text-align: center;
  border: none;
  background: #444;
  color: white;
  padding: 10px 5px;
}

.add-to-cart-large {
  background: #007bff;
  color: white;
  padding: 15px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: auto;
}

.add-to-cart-large:hover:not(:disabled) {
  background: #0056b3;
}

.add-to-cart-large:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.wishlist-detail-btn {
  margin: 15px 0;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s;
}

.footer {
    background-color: #2c2c2c;
    color: #ffffff;
    padding: 20px 0 20px;
    margin-top: 100px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 3fr 2fr auto;
    gap: 10px;
    align-items: start;
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-brand .brand-logo h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #ffffff;
}

.footer-brand .logo-plus {
    color: #007bff;
}

.footer-brand .brand-subtitle {
    font-size: 0.9rem;
    color: #cccccc;
    margin: 0;
    letter-spacing: 2px;
}

.footer-company p {
    margin: 7px 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #cccccc;
}

.footer-company .company-name {
    font-weight: 600;
    color: #ffffff;
}

.footer-company .legal-links {
    margin: 0 0;
}

.footer-company .legal-links a {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.footer-company .legal-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-contact p {
    margin: 8px 0;
    font-size: 0.8rem;
    color: #cccccc;
}

.footer-contact .contact-phone {
    font-weight: 600;
    color: #ffffff;
}

.footer-social .instagram-link {
    display: inline-block;
    color: #cccccc;
    transition: color 0.3s ease;
    margin: 8px;
}

.footer-social .instagram-link:hover {
    color: #E4405F;
}

/* 모달 내용 스타일 */
.terms-content, .privacy-content {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.terms-content h3, .privacy-content h3 {
    color: #333;
    font-size: 1.1rem;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.terms-content p, .privacy-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.business-info-table {
    width: 100%;
    border-collapse: collapse;
}

.business-info-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.business-info-table td {
    padding: 12px 8px;
    vertical-align: top;
}

.business-info-table .label {
    font-weight: 600;
    color: #333;
    width: 150px;
    background-color: #f8f9fa;
}

    /* 약관동의 모달 스타일 */
.terms-agreement-content {
    padding: 10px 0;
}

.main-agreement {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.main-agreement .main-label {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
}

.agreement-divider {
    border: none;
    height: 1px;
    background-color: #dee2e6;
    margin: 20px 0;
}

.agreement-items {
    margin-bottom: 20px;
}

.agreement-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.agreement-item label {
    flex: 1;
    margin-left: 8px;
    font-size: 14px;
    color: #495057;
}

.required {
    color: #dc3545;
    font-weight: 500;
}

.agreement-error {
    color: #dc3545;
    font-size: 14px;
    text-align: center;
    margin: 10px 0;
    font-weight: 500;
}

.agreement-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.cancel-btn, .proceed-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.cancel-btn {
    background-color: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background-color: #5a6268;
}

.proceed-btn {
    background-color: #007bff;
    color: white;
}

.proceed-btn:hover {
    background-color: #0056b3;
}

/* 약관 내용 박스 스타일 */
.agreement-section {
    margin-bottom: 20px;
}

.terms-content-box {
    margin-top: 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background-color: #f8f9fa;
}

.terms-scroll-content {
    max-height: 150px;
    overflow-y: auto;
    padding: 15px;
    font-size: 13px;
    line-height: 1.5;
}

.terms-scroll-content h4 {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    margin: 15px 0 8px 0;
}

.terms-scroll-content h4:first-child {
    margin-top: 0;
}

.terms-scroll-content h5 {
    color: #34495e;
    font-size: 13px;
    font-weight: 600;
    margin: 12px 0 6px 0;
}

.terms-scroll-content p {
    color: #495057;
    margin-bottom: 10px;
    text-align: justify;
}

/* 스크롤바 스타일링 */
.terms-scroll-content::-webkit-scrollbar {
    width: 6px;
}

.terms-scroll-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.terms-scroll-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.terms-scroll-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 모달 크기 조정 */
.modal-content-large {
    max-width: 600px;
    max-height: 90vh;
}

/* 반응형 디자인 */
@media (max-width: 480px) {
    .agreement-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .view-details-btn {
        align-self: flex-end;
    }

    .agreement-buttons {
        flex-direction: column;
    }

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

/* 반응형 디자인 */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-company .legal-links {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
}


@media (max-width: 768px) {
  .item-detail-content {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
}