/* ---------- RESET ---------- */
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: 'Apple SD Gothic Neo', 'Pretendard', 'Malgun Gothic', 'Noto Sans KR', Arial, sans-serif;
  background: #f6faf9;
  color: #222;
  line-height: 1.6;
}

/* ---------- HEADER ---------- */
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 22px 12px 22px;
  background: #f1fbf7;
  border-bottom: 2.5px solid #03c75a;
  position: relative;
  z-index: 50;
}
.logo {
  font-size: 2.4rem;
  font-weight: 900;
  color: #03c75a;
  letter-spacing: 1.8px;
  font-family: 'Arial Black', Gadget, sans-serif;
  text-shadow: 0 1px 0 #e3faec;
}
.auth-buttons { display: flex; gap: 17px; }
.auth-buttons button {
  background: #fff;
  border: 2px solid #03c75a;
  color: #03c75a;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 22px;
  cursor: pointer;
  font-size: 1.08rem;
  box-shadow: 0 2px 6px #d9efe5;
  transition: all .22s;
}
.auth-buttons button:hover {
  background: #03c75a;
  color: #fff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 5px 20px #a3e2c7;
}

/* ---------- NAVIGATION ---------- */
nav {
  background: #e8f5ea;
  padding: 10px 24px;
  display: flex;
  gap: 24px;
  font-weight: 600;
  font-size: 1.13rem;
  flex-wrap: wrap;
  border-bottom: 1px solid #dcf6e7;
}
nav a {
  color: #027335;
  text-decoration: none;
  transition: color .22s;
}
nav a:hover { color: #03c75a; text-decoration: underline; }

/* ---------- BANNER ---------- */
.banner-slider {
  max-width: 1200px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 15px;
  position: relative;
  height: 320px;
  box-shadow: 0 7px 28px #c6f3e14a;
}
.banner-track {
  display: flex;
  transition: transform .5s cubic-bezier(.7,.1,.5,1.2);
  height: 320px;
}
.banner-track img {
  width: 100%;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 15px;
}

/* ---------- PRODUCT GRID & SLIDER ---------- */
.product-section {
  max-width: 1200px;
  margin: 34px auto 32px;
  padding: 0 24px 40px;
}
.product-slider {
  display: flex;
  gap: 21px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 11px;
}
@media (min-width: 769px) {
  .product-slider {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    overflow-x: visible;
  }
  .product-slider::-webkit-scrollbar { display: none; }
}
.product-card {
  border: 1.3px solid #d5ede0;
  border-radius: 13px;
  padding: 17px 10px 15px 10px;
  text-align: center;
  box-shadow: 0 2px 9px #e4f7ed77;
  background: #fff;
  position: relative;
  cursor: pointer;
  min-width: 195px;
  transition: box-shadow .22s, transform .18s;
}
.product-card:hover {
  box-shadow: 0 8px 25px #b5f5d180;
  transform: translateY(-4px) scale(1.04);
}
.product-card img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 12px;
  height: 170px;
  object-fit: contain;
  background: #f8fefa;
}
.product-card .name {
  font-weight: 700;
  font-size: 1.12rem;
  margin-bottom: 6px;
  color: #242424;
  letter-spacing: -0.5px;
}
.product-card .price {
  font-weight: 700;
  color: #03c75a;
  font-size: 1.05rem;
}
.product-card.sold-out .soldout { display: block; }
.product-card .soldout {
  display: none;
  color: #c0392b;
  font-weight: 700;
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(255,255,255,0.9);
  padding: 4px 9px;
  border-radius: 8px;
  font-size: .99rem;
  border: 1px solid #f5c3b8;
}

/* ---------- ORDER TABLE (회원/관리자 주문관리) ---------- */
.order-table, .orders-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin: 20px 0;
  border-radius: 15px;
  overflow: hidden;
}
.order-table th, .orders-table th,
.order-table td, .orders-table td {
  padding: 13px 8px;
  border-bottom: 1px solid #e6f2ea;
  text-align: center;
  font-size: 15.5px;
}
.order-table th, .orders-table th {
  background: #e4faee;
  color: #03c75a;
  font-size: 15.8px;
  font-weight: 700;
  border-bottom: 2px solid #d0e7dc;
}
.order-table tr:last-child td, .orders-table tr:last-child td { border-bottom: none; }
@media (max-width:700px) {
  .order-table, .orders-table,
  .order-table thead, .orders-table thead,
  .order-table tbody, .orders-table tbody,
  .order-table tr, .orders-table tr,
  .order-table th, .orders-table th,
  .order-table td, .orders-table td { display: block; }
  .order-table thead, .orders-table thead { display: none; }
  .order-table tr, .orders-table tr {
    margin-bottom: 18px; border: 1.5px solid #c6ebd4;
    border-radius: 12px; background: #fff;
  }
  .order-table td, .orders-table td {
    padding: 12px 5vw 8px 35%; position:relative; border:none; border-bottom: 1px solid #ebf6f0;
    text-align:left; min-height: 45px; font-size: 15.5px;
  }
  .order-table td:before, .orders-table td:before {
    position:absolute; left:12px; top:13px; font-weight:600; color:#03c75a; font-size:14px; width:30%; min-width:80px;
  }
  .orders-table td:nth-child(1):before {content:"주문번호";}
  .orders-table td:nth-child(2):before {content:"상품명";}
  .orders-table td:nth-child(3):before {content:"수량";}
  .orders-table td:nth-child(4):before {content:"금액";}
  .orders-table td:nth-child(5):before {content:"상태";}
  .orders-table td:nth-child(6):before {content:"주문일시";}
}

/* ---------- MODAL (로그인/회원가입 등) ---------- */
#authModal, .modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
#authModal.active, .modal.active { display: flex !important; }
#authModal > div, .modal-content {
  background: #fff;
  padding: 35px 23px 30px 23px;
  border-radius: 15px;
  width: 345px;
  max-width: 96vw;
  box-shadow: 0 6px 32px #b1ebd3cc;
  position: relative;
  text-align: center;
  animation: fadeInUp .38s;
}
@keyframes fadeInUp {
  from { transform: translateY(40px); opacity:0; }
  to   { transform: none; opacity:1;}
}
#authModal button.closeModal, .modal-content button.closeModal {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 1.25rem;
  border: none;
  background: none;
  color: #aaa;
  cursor: pointer;
  transition: color .18s;
}
#authModal button.closeModal:hover, .modal-content button.closeModal:hover { color: #03c75a; }
#authModal form, .modal-content form { margin-top: 12px; }
#authModal label, .modal-content label {
  display: block;
  margin-top: 15px;
  font-weight: 600;
  color: #222;
}
#authModal input[type="text"],
#authModal input[type="password"],
#authModal input[type="email"],
.modal-content input[type="text"],
.modal-content input[type="password"],
.modal-content input[type="email"] {
  width: 100%;
  padding: 9px 10px;
  margin-top: 7px;
  border: 1.3px solid #bbe2d3;
  border-radius: 8px;
  font-size: 16px;
  background: #f7fdfa;
  margin-bottom: 7px;
}
#authModal button.submitBtn, .modal-content button.submitBtn {
  margin-top: 20px;
  width: 100%;
  background: #03c75a;
  color: #fff;
  padding: 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.09rem;
  box-shadow: 0 3px 10px #b5f5d18c;
  transition: background .2s, transform .2s;
}
#authModal button.submitBtn:hover, .modal-content button.submitBtn:hover {
  background: #02914a;
  transform: translateY(-1.5px) scale(1.03);
}

/* ---------- FOOTER ---------- */
footer {
  background: #f3f6f5;
  color: #555;
  font-size: 0.97rem;
  padding: 23px 20px 27px 20px;
  text-align: center;
  border-top: 1.3px solid #d2eae1;
  position: relative;
}
footer .admin-login {
  position: absolute;
  right: 22px; top: 21px;
  font-size: 0.91rem;
}
footer .admin-login a {
  color: #03c75a;
  text-decoration: none;
  font-weight: 700;
}
footer .admin-login a:hover { text-decoration: underline; }

/* ---------- 반응형 배너/푸터/헤더 ---------- */
@media (max-width: 768px) {
  nav { justify-content: center; flex-wrap: wrap; }
  .banner-slider, .banner-track, .banner-track img { height: 190px; }
  .orders-container, .product-section { padding: 0 2vw 15vw 2vw; }
  footer { padding: 16px 7px 32px 7px; font-size: 0.93rem; }
  .logo { font-size: 2.1rem; }
}
@media (max-width:450px) {
  .logo { font-size: 1.55rem; }
  .orders-container, .product-section { padding: 0 1vw 13vw 1vw; }
  .banner-slider, .banner-track, .banner-track img { height: 130px; }
  header, nav { padding-left: 7px; padding-right: 7px; }
}
