/* Hipopick-inspired product detail. Load AFTER product-detail.css */

html.og-shop,
body.og-shop {
  --shop-max: 1120px;
  background: #f2f2f6;
  color: #0f1729;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.og-shop .pd-m-nav,
body.og-shop .pd-top {
  display: none !important;
}

body.og-shop .pd-wrap {
  padding: 12px 0 80px;
}

body.og-shop .pd-back {
  display: none !important;
}

body.og-shop .pd-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 28px;
  align-items: start;
  background: #fff;
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 41, 0.06);
}

body.og-shop .pd-gallery {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  align-items: start;
  gap: 12px;
  position: sticky;
  top: 84px;
}

body.og-shop .pd-thumbs {
  width: 72px;
  height: 0;
  min-height: 100%;
  max-height: none;
  overflow: auto;
}

body.og-shop .pd-thumbs button,
body.og-shop .pd-thumbs img {
  width: 72px;
  height: 72px;
}

body.og-shop .pd-thumbs button {
  border-radius: 14px;
  border: 1px solid #e8e9ee;
  background: #f7f7fa;
}

body.og-shop .pd-thumbs button.active {
  border-color: #2d9f38;
}

body.og-shop .pd-stage,
body.og-shop .pd-main {
  width: auto;
  max-width: none;
  min-width: 0;
}

body.og-shop .pd-main {
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  background: #f7f7fa;
}

body.og-shop .pd-info {
  padding: 0;
}

body.og-shop .pd-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 4px 0 12px;
}

body.og-shop .pd-price {
  font-size: 26px;
  color: #2d9f38;
  font-weight: 800;
  margin-bottom: 24px;
}

body.og-shop .pd-cat-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #515761;
}

body.og-shop .pd-swatch,
body.og-shop .pd-size {
  border-radius: 12px;
  border: 1px solid #e8e9ee;
  background: #fff;
}

body.og-shop .pd-swatch.active,
body.og-shop .pd-size.active {
  border-color: #2d9f38 !important;
  color: #2d9f38;
  background: #eef8ef;
}

body.og-shop .pd-buy {
  background: #2d9f38;
  color: #fff;
  border: 0;
  border-radius: 999px;
  height: 48px;
  font-weight: 800;
  transition: transform 0.16s ease, filter 0.16s ease, background 0.16s ease;
}

body.og-shop .pd-buy:hover {
  filter: brightness(1.04);
}

body.og-shop .pd-buy:active,
body.og-shop .pd-buy.is-press {
  transform: scale(0.97);
  filter: brightness(0.92);
}

body.og-shop .pd-ops {
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

body.og-shop .pd-fav {
  position: relative;
  z-index: 6;
  pointer-events: auto;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #0f1729;
  border: 1px solid #e8e9ee;
  border-radius: 999px;
  height: 48px;
  gap: 8px;
  transition: transform 0.16s ease, border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

body.og-shop .pd-fav-icon {
  font-size: 1em;
  line-height: 1;
  pointer-events: none;
  color: #94a3b8;
}

body.og-shop .pd-fav.active .pd-fav-icon {
  color: #2d9f38;
}

body.og-shop .pd-fav:active {
  transform: scale(0.97);
}

body.og-shop .pd-fav.active {
  border-color: #2d9f38;
  color: #2d9f38;
  background: #eef8ef;
}

body.og-shop .pd-section {
  margin-top: 28px;
  background: #fff;
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 41, 0.05);
}

body.og-shop .pd-h,
body.og-shop .pd-qc-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f1729;
  text-decoration: none;
  text-transform: none;
}

body.og-shop .pd-qc-viewall {
  color: #2d9f38;
  font-weight: 700;
}

body.og-shop .pd-main img {
  will-change: transform, opacity;
}

body.og-shop .pd-main img.pd-anim-next {
  animation: pdImgInNext 0.34s cubic-bezier(0.22, 0.7, 0.25, 1);
}

body.og-shop .pd-main img.pd-anim-prev {
  animation: pdImgInPrev 0.34s cubic-bezier(0.22, 0.7, 0.25, 1);
}

@keyframes pdImgInNext {
  from {
    opacity: 0;
    transform: translateX(16%) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pdImgInPrev {
  from {
    opacity: 0;
    transform: translateX(-16%) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

body.og-shop .pd-thumbs button,
body.og-shop .pd-swatch,
body.og-shop .pd-size {
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

body.og-shop .pd-thumbs button:active,
body.og-shop .pd-swatch:active,
body.og-shop .pd-size:active {
  transform: scale(0.94);
}

body.og-shop .pd-num {
  transition: opacity 0.2s ease;
}

@keyframes pdImgReveal {
  from {
    opacity: 0;
    transform: scale(1.035);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pdFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pdSheetIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pdSheetUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: none;
  }
}

@keyframes pdRowIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

body.og-shop .pd-main img.pd-anim-in {
  animation: pdImgReveal 0.42s cubic-bezier(0.22, 0.7, 0.25, 1);
}

body.og-shop .pd-detail-item {
  animation: pdFadeUp 0.38s cubic-bezier(0.22, 0.7, 0.25, 1) both;
}

body.og-shop .pd-qc-card {
  transition: transform 0.18s ease;
}

body.og-shop .pd-qc-card:active {
  transform: scale(0.98);
}

body.og-shop .pd-qc-lb {
  background: rgba(15, 23, 41, 0.78);
  opacity: 0;
  transition: opacity 0.22s ease;
}

body.og-shop .pd-qc-lb.is-on {
  opacity: 1;
}

body.og-shop .pd-qc-lb img.pd-lb-anim {
  animation: pdImgReveal 0.32s cubic-bezier(0.22, 0.7, 0.25, 1);
}

body.og-shop .pd-buy-mask {
  display: none !important;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none !important;
  z-index: -1;
  background: rgba(15, 23, 41, 0.42);
}

body.og-shop .pd-buy-mask.open {
  display: flex !important;
  visibility: visible;
  opacity: 1;
  pointer-events: auto !important;
  z-index: 80;
}

body.og-shop .pd-buy-dialog {
  background: #fff;
  border-radius: 24px;
  padding: 18px 16px 16px;
  box-shadow: none;
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.22, 0.7, 0.25, 1), opacity 0.22s ease;
}

body.og-shop .pd-buy-mask.open .pd-buy-dialog {
  transform: none;
  opacity: 1;
}

body.og-shop .pd-buy-title {
  display: block;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f1729;
  margin: 0 4px 14px;
  text-align: left;
  font-size: 16px;
  line-height: 1.3;
}

body.og-shop .pd-buy-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

body.og-shop .pd-buy-name {
  font-weight: 700;
  font-size: 15px;
}

body.og-shop .pd-buy-code {
  color: #8a94a6;
  font-size: 12px;
  font-weight: 600;
}

body.og-shop .pd-buy-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 2px 6px;
}

body.og-shop .pd-buy-row {
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f7f7fa;
  box-shadow: none;
  gap: 14px;
  transition: transform 0.16s ease, background 0.16s ease;
}

body.og-shop .pd-buy-row img {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}

body.og-shop .pd-buy-code {
  color: #8a94a6;
}

body.og-shop .pd-buy-mask.open .pd-buy-row {
  animation: pdRowIn 0.32s cubic-bezier(0.22, 0.7, 0.25, 1) both;
}

body.og-shop .pd-buy-mask.open .pd-buy-row:nth-child(1) { animation-delay: 0.03s; }
body.og-shop .pd-buy-mask.open .pd-buy-row:nth-child(2) { animation-delay: 0.06s; }
body.og-shop .pd-buy-mask.open .pd-buy-row:nth-child(3) { animation-delay: 0.09s; }
body.og-shop .pd-buy-mask.open .pd-buy-row:nth-child(4) { animation-delay: 0.12s; }
body.og-shop .pd-buy-mask.open .pd-buy-row:nth-child(5) { animation-delay: 0.15s; }
body.og-shop .pd-buy-mask.open .pd-buy-row:nth-child(6) { animation-delay: 0.18s; }

body.og-shop .pd-buy-go {
  color: #fff;
  background: #2d9f38;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 13px;
  transition: transform 0.16s ease, filter 0.16s ease;
}

body.og-shop .pd-buy-go:hover {
  filter: brightness(1.04);
}

body.og-shop .pd-buy-go:active {
  transform: scale(0.96);
}

body.og-shop .pd-buy-close {
  display: block;
  width: 100%;
  margin-top: 12px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #f2f2f6;
  color: #515761;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 768px) {
  body.og-shop .pd-buy-mask {
    align-items: flex-end;
  }

  body.og-shop .pd-buy-dialog {
    transform: translateY(100%);
    opacity: 1;
    border-radius: 24px 24px 0 0;
    padding: 16px 14px calc(12px + env(safe-area-inset-bottom));
    max-height: 78vh;
    overflow-y: auto;
  }

  body.og-shop .pd-buy-mask.open .pd-buy-dialog {
    transform: none;
  }

  body.og-shop .pd-buy-title {
    display: block !important;
    margin: 0 4px 14px;
    text-align: left;
  }

  body.og-shop .pd-buy-list {
    gap: 12px;
  }

  body.og-shop .pd-buy-row {
    margin: 0;
    padding: 14px 16px;
    border-radius: 18px;
    background: #f7f7fa;
    box-shadow: none;
  }

  body.og-shop .pd-buy-row:has(.pd-buy-code) .pd-buy-name {
    display: block !important;
  }

  body.og-shop .pd-buy-code {
    display: block;
    color: #8a94a6;
    font-size: 12px;
    font-weight: 600;
  }

  body.og-shop .pd-buy-go {
    background: #2d9f38;
    color: #fff;
  }

  body.og-shop .pd-buy-close {
    display: block;
    width: 100%;
    margin-top: 12px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: #f2f2f6;
    color: #515761;
    font-weight: 700;
    cursor: pointer;
  }
}

@media (max-width: 1100px) {
  body.og-shop .pd-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  body.og-shop .pd-stage,
  body.og-shop .pd-main {
    width: auto;
    max-width: none;
  }
}

@media (max-width: 768px) {
  body.og-shop .pd-ops {
    z-index: 50;
    pointer-events: auto;
  }

  body.og-shop .pd-fav {
    z-index: 51;
    pointer-events: auto;
  }

  body.og-shop .pd-m-nav,
  body.og-shop .pd-top {
    display: none !important;
  }

  body.og-shop .pd-wrap {
    width: calc(100% - 24px);
    padding: 8px 0 72px !important;
    overflow-x: hidden;
  }

  body.og-shop .pd-back {
    display: none !important;
  }

  body.og-shop .pd-hero {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    margin: 0;
    border-radius: 24px;
    padding: 16px;
    gap: 0;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  body.og-shop .pd-gallery {
    display: block;
    width: 100%;
    position: static;
    grid-template-columns: none;
    gap: 0;
  }

  body.og-shop .pd-thumbs {
    display: none !important;
    width: 0;
    height: 0;
  }

  body.og-shop .pd-stage,
  body.og-shop .pd-main {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    height: auto;
  }

  body.og-shop .pd-main {
    aspect-ratio: 1 / 1;
    max-height: none;
    border-radius: 18px;
    overflow: hidden;
    touch-action: pan-y;
  }

  body.og-shop .pd-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  body.og-shop .pd-num {
    display: block;
  }

  body.og-shop .pd-section {
    margin-left: 0;
    margin-right: 0;
    border-radius: 24px;
  }

  body.og-shop .pd-info {
    display: flex;
    flex-direction: column;
    padding: 12px 0 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    box-sizing: border-box;
  }

  body.og-shop .pd-style-block {
    order: 1;
    margin: 0;
    padding: 0;
    border-bottom: 0;
  }

  body.og-shop .pd-price {
    order: 2;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    margin: 12px 0 8px;
    padding: 0;
  }

  body.og-shop .pd-title {
    order: 3;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: 0;
    margin: 0 0 12px;
    padding: 0 0 12px;
    border-bottom: 1px solid #ececef;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  body.og-shop .pd-size-block {
    order: 4;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
  }

  body.og-shop .pd-cat-label {
    margin: 0 0 8px;
    line-height: 1.3;
  }

  body.og-shop .pd-sizes {
    padding: 0;
    gap: 8px;
  }

  body.og-shop .pd-ops {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    margin: 16px 0 0;
    padding: 0;
    box-sizing: border-box;
    border-top: 0;
    box-shadow: none;
    background: transparent;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    height: auto;
  }

  body.og-shop .pd-fav,
  body.og-shop .pd-buy {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    height: 48px;
    min-height: 48px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
  }

  body.og-shop .pd-fav {
    flex: 0 0 48px;
    width: 48px;
    font-size: 20px;
    border-radius: 999px;
  }

  body.og-shop .pd-fav-icon {
    display: inline-block;
    font-size: 20px;
  }

  body.og-shop .pd-fav-text {
    display: none;
  }

  body.og-shop .pd-buy {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    font-size: 16px;
    font-weight: 800;
    border-radius: 999px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.og-shop .pd-main img.pd-anim-next,
  body.og-shop .pd-main img.pd-anim-prev,
  body.og-shop .pd-main img.pd-anim-in,
  body.og-shop .pd-detail-item,
  body.og-shop .pd-qc-lb img.pd-lb-anim,
  body.og-shop .pd-buy-mask.open .pd-buy-row {
    animation: none;
  }

  body.og-shop .pd-thumbs button,
  body.og-shop .pd-swatch,
  body.og-shop .pd-size,
  body.og-shop .pd-num,
  body.og-shop .pd-buy,
  body.og-shop .pd-buy-go,
  body.og-shop .pd-buy-mask,
  body.og-shop .pd-buy-dialog,
  body.og-shop .pd-qc-lb {
    transition: none;
  }
}
