/* dalent.kr — 이프로케어 칫솔 안내 */
:root {
  --white: #ffffff;
  --mist: #eef4f2;   /* 사진 바탕: 욕실 타일 같은 옅은 민트 회색 */
  --line: #dce6e3;
  --ink: #13242b;
  --muted: #5b6a70;
  --leaf: #2e8a5a;   /* 상자 로고의 잎 초록 — 구매 버튼에만 */
  --leaf-dark: #23704a;
  --sale: #e0483c;   /* 할인율에만 */
  --wrap: 1180px;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); background: var(--white); color: var(--ink); line-height: 1.6; word-break: keep-all; overflow-wrap: break-word; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 40px); margin: 0 auto; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 8px; }
.skip:focus { left: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 머리 */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand small { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.top-link { font-size: 14px; font-weight: 600; color: var(--muted); padding: 8px 0; }
.top-link:hover { color: var(--ink); }

/* 첫 화면 */
.hero { padding: clamp(32px, 6vw, 72px) 0 0; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(30px, 4.3vw, 54px); font-weight: 800; line-height: 1.22; letter-spacing: -.035em; }
.lead { margin-top: 22px; max-width: 30em; font-size: clamp(16px, 1.5vw, 18px); color: var(--muted); }
.cta { display: inline-flex; align-items: center; margin-top: 30px; padding: 15px 26px; background: var(--ink); color: #fff; font-weight: 700; border-radius: 999px; }
.cta:hover { background: #0a171c; }
.hero-img { border-radius: 28px; overflow: hidden; background: var(--mist); aspect-ratio: 1 / 1; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts li { padding: 20px 4px 20px 22px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.facts li:first-child { border-left: 0; padding-left: 4px; }
.facts b { font-size: 16px; font-weight: 700; }
.facts span { font-size: 14px; color: var(--muted); }

/* 제품 */
.shop { padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 6vw, 80px); scroll-margin-top: 64px; }
.shop-head { display: flex; align-items: end; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; margin-bottom: 28px; }
.shop-head h2 { font-size: clamp(24px, 2.8vw, 34px); font-weight: 800; letter-spacing: -.03em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 16px; border: 1px solid var(--line); background: var(--white); border-radius: 999px; font-size: 15px; font-weight: 600; cursor: pointer; }
.chip span { margin-left: 2px; color: var(--muted); font-weight: 500; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] span { color: rgba(255, 255, 255, .65); }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 22px; }
.card { display: flex; flex-direction: column; }
.card[hidden] { display: none; }
.card-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 18px; }
.card-img { position: relative; display: block; border-radius: 18px; overflow: hidden; background: var(--mist); aspect-ratio: 1 / 1; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-open:hover .card-img img { transform: scale(1.04); }
.best { position: absolute; left: 12px; top: 12px; padding: 4px 10px; background: var(--white); border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--leaf-dark); }
.card-body { display: flex; flex-direction: column; flex: 1; padding-top: 14px; }
.card-body h3 { font-size: 16px; font-weight: 600; line-height: 1.4; letter-spacing: -.01em; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; margin-top: 6px; }
.off { color: var(--sale); font-weight: 800; font-size: 17px; }
.now { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.was { color: var(--muted); font-size: 14px; }
.rev { margin-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.rev-n { margin-left: 6px; color: var(--muted); font-weight: 500; }
.buy { display: flex; justify-content: center; align-items: center; margin-top: auto; padding: 12px 14px; border: 1.5px solid var(--leaf); color: var(--leaf-dark); font-weight: 700; font-size: 15px; border-radius: 12px; transition: background .2s, color .2s; }
.card-body > :nth-last-child(2) { margin-bottom: 14px; } /* 구매 버튼 바로 위 줄과 띄움, 버튼은 맨 아래로 */
.buy:hover { background: var(--leaf); color: #fff; }
.note { margin-top: 40px; font-size: 13.5px; color: var(--muted); }

/* 배송 */
.ship { background: var(--mist); padding: clamp(48px, 6vw, 72px) 0; }
.ship-grid { display: grid; grid-template-columns: 1fr 2.4fr; gap: 24px 48px; }
.ship h2 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; letter-spacing: -.03em; }
.ship dl { display: grid; gap: 18px; }
.ship dl div { display: grid; grid-template-columns: 7em 1fr; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.ship dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.ship dt { font-weight: 700; }
.ship dd { color: #34444b; }
.ship dd a { color: var(--leaf-dark); text-decoration: underline; text-underline-offset: 3px; }

/* 바닥 */
.foot { padding: 32px 0 48px; font-size: 13.5px; color: var(--muted); }
.foot p + p { margin-top: 4px; }
.foot b { color: var(--ink); }
.foot .sep { margin: 0 8px; color: var(--line); }

/* 크게 보기 */
.detail { width: min(980px, 100% - 32px); max-height: min(92vh, 860px); padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: var(--white); overflow: auto; }
.detail::backdrop { background: rgba(19, 36, 43, .55); }
.detail[open] { animation: rise .25s ease-out; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.d-close-form { position: sticky; top: 0; z-index: 2; height: 0; display: flex; justify-content: flex-end; }
.d-close { margin: 12px 12px 0 0; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 1px 0 var(--line); }
.d-grid { display: grid; grid-template-columns: 1.1fr 1fr; }
.d-photos { padding: 20px; }
.d-main { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 16px; background: var(--mist); }
.d-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.d-thumbs button { width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--mist); cursor: pointer; }
.d-thumbs button[aria-current="true"] { border-color: var(--ink); }
.d-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.d-info { padding: 40px 32px 32px 12px; display: flex; flex-direction: column; }
.d-info h2 { font-size: 24px; font-weight: 800; line-height: 1.3; letter-spacing: -.02em; padding-right: 40px; }
.d-info .price { margin-top: 12px; }
.d-info .now { font-size: 24px; }
.d-rev:empty { display: none; }
.d-sum { margin-top: 18px; color: #34444b; }
.d-opt { margin-top: 22px; }
.d-opt[hidden] { display: none; }
.d-opt h3 { font-size: 14px; font-weight: 700; color: var(--muted); }
.d-opt ul { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.d-opt li { padding: 5px 11px; background: var(--mist); border-radius: 8px; font-size: 14px; }
.buy-lg { margin-top: 28px; padding: 16px; font-size: 16px; background: var(--leaf); color: #fff; border-color: var(--leaf); }
.buy-lg:hover { background: var(--leaf-dark); border-color: var(--leaf-dark); }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-img { order: -1; border-radius: 22px; aspect-ratio: 4 / 3; }
  .facts { grid-template-columns: 1fr; }
  .facts li, .facts li:first-child { border-left: 0; border-top: 1px solid var(--line); padding: 14px 2px; flex-direction: row; justify-content: space-between; gap: 12px; align-items: baseline; }
  .facts li:first-child { border-top: 0; }
  .facts span { text-align: right; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 14px; }
  .card-body h3 { font-size: 15px; }
  .now { font-size: 17px; }
  .buy { padding: 11px 8px; font-size: 14px; }
  .ship-grid { grid-template-columns: 1fr; }
  .ship dl div { grid-template-columns: 1fr; gap: 4px; }
  .detail { width: 100%; max-width: none; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .d-grid { grid-template-columns: 1fr; }
  .d-photos { padding: 14px 14px 0; }
  .d-info { padding: 22px 20px 28px; }
  .d-info h2 { font-size: 21px; padding-right: 0; }
  .buy-lg { position: sticky; bottom: 12px; box-shadow: 0 0 0 12px var(--white); } /* 폰: 사진을 내려 보는 동안에도 구매 버튼이 보이게 */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.nf { padding: 18vh 0 20vh; } .nf h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.03em; }

/* 구매 막아 둔 동안(build.py BUY_OPEN = False) */
.buy.is-off, .buy.is-off:hover { border-color: var(--line); color: var(--muted); background: var(--mist); cursor: default; }
