/* 시술 상세 4벌 공용(dermatology/item-detail.html · medical-item-detail.html) — 구역은 화면 끝까지 가는 띠, 내용은 .inner 안 최대 1400px */

.item-detail { padding-top: 85px; }                    /* 상세 전용 헤더 높이 */
.item-detail .band { width: 100%; }
.item-detail .inner { max-width: 1400px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 96px); }
.item-detail .gray { background: #f8f9fa; }
.item-detail h2.section-h { font-size: clamp(20px, 1.8vw, 28px); font-weight: 600; margin: 0 0 16px; padding-left: 12px; border-left: 4px solid #6d28d9; }

/* 1 머리 */
.item-detail .hero { background: linear-gradient(135deg, #f5f3ff 0%, #fdf2f8 100%); }
.item-detail .hero .inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.item-detail .hero.no-image .inner { grid-template-columns: 1fr; }
.item-detail .breadcrumb { font-size: 13px; color: #777; margin-bottom: 14px; }
.item-detail .breadcrumb a { color: #777; text-decoration: none; }
.item-detail .breadcrumb a:hover { color: #6d28d9; }
.item-detail .breadcrumb .sep { margin: 0 6px; }
.item-detail .breadcrumb .current { color: #333; font-weight: 600; }
.item-detail h1 { font-size: clamp(28px, 3vw, 44px); font-weight: 700; margin: 0 0 12px; line-height: 1.25; }
.item-detail .lead { font-size: clamp(15px, 1.2vw, 19px); color: #555; line-height: 1.6; margin: 0 0 22px; }
.item-detail .hero figure { margin: 0; border-radius: 16px; overflow: hidden; }
.item-detail .hero figure img { width: 100%; height: auto; display: block; }
.item-detail .badges { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.item-detail .badge { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.item-detail .badge-popular { background: #fef3c7; color: #92400e; }
.item-detail .badge-new { background: #dbeafe; color: #1e40af; }
.item-detail .badge-month { background: #fce7f3; color: #9f1239; }
.item-detail .hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.item-detail .btn { display: inline-block; padding: 13px 26px; border-radius: 10px; font-weight: 700; font-size: 15px; background: #fff; color: #6d28d9; border: 1px solid #d6c9ff; text-decoration: none; transition: background .15s; }
.item-detail .btn:hover { background: #f5f3ff; }
.item-detail .btn.primary { background: #6d28d9; color: #fff; border-color: #6d28d9; }
.item-detail .btn.primary:hover { background: #5b21b6; }

/* 2 시술 정보 */
.item-detail .info .inner { padding-top: 36px; padding-bottom: 8px; }
.item-detail .meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.item-detail .meta-card { background: #f8f9fa; border-radius: 12px; padding: 20px 22px; }
.item-detail .meta-card .label { font-size: 12px; color: #888; margin-bottom: 6px; }
.item-detail .meta-card .value { font-size: 18px; font-weight: 600; color: #222; }
.item-detail .meta-card .price-original { color: #aaa; font-size: 14px; }
.item-detail .meta-card .price-discount { color: #e74c3c; font-size: 18px; margin-left: 8px; font-weight: 700; }

/* 3 본문 */
.item-detail .body .inner { padding-top: 32px; padding-bottom: 48px; }
.item-detail .body h2.section-h { margin-top: 32px; }
.item-detail .body h2.section-h:first-child { margin-top: 0; }
.item-detail .section-body { font-size: 15px; color: #444; line-height: 1.8; margin-bottom: 30px; padding: 0; }
.item-detail .section-body img {
  /* 본문 이미지 원본이 전부 1080px 이라 그 이상 늘리면 흐려진다 */
  max-width: min(100%, 1080px);
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.item-detail .warn-box { background: #fff3cd; border-left: 4px solid #ffc107; padding: 16px 20px; border-radius: 4px; max-width: 900px; }
.item-detail .warn-box h2 { font-size: 18px; font-weight: 600; margin: 0 0 10px; color: #856404; }
.item-detail .warn-box p { font-size: 14px; color: #856404; line-height: 1.7; margin: 0; }

/* 4·5·6 카드 구역 */
#itemReviews { scroll-margin-top: 95px; }
.item-detail .cards .inner { padding-top: 40px; padding-bottom: 40px; }
.item-detail .sub-block { margin-top: 28px; }
.item-detail .item-related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.item-detail .item-related-card { display: block; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff; text-decoration: none; }
.item-detail .item-related-card img { width: 100%; aspect-ratio: 1400 / 989; object-fit: contain; display: block; background: #f3f4f6; }
.item-detail.square-cards .item-related-card img { aspect-ratio: 1; object-fit: cover; }   /* 셀피처럼 정사각에 가까운 사진만 */
.item-detail .item-related-cap { display: block; padding: 10px 12px; font-size: 13px; color: #666; }
.item-detail .item-related-more { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; color: #6d28d9; text-decoration: none; }
.item-detail .item-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.item-detail .item-chip { display: inline-block; padding: 8px 16px; border: 1px solid #d6c9bb; border-radius: 20px; font-size: 14px; color: #333; text-decoration: none; background: #fff; }
.item-detail .item-chip:hover { border-color: #6d28d9; color: #6d28d9; }
.item-detail .item-doctors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.item-detail .item-doctor { display: flex; gap: 16px; align-items: center; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; background: #fff; }
.item-detail .item-doctor img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: top; flex: 0 0 88px; }
.item-detail .item-doctor-body b { display: block; font-size: 16px; }
.item-detail .item-doctor-body span { font-size: 13px; color: #666; }


/* 6-1 소개·이벤트 안내 상자 */
.item-detail .more .section-h + .more-grid { margin-bottom: 32px; }
.item-detail .more .more-grid:last-child { margin-bottom: 0; }
.item-detail .more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.item-detail .more-card { display: flex; flex-direction: column; gap: 8px; padding: 22px 20px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; text-decoration: none; color: #333; transition: border-color .15s, transform .15s; }
.item-detail .more-card:hover { border-color: #6d28d9; transform: translateY(-2px); }
.item-detail .more-card b { font-size: 16px; }
.item-detail .more-card span { font-size: 13px; color: #666; line-height: 1.6; flex: 1 1 auto; }
.item-detail .more-card em { font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: #6d28d9; border: 1px solid #6d28d9; border-radius: 14px; padding: 5px 14px; align-self: flex-start; }
.item-detail .more-card:hover em { background: #6d28d9; color: #fff; }

/* 6-2 다른 이유 — 검은 띠에 흰 글씨 */
.item-detail .why { background: #111; color: #fff; }
.item-detail .why .inner { padding-top: 48px; padding-bottom: 48px; }
.item-detail .why h2.section-h { color: #fff; border-left-color: #a78bfa; }
.item-detail .why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.item-detail .why-item { background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 20px; }
.item-detail .why-item b { display: block; font-size: 16px; margin-bottom: 6px; }
.item-detail .why-item span { font-size: 13px; color: #d1d5db; line-height: 1.6; }

/* 7 상담·예약 · 진료시간 · 오시는길 */
.item-detail .contact .inner { padding-top: 48px; padding-bottom: 64px; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.item-detail .contact .tel { display: block; font-size: 30px; font-weight: 800; color: #6d28d9; text-decoration: none; margin-bottom: 14px; }
.item-detail .hours { list-style: none; margin: 0; padding: 0; font-size: 14px; color: #444; }
.item-detail .hours li { display: flex; gap: 12px; padding: 4px 0; }
.item-detail .hours li span:first-child { min-width: 64px; font-weight: 600; }
.item-detail .hours-note { font-size: 13px; color: #888; margin: 8px 0 0; }
.item-detail .map { height: 260px; max-width: 520px; border-radius: 12px; overflow: hidden; background: #f3f4f6; }
.item-detail .address { display: block; font-size: 13px; color: #555; margin: 8px 0 0; text-decoration: underline; }

@media (max-width: 1068px) {
  .item-detail { padding-top: 90px; }   /* 모바일 헤더 줄은 네 진료과 공용 */
}

@media (max-width: 1023px) {
  .item-detail .hero .inner { grid-template-columns: 1fr; gap: 24px; }
  .item-detail .meta-grid, .item-detail .item-related-grid, .item-detail .item-doctors, .item-detail .why-grid { grid-template-columns: repeat(2, 1fr); }
  .item-detail .contact .inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 767px) {
  .item-detail .hero .inner { padding-top: 28px; padding-bottom: 28px; }
  .item-detail .btn { padding: 11px 16px; font-size: 14px; white-space: nowrap; }
  .item-detail .meta-grid { gap: 10px; }
  .item-detail .meta-card { padding: 12px; }
  .item-detail .meta-card .value, .item-detail .meta-card .price-discount { font-size: 16px; }
  .item-detail .meta-card .price-original { display: block; }
  .item-detail .meta-card .price-discount { margin-left: 0; }
  .item-detail .item-related-grid { gap: 10px; }
  .item-detail .item-doctors { grid-template-columns: 1fr; }
}

/* 위치 표시 띠(fragments/breadcrumb) — 헤더 바로 아래. 분류 칸·마지막 칸을 누르면 목록이 펼쳐진다 */
.crumb-bar { border-bottom: 1px solid #ececef; background: #fff; }
.crumb-bar ol { max-width: 1400px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 96px); height: 44px; display: flex; align-items: center; list-style: none; font-size: 14px; color: #555; }
.crumb-bar ol > li { display: flex; align-items: center; position: relative; min-width: 0; }
.crumb-bar ol > li + li::before { content: ''; width: 1px; height: 12px; background: #d4d4d8; margin: 0 14px; flex-shrink: 0; }
.crumb-bar a { color: #555; text-decoration: none; display: flex; align-items: center; gap: 6px; }
.crumb-bar a:hover { color: #6d28d9; }
.crumb-bar svg { width: 16px; height: 16px; fill: #1d1d1f; }
.crumb-bar summary, .crumb-bar .crumb-title { color: #1d1d1f; font-weight: 600; }
.crumb-bar .crumb-title { font-size: inherit; line-height: inherit; margin: 0; display: flex; }
.crumb-bar details { position: relative; }
.crumb-bar summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.crumb-bar summary::-webkit-details-marker { display: none; }
.crumb-bar summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid #1d1d1f; border-bottom: 1.5px solid #1d1d1f; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.crumb-bar details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.crumb-bar .crumb-cat summary { color: #555; font-weight: 400; }
.crumb-bar .crumb-cat summary::after { border-color: #9a9aa2; }
.crumb-bar .crumb-menu { position: absolute; top: calc(100% + 12px); left: -12px; min-width: 200px; background: #fff; border: 1px solid #ececef; border-radius: 10px; padding: 6px 0; margin: 0; list-style: none; z-index: 50; }
.crumb-bar .crumb-menu li { display: block; }
.crumb-bar .crumb-menu a { display: block; padding: 9px 16px; color: #333; white-space: nowrap; }
.crumb-bar .crumb-menu a[aria-current] { color: #6d28d9; font-weight: 700; }
.crumb-bar .crumb-menu a:hover { background: #f7f7f8; }
.crumb-bar ol, .crumb-bar summary span, .crumb-bar ol > li > a span, .crumb-bar ol > li > span, .crumb-bar .crumb-title span { white-space: nowrap; }
@media (max-width: 768px) {
  .crumb-bar ol { height: 40px; font-size: 13px; padding: 0 16px; position: relative; }
  .crumb-bar ol > li + li::before { margin: 0 10px; }
  .crumb-home span { display: none; }
  .crumb-bar ol > li, .crumb-bar details { position: static; min-width: 0; }
  .crumb-bar ol > li > a, .crumb-bar summary, .crumb-bar .crumb-title { min-width: 0; }
  .crumb-bar summary span, .crumb-bar ol > li > a span, .crumb-bar ol > li > span, .crumb-bar .crumb-title span { overflow: hidden; text-overflow: ellipsis; }
  .crumb-bar ol > li:not(.crumb-home) { flex: 0 1 auto; }
  .crumb-bar ol > li.crumb-cat { max-width: 35%; flex-shrink: 0; }
  .crumb-bar .crumb-menu { left: 16px; right: 16px; top: 100%; min-width: 0; }
  .crumb-bar .crumb-menu a { white-space: normal; }
}
