/* OscarShop product detail repair - 2026-10-16.
   Required by urun-detay.php and lavender-product-gallery.php.
   All rules are scoped to the product page; lavender.css stays unchanged. */
.lv-product-page .product-container .lv-product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.lv-product-page .lv-product-layout > .lv-product-visual,
.lv-product-page .lv-product-layout > .lv-product-info,
.lv-product-page .lv-detail-gallery {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.lv-product-page .product-container .lv-product-layout .prod-content.lv-product-summary {
  position: static;
  top: auto;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.lv-product-page .lv-product-summary .prod-title,
.lv-product-page .lv-product-summary .prod-text {
  overflow-wrap: anywhere;
}

/* Size both the stage and the image: the HTML image is 1000 x 1000. */
.lv-product-page .lv-detail-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--lv-border-soft, #ede3e9);
  border-radius: 12px;
  background: var(--lv-cream, #faf7f4);
  touch-action: pan-y;
}

.lv-product-page .lv-detail-open {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--lv-plum, #612542);
  cursor: zoom-in;
  -webkit-user-drag: none;
}

.lv-product-page .lv-detail-open > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.lv-product-page .lv-detail-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--lv-border-soft, #ede3e9);
  border-radius: 20px;
  background: #fffffff0;
  color: var(--lv-plum, #612542);
  font-size: 16px;
  line-height: 1.25;
  pointer-events: none;
}

.lv-product-page .lv-photo-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--lv-border, #e4d2dc);
  border-radius: 50%;
  background: #fffffff0;
  color: var(--lv-plum, #612542);
  font-size: 18px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.lv-product-page .lv-photo-prev { left: 12px; }
.lv-product-page .lv-photo-next { right: 12px; }

.lv-product-page .lv-photo-arrow:hover {
  border-color: var(--lv-plum, #612542);
  background: var(--lv-plum, #612542);
  color: #fff;
}

.lv-product-page .lv-detail-thumbs {
  display: flex;
  gap: 10px;
  max-width: 100%;
  margin-top: 12px;
  padding: 3px 3px 9px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.lv-product-page .lv-detail-thumbs[hidden] { display: none; }

.lv-product-page .lv-detail-thumb {
  display: block;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 2px solid var(--lv-border-soft, #ede3e9);
  border-radius: 8px;
  background: #fff;
}

.lv-product-page .lv-detail-thumb[aria-current="true"] {
  border-color: var(--lv-plum, #612542);
}

.lv-product-page .lv-detail-thumb > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lv-product-page .product-container .lv-product-layout .prod-prince {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lv-product-page .product-container .lv-product-layout .prod-prince .coin {
  background: var(--lv-lilac, #f2e7ed);
  color: var(--lv-plum, #612542);
}

.lv-product-page .product-container .lv-product-layout .prod-prince .coin2 {
  background: var(--lv-plum, #612542);
  color: #fff;
}

.lv-product-page .product-container .lv-product-layout .prod-prince .n-coin2 {
  color: var(--lv-gold-text, #80571e);
}

.lv-product-page .product-container .lv-product-layout .prod-box .btn-box {
  border-color: var(--lv-plum, #612542);
  color: var(--lv-plum, #612542);
}

.lv-product-page .product-container .lv-product-layout .prod-box .btn-box:hover,
.lv-product-page .product-container .lv-product-layout .prod-box .btn-box:focus-visible {
  border-color: var(--lv-plum, #612542);
  background: var(--lv-plum, #612542);
  color: #fff;
}

.lv-product-page .product-container .lv-product-layout .lv-detail-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lv-product-page .lv-detail-share > form {
  display: flex;
  flex: 0 0 auto;
  margin: 0;
}

.lv-product-page .lv-detail-share > .btn,
.lv-product-page .lv-detail-share > form > .btn {
  flex: 0 0 40px;
  margin: 0;
}

/* The existing JS moves this Bootstrap modal directly under body. */
.lv-product-page .lv-lightbox .modal-dialog {
  width: calc(100% - 32px);
  max-width: 1100px;
  min-height: calc(100% - 32px);
  margin: 16px auto;
}

.lv-product-page .lv-lightbox .modal-content {
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  color: var(--lv-ink, #30232b);
}

.lv-product-page .lv-lightbox-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--lv-border-soft, #ede3e9);
}

.lv-product-page #lv-lightbox-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--lv-plum, #612542);
  font-size: 20px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lv-product-page .lv-lightbox-count {
  color: var(--lv-muted, #71636c);
  font-size: 16px;
  white-space: nowrap;
}

.lv-product-page .lv-lightbox-close {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--lv-border-soft, #ede3e9);
  border-radius: 50%;
  background: var(--lv-cream, #faf7f4);
  color: var(--lv-plum, #612542);
  font-size: 18px;
  cursor: pointer;
}

.lv-product-page .lv-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: min(72vh, 800px);
  height: min(72dvh, 800px);
  min-height: 0;
  background: var(--lv-cream, #faf7f4);
  touch-action: pan-y;
}

.lv-product-page .lv-lightbox-stage > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.lv-product-page .lv-lightbox-stage > [hidden] { display: none; }

.lv-product-page .lv-lightbox-error {
  padding: 24px 60px;
  font-size: 18px;
  line-height: 1.4;
  text-align: center;
}

.lv-product-page .lv-lightbox-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--lv-border-soft, #ede3e9);
  color: var(--lv-muted, #71636c);
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
}

.lv-product-page .lv-detail-open:focus-visible,
.lv-product-page .lv-detail-thumb:focus-visible,
.lv-product-page .lv-photo-arrow:focus-visible,
.lv-product-page .lv-lightbox-close:focus-visible,
.lv-product-page .lv-product-summary .btn-box:focus-visible {
  outline: 2px solid var(--lv-focus, #a8752b);
  outline-offset: 3px;
}

@media (min-width: 992px) {
  .lv-product-page .product-container .lv-product-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 4vw, 56px);
  }
}

@media (max-width: 575.98px) {
  .lv-product-page .lv-detail-hint {
    right: 10px;
    bottom: 10px;
    padding: 6px 10px;
    font-size: 14px;
  }

  .lv-product-page .lv-lightbox .modal-dialog {
    width: calc(100% - 16px);
    min-height: calc(100% - 16px);
    margin: 8px auto;
  }

  .lv-product-page .lv-lightbox-header {
    gap: 8px;
    padding: 10px;
  }

  .lv-product-page #lv-lightbox-title { font-size: 18px; }
  .lv-product-page .lv-lightbox-footer { font-size: 14px; }
}
