/* ============================================================
   SAYOANG — product detail shell (공통 셸 + 제품 스킨).
   Shared LNB · price row · hero CTA pair · #buy block · bottom buy bar for
   every native product detail. Markup: inc/product-shell.php (rendered by
   single.php + partials). Loaded on product singles from inc/enqueue.php,
   before the per-product stylesheet.

   Skin = four custom properties set inline on .sy-pd by single.php:
   --p-accent (active underline, highlights) · --p-accent-text (accent as text,
   ≥4.5:1 on white) · --p-soft (tint) · --p-cta / --p-on-cta (button fill/text,
   ≥4.5:1) · --p-display (headline face). UI text is always Pretendard.
   ============================================================ */

.sy-pd {
  --pd-ink:   #1f1a1f;
  --pd-ink-2: #4a4148;
  --pd-mute:  #8e8389;
  --pd-line:  #e8dfd2;
  --pd-sale:  #D6456B;
  --pd-star:  #E9A91F;
  --pd-sans:  'Pretendard', 'Apple SD Gothic Neo', -apple-system, system-ui, sans-serif;
  position: relative;
  overflow-x: clip;               /* clip, not hidden — hidden would become the LNB's scrollport */
}
.sy-pd [id] { scroll-margin-top: 72px; }
.sy-pd .sy-pd-legacy { display: block; height: 0; overflow: hidden; }

/* ---------- buttons ---------- */
.sy-pd .sy-pd-btn {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  height: 56px; padding: 0 30px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--pd-sans); font-size: 16.5px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap; text-align: center;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.sy-pd .sy-pd-btn:hover { transform: translateY(-2px); }
.sy-pd .sy-pd-btn--primary { background: var(--p-cta); color: var(--p-on-cta); border-color: var(--p-cta); }
.sy-pd .sy-pd-btn--primary:hover { background: var(--pd-ink); border-color: var(--pd-ink); color: #fff; }
.sy-pd .sy-pd-btn--line { background: #fff; color: var(--p-cta); border-color: var(--p-cta); padding: 0 26px; }
.sy-pd .sy-pd-btn--line:hover { background: var(--p-soft); }
.sy-pd .sy-pd-btn--m { height: 44px; padding: 0 24px; font-size: 15px; }
.sy-pd .sy-pd-btn--s { height: 40px; padding: 0 20px; font-size: 14px; }
.sy-pd .sy-pd-btn--block { display: flex; width: 100%; }
.sy-pd .sy-pd-textlink { align-self: flex-start; font-family: var(--pd-sans); font-size: 14.5px; font-weight: 800; color: var(--pd-ink); text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.sy-pd .sy-pd-textlink:hover { color: var(--p-accent-text); }
.sy-pd .sy-pd-eyebrow { font-family: var(--pd-sans); font-size: 12.5px; font-weight: 800; letter-spacing: .14em; color: var(--p-accent-text); }
.sy-pd .sy-pd-stars { color: var(--pd-star); letter-spacing: 2px; }

/* ---------- LNB ---------- */
.sy-pd .sy-pd-lnb {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--pd-line);
  font-family: var(--pd-sans);
}
.sy-pd .sy-pd-lnb__in { max-width: 1200px; margin: 0 auto; padding: 0 12px 0 20px; height: 56px; display: flex; align-items: center; gap: 12px; }
.sy-pd .sy-pd-lnb__links { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.sy-pd .sy-pd-lnb__links::-webkit-scrollbar { display: none; }
.sy-pd .sy-pd-lnb__links a {
  flex: 0 0 auto; height: 56px; box-sizing: border-box; display: flex; align-items: center; padding: 0 14px;
  font-size: 14.5px; font-weight: 700; color: var(--pd-ink-2); text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.sy-pd .sy-pd-lnb__links a:hover { color: var(--pd-ink); }
.sy-pd .sy-pd-lnb__links a.is-active { color: var(--pd-ink); font-weight: 800; border-bottom-color: var(--p-accent); }
.sy-pd .sy-pd-lnb .sy-pd-btn { flex: 0 0 auto; }

/* ---------- price row ---------- */
.sy-pd .sy-pd-price { font-family: var(--pd-sans); color: var(--pd-ink); display: flex; flex-direction: column; gap: 8px; }
.sy-pd .sy-pd-price p { margin: 0; }
.sy-pd .sy-pd-price__row { display: flex; align-items: baseline; gap: 10px 12px; flex-wrap: wrap; }
.sy-pd .sy-pd-price__now { font-weight: 900; letter-spacing: -0.04em; line-height: 1; font-size: clamp(32px, 4.2vw, 44px); }
.sy-pd .sy-pd-price__now small { font-size: .5em; font-weight: 800; margin-left: 3px; }
.sy-pd .sy-pd-price__was { font-size: 16px; font-weight: 600; color: var(--pd-mute); }
.sy-pd .sy-pd-price__off { background: var(--pd-sale); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; align-self: center; }
.sy-pd .sy-pd-price__unit { font-size: 15px; font-weight: 700; color: var(--pd-ink-2); }
.sy-pd .sy-pd-price__rating { font-size: 14px; font-weight: 700; color: var(--pd-ink-2); }
.sy-pd .sy-pd-price--m .sy-pd-price__now { font-size: clamp(30px, 3.4vw, 38px); }

/* ---------- hero CTA bundle ---------- */
.sy-pd .sy-pd-hero { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; margin-top: 24px; }
.sy-pd .sy-pd-hero__ctas { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- #buy block ---------- */
.sy-pd .sy-pd-buy { background: var(--p-soft); padding: clamp(56px, 7vw, 100px) 20px; }
.sy-pd .sy-pd-buy__in { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.sy-pd .sy-pd-buy__copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; font-family: var(--pd-sans); color: var(--pd-ink); }
.sy-pd .sy-pd-buy__title { margin: 0; font-family: var(--p-display); font-weight: 900; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.2; letter-spacing: -0.035em; word-break: keep-all; color: var(--pd-ink); }
.sy-pd .sy-pd-buy__lead { margin: 0; font-size: 16px; line-height: 1.75; font-weight: 500; color: var(--pd-ink-2); max-width: 42ch; word-break: keep-all; }
.sy-pd .sy-pd-buy__links { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 460px; }
.sy-pd .sy-pd-buy__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
/* Channel buttons — brand colours. Naver's #03C75A is 2.25:1 under white text, so
   the fill is a deeper Naver green (#009A47, 3.68:1) and the label is large text
   (19px/800 ≥ 14pt bold → 3:1 rule). Coupang red #E8351E is 4.23:1. */
.sy-pd .sy-pd-buy__pair .sy-pd-btn { height: 60px; padding: 0 12px; font-size: 19px; gap: 8px; }
.sy-pd .sy-pd-btn--naver { background: #009A47; border-color: #009A47; color: #fff; }
.sy-pd .sy-pd-btn--naver:hover { background: #008A40; border-color: #008A40; color: #fff; }
.sy-pd .sy-pd-btn--coupang { background: #E8351E; border-color: #E8351E; color: #fff; }
.sy-pd .sy-pd-btn--coupang:hover { background: #C92C17; border-color: #C92C17; color: #fff; }
.sy-pd .sy-pd-btn__mark { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 5px; background: #fff; color: #009A47; font-size: 14px; font-weight: 900; line-height: 1; }
/* 비마이펫 스토어 — secondary: outline in the Bemypet purple, lighter weight. */
.sy-pd .sy-pd-btn--store { height: 50px; background: #fff; color: #5B32A8; border-color: #b89adf; font-size: 15px; }
.sy-pd .sy-pd-btn--store:hover { background: #f4ecfb; border-color: #5B32A8; color: #5B32A8; }
.sy-pd .sy-pd-buy__fine { margin: 0; font-size: 12.5px; line-height: 1.8; color: var(--pd-ink-2); word-break: keep-all; }
.sy-pd .sy-pd-buy__media { background: #fff; border-radius: 28px; overflow: hidden; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; max-height: 560px; box-shadow: 0 22px 50px rgba(31,26,31,.10); }
.sy-pd .sy-pd-buy__media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sy-pd .sy-pd-buy__media.is-cover img { object-fit: cover; }

/* ---------- bottom buy bar ---------- */
.sy-pd .sy-pd-buybar {
  position: fixed; left: 50%; bottom: 14px; z-index: 70; width: min(880px, calc(100% - 20px)); box-sizing: border-box;
  transform: translate(-50%, 140%); transition: transform .32s cubic-bezier(.2,.7,.3,1);
  background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--pd-line); border-radius: 18px; box-shadow: 0 -8px 30px rgba(31,26,31,.12);
  padding: 10px 10px 10px 18px; display: flex; align-items: center; gap: 12px;
  font-family: var(--pd-sans); color: var(--pd-ink);
}
.sy-pd .sy-pd-buybar.is-on { transform: translate(-50%, 0); }
.sy-pd .sy-pd-buybar__info { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.sy-pd .sy-pd-buybar__name { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sy-pd .sy-pd-buybar__price { font-size: 20px; font-weight: 900; letter-spacing: -0.03em; color: var(--p-accent-text); white-space: nowrap; }
.sy-pd .sy-pd-buybar__price em { font-style: normal; font-size: 13px; font-weight: 800; color: var(--pd-sale); margin-left: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .sy-pd .sy-pd-lnb__in { height: 52px; padding: 0 8px 0 6px; gap: 6px; }
  .sy-pd .sy-pd-lnb__links a { height: 52px; padding: 0 10px; font-size: 14px; }
  .sy-pd .sy-pd-lnb__links { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .sy-pd .sy-pd-lnb .sy-pd-btn--s { height: 36px; padding: 0 15px; font-size: 13.5px; }
  .sy-pd .sy-pd-btn { height: 52px; padding: 0 24px; font-size: 15.5px; }
  .sy-pd .sy-pd-hero__ctas { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sy-pd .sy-pd-hero__ctas .sy-pd-btn { padding: 0 10px; }
  .sy-pd .sy-pd-buy__in { grid-template-columns: minmax(0, 1fr); }
  .sy-pd .sy-pd-buy__media { order: -1; aspect-ratio: 1 / 1; max-height: 360px; }
  .sy-pd .sy-pd-buybar { bottom: 10px; padding: 8px 8px 8px 14px; }
  .sy-pd .sy-pd-buybar__info { flex-direction: column; gap: 0; }
  .sy-pd .sy-pd-buybar__name { font-size: 12.5px; }
  .sy-pd .sy-pd-buybar__price { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .sy-pd .sy-pd-btn, .sy-pd .sy-pd-buybar { transition: none; }
  .sy-pd .sy-pd-btn:hover { transform: none; }
}
