/* =========================
   기본 설정
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0 8px;              /* 좌우 여백 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  background: #fff;
}

/* =========================
   헤더
========================= */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  padding: 12px 16px;
  margin: 0 -8px;              /* body 좌우 여백 상쇄 */
  border-bottom: 1px solid #e5e5ea;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

header button {
  font-size: 14px;
  padding: 6px 10px;
}

/* =========================
   안내사항 카드
========================= */
.notice {
  margin: 12px 0 20px;         /* 하단 간격 */
  padding: 14px 16px;
  background: #f5f5f7;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  font-size: 13px;
  color: #333;
  line-height: 1.5;
}

.notice a {
  display: inline-block;
  margin-top: 6px;
  color: #007aff;
  font-weight: 500;
  text-decoration: none;
}

/* =========================
   상품 리스트 (모바일 전용)
========================= */
#product-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 한 상품 = 한 줄 */
.product-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
  border-bottom: 1px solid #e5e5ea;
  background: #fff;
}

/* 터치 피드백 */
.product-item:active {
  background: #f2f2f7;
}

/* =========================
   체크박스
========================= */
.product-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid #c7c7cc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-item input[type="checkbox"]:checked {
  background: #007aff;
  border-color: #007aff;
}

.product-item input[type="checkbox"]:checked::after {
  content: "✓";
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

/* =========================
   중앙 정보 영역
========================= */
.product-item .center {
  flex: 1;
  min-width: 0;
}

.product-item .title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.product-item .sub {
  margin-top: 4px;
  font-size: 13px;
  color: #8e8e93;
}

/* =========================
   오른쪽 수량 / 금액
========================= */
.product-item .right {
  text-align: right;
  line-height: 1.2;
  white-space: nowrap;
}

.product-item .qty {
  font-size: 12px;
  color: #8e8e93;
}

.product-item .price {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
}

/* =========================
   숫자 입력 (장바구니용)
========================= */
input[type="number"] {
  width: 56px;
  font-size: 14px;
}

/* =========================
   장바구니 하단 고정 바
========================= */
.cart-footer {
  position: sticky;
  bottom: 0;
  margin: 0 -8px;               /* body 여백 상쇄 */
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #e5e5ea;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-footer #total {
  font-size: 16px;
  font-weight: 600;
}

.cart-footer button {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: #007aff;
  color: #fff;
}

/* =========================
   장바구니 상단 카드
========================= */
.cart-summary {
  margin: 12px 0 20px;
  padding: 16px;
  background: #f5f5f7;
  border: 1px solid #e5e5ea;
  border-radius: 14px;
}

.cart-summary .label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.shipping-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.shipping-buttons button {
  flex: 1 1 45%;
  padding: 10px 0;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid #d1d1d6;
  background: #fff;
}

.shipping-buttons button.active {
  background: #007aff;
  border-color: #007aff;
  color: #fff;
}

.total-price {
  font-size: 16px;
  font-weight: 600;
  text-align: right;
}

/* 빈 장바구니 */
.empty {
  padding: 20px;
  color: #8e8e93;
  text-align: center;
}

.qty-input {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-input select {
  font-size: 14px;
  padding: 4px 6px;
}

/* =========================
   품절 상태
========================= */
.product-item.sold-out {
  opacity: 0.45;
}

.product-item.sold-out input[type="checkbox"] {
  pointer-events: none;
}

.sold-text {
  font-size: 13px;
  font-weight: 600;
  color: #ff3b30; /* iOS 빨강 */
}

.inquiry-btn {
  width: calc(100% - 32px);
  margin: 16px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  background: #fee500;
  color: #000;
  border: none;
  border-radius: 12px;
}

/* =========================
   총합 강조
========================= */
.cart-summary .total-price,
#total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed #e5e5ea;

  font-size: 14px;      /* 글자 키우기 */
  font-weight: 700;     /* 굵게 */
  color: #000;          /* 또렷하게 */

  text-align: left;
}
