/* =====================================================================
   KACHIROLYN 카페24 스킨 디자인 (kc-skin.css)
   - 카페24 기존 모듈(가격·옵션·총액·버튼)은 그대로 두고 겉모습만 바꾼다.
   - 모든 선택자는 kc- 블록 안으로 한정 (기존 스킨과 충돌 방지)
   - 분위기: 흰 배경 + 포인트 1색(딥 그린) + 가격만 레드, 군더더기 없는 쇼핑몰형
   - 넣는 위치: product/detail.html 맨 위 <!--@css(/kc/kc-skin.css)-->  (적용방법.md 3단계)
   ===================================================================== */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

.kc-gallery, .kc-buy, .kc-tabs, #kc-review, .kc-buybar {
  --kc-main: #1F4D3A; --kc-main-dark: #163829; --kc-tint: #EAF2ED;
  --kc-text: #1A1A1A; --kc-sub: #767676; --kc-line: #E6E6E3; --kc-surface: #F6F6F4; --kc-sale: #E5533D;
  --kc-tab-top: 0px;   /* 스킨 상단 헤더가 고정형이면 그 높이로 (예: 60px) */
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  color: var(--kc-text); word-break: keep-all; box-sizing: border-box;
}
.kc-gallery *, .kc-buy *, .kc-tabs *, #kc-review *, .kc-buybar * { box-sizing: border-box; }

/* ===================== 상단 상품 이미지 갤러리 ([H]) ===================== */
.kc-gallery { position: relative; max-width: 860px; margin: 0 auto; aspect-ratio: 1; overflow: hidden; background: #EEF0F2; }
.kc-gallery-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.kc-gallery-track::-webkit-scrollbar { display: none; }
.kc-gallery-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
.kc-gallery-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kc-gallery-tags { position: absolute; left: 16px; top: 16px; z-index: 2; display: flex; gap: 6px; pointer-events: none; }
.kc-gallery-tags span { font-size: 11px; font-weight: 700; padding: 5px 9px; border-radius: 4px; background: #fff; color: var(--kc-main); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.kc-gallery-thumbs { position: absolute; right: 12px; bottom: 14px; z-index: 2; display: flex; gap: 6px; }
.kc-gallery-thumb { width: 46px; height: 46px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; cursor: pointer; background: #fff; opacity: .7; box-shadow: 0 0 0 1px rgba(255,255,255,.7), 0 2px 6px rgba(0,0,0,.18); transition: opacity .2s ease, transform .15s ease, box-shadow .2s ease; }
.kc-gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kc-gallery-thumb:hover { opacity: 1; }
.kc-gallery-thumb:active { transform: scale(.94); }
.kc-gallery-thumb:focus-visible { outline: 2px solid var(--kc-main); outline-offset: 2px; }
.kc-gallery-thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(0,0,0,.25); }
/* 다음 장까지 남은 시간 진행바 */
.kc-gallery-progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 3px; background: rgba(255,255,255,.35); }
.kc-gallery-progress i { display: block; height: 100%; width: 100%; background: var(--kc-main); transform: scaleX(0); transform-origin: left; }
.kc-gallery-progress.kc-run i { animation: kc-gallery-progress var(--kc-gallery-delay, 3500ms) linear forwards; }
@keyframes kc-gallery-progress { to { transform: scaleX(1); } }
@media (max-width: 380px) { .kc-gallery-thumb { width: 40px; height: 40px; } }
.kc-hide { display: none !important; } /* [H]로 바꾼 기존 상품 이미지 블록 숨김 */

/* ===================== ③ 구매 영역 ===================== */
.kc-buy { max-width: 860px; margin: 0 auto; padding: 24px 20px 8px; background: #fff; }

/* 가격 한 줄: 할인율 → 판매가 → 소비자가(취소선) */
.kc-buy .kc-rate { color: var(--kc-sale); font-size: 24px; font-weight: 800; margin-right: 8px; }
.kc-buy #span_product_price_text, .kc-buy .kc-price-sale { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--kc-text); margin-right: 6px; }
.kc-buy #span_product_price_custom, .kc-buy .kc-price-custom { color: #A5A5A5; font-size: 16px; text-decoration: line-through; }

/* [G] 포인트 + 쿠폰 버튼 + 섭취 기간 */
.kc-point { margin: 20px 0 0; padding: 20px 0; border-top: 1px solid var(--kc-text); border-bottom: 1px solid var(--kc-line); }
.kc-point-title { margin: 0 0 10px; font-size: 17px; font-weight: 800; color: var(--kc-main); }
.kc-point-list { margin: 0; padding: 0 0 0 18px; display: grid; gap: 4px; font-size: 15px; }
.kc-point-list b { font-weight: 800; }
.kc-coupon { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; margin: 18px 0 16px; border-radius: 10px; background: var(--kc-main); color: #fff; font-size: 15px; text-decoration: none; transition: transform .15s ease, background-color .2s ease; }
.kc-coupon b { font-weight: 800; }
.kc-coupon:hover { background: var(--kc-main-dark); }
.kc-coupon:active { transform: scale(.98); }
.kc-coupon:focus-visible { outline: 3px solid var(--kc-tint); outline-offset: 2px; box-shadow: 0 0 0 5px var(--kc-main); }
.kc-coupon-arrow { font-weight: 400; opacity: .8; }
.kc-intake { margin: 0; font-size: 14px; line-height: 1.6; }
.kc-intake b { font-weight: 800; }
.kc-intake em { font-style: normal; font-weight: 800; color: var(--kc-sale); }

/* 버튼형 옵션 → 2열 카드 격자 (카페24 옵션 표시 "버튼형"이 만드는 ul.ec-product-button) */
.kc-buy .ec-product-button { display: grid !important; grid-template-columns: 1fr 1fr; gap: 16px 10px; margin: 28px 0 0; padding: 14px 0 0; list-style: none; width: 100%; }
.kc-buy .ec-product-button li { float: none !important; margin: 0 !important; width: auto !important; border: 0 !important; padding: 0 !important; background: none !important; }
.kc-buy .ec-product-button li a {
  position: relative; display: flex !important; flex-direction: column; align-items: center; gap: 2px;
  width: 100%; height: 100% !important; min-height: 0; padding: 22px 8px 14px !important; text-align: center;
  border-radius: 12px; background: var(--kc-surface); border: 0 !important; color: var(--kc-text); text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--kc-line);
  font-size: 15px; font-weight: 800; line-height: 1.35;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.kc-buy .ec-product-button li a > span:first-child { order: 1; }
.kc-buy .ec-product-button li a:hover { box-shadow: inset 0 0 0 1px #BFC9C3; }
.kc-buy .ec-product-button li a:active { transform: scale(.98); }
.kc-buy .ec-product-button li a:focus-visible { outline: 3px solid var(--kc-tint); outline-offset: 2px; }
.kc-buy .ec-product-button li.ec-product-selected a { background: #fff; box-shadow: inset 0 0 0 2px var(--kc-main); }
.kc-buy .ec-product-button li.ec-product-disabled a,
.kc-buy .ec-product-button li.ec-product-soldout a { opacity: .45; cursor: not-allowed; }
.kc-buy .kc-opt-meta { display: contents; }
.kc-buy .kc-opt-ribbon { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-style: normal; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--kc-main); color: #fff; }
.kc-buy .kc-opt-ribbon-basic { background: #8A8A8A; }
.kc-buy .kc-opt-brand { order: 0; font-size: 11px; font-weight: 600; color: var(--kc-sub); }
.kc-buy .kc-opt-list { order: 2; margin-top: 2px; font-size: 12px; font-weight: 400; color: #AAAAAA; }
.kc-buy .kc-opt-price { order: 3; font-size: 17px; font-weight: 800; }
.kc-buy .kc-opt-unit { order: 4; font-size: 12px; font-weight: 600; color: var(--kc-sub); }
.kc-buy .kc-opt-unit b { font-size: 16px; font-weight: 800; color: var(--kc-sale); }
.kc-buy .kc-opt-ship { order: 5; margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--kc-main); background: var(--kc-tint); padding: 2px 8px; border-radius: 4px; }

/* 총 상품금액 (카페24 #totalPrice) */
.kc-buy #totalPrice { display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; margin-top: 22px; font-weight: 600; font-size: 14px; color: var(--kc-sub); }
.kc-buy #totalPrice .total strong, .kc-buy #totalPrice .total em { font-size: 24px; font-weight: 800; font-style: normal; color: var(--kc-text); font-variant-numeric: tabular-nums; }

/* 무료배송 진행바 ([D]) */
.kc-ship { margin-top: 14px; }
.kc-ship-text { margin: 0; font-size: 13px; font-weight: 600; color: var(--kc-main); text-align: right; }
.kc-ship-bar { margin-top: 6px; height: 4px; border-radius: 2px; background: var(--kc-line); overflow: hidden; }
.kc-ship-fill { display: block; height: 100%; width: 0; background: var(--kc-main); transition: width .45s ease; }

/* 기존 장바구니 / 바로구매 버튼 → [장바구니 아이콘][넓은 바로구매] 한 줄 */
.kc-buy .kc-btn-row { display: grid !important; grid-template-columns: 64px 1fr; gap: 8px; margin-top: 18px; }
.kc-buy .kc-btn-cart, .kc-buy .kc-btn-buy {
  display: inline-flex !important; align-items: center; justify-content: center;
  height: 58px; border-radius: 10px; font-size: 17px; font-weight: 800; text-decoration: none;
  transition: transform .15s ease, background-color .2s ease;
}
/* 장바구니: 글자는 화면에서 숨기고(스크린리더는 읽음) 아이콘만 */
.kc-buy .kc-btn-cart { position: relative; color: transparent !important; overflow: hidden; white-space: nowrap; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.4 11h10.2L20 7H6.2'/%3E%3Ccircle cx='9.5' cy='19' r='1.4'/%3E%3Ccircle cx='17' cy='19' r='1.4'/%3E%3C/svg%3E") center/26px no-repeat; box-shadow: inset 0 0 0 1px var(--kc-line); }
.kc-buy .kc-btn-cart:hover { background-color: var(--kc-surface); }
.kc-buy .kc-btn-buy { background: var(--kc-main); color: #fff; }
.kc-buy .kc-btn-buy:hover { background: var(--kc-main-dark); }
.kc-buy .kc-btn-cart:active, .kc-buy .kc-btn-buy:active { transform: scale(.97); }
.kc-buy .kc-btn-cart:focus-visible, .kc-buy .kc-btn-buy:focus-visible { outline: 3px solid var(--kc-main); outline-offset: 2px; }

/* 오늘출발 ([D]) */
.kc-today { margin-top: 16px; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; background: var(--kc-surface); }
.kc-today-ico { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--kc-main); display: grid; place-items: center; }
.kc-today-ico svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.kc-today-text { margin: 0; font-size: 14px; line-height: 1.55; }
.kc-today-text b { font-weight: 800; }
.kc-today-time { color: var(--kc-sale); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ===================== ⑤ 탭 (상품후기 / 상세정보, 스크롤 시 상단 고정) ===================== */
.kc-tabs { position: sticky; top: var(--kc-tab-top); z-index: 40; max-width: 860px; margin: 40px auto 0; display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.kc-tab { position: relative; display: grid; place-items: center; height: 52px; font-size: 15px; font-weight: 600; color: var(--kc-sub); text-decoration: none; background: var(--kc-surface); border-top: 1px solid var(--kc-line); border-bottom: 1px solid var(--kc-line); transition: color .2s ease, background-color .2s ease; }
.kc-tab:hover { color: var(--kc-text); }
.kc-tab:active { transform: scale(.98); }
.kc-tab:focus-visible { outline: 2px solid var(--kc-main); outline-offset: -3px; }
.kc-tab-active { background: #fff; color: var(--kc-text); font-weight: 800; border-top: 2px solid var(--kc-text); border-bottom-color: transparent; }
.kc-tab { grid-auto-flow: column; justify-content: center; gap: 6px; }
.kc-tab-count { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--kc-main); color: #fff; }

/* ===================== ⑥ 후기 영역 ===================== */
#kc-review { max-width: 860px; margin: 0 auto; padding: 32px 20px 64px; background: #fff; scroll-margin-top: calc(var(--kc-tab-top) + 52px); }
/* 별점 요약: 평균(왼쪽) + 세로 막대(오른쪽) */
#kc-review .kc-rating { display: grid; grid-template-columns: 1fr 1.3fr; align-items: center; padding-bottom: 28px; border-bottom: 1px solid var(--kc-line); }
#kc-review .kc-rating-avg { text-align: center; border-right: 1px solid var(--kc-line); }
#kc-review .kc-rating-avg strong { display: block; font-size: 48px; font-weight: 800; line-height: 1.1; }
#kc-review .kc-stars { color: var(--kc-main); letter-spacing: 1px; font-size: 18px; }
#kc-review .kc-rating-avg small { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--kc-sub); background: var(--kc-surface); padding: 3px 10px; border-radius: 999px; }
#kc-review .kc-dist { display: flex; justify-content: space-around; align-items: flex-end; height: 120px; padding-left: 12px; }
#kc-review .kc-dist-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; font-size: 12px; color: var(--kc-sub); }
#kc-review .kc-dist-bar { flex: 1; width: 10px; border-radius: 5px; background: #EFEFEF; overflow: hidden; display: flex; align-items: flex-end; }
#kc-review .kc-dist-bar i { display: block; width: 100%; border-radius: 5px; background: var(--kc-main); }
/* 포토 리뷰 모아보기 (가로 넘기기) */
#kc-review .kc-photo-head { display: flex; align-items: center; gap: 8px; margin: 28px 0 14px; font-size: 16px; font-weight: 800; }
#kc-review .kc-photo-head span { font-weight: 600; color: var(--kc-sub); }
#kc-review .kc-photo-list { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px; margin: 0 -20px; padding: 0 20px 8px; list-style: none; scrollbar-width: none; }
#kc-review .kc-photo-list::-webkit-scrollbar { display: none; }
#kc-review .kc-photo-card { flex: 0 0 46%; scroll-snap-align: start; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--kc-line); }
#kc-review .kc-photo-img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--kc-surface); }
#kc-review .kc-photo-body { padding: 12px; font-size: 13px; line-height: 1.5; }
#kc-review .kc-photo-body p { margin: 6px 0 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#kc-review .kc-photo-body small { color: var(--kc-sub); }
/* 텍스트 리뷰 목록 */
#kc-review .kc-review-list { margin: 20px 0 0; padding: 0; list-style: none; }
#kc-review .kc-review-item { padding: 22px 0; border-top: 1px solid var(--kc-line); font-size: 14px; }
#kc-review .kc-review-item p { margin: 8px 0 6px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#kc-review .kc-review-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--kc-sub); }
#kc-review .kc-review-opt { color: var(--kc-main); font-weight: 600; }
#kc-review .kc-review-more { display: block; margin-top: 8px; height: 48px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--kc-line); text-align: center; line-height: 48px; font-size: 14px; font-weight: 600; color: var(--kc-text); text-decoration: none; transition: background-color .2s ease, transform .15s ease; }
#kc-review .kc-review-more:hover { background: var(--kc-surface); }
#kc-review .kc-review-more:active { transform: scale(.98); }
#kc-review .kc-review-more:focus-visible { outline: 2px solid var(--kc-main); outline-offset: 2px; }
/* 카페24 기본 후기 게시판(표 형태)을 그대로 쓸 때 최소 정리 */
#kc-review table { width: 100%; border-collapse: collapse; font-size: 14px; }
#kc-review table th, #kc-review table td { padding: 14px 8px; border-bottom: 1px solid var(--kc-line); }

/* ===================== ⑩ 하단 고정 구매바: [리뷰보기][바로구매+가격] + 카카오 ===================== */
.kc-buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; box-shadow: 0 -1px 0 var(--kc-line, #E6E6E3); padding-bottom: env(safe-area-inset-bottom); }
.kc-buybar-inner { position: relative; max-width: 860px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; }
.kc-buybar-review { position: relative; display: grid; place-items: center; height: 60px; background: var(--kc-surface); color: var(--kc-text); font-size: 15px; font-weight: 700; text-decoration: none; transition: background-color .2s ease; }
.kc-buybar-review:hover { background: #EDEDEA; }
.kc-buybar-review:active { background: #E4E4E0; }
.kc-buybar-review:focus-visible { outline: 2px solid var(--kc-main); outline-offset: -3px; }
.kc-buybar-count { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--kc-main); color: #fff; }
.kc-buybar-buy { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; height: 60px; padding: 0 12px; border: 0; background: var(--kc-main); color: #fff; font: inherit; cursor: pointer; transition: background-color .2s ease; }
.kc-buybar-buy:hover { background: var(--kc-main-dark); }
.kc-buybar-buy:active { background: #0F2B1F; }
.kc-buybar-buy:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.kc-buybar-buy:disabled { opacity: .5; cursor: not-allowed; }
.kc-buybar-label { font-size: 16px; font-weight: 800; }
.kc-buybar-sub { display: block; max-width: 100%; font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-buybar-price { font-weight: 800; font-variant-numeric: tabular-nums; }
.kc-buybar-kakao { position: absolute; right: 16px; bottom: calc(100% + 14px); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #FEE500; box-shadow: 0 6px 16px -6px rgba(0,0,0,.35); transition: transform .15s ease, background-color .2s ease; }
.kc-buybar-kakao svg { width: 26px; height: 26px; fill: #191919; }
.kc-buybar-kakao:hover { background: #F5DC00; transform: translateY(-2px); }
.kc-buybar-kakao:active { transform: scale(.94); }
.kc-buybar-kakao:focus-visible { outline: 3px solid var(--kc-main); outline-offset: 2px; }
.kc-buybar-space { height: 76px; } /* 하단바에 마지막 내용이 가리지 않게 */

/* ===================== 반응형 ===================== */
@media (min-width: 768px) {
  .kc-buy { padding: 32px 40px 8px; }
  .kc-buy .ec-product-button { gap: 20px 14px; }
  #kc-review { padding-left: 40px; padding-right: 40px; }
  #kc-review .kc-photo-list { margin: 0; padding: 0 0 8px; scroll-padding: 0; }
  #kc-review .kc-photo-card { flex-basis: calc(25% - 8px); }
}
