/* Mor Stil premium product detail — scoped to the live detail template. */
body.yn-product-detail-page {
  --pp-ink: #11283c;
  --pp-muted: #697987;
  --pp-line: rgba(26, 54, 72, .10);
  --pp-plum: var(--yn-red);
  --pp-teal: #075d67;
  --pp-coral: #ff7a5f;
  --pp-cream: #fffaf6;
  background:
    radial-gradient(circle at 13% 23%, rgba(255, 137, 105, .10), transparent 22rem),
    radial-gradient(circle at 90% 44%, rgba(178, 122, 222, .08), transparent 25rem),
    #fff;
  color: var(--pp-ink);
}

.yn-product-detail-page main { padding-bottom: 56px; }
.yn-product-detail-page .yn-breadcrumb { padding: 22px 0 16px; font-size: 11px; }

/* Product detail uses the compact header from the selected visual. */
@media (min-width: 781px) {
  .yn-product-detail-page .yn-header-core {
    min-height: 66px;
    grid-template-rows: 66px;
    padding-top: 0;
  }
  .yn-product-detail-page .yn-quick,
  .yn-product-detail-page .yn-brand,
  .yn-product-detail-page .yn-actions { align-self: center; grid-row: 1; }
  .yn-product-detail-page .yn-search {
    position: absolute;
    z-index: 6;
    right: 0;
    bottom: -43px;
    display: block;
    width: 38px;
  }
  .yn-product-detail-page .yn-search input { display: none; }
  .yn-product-detail-page .yn-search button {
    position: static;
    width: 38px;
    height: 38px;
  }
}

.yn-product-detail-page .yn-detail {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, .9fr);
  grid-template-rows: auto auto;
  gap: 14px 30px;
  align-items: start;
}
.yn-product-detail-page .yn-detail:before,
.yn-product-detail-page .yn-detail:after {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  content: "";
}
.yn-product-detail-page .yn-detail:before {
  top: 18px;
  left: -48px;
  width: 270px;
  height: 330px;
  border-radius: 48% 52% 54% 46% / 46% 42% 58% 54%;
  background: linear-gradient(145deg, rgba(255, 125, 92, .52), rgba(255, 180, 157, .28));
  transform: rotate(12deg);
}
.yn-product-detail-page .yn-detail:after {
  bottom: -12px;
  left: -70px;
  width: 290px;
  height: 280px;
  border-radius: 62% 38% 42% 58% / 50% 58% 42% 50%;
  background: linear-gradient(145deg, rgba(171, 103, 214, .30), rgba(222, 198, 239, .42));
  transform: rotate(-18deg);
}

.yn-product-detail-page .yn-detail-image {
  grid-column: 1;
  grid-row: 1;
  z-index: 1;
  aspect-ratio: 1.25;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.84);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,247,245,.96));
  box-shadow: 0 22px 60px rgba(31, 44, 60, .10), inset 0 0 0 1px rgba(24,52,68,.035);
}
.yn-product-detail-page .yn-detail-image > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
  transform: scale(1.025);
  transition: opacity .18s ease, transform .35s ease;
}
.yn-product-detail-page .yn-detail-image:hover > img { transform: scale(1.055); }
.yn-product-detail-page .yn-detail-favorite {
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.88);
  box-shadow: 0 10px 28px rgba(26,47,62,.13);
}
.yn-product-detail-page .yn-zoom { display: none; }

.yn-product-detail-page .yn-thumbs {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(64px, 88px));
  justify-content: center;
  gap: 9px;
  width: min(100%, 650px);
  margin: -72px auto 18px;
  padding: 10px 12px;
  overflow-x: auto;
  border: 1px solid rgba(26,54,72,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 35px rgba(25,43,56,.09);
  backdrop-filter: blur(10px);
}
.yn-product-detail-page .yn-thumb {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--pp-line);
  border-radius: 9px;
  background: #faf9f7;
}
.yn-product-detail-page .yn-thumb.active {
  border-color: var(--pp-plum);
  box-shadow: 0 0 0 2px rgba(var(--yn-red-rgb), .12);
}
.yn-product-detail-page .yn-thumb img { object-fit: contain; mix-blend-mode: multiply; }

.yn-product-detail-page .yn-summary {
  grid-column: 2;
  grid-row: 1 / 3;
  position: sticky;
  top: 18px;
  padding: 28px 30px 26px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 25px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 22px 60px rgba(31, 44, 60, .09), inset 0 0 0 1px rgba(26,54,72,.055);
  backdrop-filter: blur(12px);
}
.yn-product-detail-page .yn-popular-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 115, 87, .12);
  color: #f05d45;
  font-size: 11px;
  font-weight: 750;
}
.yn-product-detail-page .yn-popular-badge svg { width: 16px; height: 16px; }
.yn-product-detail-page .yn-summary h1 {
  max-width: 650px;
  margin: 0 0 10px;
  color: var(--pp-ink);
  font-size: clamp(24px, 2vw, 34px);
  line-height: 1.13;
  letter-spacing: -.025em;
}
.yn-product-detail-page .yn-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--pp-muted);
  font-size: 12px;
}
.yn-product-detail-page .yn-rating-stars { color: #ffb400; letter-spacing: 1px; }
.yn-product-detail-page .yn-rating-row strong { color: var(--pp-ink); }
.yn-product-detail-page .yn-rating-row a { color: var(--pp-teal); text-decoration: underline; }
.yn-product-detail-page .yn-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.yn-product-detail-page .yn-detail-price {
  margin: 0;
  color: var(--pp-plum);
  font-size: clamp(32px, 3vw, 45px);
  line-height: 1;
  letter-spacing: -.035em;
}
.yn-product-detail-page .yn-old-price { color: #89949c; font-size: 16px; }
.yn-product-detail-page .yn-tax { margin-top: 6px; color: var(--pp-muted); font-size: 11px; }
.yn-product-detail-page .yn-stock { margin: 11px 0 16px; font-size: 12px; }
.yn-product-detail-page .yn-summary form { border-top: 1px solid var(--pp-line); }
.yn-product-detail-page .yn-variant { padding-top: 15px; }
.yn-product-detail-page .yn-variant-head { margin-bottom: 9px; font-size: 12px; }
.yn-product-detail-page .yn-options { gap: 8px; }
.yn-product-detail-page .yn-option { min-width: 52px; height: 39px; border-radius: 9px; font-size: 11px; }
.yn-product-detail-page .yn-color { width: 36px; min-width: 36px; height: 36px; padding: 0; border-radius: 50%; }
.yn-product-detail-page .yn-size-link { margin-top: 8px; font-size: 10px; }
.yn-product-detail-page .yn-buy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 10px;
  margin-top: 21px;
}
.yn-product-detail-page .yn-buy .yn-btn {
  height: 52px;
  border-radius: 8px;
  background: var(--pp-plum);
  box-shadow: 0 11px 24px rgba(var(--yn-red-rgb), .19);
  font-size: 13px;
}
.yn-product-detail-page .yn-summary-favorite {
  position: static;
  width: 56px;
  height: 52px;
  border: 1px solid #b9c4ca;
  border-radius: 8px;
  background: #fff;
  color: var(--pp-ink);
  box-shadow: none;
}
.yn-product-detail-page .yn-buy .yn-btn.outline {
  grid-column: 1 / 3;
  border-color: var(--pp-teal);
  background: var(--pp-teal);
  box-shadow: none;
  color: #fff;
}
.yn-product-detail-page .yn-delivery {
  margin-top: 13px;
  padding: 14px 16px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(50,172,170,.15), rgba(114,202,194,.08));
}
.yn-product-detail-page .yn-delivery strong { font-size: 12px; }
.yn-product-detail-page .yn-delivery span { color: var(--pp-muted); font-size: 10px; }

.yn-product-detail-page .yn-detail-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0 16px;
  padding: 0;
  border: 0;
}
.yn-product-detail-page .yn-detail-benefits .yn-benefit {
  min-height: 76px;
  justify-content: flex-start;
  padding: 16px 20px;
  border: 1px solid rgba(26,54,72,.07);
  border-radius: 12px;
}
.yn-product-detail-page .yn-detail-benefits .yn-benefit:nth-child(1) { background: linear-gradient(135deg, rgba(255,127,95,.14), rgba(255,237,229,.72)); }
.yn-product-detail-page .yn-detail-benefits .yn-benefit:nth-child(2) { background: linear-gradient(135deg, rgba(171,104,216,.13), rgba(239,226,249,.70)); }
.yn-product-detail-page .yn-detail-benefits .yn-benefit:nth-child(3) { background: linear-gradient(135deg, rgba(31,167,158,.13), rgba(225,247,243,.72)); }
.yn-product-detail-page .yn-detail-benefits .yn-benefit svg { width: 28px; height: 28px; }
.yn-product-detail-page .yn-detail-benefits .yn-benefit strong { font-size: 12px; }
.yn-product-detail-page .yn-detail-benefits .yn-benefit span { font-size: 10px; }

.yn-product-detail-page .yn-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(360px, .95fr);
  gap: 16px;
  align-items: stretch;
}
.yn-product-detail-page .yn-product-tabs,
.yn-product-detail-page .yn-related {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--pp-line);
  border-radius: 15px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 34px rgba(31,44,60,.055);
}
.yn-product-detail-page .yn-tab-list { border-bottom-color: var(--pp-line); }
.yn-product-detail-page .yn-tab-list button { min-height: 55px; font-size: 11px; }
.yn-product-detail-page .yn-tab-panels { min-height: 250px; }
.yn-product-detail-page .yn-tab-panel { padding: 24px 26px 28px; font-size: 14px; }
.yn-product-detail-page .yn-description-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, .9fr);
  gap: 22px;
  align-items: start;
}
.yn-product-detail-page .yn-description-visual {
  overflow: hidden;
  aspect-ratio: 1.35;
  border-radius: 12px;
  background: linear-gradient(145deg,#faf9f7,#f0eeea);
}
.yn-product-detail-page .yn-description-visual img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.yn-product-detail-page .yn-description-copy,
.yn-product-detail-page .yn-description-copy p,
.yn-product-detail-page .yn-description-copy li,
.yn-product-detail-page .yn-description-copy div,
.yn-product-detail-page .yn-description-copy span,
.yn-product-detail-page .yn-description-copy td { font-size: 14px !important; line-height: 1.75; }
.yn-product-detail-page .yn-related .yn-head { margin: 0; padding: 18px 18px 12px; }
.yn-product-detail-page .yn-related .yn-head h2 { font-size: 16px; }
.yn-product-detail-page .yn-related .yn-products {
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 9px;
  padding: 0 12px 14px;
}
.yn-product-detail-page .yn-related .yn-product { padding: 5px; border-radius: 9px; box-shadow: none; }
.yn-product-detail-page .yn-related .yn-product-media { aspect-ratio: .82; }
.yn-product-detail-page .yn-related .yn-product-body { min-height: 138px; padding: 9px 4px 3px; }
.yn-product-detail-page .yn-related .yn-product h3 { min-height: 62px; font-size: 13px; line-height: 1.25; }
.yn-product-detail-page .yn-related .yn-product-price { font-size: 12px; }
.yn-product-detail-page .yn-related .yn-cart { height: 42px; font-size: 13px; }
.yn-product-detail-page .yn-related .yn-product-body { display:flex; flex-direction:column; gap:0; min-height:174px; }
.yn-product-detail-page .yn-related .yn-product h3 { display:-webkit-box; min-height:42px; margin:0; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.yn-product-detail-page .yn-related .yn-product-price { display:flex; align-items:center; min-height:24px; margin:8px 0 12px; font-size:18px; font-weight:800; line-height:1.2; }
.yn-product-detail-page .yn-related .yn-cart { margin-top:auto; }

.yn-mobile-buybar { display: none; }

@media (max-width: 1100px) {
  .yn-product-detail-page .yn-detail { grid-template-columns: minmax(0, 1fr) minmax(350px, .78fr); gap: 14px 20px; }
  .yn-product-detail-page .yn-content-grid { grid-template-columns: 1fr; }
  .yn-product-detail-page .yn-related .yn-products { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

@media (max-width: 780px) {
  body.yn-product-detail-page { background: #fff; }
  .yn-product-detail-page main { padding-bottom: 94px; }
  .yn-product-detail-page .yn-breadcrumb { padding: 14px 0 11px; font-size: 9px; }
  .yn-product-detail-page .yn-search {
    position: relative;
    right: auto;
    bottom: auto;
    display: block;
    width: 100%;
  }
  .yn-product-detail-page .yn-search input { display: block; }
  .yn-product-detail-page .yn-detail { display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 10px; }
  .yn-product-detail-page .yn-detail:before,
  .yn-product-detail-page .yn-detail:after { display: none; }
  .yn-product-detail-page .yn-detail-image { grid-column: 1; grid-row: 1; aspect-ratio: .92; border-radius: 17px; }
  .yn-product-detail-page .yn-thumbs {
    grid-column: 1;
    grid-row: 2;
    grid-auto-flow: column;
    grid-auto-columns: 61px;
    grid-template-columns: none;
    justify-content: start;
    width: 100%;
    margin: -50px 0 4px;
    padding: 8px;
    border-radius: 11px;
  }
  .yn-product-detail-page .yn-summary { grid-column: 1; grid-row: 3; position: static; padding: 21px 18px; border-radius: 17px; }
  .yn-product-detail-page .yn-popular-badge { margin-bottom: 10px; }
  .yn-product-detail-page .yn-summary h1 { font-size: clamp(23px, 7vw, 30px); }
  .yn-product-detail-page .yn-detail-price { font-size: 35px; }
  .yn-product-detail-page .yn-buy { grid-template-columns: minmax(0,1fr) 52px; }
  .yn-product-detail-page .yn-summary-favorite { width: 52px; }
  .yn-product-detail-page .yn-detail-benefits { grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
  .yn-product-detail-page .yn-content-grid { grid-template-columns: 1fr; }
  .yn-product-detail-page .yn-description-layout { grid-template-columns: 1fr; }
  .yn-product-detail-page .yn-description-visual { aspect-ratio: 1.15; }
  .yn-product-detail-page .yn-related .yn-products { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); overflow: visible; }
  .yn-mobile-buybar {
    position: fixed;
    z-index: 950;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    gap: 12px;
    align-items: center;
    padding: 10px max(14px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(22,50,66,.09);
    background: rgba(255,255,255,.95);
    box-shadow: 0 -12px 34px rgba(21,42,55,.12);
    backdrop-filter: blur(14px);
  }
  .yn-mobile-buybar strong { white-space: nowrap; color: var(--pp-plum); font-size: 17px; }
  .yn-mobile-buybar button { height: 48px; border: 0; border-radius: 8px; background: var(--pp-plum); color: #fff; font-weight: 800; }
  .yn-mobile-buybar button:disabled { background: #aeb5b9; }
}

/* Product detail now uses the same full premium storefront header as the rest of the site. */
@media (min-width: 781px) {
  .yn-product-detail-page .yn-header-core {
    min-height: 126px;
    padding-top: 0;
    grid-template-columns: minmax(220px, .78fr) minmax(420px, 1.65fr) minmax(270px, .78fr);
    grid-template-rows: 126px;
    column-gap: 44px;
  }
  .yn-product-detail-page .yn-quick { display: none; }
  .yn-product-detail-page .yn-brand {
    align-self: center;
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
  }
  .yn-product-detail-page .yn-actions {
    align-self: center;
    grid-column: 3;
    grid-row: 1;
  }
  .yn-product-detail-page .yn-search {
    position: relative;
    z-index: auto;
    right: auto;
    bottom: auto;
    display: block;
    align-self: center;
    grid-column: 2;
    grid-row: 1;
    width: 100%;
  }
  .yn-product-detail-page .yn-search input { display: block; }
  .yn-product-detail-page .yn-search button {
    position: absolute;
    top: 0;
    right: auto;
    left: 13px;
    width: 42px;
    height: 54px;
  }
}

@media (max-width: 1100px) and (min-width: 781px) {
  .yn-product-detail-page .yn-header-core {
    grid-template-columns: minmax(180px, .7fr) minmax(330px, 1.45fr) minmax(230px, .7fr);
    column-gap: 24px;
  }
}
