/* 기본 설정 */
body,
html {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans KR", sans-serif;
  scroll-behavior: smooth;
}


#backToTop:hover {
  background-color: #005bb5;
}

/* 헤더 (고정 메뉴) */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #ddd;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-container {
  display: flex;
  align-items: center;
}
.logo-container img {
  margin-right: 10px; /* controls spacing between image and text */
}
.logo a {
  text-decoration: none;
  color: inherit; /* h1 색상 그대로 */
}

.nav a {
  margin-left: 15px;
  margin-right: 15px;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  font-size: 1.2rem;
}
.nav a:hover {
  color: #0078ff;
}

/* 리스트 */
ul {
  padding-left: 20px;
}

/* 푸터 */
.footer {
  background: #fafafa;
  text-align: center;
  padding: 20px;
  border-top: 1px solid #ddd;
  font-size: 25px;
}
.footer a {
  color: #333;
  text-decoration: none;
  font-size: 25px;
}

/* 주문 섹션 */
.order-section {
  padding: 100px 8%;
  background: #f6f6f6;
}

/* 전체 박스 */
.order-container {
  display: flex;
  gap: 70px;
  background: #fff;
  padding: 50px;
  border: 1px solid #ddd;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* 상품 이미지 */
.order-image img {
  width: 720px;
  border: 1px solid #ccc;
}

/* 주문 정보 */
.order-info {
  flex: 1;
}

.order-info h2 {
  font-size: 36px;
  margin-bottom: 15px;
}

.order-price {
  font-size: 34px;
  font-weight: bold;
  color: #c62828;
  margin-bottom: 35px;
}

/* 옵션 & 수량 & 고객정보 */
.order-option,
.order-qty,
.order-customer {
  margin-bottom: 30px;
}

.order-option label,
.order-qty label,
.order-customer label {
  display: block;
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
}

.order-option select,
.order-qty select,
.order-qty input,
.order-customer input {
  width: 100%;
  padding: 14px;
  font-size: 20px;
  border: 1px solid #bbb;
  cursor: pointer;
}

/* Increase qty select size */
.order-qty select {
  padding: 16px;
  font-size: 24px;
  height: 60px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 1.5em;
  padding-right: 2.5em;
}

/* 총 금액 */
.order-total {
  margin-top: 40px;
  padding-top: 25px;
  border-top: 2px solid #333;
  display: flex;
  justify-content: space-between;
  font-size: 26px;
}

.order-total strong {
  color: #000;
}

/* 주문 버튼 */
.order-btn {
  margin-top: 35px;
  width: 100%;
  padding: 20px;
  font-size: 26px;
  font-weight: bold;
  background: #000;
  color: #fff;
  border: none;
  cursor: pointer;
}

.order-btn:hover {
  background: #333;
}

.btn-address {
  background-color: #666;
  color: white;
  border: none;
  padding: 14px 20px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  margin-left: 10px;
}

.btn-address:hover {
  background-color: #444;
}

/* 주소 그룹 레이아웃 */
.address-group {
  display: flex;
  align-items: center;
}

@media (max-width: 980px) {
  /* 1. 헤더: 옆으로 삐져나가지 않게 폭 제한 */
  .header {
    padding: 10px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 94%;
    overflow: hidden; /* 삐져나오는 부분 숨김 */
  }

  /* 2. 로고 영역: 절대 찌그러지지 않게 설정 */
  .logo-container {
    flex-shrink: 0; /* 공간이 부족해도 로고 크기 유지 */
    display: flex;
    align-items: center;
  }

  .logo-container img {
    height: 30px; /* 로고 이미지 살짝 더 축소 */
    margin-right: 3px;
  }

  .logo {
    font-size: 15px !important;
    white-space: nowrap; /* ★글자가 세로로 나오는 것 방지 */
    margin: 0;
  }

  /* 3. 메뉴 영역: 한 줄로 유지하되, 화면보다 길면 가로 스크롤 */
  .nav {
    display: flex;
    white-space: nowrap; /* 메뉴 글자들이 한 줄로 나오게 */
    padding-bottom: 5px; /* 스크롤바 공간 살짝 확보 */
  }

  /* 가로 스크롤바 숨기기 (깔끔하게 보이기 위함) */
  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    font-size: 14px; /* 글자 크기 최적화 */
    margin-left: 3px;
    margin-right: 3px;
    flex-shrink: 0; /* 메뉴 글자가 찌그러지지 않게 */
  }

  /* 4. 컨테이너 및 이미지: 화면 폭에 맞춤 */
  .order-section {
    padding: 20px 10px;
  }

  .order-container {
    flex-direction: column;
    padding: 15px;
    gap: 20px;
    width: 100%;
    box-sizing: border-box; /* 패딩 때문에 옆이 잘리지 않게 함 */
  }

  .order-image img {
    width: 100% !important;
    height: auto;
  }

  /* 5. 주소 입력창 삐져나감 방지 */
  .address-group {
    display: flex;
    width: 100%;
  }
  
  .address-group input#postcode {
    width: 70px !important;
    flex-shrink: 0;
  }

  .btn-address {
    font-size: 12px;
    padding: 10px;
    white-space: nowrap;
  }
  .order-option select,
  .order-qty input,
  .order-customer input {
    width: 90%;
    padding: 14px;
    font-size: 20px;
    border: 1px solid #bbb;
    cursor: pointer;
  }
}