* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", sans-serif;
}

body {
  background-color: #fcfcfb;
  color: #1a1a1a;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 헤더 */
.header {
  position: sticky;
  top: 0;
  background: rgba(252, 252, 251, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #ececea;
  z-index: 100;
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  letter-spacing: 0.22em;
  font-weight: 600;
  cursor: pointer;
}

.bag-btn {
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
}

/* 공통 컨테이너 */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* 메인 룩북 인트로 */
.lookbook-intro {
  text-align: center;
  margin: 20px 0 50px;
}

.lookbook-intro p {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  color: #888;
  margin-bottom: 8px;
}

.lookbook-intro h2 {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* 메인 상품 그리드 (PC 3열, 모바일 2열/1열) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 24px;
}

.product-card {
  cursor: pointer;
}

.product-card .img-box {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: #efefef;
  margin-bottom: 14px;
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover img {
  transform: scale(1.03);
}

.product-card-title {
  font-size: 0.95rem;
  font-weight: 400;
  color: #222;
  margin-bottom: 4px;
}

.product-card-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111;
}

/* 상세 페이지 뷰 */
.back-nav {
  margin-bottom: 24px;
}

.back-nav button {
  background: none;
  border: none;
  font-size: 0.9rem;
  color: #555;
  cursor: pointer;
}

.product-wrapper {
  display: flex;
  gap: 60px;
}

.product-gallery {
  flex: 1.3;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product-gallery img {
  width: 100%;
  height: auto;
  display: block;
  background: #f0f0f0;
}

.product-info-sticky {
  flex: 1;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.season-tag {
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-title {
  font-size: 1.6rem;
  font-weight: 500;
  margin: 8px 0 14px;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.product-description {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 30px;
  line-height: 1.75;
  white-space: pre-line;
}

.option-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.option-group select {
  width: 100%;
  padding: 13px;
  border: 1px solid #dcdcdc;
  background: #fff;
  font-size: 0.92rem;
  margin-bottom: 16px;
  outline: none;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin: 10px 0 32px;
}

.btn-outline {
  flex: 1;
  padding: 16px;
  background: #fff;
  color: #111;
  border: 1px solid #111;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-solid {
  flex: 1;
  padding: 16px;
  background: #111;
  color: #fff;
  border: 1px solid #111;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.full-width {
  width: 100%;
}

.accordion-group details {
  border-bottom: 1px solid #eaeaea;
  padding: 14px 0;
}

.accordion-group summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.accordion-content {
  padding-top: 10px;
  font-size: 0.85rem;
  color: #666;
  line-height: 1.7;
}

/* 장바구니 사이드 드로어 */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: #fff;
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

.cart-drawer.open {
  right: 0;
}

.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-header h3 {
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.shipping-notice {
  background: #f5f5f3;
  padding: 10px 24px;
  font-size: 0.82rem;
  color: #444;
  text-align: center;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item img {
  width: 70px;
  height: 92px;
  object-fit: cover;
  background: #eee;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.cart-item-opt {
  font-size: 0.8rem;
  color: #888;
  margin: 2px 0 8px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-control button {
  width: 24px;
  height: 24px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

.drawer-footer {
  padding: 20px 24px;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #555;
}

.summary-row.total {
  font-size: 1.05rem;
  font-weight: 600;
  color: #111;
  margin: 12px 0 18px;
  padding-top: 12px;
  border-top: 1px solid #e5e5e5;
}

/* 주문/결제 모달 */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  justify-content: center;
  align-items: center;
  z-index: 300;
  padding: 16px;
}

.modal-window {
  background: #fff;
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px;
  border-radius: 6px;
}

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

.btn-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.order-summary-box {
  background: #f6f6f5;
  padding: 14px;
  margin-bottom: 18px;
  border-radius: 4px;
}

.checkout-item-name {
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 4px;
}

.checkout-final-price {
  font-size: 1.05rem;
  font-weight: 600;
}

.order-form input {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  font-size: 0.92rem;
}

.address-input-group {
  display: flex;
  gap: 8px;
}

.address-input-group button {
  padding: 0 16px;
  margin-bottom: 10px;
  background: #222;
  color: #fff;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-pay {
  width: 100%;
  padding: 16px;
  background: #0064FF;
  color: #fff;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  margin-top: 12px;
}

/* 푸터 */
.footer {
  border-top: 1px solid #eaeaea;
  padding: 50px 24px;
  background: #f7f7f5;
  font-size: 0.8rem;
  color: #777;
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
}

.footer-brand {
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}

.copyright {
  margin-top: 16px;
  color: #999;
}

/* ==========================================
   모바일 완벽 최적화 (폰뷰 전용 디테일)
   ========================================== */
@media (max-width: 768px) {
  /* 1. 전체 여백을 폰 화면에 맞게 시원하게 조정 */
  .header-inner {
    padding: 16px;
  }
  .logo {
    font-size: 1.1rem;
  }
  .container {
    padding: 24px 16px 100px; /* 하단 고정 버튼에 가려지지 않게 여유 확보 */
  }
  .lookbook-intro {
    margin: 10px 0 32px;
  }
  .lookbook-intro h2 {
    font-size: 1.25rem;
  }

  /* 2. 메인 그리드: 2열로 깔끔하게 (룩북 사진을 큼직하게 1열로 보고 싶으면 1fr로 변경 가능!) */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 28px 10px;
  }
  .product-card-title {
    font-size: 0.85rem;
  }
  .product-card-price {
    font-size: 0.85rem;
  }

  /* 3. 상세 페이지: 좌우 분할을 상하 1열로 변경 */
  .product-wrapper {
    flex-direction: column;
    gap: 24px;
  }
  .product-gallery {
    margin: 0 -16px; /* 사진은 폰 화면 양끝에 꽉 차게 (매거진 느낌) */
    gap: 12px;
  }
  .product-info-sticky {
    position: static;
  }
  .product-title {
    font-size: 1.35rem;
  }

  /* 4. 아이폰 터치 시 화면 자동 확대 방지 (16px 고정) */
  .option-group select,
  .order-form input {
    font-size: 16px;
  }

  /* 5. 장바구니/구매 버튼을 폰 화면 맨 아래에 항상 고정! */
  .action-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); /* 아이폰 하단 홈바 여백 대응 */
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid #eaeaea;
    z-index: 90;
  }
  .btn-outline, .btn-solid {
    padding: 14px;
    font-size: 0.9rem;
  }

  /* 6. 장바구니 드로어: 폰 화면 꽉 차게 */
  .cart-drawer {
    max-width: 100%;
    right: -100%;
  }

  /* 7. 주문 모달: 아래에서 위로 올라오는 바텀시트 스타일 */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-window {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
    padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  }
}

/* 상세페이지 하단 '목록으로 돌아가기' 버튼 */
.bottom-back-nav {
  margin-top: 48px;
  padding-top: 24px;
  text-align: center;
}

.bottom-back-nav button {
  width: 100%;
  padding: 15px 20px;
  background: #f7f7f5;
  border: 1px solid #dcdcdc;
  color: #333;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bottom-back-nav button:hover {
  background: #ececea;
  border-color: #bbb;
}