:root {
  --brand: #ED7B1F;
  --bg: #fff;
  --border: #e5e7eb;
  --muted: #6b7280;
  --max-width: 1200px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR";
  background: var(--bg);
  color: #111;
  opacity: 0;
  transition: opacity 0.3s ease;
}
body.loaded { opacity: 1; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px;
  transition: padding-top 0.3s ease;
}

/* 상단 영역 */
.product-header {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  margin-bottom: 60px;
}

@media (max-width: 900px) {
  .product-header { grid-template-columns: 1fr; }
}

.product-image {
  width: 100%;
  max-width: 400px;
  margin-bottom: 16px;
}

.product-image img {
  width: 100%;
  border-radius: 10px;
  display: block;
}

.thumb-gallery {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.thumb-gallery img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
}
.thumb-gallery img.active { border-color: var(--brand); }

.product-title { font-size: 1.8rem; margin: 20px 0 8px 0; }
.product-desc { color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
.product-price { font-size: 1.3rem; color: var(--brand); font-weight: 700; }

/* 결제 정보 */
.payment-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.payment-box h3 { margin-top: 0; }

.amount-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.amount-btn {
  flex: 1 1 calc(50% - 8px);
  text-align: center;
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}
.amount-btn.active {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(237,123,31,0.05);
}

.quantity-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  max-width: 180px;
  margin-bottom: 16px;
}
.quantity-control button {
  width: 40px;
  height: 40px;
  background: #f3f4f6;
  border: none;
  cursor: pointer;
  font-size: 18px;
}
.quantity-control input {
  width: 60px;
  text-align: center;
  border: none;
  font-size: 1rem;
}

/* ✅ 결제수단 2개 가로형 라디오 버튼 스타일 */
.payment-option {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.payment-option label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  background: #fafafa;
}

.payment-option input[type="radio"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-option input[type="radio"]:checked {
  border-color: var(--brand);
}

.payment-option input[type="radio"]:checked::before {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--brand);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.payment-option label.selected {
  border-color: var(--brand);
  background: rgba(237,123,31,0.05);
  color: var(--brand);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
  font-size: 0.95rem;
}
.summary-row.total {
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 10px;
}

.btn-buy {
  width: 100%;
  padding: 12px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  margin-top: 16px;
  cursor: pointer;
  transition: transform 0.08s, filter 0.12s;
}
.btn-buy:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.btn-buy:active { transform: scale(.98); }

/* 탭형 하단 영역 */
.tab-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.tab-menu {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 4px;
  flex-wrap: wrap;
}

.tab-menu button {
  flex: 1;
  padding: 14px 0;
  background: #f9fafb;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--muted);
  transition: all 0.2s ease;
}

.tab-menu button.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: #fff;
}

.tab-content {
  padding: 24px 0;
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-content.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-content img {
  width: 100%;
  max-width: 800px;
  border-radius: 8px;
  margin-bottom: 16px;
}

ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
  color: var(--muted);
}

.faq-item { margin-bottom: 12px; color: var(--muted); }
.faq-item strong { display: block; margin-bottom: 4px; }
