/* =============================================================
   shop.css  — 상품 목록 / 상세 / 선물세트 스타일
   ============================================================= */

/* ─ 상품 그리드 ─ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.product-grid--sm { grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ─ 상품 카드 ─ */
.product-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: box-shadow .2s, transform .2s;
  background: #fff;
}
.product-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.1); transform: translateY(-4px); }

.product-card__img {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f5f5f5;
}
.product-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.product-card:hover .product-card__img img { transform: scale(1.04); }

.badge {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}
.badge--gift { background: #ffd700; color: #5a4400; }

.product-card__body { padding: 16px; }
.product-card__category { font-size: 0.75rem; color: #2d6a2d; font-weight: 600; margin-bottom: 4px; }
.product-card__name { font-size: 0.98rem; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.product-card__price { font-size: 1rem; font-weight: 700; color: #2d6a2d; }

/* ─ 카테고리 탭 ─ */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}
.category-tab {
  padding: 8px 20px;
  border-radius: 24px;
  border: 1px solid #ddd;
  font-size: 0.88rem;
  color: #555;
  cursor: pointer;
  transition: all .2s;
}
.category-tab:hover, .category-tab.active {
  background: #2d6a2d;
  border-color: #2d6a2d;
  color: #fff;
}

/* ─ 상품 상세 ─ */
.section-product-detail { padding: 48px 0 80px; }

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-bottom: 60px;
}

.product-detail__gallery .main-img {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #f5f5f5;
}
.product-detail__gallery .main-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.thumb-strip {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.thumb-img {
  width: 68px; height: 68px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .2s;
}
.thumb-img:hover { border-color: #2d6a2d; }

.product-category { font-size: 0.8rem; font-weight: 700; color: #2d6a2d; margin-bottom: 8px; }
.product-name { font-size: 1.6rem; font-weight: 900; margin-bottom: 12px; color: #1a1a1a; }
.product-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag {
  font-size: 0.75rem;
  padding: 3px 10px;
  background: #e8f5e9;
  color: #2d6a2d;
  border-radius: 20px;
}
.product-price {
  font-size: 1.9rem;
  font-weight: 900;
  color: #2d6a2d;
  margin-bottom: 24px;
}
.price-unit { font-size: 0.9rem; font-weight: 400; color: #888; }

.product-meta dl { display: grid; grid-template-columns: 80px 1fr; gap: 10px 16px; margin-bottom: 28px; }
.product-meta dt { font-size: 0.82rem; color: #888; padding-top: 2px; }
.product-meta dd { font-size: 0.92rem; color: #333; }
.stock-ok { color: #2d6a2d; font-weight: 600; }
.stock-out { color: #c62828; font-weight: 600; }

.product-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.product-description {
  border-top: 1px solid #eee;
  padding-top: 40px;
  margin-bottom: 60px;
}
.product-description h2 { font-size: 1.3rem; margin-bottom: 20px; }
.desc-body { font-size: 0.92rem; color: #444; line-height: 1.9; }
.desc-body img { border-radius: 8px; margin: 16px 0; }

.related-products h2 { font-size: 1.3rem; margin-bottom: 24px; }

/* ─ 선물세트 ─ */
.page-hero--gift {
  background-size: cover;
  background-position: center;
  background-color: #2d6a2d;
}
.gift-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
  color: #555;
  line-height: 1.9;
}

/* ─ 반응형 ─ */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid--sm { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .product-detail-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .product-grid--sm { grid-template-columns: repeat(2, 1fr); }
}


/* =============================================================
   shop blueprint — product_list / product_detail / order_complete
   ============================================================= */

/* ─ 상품 목록 그리드 (shop blueprint) ─ */
.shop-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.shop-product-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  background: #fff;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.shop-product-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.1); transform: translateY(-3px); }

.shop-product-card__img-wrap-outer {
  position: relative;
}
.shop-product-card__img-wrap {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f5f5f5;
}
.shop-product-card__img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.shop-product-card:hover .shop-product-card__img-wrap img { transform: scale(1.04); }
.shop-product-card__img-wrap--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 0.85rem;
}

/* 이미지 좌상단 배지 오버레이 */
.shop-product-card__badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
  pointer-events: none;
}
.shop-product-card__badges .badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  opacity: 0.92;
}
.badge-home {
  background: #4a7c4e;
  color: #fff;
}

.shop-product-card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.shop-product-card__meta { display: flex; gap: 6px; flex-wrap: wrap; }
.shop-product-card__name { font-size: 1rem; font-weight: 700; line-height: 1.4; }
.shop-product-card__name a { color: inherit; text-decoration: none; }
.shop-product-card__name a:hover { color: #2d6a2d; }
.shop-product-card__subtitle { font-size: 0.82rem; color: #666; }
.shop-product-card__price { font-size: 1rem; font-weight: 700; color: #2d6a2d; margin-top: auto; }
.shop-product-card__actions { display: flex; gap: 8px; margin-top: 8px; }

/* ─ 뱃지 (범용) ─ */
.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.badge-primary { background: #e8f5e9; color: #2d6a2d; }
.badge-secondary { background: #fff8e1; color: #7a5c00; }
.badge-tertiary { background: #e3f2fd; color: #1565c0; }

/* ─ btn-sm ─ */
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* ─ 상품 상세 레이아웃 (shop blueprint) ─ */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-bottom: 48px;
}
.product-detail-media {}
.product-detail-main-img { width: 100%; border-radius: 12px; aspect-ratio: 1/1; object-fit: cover; }
.product-detail-img-placeholder {
  width: 100%; aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  background: #f5f5f5; border-radius: 12px; color: #aaa; font-size: 0.9rem;
}
.product-detail-sub-imgs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product-detail-sub-imgs img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; }
.product-detail-sub-imgs img:hover { border-color: #2d6a2d; }

.product-detail-info { display: flex; flex-direction: column; gap: 16px; }
.product-detail-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.product-detail-name { font-size: 1.7rem; font-weight: 900; color: #1a1a1a; margin: 0; }
.product-detail-subtitle { font-size: 1rem; color: #555; margin: 0; }
.product-detail-price { font-size: 1.9rem; font-weight: 900; color: #2d6a2d; }
.product-detail-weight { font-size: 0.85rem; color: #888; }

.product-detail-section h3 { font-size: 0.95rem; font-weight: 700; color: #2d6a2d; margin-bottom: 8px; }
.product-detail-list { padding-left: 20px; color: #444; font-size: 0.9rem; line-height: 1.8; }

.product-detail-cta { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }

/* ─ 수량 컨트롤 (상품 상세 + 주문 폼 공용) ─ */
.product-qty-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.product-qty-label { font-size: 0.9rem; font-weight: 600; color: #444; min-width: 28px; }
.product-qty-ctrl { display: inline-flex; align-items: center; border: 1.5px solid #c8a882; border-radius: 10px; overflow: hidden; }
.qty-btn {
    width: 36px; height: 36px; border: none; background: #fdf8f3;
    font-size: 1.2rem; cursor: pointer; color: #4c2913; font-weight: 700;
    transition: background 0.15s;
    display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: #f0e0cc; }
.qty-input {
    width: 52px; height: 36px; text-align: center; border: none;
    border-left: 1px solid #c8a882; border-right: 1px solid #c8a882;
    font-size: 1rem; font-weight: 700; color: #1a1a1a; background: #fff;
    -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.product-stock-hint { font-size: 0.82rem; color: #888; }
.product-stock-warn { font-size: 0.82rem; color: #c62828; font-weight: 600; margin: 0; }
.product-soldout-badge {
    display: inline-block; background: #e53935; color: #fff;
    font-size: 0.9rem; font-weight: 700; padding: 4px 16px;
    border-radius: 999px; letter-spacing: 1px;
}
.product-soldout-notice { font-size: 0.88rem; color: #888; margin: 4px 0 0; }

.product-detail-description h2 { font-size: 1.3rem; margin-bottom: 16px; }
.product-detail-description-body { font-size: 0.92rem; color: #444; line-height: 1.9; }
.product-detail-hero-text { font-size: 1rem; color: #555; line-height: 1.8; font-style: italic; }

/* ─ 주문 완료 ─ */
.order-complete-dl { display: grid; grid-template-columns: 80px 1fr; gap: 8px 16px; }
.order-complete-dl dt { font-size: 0.82rem; color: #888; padding-top: 2px; }
.order-complete-dl dd { font-size: 0.95rem; color: #222; margin: 0; }

/* ─ 반응형 ─ */
@media (max-width: 1024px) {
  .shop-product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .product-detail-layout { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .shop-product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
