/* Ambient.hr – Proizvod (PDP) redizajn
   - Scopirano na .pdp da ne dira ostale stranice
   - Zadržava postojeće ID-jeve i JS funkcionalnost (bigImage, imagesPreview, price, verzije...)
*/

.pdp {
  --pdp-max: 1160px;
  --pdp-gutter: 18px;
  --pdp-radius: 18px;
  --pdp-radius-sm: 14px;
  --pdp-border: rgba(15, 23, 42, 0.12);
  --pdp-muted: rgba(15, 23, 42, 0.62);
  --pdp-bg: #ffffff;
  --pdp-surface: #ffffff;
  --pdp-soft: rgba(15, 23, 42, 0.04);
  --pdp-shadow: 0 12px 36px rgba(15, 23, 42, 0.10);
  --pdp-shadow-sm: 0 10px 28px rgba(15, 23, 42, 0.08);
  --pdp-focus: rgba(17, 153, 142, 0.32);
  --pdp-accent: #11998e;
  --pdp-accent-2: #0f766e;

  background: transparent;
}

.pdp__container {
  max-width: var(--pdp-max);
  margin: 24px auto 54px;
  padding: 0 var(--pdp-gutter);
}

.pdp__grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 22px;
  align-items: start;
}

.pdp__mediaInner {
  background: var(--pdp-surface);
  border: 1px solid var(--pdp-border);
  border-radius: var(--pdp-radius);
  padding: 16px;
  box-shadow: var(--pdp-shadow-sm);
}

/* Media layout: thumbs left, big image right */
.pdp__mediaInner {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 16px;
}

.pdp__thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 6px;
}

.pdp__thumbs img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(210, 210, 210, 1);
  cursor: pointer;
  background: var(--pdp-soft);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.pdp__thumbs img:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.10);
}

/* Glavna slika + lupa: glavna slika puna širine; povećalo je overlay (ne steže layout) */
.pdp__heroImageOuter {
  min-width: 0;
}

.pdp__heroImage {
  margin: 0;
  border-radius: var(--pdp-radius-sm);
  overflow: hidden;
  background: var(--pdp-soft);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.pdp__heroZoom {
  position: relative;
  display: block;
  line-height: 0;
}

.pdp__heroZoom.pdp__heroZoom--active {
  cursor: crosshair;
}

#bigImage,
.pdp__heroImg {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  vertical-align: top;
}

.pdp__heroLens {
  position: absolute;
  box-sizing: border-box;
  width: 100px;
  height: 100px;
  border: 2px solid rgba(17, 153, 142, 0.95);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.15) inset, 0 8px 24px rgba(15, 23, 42, 0.12);
  pointer-events: none;
  z-index: 2;
}

/* Povećalo: mora biti selektor bez .pdp roditelja — flyout se JS-om stavlja na document.body */
.pdp__heroZoomFlyout {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(180px, 19vw, 320px);
  min-width: 180px;
  aspect-ratio: 1;
  max-height: clamp(180px, 19vw, 320px);
  border-radius: 12px;
  overflow: hidden;
  clip-path: inset(0 round 12px);
  -webkit-clip-path: inset(0 round 12px);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  z-index: 3;
  pointer-events: none;
}

.pdp__heroZoomFlyoutImg {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  max-width: none;
  height: auto;
  display: block;
  pointer-events: none;
  border-radius: inherit;
}

@media (max-width: 980px) {
  .pdp__heroZoomFlyout {
    display: none !important;
  }

  .pdp__heroLens {
    display: none !important;
  }

  .pdp__heroZoom {
    cursor: default;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pdp__heroZoomFlyout,
  .pdp__heroLens {
    display: none !important;
  }

  .pdp__heroZoom {
    cursor: default;
  }
}

/* Buy card */
.pdp__buy {
  position: sticky;
  top: 92px;
}

.pdp__card {
  background: var(--pdp-surface);
  border: 1px solid var(--pdp-border);
  border-radius: var(--pdp-radius);
  padding: 18px;
  box-shadow: var(--pdp-shadow);
}

.pdp__header { margin-bottom: 10px; }

.pdp__kicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--pdp-muted);
}

.pdp__title {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.pdp__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pdp__badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.pdp__propertyChips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pdp__propertyChip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(17, 153, 142, 0.18);
  background: rgba(17, 153, 142, 0.08);
  color: var(--pdp-accent-2);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdp__price { margin-top: 14px; }

.pdp__priceTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.pdp__label {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--pdp-muted);
}

.pdp__priceTop .pdp__label {
  margin-bottom: 0;
}

.pdp__saleMeta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.pdp__saleBadge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 14px 8px;
  border-radius: 18px;
  border: 1px solid rgba(194, 65, 12, 0.30);
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.98), rgba(255, 237, 213, 0.92));
  color: #b45309;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(194, 65, 12, 0.08);
}

.pdp__saleBadgeLabel {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pdp__saleBadgeValue {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.pdp__saleUntil {
  font-size: 12px;
  line-height: 1.1;
  font-weight: 600;
  color: rgba(180, 83, 9, 0.82);
  letter-spacing: 0.01em;
  text-align: center;
}

.pdp__label--sub { margin-top: 10px; }

.pdp__oldPrice {
  margin: 0 0 2px;
  font-size: 16px;
  color: rgba(15, 23, 42, 0.55);
  text-decoration: line-through;
}

.pdp__currentPrice {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.pdp__currentPrice--sub {
  font-size: 22px;
}

.pdp__sleepBenefits {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.pdp__sleepBenefit {
  border-radius: 16px;
  border: 1px solid rgba(17, 153, 142, 0.2);
}

.pdp__sleepBenefit--highlight {
  padding: 14px 16px;
  background:
    linear-gradient(135deg, rgba(17, 153, 142, 0.12), rgba(255, 255, 255, 0.96)),
    #fff;
  box-shadow: 0 10px 24px rgba(17, 153, 142, 0.10);
}

.pdp__sleepBenefitLabel {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--pdp-muted);
}

.pdp__sleepBenefitHero {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--pdp-accent-2);
}

.pdp__sleepBenefitText {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.72);
}

.pdp .min {
  font-size: 12px;
  color: var(--pdp-muted);
  margin-left: 4px;
}

.pdp__divider {
  height: 1px;
  background: rgba(15, 23, 42, 0.10);
  margin: 16px 0;
}

.pdp__dimFilterNote {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: var(--pdp-radius-sm);
  background: rgba(17, 153, 142, 0.08);
  border: 1px solid rgba(17, 153, 142, 0.22);
  font-size: 14px;
  line-height: 1.4;
}

.pdp__dimFilterNoteText {
  color: rgba(15, 23, 42, 0.88);
}

.pdp__dimFilterLink {
  color: var(--pdp-accent);
  font-weight: 600;
  text-decoration: none;
}

.pdp__dimFilterLink:hover {
  text-decoration: underline;
}

/* Options */
.pdp__options label {
  display: block;
  margin: 10px 0 8px;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--pdp-muted);
}

.pdp__options select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  font-size: 15px;
  outline: none;
}

.pdp__options select:focus {
  border-color: rgba(17, 153, 142, 0.6);
  box-shadow: 0 0 0 4px var(--pdp-focus);
}

/* Dimensions + optional brand logo (Hespo širok, Alples kvadrat – isti visinski slot, poravnato s prvim redom) */
.pdp__dimsWrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 24px;
}

.pdp__dims {
  flex: 0 1 auto;
}

.pdp__dims h5 {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.pdp__dims h5:first-child {
  margin-top: 0;
}

.pdp__dims h5 span {
  font-weight: 600;
  color: rgba(15, 23, 42, 0.72);
}

/* Fiksna visina da široki (Hespo) i kvadratni (Alples) logo imaju isti vertikalni prostor */
.pdp__brandLogo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 48px;
  height: 48px;
}

.pdp__brandLogoImg {
  max-width: 140px;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: right center;
  display: block;
}

/* CTA */
.pdp__ctaRow {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.pdp__ctaNote {
  margin: 0;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  color: #355b58;
}

.pdp__ctaNote p {
  margin: 0;
}

.pdp__ctaNote--inline {
  padding: 10px 12px 10px 14px;
  border-left: 3px solid var(--pdp-accent);
  background: rgba(15, 23, 42, 0.035);
  color: #475569;
}

#pdp-cta-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* CTA "Dodaj i vidi ponudu" – isto kao Saznaj više na bamt: proziran, zeleni okvir */
.pdp .btn {
  width: 100%;
  border: 1px solid var(--pdp-accent-2);
  border-radius: 12px;
  padding: 14px 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--pdp-accent-2);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.pdp .btn:hover {
  background-color: rgba(15, 118, 110, 0.08);
  border-color: #0b5f59;
  color: #0b5f59;
  box-shadow: 0 2px 10px rgba(15, 118, 110, 0.15);
  transform: translateY(-1px);
}

.pdp .btn:active {
  transform: translateY(0px);
}

/* "Dodaj još jedan" – outline stil, druga boja (sekundarna akcija) */
.pdp .pdp__cta--addMore {
  background: rgba(30, 64, 175, 0.08);
  color: rgba(30, 58, 138, 0.95);
  border: 1px solid rgba(30, 64, 175, 0.4);
  box-shadow: none;
  font-weight: 700;
}

.pdp .pdp__cta--addMore:hover {
  background: rgba(30, 64, 175, 0.14);
  border-color: rgba(30, 64, 175, 0.55);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.12);
}

/* Trust strip: Dostava, Povrat, Reklamacije, Načini plaćanja, Jamstvo najniže cijene */
.pdp__trustStrip {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 8px;
  font-size: 13px;
}

.pdp__trustStrip--standalone {
  padding: 0;
  border-top: 0;
  justify-content: center;
}

.pdp__trustLink {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(17, 153, 142, 0.05);
  border: 1px solid rgba(17, 153, 142, 0.14);
  color: rgba(11, 95, 89, 0.92);
  text-decoration: none;
  font-weight: 600;
  transition: background .18s ease, border-color .18s ease, color .18s ease, text-decoration 0s;
}

.pdp__trustLink:hover {
  background: rgba(17, 153, 142, 0.10);
  border-color: rgba(17, 153, 142, 0.24);
  color: #0b5f59;
  text-decoration: underline;
}

/* Discount banner */
.pdp__discount {
  margin: 16px 0 0;
  padding: 11px 14px;
  border-radius: var(--pdp-radius);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.94);
  color: rgba(15, 23, 42, 0.72);
  font-size: 14px;
  font-weight: 500;
}

.pdp__discount strong {
  color: rgba(15, 23, 42, 0.88);
  font-weight: 700;
}

/* Description */
.pdp__details {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--pdp-radius);
  border: 1px solid var(--pdp-border);
  background: var(--pdp-surface);
  box-shadow: var(--pdp-shadow-sm);
}

.pdp__details h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.pdp__details--properties {
  margin-top: 18px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 1)),
    var(--pdp-surface);
}

.pdp__details--properties h2 {
  margin-bottom: 14px;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.72);
  font-weight: 700;
}

.pdp__details--description h2 {
  margin-bottom: 14px;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.72);
  font-weight: 700;
}

.pdp__propertyRows {
  display: grid;
  gap: 0;
}

.pdp__propertyRow {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 13px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.pdp__propertyRow:first-child {
  border-top: 0;
  padding-top: 2px;
}

.pdp__propertyName {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--pdp-muted);
  text-transform: none;
}

.pdp__propertyValue {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(15, 23, 42, 0.88);
  font-weight: 500;
}

.pdp__richText {
  color: rgba(15, 23, 42, 0.82);
  line-height: 1.65;
  font-size: 15px;
}

.pdp__richLead {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(15, 23, 42, 0.9);
  font-weight: 500;
}

.pdp__richLead > *:last-child {
  margin-bottom: 0;
}

.pdp__richBody {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.pdp__richBody > *:first-child {
  margin-top: 0;
}

.pdp__richText p { margin: 0 0 10px; }
.pdp__richText ul, .pdp__richText ol { margin: 8px 0 12px 20px; }
.pdp__richText li { margin: 4px 0; }
.pdp__richText img { max-width: 100%; height: auto; border-radius: 12px; }

/* Očekivani rok isporuke (same style as basket) */
.pdp .ct2__eta {
  margin-top: 0;
  font-size: 14px;
  color: #444;
  opacity: 0.9;
}
.pdp .ct2__etaInfo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: #555;
  user-select: none;
}
.pdp .ct2__etaInfo:hover { color: #000; }
.pdp .ct2__etaInfo:focus {
  outline: 2px solid #999;
  outline-offset: 2px;
}

/* Tippy tooltips na PDP – konzistentna veličina */
.pdp .tippy-box {
  max-width: 260px;
  font-size: 13px;
  line-height: 1.35;
  border-radius: 12px;
}

/* Existing delivery tooltip - just make sure it's not awkward */
.pdp .delivery50 {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  background: rgba(15, 23, 42, 0.04);
}

.pdp .delivery50 img { width: 22px; height: 22px; }

/* Responsive */
@media (max-width: 980px) {
  .pdp__grid {
    grid-template-columns: 1fr;
  }

  .pdp__buy {
    position: static;
  }

  .pdp__mediaInner {
    grid-template-columns: 1fr;
  }

  .pdp__thumbs {
    flex-direction: row;
    max-height: none;
    overflow: auto;
    padding-right: 0;
  }

  .pdp__thumbs img {
    width: 78px;
    height: 78px;
    flex: 0 0 auto;
  }
}

@media (max-width: 640px) {
  .pdp__propertyChips {
    gap: 7px;
    margin-top: 10px;
  }

  .pdp__propertyChip {
    padding: 7px 11px;
    font-size: 13px;
  }

  .pdp__propertyRow {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 11px 0;
  }

  .pdp__details--properties h2 {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .pdp__details--description h2 {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .pdp__propertyName {
    font-size: 13px;
  }

  .pdp__propertyValue {
    font-size: 14px;
  }

  .pdp__richBody {
    margin-top: 12px;
    padding-top: 12px;
  }

  .pdp__richLead {
    font-size: 15px;
    line-height: 1.65;
  }

  .pdp__priceTop {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .pdp__saleMeta {
    align-items: center;
  }

  .pdp__saleBadge {
    padding: 8px 12px 7px;
  }

  .pdp__saleBadgeLabel {
    font-size: 11px;
  }

  .pdp__saleBadgeValue {
    font-size: 20px;
  }

  .pdp__saleUntil {
    font-size: 11px;
  }
}

@media (max-width: 520px) {
  .pdp__title { font-size: 22px; }
  .pdp__currentPrice { font-size: 30px; }
  .pdp__container { margin-top: 14px; }
}



/* Ripple FIX: efekt mora biti out-of-flow (absolute) da ne rasteže gumb */
.pdp .pdp__cta.ripple-button{
  position: relative;
  overflow: hidden;
  isolation: isolate; /* drži z-index unutar gumba */
}

.pdp .pdp__cta.ripple-button .ripple-content{
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.pdp .pdp__cta.ripple-button .ripple-effect-layer{
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.pdp .pdp__cta.ripple-button .ripple-effect{
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  pointer-events: none;
  /* boju i opacity možeš po želji */
  background: currentColor;
  opacity: 0.15;
}


