/* Ürün detayı. Ortak kart, seçim ve teslimat stillerini kullanır. */

.pdp-page {
  padding-top: 0.75rem;
  padding-bottom: 1.5rem;
}

body#urun {
  scroll-padding-top: var(--header-sticky);
}

#icerik {
  scroll-margin-top: var(--header-sticky);
}

.pdp {
  display: grid;
  gap: 22px;
  align-items: start;
}

.pdp-gallery {
  min-width: 0;
}

.pdp-stage {
  position: relative;
  background: #f3ece4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  height: clamp(11rem, 38svh, 22rem);
}

.pdp-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pdp-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.pdp-thumbs button {
  flex: 0 0 clamp(4.25rem, 18vw, 5.25rem);
  width: clamp(4.25rem, 18vw, 5.25rem);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f3ece4;
  min-height: 4.25rem;
}

.pdp-thumbs button.is-selected {
  border-color: var(--cocoa-700);
  box-shadow: inset 0 0 0 1px var(--cocoa-700);
}

.pdp-thumbs img {
  width: 100%;
  height: 3.6rem;
  object-fit: contain;
}

.pdp-buy {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.pdp-buy h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.pdp-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.pdp-price {
  margin: 0;
  font-weight: 750;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  color: var(--cocoa-900);
}

.pdp-blurb {
  color: var(--muted);
}

.pdp-sample {
  font-size: 0.78rem;
  color: var(--gold-600);
  font-weight: 700;
}

.pdp-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}

.pdp-actions form {
  display: flex;
  min-width: 0;
  margin: 0;
}

.pdp-actions .btn {
  width: 100%;
}

.pdp-buy .btn--gold {
  background: var(--gold-500);
  color: var(--cocoa-950);
  border: 1px solid var(--gold-600);
}

.pdp-buy .btn--gold:hover {
  background: var(--gold-400);
  color: var(--cocoa-950);
}

.pdp-actions__total {
  display: none;
  grid-column: 1 / -1;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
  color: var(--cocoa-800);
  font-size: 0.82rem;
  font-weight: 700;
}

.pdp-actions__total strong {
  font-size: 1.15rem;
  color: var(--cocoa-900);
}

.pdp-buy .choice strong,
.pdp-buy .choice small {
  overflow-wrap: anywhere;
}

.pdp-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pdp-tools .qty button {
  width: 44px;
  height: 44px;
}

.pdp-fav {
  border: 1px solid #e4d8c8;
  background: var(--white);
  border-radius: 12px;
  min-height: 44px;
  padding: 0 14px;
  font-weight: 700;
  color: var(--cocoa-800);
}

.pdp-delivery h2 {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 1rem;
}

.pdp-delivery .region-form {
  grid-template-columns: 1fr;
}

.pdp-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.pdp-block {
  margin-top: 36px;
}

.pdp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pdp-tabs button {
  border: 1px solid #e4d8c8;
  background: var(--white);
  border-radius: var(--radius-pill);
  min-height: 44px;
  padding: 0 14px;
  font-weight: 700;
  color: var(--cocoa-800);
  white-space: normal;
  text-align: center;
}

.pdp-tabs button.is-selected {
  background: var(--cocoa-800);
  color: var(--white);
  border-color: var(--cocoa-800);
}

.pdp-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  display: grid;
  gap: 8px;
}

.pdp-reviews {
  display: grid;
  gap: 12px;
}

.pdp-review {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.pdp-review:first-child {
  border-top: 0;
  padding-top: 0;
}

.pdp-offer {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.pdp-missing {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
}

@media (min-width: 900px) {
  .pdp-page {
    padding-top: 1rem;
  }

  .pdp-stage {
    aspect-ratio: 1;
    height: auto;
    max-height: min(68vh, 36rem);
  }

  .pdp {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    gap: 36px;
  }

  .pdp-delivery .region-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  body#urun {
    padding-bottom: var(--pdp-bar, 7.75rem);
    scroll-padding-bottom: calc(var(--pdp-bar, 7.75rem) + 12px);
  }

  .pdp-page {
    padding-top: 0.5rem;
    padding-bottom: 1rem;
  }

  .pdp-stage {
    height: clamp(9rem, 22svh, 12.5rem);
  }

  .pdp-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-buybar);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--cream-50);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 28px rgba(40, 26, 17, 0.08);
  }

  .pdp-actions__total {
    display: flex;
  }

  .pdp-actions .btn {
    min-height: 48px;
    padding: 0 8px;
    font-size: 0.86rem;
  }

  .pdp-buy .choice,
  .pdp-buy select,
  .pdp-buy .qty,
  .pdp-fav,
  .pdp-thumbs button {
    scroll-margin-top: 12px;
    scroll-margin-bottom: calc(var(--pdp-bar, 7.75rem) + 24px);
  }

  body#urun .footer-bottom {
    padding-bottom: 18px;
  }

  body#urun .support-toggle {
    width: 44px;
    height: 44px;
    right: 12px;
    bottom: calc(var(--pdp-bar) + 10px);
  }

  body#urun .support-toggle svg {
    width: 22px;
    height: 22px;
  }

  body#urun .support-menu:not([hidden]) {
    right: 12px;
    bottom: calc(var(--pdp-bar) + 62px);
    width: min(240px, calc(100vw - 24px));
    max-height: calc(100dvh - var(--pdp-bar) - 84px);
  }

  body#urun .assistant-panel {
    bottom: calc(var(--pdp-bar) + 10px);
    max-height: calc(100dvh - var(--pdp-bar) - 24px);
  }

  body#urun.is-keyboard .pdp-actions,
  body#urun.is-keyboard .support-toggle,
  body#urun.is-keyboard .support-menu {
    transform: translateY(calc(100% + var(--pdp-bar)));
    pointer-events: none;
  }
}

.pdp-zoom-hit {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.pdp-zoom-hint {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 252, 248, 0.94);
  color: var(--cocoa-900);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(40, 26, 17, 0.12);
}

.pdp-zoom-hint svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

body.is-lightbox {
  overflow: hidden;
}

body.is-lightbox .pdp-actions,
body.is-lightbox .support-toggle,
body.is-lightbox .support-menu,
body.is-lightbox .assistant-fab,
body.is-lightbox .whatsapp-fab,
body.is-lightbox .assistant-panel {
  visibility: hidden;
  pointer-events: none;
}

.pdp-lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(28, 16, 10, 0.92);
  color: var(--white);
  overflow: hidden;
}

.pdp-lightbox::backdrop {
  background: rgba(28, 16, 10, 0.9);
}

.pdp-lightbox[open] {
  display: block;
}

.pdp-lightbox__stage {
  position: absolute;
  inset: 56px 76px 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
}

.pdp-lightbox__stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  user-select: none;
  touch-action: none;
}

.pdp-lightbox__close,
.pdp-lightbox__nav {
  position: absolute;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--cream-50);
  color: var(--cocoa-900);
  font-size: 1.7rem;
  line-height: 1;
}

.pdp-lightbox__close {
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
}

.pdp-lightbox__nav {
  top: 50%;
  margin-top: -22px;
}

.pdp-lightbox__nav--prev { left: 12px; }
.pdp-lightbox__nav--next { right: 12px; }

.pdp-lightbox__count {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.pdp-ship,
.pdp-personal {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
}

.pdp-ship h2,
.pdp-personal h2,
.pdp-rail h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
}

.pdp-ship label,
.pdp-personal p,
.pdp-addon {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cocoa-800);
}

.pdp-addon {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.pdp-addon input {
  width: 18px;
  height: 18px;
}

.design-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.design-strip__nav {
  width: 32px;
  height: 32px;
  border: 1px solid var(--gold-400, #c4a265);
  border-radius: 50%;
  background: #fff;
  color: var(--cocoa-800);
  font-size: 1.2rem;
  line-height: 1;
}

.design-gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
}

.design-card {
  position: relative;
  flex: 0 0 7.25rem;
  width: 7.25rem;
  height: 7.25rem;
  scroll-snap-align: start;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
}

.design-card.is-selected {
  border-color: var(--gold-500, #c4a265);
  box-shadow: inset 0 0 0 1px var(--cocoa-800);
}

.design-card__zoom {
  display: block;
  width: 100%;
  height: 100%;
  padding: 4px;
  border: 0;
  border-radius: inherit;
  background: transparent;
}

.design-card__zoom img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.design-card__pick {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: 1px solid var(--gold-500, #c4a265);
  border-radius: 50%;
  background: #fff;
  color: transparent;
  font-size: 12px;
  line-height: 20px;
}

.design-card__pick[aria-pressed="true"] {
  background: var(--cocoa-800);
  border-color: var(--cocoa-800);
  color: #fff;
}

.design-modal {
  width: min(92vw, 36rem);
  max-height: min(92dvh, 44rem);
  margin: auto;
  padding: 16px 16px 18px;
  border: 0;
  border-radius: 16px;
  background: var(--cream-50, #fffaf4);
  color: var(--cocoa-900);
}

.design-modal::backdrop {
  background: rgba(28, 16, 10, 0.72);
}

.design-modal[open] {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.design-modal img {
  width: min(100%, 32rem);
  max-height: min(70dvh, 32rem);
  object-fit: contain;
  background: #fff;
}

.design-modal__close {
  justify-self: end;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--cocoa-800);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
}

@media (min-width: 768px) {
  .design-card {
    flex-basis: 8.25rem;
    width: 8.25rem;
    height: 8.25rem;
  }
}

@media (max-width: 767px) {
  .design-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .design-strip__nav {
    display: none;
  }
}

.design-field {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 700;
}

.design-field input,
.design-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream-50, #fffaf4);
  font: inherit;
  font-weight: 600;
}

.design-preview {
  margin: 0;
}

.design-preview img {
  width: min(100%, 22rem);
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.design-preview figcaption {
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cocoa-700);
}

.pdp-ship input,
.pdp-ship select,
.pdp-panel textarea,
.pdp-panel select {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream-50, #fffaf4);
  font: inherit;
  font-weight: 600;
}

.pdp-ship .is-ok { color: #2f6b45; }
.pdp-ship .is-wait { color: var(--cocoa-800); }

.pdp-rail {
  margin-top: 36px;
}

.pdp-rail .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

@media (min-width: 900px) {
  .pdp-ship {
    grid-template-columns: 1fr 1fr;
  }

  .pdp-ship h2,
  .pdp-ship .is-ok,
  .pdp-ship .is-wait,
  .pdp-ship .btn,
  .pdp-ship .pdp-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .pdp-lightbox__stage {
    inset: calc(52px + env(safe-area-inset-top, 0px)) 8px calc(44px + env(safe-area-inset-bottom, 0px));
  }

  .pdp-lightbox__nav--prev { left: 8px; }
  .pdp-lightbox__nav--next { right: 8px; }
}
