/* Product detail — Style It With / Discover More / Recently Viewed */

.pdp-page {
  background: #fff;
}

.pdp-wrap {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto 4rem;
}

.pdp-extras {
  margin-top: 3rem;
  padding-top: 0.5rem;
}

.pdp-section {
  margin: 0 0 3rem;
}

.pdp-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.15rem;
}

.pdp-section-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111;
}

.pdp-clear {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: #111;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.pdp-rail-wrap {
  position: relative;
}

.pdp-rail {
  display: flex;
  gap: 1.15rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.pdp-rail-btn {
  position: absolute;
  top: 28%;
  right: -0.25rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  background: #fff;
  color: #111;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pdp-rail-btn[hidden] {
  display: none;
}

.pdp-rail-btn svg {
  width: 16px;
  height: 16px;
}

/* Wishlist hearts */
.wish-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  flex: 0 0 auto;
}

.wish-btn svg {
  width: 18px;
  height: 18px;
}

.wish-btn.is-on svg {
  fill: #111;
}

.wish-btn--bag {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  background: #fff;
}

.wish-btn--bag svg {
  width: 20px;
  height: 20px;
}

.wish-btn--overlay {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  z-index: 2;
}

.pdp-bag-row {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  margin: 0.85rem 0 0.75rem;
  position: static;
  background: none;
  padding: 0;
}

.pdp-add-bag {
  flex: 1 1 auto;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: #111;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: max(16px, var(--fs-md));
  letter-spacing: 0.04em;
  text-transform: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.pdp-add-bag:hover {
  background: #000;
}

.pdp-delivery {
  margin: 0 0 1.25rem;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #111;
  line-height: 1.45;
}

.pdp-rec-wrap {
  flex: 0 0 auto;
  width: min(220px, 42vw);
  scroll-snap-align: start;
}

.pdp-rec-card {
  display: block;
  text-decoration: none;
  color: #111;
}

.pdp-rec-meta {
  margin-top: 0.55rem;
}

.pdp-rec-row {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.pdp-rec-title {
  flex: 1 1 auto;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: #111;
  text-decoration: none;
}

.pdp-recent-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
}

.pdp-recent-card {
  display: block;
  text-decoration: none;
  color: #111;
}

.pdp-rec-media {
  aspect-ratio: 3 / 4;
  background: #eceae6 center / cover no-repeat;
  margin-bottom: 0.65rem;
}

.pdp-rec-sub {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  line-height: 1.35;
  color: #333;
  margin: 0 0 0.35rem;
  min-height: 2.4em;
}

.pdp-rec-price {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: 700;
}

.pdp-discover-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pdp-tag {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.95rem;
  border: 1px solid rgba(0, 0, 0, 0.22);
  background: #fff;
  color: #111;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
}

.pdp-tag:hover {
  border-color: #111;
}

.pdp-recent-rail {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.pdp-recent-card {
  flex: 0 0 auto;
  width: 112px;
  text-decoration: none;
  color: #111;
}

.pdp-recent-media {
  aspect-ratio: 3 / 4;
  background: #eceae6 center / cover no-repeat;
  margin-bottom: 0.4rem;
}

.pdp-recent-price {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.pdp-empty-note {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  color: #666;
  margin: 0;
}

.pdp-top {
  position: fixed;
  right: 1.1rem;
  bottom: 5.5rem;
  z-index: 40;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #111;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.pdp-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.pdp-top svg {
  width: 18px;
  height: 18px;
}

.plp-wish.is-on svg {
  fill: #111;
}

@media (max-width: 760px) {
  .pdp-wrap {
    width: min(100% - 1.15rem, 1280px);
    margin-bottom: 5.5rem;
  }

  .pdp-rec-wrap {
    width: min(160px, 48vw);
  }

  .pdp-rail-btn {
    display: none;
  }

  .pdp-top {
    bottom: calc(var(--bottom-nav-core, 58px) + var(--safe-bottom, 0px) + 5.25rem);
    right: max(0.85rem, env(safe-area-inset-right, 0px));
  }

  /* Sticky Add to Bag above iPhone home bar + app bottom nav */
  .pdp-bag-row {
    position: sticky;
    bottom: calc(var(--bottom-nav-core, 58px) + env(safe-area-inset-bottom, 0px) + 0.35rem);
    z-index: 35;
    margin: 0.85rem -0.35rem 0.35rem;
    padding: 0.55rem 0.35rem;
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }

  .pdp-add-bag {
    min-height: 50px;
    font-size: 16px;
  }

  .wish-btn--bag {
    width: 50px;
    height: 50px;
    min-width: 50px;
  }

  .pdp-section-title {
    font-size: 0.9rem;
  }
}
