/* =====================================================================
   자체 쇼핑몰(shop.php) — 미니멀 화이트 · 모바일 우선
   디자인 원칙: 흰 배경 + 큰 여백 + 상품이 주인공 + ARVO 네이비·베이지 톤
   ===================================================================== */
* { box-sizing: border-box; }
:root {
  --pt: #1a2a5e;        /* 포인트(가격/CTA) — ARVO 딥 네이비 */
  --pt-d: #12203f;
  --beige: #d8b98a;     /* ARVO 베이지(로고 아치) */
  --beige-d: #b48f57;
  --ink: #1c1c22;       /* 본문 */
  --sub: #8a8a8a;       /* 보조 텍스트 */
  --line: #f0eeea;      /* 얇은 구분선(웜 뉴트럴) */
  --line-2: #e6e2db;
  --bg: #ffffff;
  --bg-soft: #faf9f6;   /* 웜 화이트 */
  --wrap: 1120px;       /* 최대 콘텐츠 폭 */
  --radius: 14px;
}
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
  line-height: 1.5; -webkit-text-size-adjust: 100%;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.wrap-pad { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ============ 헤더 ============ */
.hdr {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
/* arvofamily 홈 헤더 스타일 — 로고 좌측(크게) + 메뉴 우측(넓은 간격·미니멀) */
.hdr-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 18px 26px;
  display: flex; align-items: center; justify-content: space-between;
}
.hdr-brand { display: flex; align-items: center; }
.hdr-nav { display: flex; align-items: center; gap: 26px; }
.hdr-logo { height: 50px; width: auto; object-fit: contain; }
.hdr-nav { display: flex; align-items: center; gap: 24px; }
.txt-btn {
  border: 0; background: transparent; color: #555;
  font-size: 15px; letter-spacing: .01em; padding: 4px 2px; white-space: nowrap;
}
.txt-btn:hover { color: var(--pt); }
.ico-btn {
  position: relative; border: 0; background: transparent; font-size: 20px;
  padding: 4px; line-height: 1;
}
.ico-btn:hover { color: var(--pt); }
.cart-count {
  position: absolute; top: 0; right: 0;
  background: var(--pt); color: #fff; font-size: 10.5px; font-weight: 700;
  min-width: 17px; height: 17px; line-height: 17px; text-align: center;
  border-radius: 9px; padding: 0 4px;
}
/* 검색 토글바 */
.hdr-search { border-top: 1px solid var(--line); background: #fff; }
.hdr-search-inner { max-width: var(--wrap); margin: 0 auto; padding: 12px 20px; }
.hdr-search input {
  width: 100%; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px 14px; font-size: 15px; outline: none;
}
.hdr-search input:focus { border-color: var(--ink); }

/* ============ 히어로 ============ */
.hero {
  /* arvo 북유럽 미니멀 — 웜 뉴트럴 그라디언트 */
  background: linear-gradient(180deg, #f6f4f1 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}
/* 배경 슬라이드 — 필터(밝기·오버레이)는 관리자 콘솔에서 조절, CSS 변수로 주입 */
.hero.has-slides { position: relative; overflow: hidden; border-bottom: 0; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.1s ease;
  filter: brightness(var(--hero-bright, 100%));
}
.hero-slide.active { opacity: 1; }
.hero.has-slides::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.hero.has-slides .hero-inner { position: relative; z-index: 2; text-align: left; padding-top: 92px; padding-bottom: 96px; }

/* light: 밝은 배경 위 좌측 흰 그라디언트 + 어두운(네이비) 텍스트 */
.hero.hero-light::after {
  background: linear-gradient(100deg,
    rgba(255,255,255, var(--hero-overlay, .6)) 0%,
    rgba(255,255,255, calc(var(--hero-overlay, .6) * .62)) 42%,
    rgba(255,255,255, calc(var(--hero-overlay, .6) * .12)) 100%);
}
.hero.hero-light .hero-eyebrow { color: var(--beige-d); }
.hero.hero-light .hero-title { color: var(--pt); }
.hero.hero-light .hero-sub { color: #6a6a70; }
.hero.hero-light .hero-cta { background: var(--pt); color: #fff; }
.hero.hero-light .hero-cta:hover { background: var(--pt-d); }

/* dark: 어두운 오버레이 + 흰 텍스트 */
.hero.hero-dark::after { background: rgba(0,0,0, var(--hero-overlay, .45)); }
.hero.hero-dark .hero-eyebrow { color: var(--beige); }
.hero.hero-dark .hero-title { color: #fff; text-shadow: 0 1px 14px rgba(0,0,0,.3); }
.hero.hero-dark .hero-sub { color: rgba(255,255,255,.9); }
.hero.hero-dark .hero-cta { background: #fff; color: var(--pt); }
.hero.hero-dark .hero-cta:hover { background: #f0f0f0; }
.hero-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 64px 20px 72px; text-align: center;
}
.hero-eyebrow {
  color: var(--pt); font-size: 12.5px; font-weight: 700; letter-spacing: .18em;
  margin: 0 0 16px;
}
.hero-title {
  font-size: 33px; line-height: 1.32; font-weight: 700; letter-spacing: -.015em;
  margin: 0 0 18px;
}
.hero-sub { color: var(--sub); font-size: 15.5px; margin: 0 0 30px; }
.hero-cta {
  display: inline-block; background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 700; padding: 15px 34px; border-radius: 999px;
  transition: transform .12s, background .12s;
}
.hero-cta:hover { background: #000; transform: translateY(-1px); }
@media (min-width: 720px) {
  .hero-inner { padding: 96px 20px 104px; }
  .hero-title { font-size: 46px; }
  .hero-sub { font-size: 17px; }
}

/* ============ 상품 섹션 ============ */
.shop-main { max-width: var(--wrap); margin: 0 auto; padding: 48px 20px 72px; min-height: 40vh; }
.section-head {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px;
}
.section-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.section-count { color: var(--sub); font-size: 14px; }

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 14px; }
@media (min-width: 560px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 860px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; } }

.card { cursor: pointer; }
.card-thumb {
  position: relative; width: 100%; aspect-ratio: 1/1;
  background: var(--bg-soft); border-radius: var(--radius); overflow: hidden;
}
.card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.card:hover .card-thumb img { transform: scale(1.05); }
.card-thumb.no-img::after {
  content: "준비중"; color: #c9c9c9; font-size: 13px;
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.soldout-badge {
  position: absolute; inset: 0; background: rgba(255,255,255,.72);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; letter-spacing: .1em; color: var(--ink);
}
.card-body { padding: 12px 2px 4px; }
.card-name {
  font-size: 14px; line-height: 1.4; margin: 0 0 6px; color: #333;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 39px;
}
.card-price { font-size: 16px; font-weight: 800; }
.card-price small { display: block; font-size: 11.5px; font-weight: 500; color: var(--sub); margin-top: 3px; }

.state-msg { text-align: center; color: var(--sub); padding: 60px 0; }

/* ============ 푸터 ============ */
/* arvofamily 홈 스타일 — 네이비 배경 + 4컬럼 + 사업자정보 */
.ftr { background: var(--pt); color: rgba(255,255,255,.72); margin-top: 60px; }
.ftr-inner { max-width: var(--wrap); margin: 0 auto; padding: 56px 20px 46px; }
.ftr-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr; gap: 28px; margin-bottom: 38px; }
@media (max-width: 860px) { .ftr-grid { grid-template-columns: 1fr 1fr; gap: 30px 24px; } }
.ftr-logo { font-size: 22px; font-weight: 800; letter-spacing: .2em; color: #fff; margin-bottom: 14px; }
.ftr-slogan { color: rgba(255,255,255,.55); font-size: 13.5px; line-height: 1.6; margin: 0; }
.ftr-col h4 { color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; margin: 0 0 15px; }
.ftr-col a, .ftr-col span { display: block; color: rgba(255,255,255,.68); font-size: 13.5px; margin-bottom: 10px; }
.ftr-col a { transition: color .12s; }
.ftr-col a:hover { color: #fff; }
.ftr-legal-links { border-top: 1px solid rgba(255,255,255,.14); padding-top: 22px; margin-bottom: 16px; font-size: 13px; }
.ftr-legal-links a { color: rgba(255,255,255,.85); }
.ftr-legal-links a:hover { color: #fff; }
.ftr-div { color: rgba(255,255,255,.3); margin: 0 10px; }
.ftr-biz { color: rgba(255,255,255,.48); font-size: 12.5px; line-height: 1.9; margin-bottom: 14px; }
.ftr-copy { color: rgba(255,255,255,.4); font-size: 12px; letter-spacing: .02em; }

/* ============ 모달 공통 ============ */
.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.42);
  display: flex; align-items: flex-end; justify-content: center; z-index: 100;
}
@media (min-width: 640px) { .modal-back { align-items: center; } }
/* ★ HTML hidden 이 display:flex 를 못 이기므로 명시 override(모달이 열자마자 뜨는 버그 방지) */
.modal-back[hidden] { display: none; }
.modal {
  background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 18px 18px 0 0; padding: 22px; position: relative;
  animation: slideup .22s ease;
}
@media (min-width: 640px) { .modal { border-radius: 18px; } }
/* 상품 상세는 이미지 갤러리·상세페이지가 들어가므로 더 넓게 */
.detail-modal { max-width: 880px; }
@keyframes slideup { from { transform: translateY(24px); opacity: .5; } to { transform: none; opacity: 1; } }
.modal-x {
  position: absolute; top: 14px; right: 14px; border: 0; background: var(--bg-soft);
  width: 32px; height: 32px; border-radius: 16px; font-size: 14px; color: var(--sub);
}
.modal-title { margin: 2px 0 18px; font-size: 19px; font-weight: 800; }

/* ---- 상품 상세 ---- */
/* 데스크톱: 좌(갤러리)–우(구매) 2단 · 모바일: 세로 스택 */
.detail-top { display: block; }
@media (min-width: 640px) {
  .detail-top { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .detail-buy { position: sticky; top: 4px; }
}
/* 갤러리 캐러셀: 대표 이미지 + 좌우 화살표 + 썸네일 */
/* 대표이미지·썸네일을 함께 감싸는 래퍼에 최대폭을 걸어 과도한 확대 방지(태블릿 세로 등).
   데스크톱 2단(컬럼 ≈400px)에서는 440 미만이라 영향 없음. margin:0 auto 로 중앙 정렬. */
.detail-gallery { max-width: 440px; margin: 0 auto; }
.gallery-main {
  position: relative; width: 100%; aspect-ratio: 1/1;
  background: var(--bg-soft); border-radius: var(--radius); overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main.no-img::after {
  content: "준비중"; color: #c9c9c9; font-size: 13px;
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; border-radius: 20px;
  background: rgba(255,255,255,.88); color: #333; font-size: 24px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.16); cursor: pointer; padding: 0 0 3px;
}
.gal-nav:hover { background: #fff; }
.gal-nav.prev { left: 10px; }
.gal-nav.next { right: 10px; }
.gal-count {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 12px;
}
.gallery-thumbs { display: flex; gap: 7px; margin-top: 8px; overflow-x: auto; padding-bottom: 2px; }
.gallery-thumbs .thumb {
  width: 58px; height: 58px; object-fit: cover; border-radius: 9px; cursor: pointer;
  opacity: .5; border: 2px solid transparent; flex-shrink: 0; transition: opacity .12s;
}
.gallery-thumbs .thumb:hover { opacity: .85; }
.gallery-thumbs .thumb.active { opacity: 1; border-color: var(--ink); }
.detail-name { font-size: 20px; font-weight: 800; margin: 0 0 8px; letter-spacing: -.02em; }
.detail-note { color: var(--sub); font-size: 14px; line-height: 1.7; white-space: pre-wrap; margin-bottom: 18px; }
/* 상세설명(상세페이지) — 관리자가 편집한 HTML 렌더 */
.detail-desc { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.75; color: #333; }
.detail-desc img { width: 100%; border-radius: 10px; margin: 10px 0; }
.detail-desc h1, .detail-desc h2, .detail-desc h3 { line-height: 1.35; }
.detail-desc hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.detail-desc p { margin: 10px 0; }
.detail-empty { color: var(--sub); text-align: center; padding: 34px 0; font-size: 14px; margin: 0; }
.opt-row {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line-2); border-radius: 12px; padding: 13px 15px; margin-bottom: 9px;
  cursor: pointer; transition: border-color .12s, background .12s;
}
.opt-row.on { border-color: var(--ink); background: #fafafa; }
.opt-row .opt-label { font-weight: 600; }
.opt-row .opt-price { font-weight: 800; }
/* 품절 옵션: 흐리게 + 선택 불가 표시 */
.opt-row.opt-soldout { opacity: .45; cursor: not-allowed; background: #f5f5f5; }
.opt-row.opt-soldout .opt-price { text-decoration: line-through; }
.opt-soldtag { font-size: 11px; font-weight: 700; color: #c0392b; margin-left: 4px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; margin: 18px 0; }
.qty-ctrl { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.qty-ctrl button { border: 0; background: #fff; width: 42px; height: 42px; font-size: 18px; }
.qty-ctrl button:hover { background: var(--bg-soft); }
.qty-ctrl input { width: 48px; height: 42px; border: 0; text-align: center; font-size: 16px; }

/* ---- 버튼 ---- */
.btn-primary {
  width: 100%; border: 0; background: var(--pt); color: #fff;
  font-size: 16px; font-weight: 700; padding: 16px; border-radius: 13px;
  transition: background .12s;
}
.btn-primary:hover { background: var(--pt-d); }
.btn-primary:disabled { background: #d5d5d5; }
.btn-line {
  width: 100%; border: 1px solid var(--ink); background: #fff; color: var(--ink);
  font-size: 15px; font-weight: 700; padding: 14px; border-radius: 13px; margin-bottom: 9px;
}
.btn-line:hover { background: var(--bg-soft); }
/* 상품 링크 복사/공유 버튼 — 구매 버튼 아래 보조 액션 */
.btn-share {
  width: 100%; border: 1px solid var(--line, #e6e6ea); background: #fff; color: var(--sub, #6b6b70);
  font-size: 13.5px; font-weight: 600; padding: 11px; border-radius: 12px; margin-top: 4px; cursor: pointer;
}
.btn-share:hover { background: var(--bg-soft); color: var(--pt); border-color: var(--pt); }
/* 복사 완료 토스트 */
.mini-toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(12px);
  background: rgba(20,20,26,.94); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; z-index: 9999; opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s; max-width: 88vw; text-align: center;
}
.mini-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- 장바구니 ---- */
.cart-item { display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 66px; height: 66px; border-radius: 10px; object-fit: cover; background: var(--bg-soft); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.cart-item-opt { font-size: 12px; color: var(--sub); }
.cart-item-price { font-weight: 800; margin-top: 5px; }
.cart-item-del { border: 0; background: transparent; color: #ccc; font-size: 17px; align-self: flex-start; }
.cart-empty { text-align: center; color: var(--sub); padding: 44px 0; }
.cart-sum { margin: 18px 0; font-size: 14px; line-height: 2.1; }
.cart-sum .row { display: flex; justify-content: space-between; }
.cart-sum .total { font-size: 17px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 5px; }
.cart-sum .total b { color: var(--pt); }

/* ---- 폼 ---- */
.form-field { margin-bottom: 13px; }
.form-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-field label .req { color: var(--pt); }
.form-field input, .form-field textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: 11px; padding: 13px; font-size: 15px;
  font-family: inherit; outline: none;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--ink); }
.form-field textarea { resize: vertical; min-height: 62px; }
.form-row2 { display: flex; gap: 8px; }
.form-row2 > * { flex: 1; }
.bank-box {
  background: #fff6f2; border: 1px solid #ffdcce; border-radius: 12px;
  padding: 15px; font-size: 14px; line-height: 1.7; margin: 13px 0;
}
.err-msg { color: #d33; font-size: 13px; margin: 8px 0; }
.oi { padding: 4px 0; font-size: 14px; }

/* ============ 로그인/회원가입 페이지 ============ */
.auth-body { background: var(--bg-soft); margin: 0; }
.auth-top { padding: 22px 20px; text-align: center; border-bottom: 1px solid var(--line); background: #fff; }
.auth-logo { height: 40px; width: auto; display: inline-block; }
.auth-wrap { min-height: 68vh; display: flex; align-items: center; justify-content: center; padding: 44px 20px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 38px 32px; width: 100%; max-width: 410px; }
.auth-title { font-size: 23px; font-weight: 800; text-align: center; margin: 0 0 26px; letter-spacing: -.02em; }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.auth-field label .hint { color: var(--sub); font-weight: 400; }
.auth-field input { width: 100%; border: 1px solid var(--line-2); border-radius: 11px; padding: 13px 14px; font-size: 15px; font-family: inherit; }
.auth-field input:focus { border-color: var(--ink); outline: none; }
.btn-submit { width: 100%; background: var(--pt); color: #fff; border: 0; border-radius: 12px; padding: 15px; font-size: 16px; font-weight: 700; margin-top: 6px; }
.btn-submit:hover { background: var(--pt-d); }
.btn-submit:disabled { background: #c7c7c7; }
.btn-kakao { display: block; text-align: center; background: #FEE500; color: #191600; border-radius: 12px; padding: 14px; font-weight: 700; font-size: 15px; }
.auth-sep { text-align: center; color: #b5b5b5; font-size: 12.5px; margin: 20px 0; position: relative; }
.auth-sep::before, .auth-sep::after { content: ""; position: absolute; top: 50%; width: 38%; height: 1px; background: var(--line); }
.auth-sep::before { left: 0; } .auth-sep::after { right: 0; }
.auth-alt { text-align: center; font-size: 14px; color: var(--sub); margin-top: 22px; }
.auth-alt a { color: var(--pt); font-weight: 700; }
.auth-err { color: #d33; font-size: 13px; margin: 8px 0 4px; }
.auth-agree { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: #555; line-height: 1.5; margin: 16px 0 6px; cursor: pointer; }
.auth-agree input { margin-top: 2px; flex-shrink: 0; }
.auth-agree a { color: var(--pt); text-decoration: underline; }

/* ============ 마이페이지 ============ */
.my-wrap { max-width: 760px; margin: 0 auto; padding: 36px 20px 80px; }
.my-title { font-size: 24px; font-weight: 800; margin: 0 0 24px; letter-spacing: -.02em; }
.my-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-bottom: 18px; }
.my-card > h2 { font-size: 16px; font-weight: 800; margin: 0 0 16px; display: flex; justify-content: space-between; align-items: center; }
.my-btn { border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; padding: 8px 13px; border-radius: 9px; }
.my-btn:hover { background: var(--bg-soft); }
.my-btn.danger { color: #d33; border-color: #f0cccc; }
.my-profile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 520px) { .my-profile-grid { grid-template-columns: 1fr; } }
.my-stat { background: var(--bg-soft); border-radius: 12px; padding: 14px 16px; }
.my-stat .l { font-size: 12px; color: var(--sub); margin-bottom: 5px; }
.my-stat .v { font-size: 15px; font-weight: 700; word-break: break-all; }
.my-stat.point .v { color: var(--pt); font-size: 22px; font-weight: 800; }
.my-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.my-tbl th, .my-tbl td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.my-tbl th { color: var(--sub); font-weight: 600; font-size: 12.5px; }
.my-tbl td.wrap { white-space: normal; color: var(--sub); }
.my-empty { color: var(--sub); text-align: center; padding: 28px 0; font-size: 14px; }
.my-foot-btns { display: flex; gap: 10px; margin-top: 6px; }
.my-badge { font-size: 11.5px; padding: 3px 9px; border-radius: 12px; font-weight: 700; }
.mb-red { background: #fff0f0; color: #d33; } .mb-green { background: #e9f9ee; color: #1a9e4b; }
.mb-amber { background: #fff8e6; color: #b7791f; } .mb-blue { background: #eaf1ff; color: #3b62d6; }
.my-pos { color: #1a9e4b; font-weight: 700; } .my-neg { color: #d33; font-weight: 700; }

/* ============ 약관/정책 문서 페이지 ============ */
.policy-wrap { max-width: 820px; margin: 0 auto; padding: 40px 20px 80px; }
.policy-tabs { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.policy-tabs a { padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 22px; font-size: 13.5px; color: var(--sub); white-space: nowrap; }
.policy-tabs a:hover { color: var(--ink); }
.policy-tabs a.on { background: var(--pt); color: #fff; border-color: var(--pt); }
.policy-doc h1 { font-size: 26px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.02em; }
.policy-meta { color: var(--sub); font-size: 13px; margin: 0 0 30px; }
.policy-doc h2 { font-size: 18px; font-weight: 800; margin: 34px 0 12px; padding-top: 26px; border-top: 1px solid var(--line); }
.policy-doc h3 { font-size: 15px; font-weight: 700; margin: 20px 0 8px; }
.policy-doc p { font-size: 14.5px; line-height: 1.85; color: #444; margin: 10px 0; }
.policy-doc ul, .policy-doc ol { padding-left: 20px; margin: 10px 0; }
.policy-doc li { font-size: 14.5px; line-height: 1.8; color: #444; margin: 5px 0; }
.policy-doc table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.policy-doc th, .policy-doc td { border: 1px solid var(--line-2); padding: 10px 13px; text-align: left; font-size: 14px; line-height: 1.6; }
.policy-doc th { background: var(--bg-soft); width: 32%; font-weight: 600; }
.policy-doc .note { background: var(--bg-soft); border-radius: 10px; padding: 14px 16px; font-size: 13.5px; color: #555; margin: 14px 0; }

/* ---- 주문완료 ---- */
.done-modal { text-align: center; }
.done-check { font-size: 50px; margin: 6px 0; }
.done-no { font-size: 14px; background: var(--bg-soft); border-radius: 9px; padding: 9px 13px; display: inline-block; margin: 8px 0; font-weight: 700; }
.addr { background: var(--bg-soft); border-radius: 10px; padding: 11px 13px; font-size: 13px; line-height: 1.7; }

/* ============ 상세페이지 고도화(Phase 2) ============ */
/* 배송·무료배송 안내 */
.detail-ship { margin: 2px 0 14px; padding: 10px 13px; background: var(--bg-soft); border-radius: 10px; font-size: 13px; color: var(--ink); }
.detail-ship b { color: var(--pt); }
.detail-ship .ship-sub { color: var(--sub); font-weight: 400; }

/* 상품 스펙 표(소재/사이즈/원산지/구성) */
.detail-spec { margin-top: 22px; }
.spec-title { font-size: 15px; font-weight: 800; margin: 0 0 12px; }
.spec-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-tbl th, .spec-tbl td { padding: 10px 13px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-tbl th { background: var(--bg-soft); width: 92px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.spec-tbl td { color: var(--sub); }

/* 배송/교환·반품 안내(전역 설정, 전 상품 공통) */
.detail-policy { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); display: grid; gap: 22px; }
.detail-policy .policy-block h4 { font-size: 14px; font-weight: 800; margin: 0 0 8px; }
.detail-policy .policy-block p { font-size: 13px; line-height: 1.75; color: var(--sub); margin: 0; }

/* 관련상품(교차구매 + 내부링크) */
.detail-related { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line); }
.related-title { font-size: 16px; font-weight: 800; margin: 0 0 18px; letter-spacing: -.01em; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
/* min-width:0 — 그리드 아이템이 내용(긴 상품명 nowrap)보다 작아질 수 있게 해
   1fr 컬럼을 진짜 균등하게 유지(긴 이름 카드의 이미지가 커지는 '튀는' 현상 방지) */
.rel-card { display: block; min-width: 0; text-decoration: none; color: inherit; }
.rel-thumb { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--bg-soft); }
.rel-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.rel-card:hover .rel-thumb img { transform: scale(1.05); }
.rel-noimg { display: block; width: 100%; height: 100%; background: var(--bg-soft); }
.rel-sold { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.7); font-size: 12px; font-weight: 800; letter-spacing: .06em; color: #666; }
.rel-name { display: block; margin: 9px 0 2px; font-size: 13px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-price { display: block; font-size: 14px; font-weight: 800; color: var(--pt); }

/* 모바일 스티키 구매바 — 모바일에서만 노출(빠른 주문 CTA) */
.detail-sticky { display: none; }
@media (max-width: 640px) {
  .detail-sticky {
    display: flex; align-items: center; gap: 12px;
    position: sticky; bottom: 0; z-index: 12;
    margin-top: 22px; padding: 12px 4px;
    background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line);
    backdrop-filter: blur(4px);
  }
  .detail-sticky .ds-price { font-size: 18px; font-weight: 800; color: var(--pt); white-space: nowrap; }
  .detail-sticky .ds-buy { flex: 1; width: auto; margin: 0; }
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* ============ 대분류 카테고리 칩 ============ */
.category-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 20px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--sub); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.cat-chip:hover { border-color: var(--ink); color: var(--ink); }
.cat-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.cat-chip .cat-n { font-size: 11px; font-weight: 700; opacity: .55; }
.cat-chip.on .cat-n { opacity: .85; }
@media (max-width: 640px) {
  .category-bar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; margin-bottom: 14px; }
  .cat-chip { flex: 0 0 auto; }
}
