/* 기본 설정 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans KR', sans-serif; color: #333; line-height: 1.6; background-color: #fcfbf9; display: flex; }

/* 좌측 사이드바 네비게이션 */
.sidebar {
  width: 200px;
  background: #2E4C31;
  color: #fff;
  padding: 30px 0;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar-content { padding: 20px; }
.sidebar-content h3 { margin-bottom: 20px; font-size: 1.1rem; }
.nav-list { list-style: none; }
.nav-list li { margin: 10px 0; }
.nav-list a {
  color: #ccc;
  text-decoration: none;
  padding: 10px 15px;
  display: block;
  border-radius: 5px;
  transition: 0.3s;
}
.nav-list a:hover,
.nav-list a.active {
  background: #C59D5F;
  color: #fff;
}

/* 메인 콘텐츠 영역 */
.main-content {
  margin-left: 200px;
  flex: 1;
  width: calc(100% - 200px);
}

.container { width: 90%; max-width: 1100px; margin: 0 auto; }

/* 헤더 */
header { background: #fff; padding: 20px 0; border-bottom: 2px solid #C59D5F; }
.logo { display: flex; align-items: center; justify-content: center; }
.logo img { height: 80px; margin-right: 15px; }
.logo h1 { color: #C59D5F; font-size: 2rem; letter-spacing: 2px; }

/* 히어로 섹션 */
.hero { 
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('hero_bg.jpg') center/cover no-repeat;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}
.hero h2 { font-size: 2.5rem; margin-bottom: 15px; }
.hero h2 span { color: #C59D5F; }
.hero p { font-size: 1.2rem; }

/* 특징 섹션 */
.features { padding: 80px 0; background: #fff; display: flex; text-align: center; }
.features .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.feature-item { padding: 30px; border-radius: 10px; background: #f9f9f9; border-top: 5px solid #2E4C31; }
.feature-item h3 { color: #2E4C31; margin-bottom: 15px; }

/* 연락처 섹션 */
.contact { padding: 80px 0; text-align: center; background-color: #f2ede4; }
.contact h2 { color: #2E4C31; margin-bottom: 20px; }
.contact-info { margin-top: 30px; font-size: 1.3rem; }
.contact-info a { color: #C59D5F; text-decoration: none; font-weight: bold; }

/* 푸터 */
footer { background: #333; color: #fff; padding: 30px 0; text-align: center; font-size: 0.9rem; }

/* 햄버거 메뉴 버튼 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #C59D5F;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px 15px;
  z-index: 101;
  position: relative;
}

/* 모바일 반응형 설정 */
@media (max-width: 767px) {
  /* 기본 레이아웃 */
  body { flex-direction: column; }

  /* 사이드바 - 슬라이드 메뉴 */
  .sidebar {
    width: 80%;
    max-width: 300px;
    height: 100vh;
    position: fixed;
    left: -300px;
    top: 0;
    background: #2E4C31;
    color: #fff;
    padding: 30px 0;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    transition: left 0.3s ease;
    z-index: 100;
  }

  .sidebar.active {
    left: 0;
  }

  /* 모바일 메뉴 오버레이 배경 */
  body::before {
    content: '';
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99;
  }

  body.menu-open::before {
    opacity: 1;
    visibility: visible;
  }

  .sidebar-content { padding: 15px; }
  .sidebar-content h3 { margin-bottom: 15px; font-size: 1rem; }
  .nav-list li { margin: 8px 0; }
  .nav-list a { padding: 8px 12px; font-size: 0.95rem; }

  /* 메인 콘텐츠 - 풀 너비 */
  .main-content {
    margin-left: 0;
    width: 100%;
  }

  /* 헤더 */
  header { padding: 15px 0; display: flex; align-items: center; justify-content: space-between; }
  .logo { display: flex; align-items: center; justify-content: flex-start; flex: 1; }
  .logo img { height: 50px; margin-right: 10px; }
  .logo h1 { font-size: 1.5rem; }

  .menu-toggle { display: block; }

  /* 히어로 섹션 */
  .hero { height: 40vh; }
  .hero h2 { font-size: 1.5rem; }
  .hero p { font-size: 1rem; }

  /* 특징 섹션 */
  .features { padding: 40px 0; }
  .features .container { grid-template-columns: 1fr; gap: 20px; }
  .feature-item { padding: 20px; }
  .feature-item h3 { font-size: 1rem; }

  /* 연락처 섹션 */
  .contact { padding: 40px 0; }
  .contact h2 { font-size: 1.5rem; }
  .contact-info { font-size: 1rem; }

  /* 갤러리 그리드 */
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    gap: 15px !important;
  }

  .gallery-item img { height: 150px; }
  .gallery-info { padding: 10px; }
  .gallery-info h4 { font-size: 0.9rem; margin-bottom: 5px; }
  .gallery-info p { font-size: 0.8rem; }

  /* 제품 그리드 */
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    gap: 15px !important;
  }

  .product-image-container { height: 180px; }
  .product-details { padding: 12px; }
  .product-details h3 { font-size: 0.95rem; }
  .product-price { font-size: 1.1rem; }
  .product-info { font-size: 0.8rem; }

  /* 폼 요소 */
  .form-group { margin-bottom: 12px; }
  .form-group label { font-size: 0.95rem; margin-bottom: 5px; }
  .form-group input,
  .form-group textarea { padding: 8px; font-size: 1rem; }

  /* 버튼 */
  .btn { padding: 10px 16px; font-size: 0.95rem; }
  .btn-small { padding: 5px 10px; font-size: 0.75rem; }

  /* 로그인 컨테이너 */
  .admin-login-container {
    max-width: 100%;
    margin: 20px 15px;
    padding: 20px;
  }

  .admin-login-container h2 { font-size: 1.3rem; }

  /* 대시보드 */
  .dashboard-container { padding: 15px; }
  .dashboard-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .section { padding: 15px; margin-bottom: 20px; }
  .section h3 { font-size: 1rem; margin-bottom: 15px; }

  .tabs { flex-wrap: wrap; gap: 5px; }
  .tab-btn { padding: 8px 15px; font-size: 0.9rem; }

  /* 컨테이너 */
  .container { width: 95%; max-width: 100%; }
}

/* 태블릿 반응형 설정 */
@media (min-width: 768px) and (max-width: 1024px) {
  .sidebar { width: 150px; }
  .sidebar-content h3 { font-size: 1rem; }
  .nav-list a { padding: 8px 10px; font-size: 0.9rem; }

  .main-content { margin-left: 150px; width: calc(100% - 150px); }

  .logo img { height: 60px; margin-right: 10px; }
  .logo h1 { font-size: 1.5rem; }

  .hero { height: 50vh; }
  .hero h2 { font-size: 2rem; }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
  }
}

/* 데스크톱 - 기본값 유지 */
@media (min-width: 1025px) {
  .menu-toggle { display: none; }
}