/* 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);
}

.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);
}

#bigImage {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* 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__price { margin-top: 14px; }

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

.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 .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;
}

/* 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 */
.pdp__dims h5 {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
}

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

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

.pdp .btn {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 14px 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--pdp-accent), var(--pdp-accent-2));
  color: #fff;
  box-shadow: 0 14px 28px rgba(17, 153, 142, 0.22);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.pdp .btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 18px 34px rgba(17, 153, 142, 0.25);
}

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

.pdp__badgeLink {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(17, 153, 142, 0.35);
  color: rgba(15, 23, 42, 0.86);
  background: rgba(17, 153, 142, 0.08);
  font-weight: 700;
}

.pdp__badgeLink:hover {
  background: rgba(17, 153, 142, 0.12);
}

/* Discount banner */
.pdp__discount {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--pdp-radius);
  border: 1px solid rgba(17, 153, 142, 0.22);
  background: rgba(17, 153, 142, 0.08);
  color: rgba(15, 23, 42, 0.85);
  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__richText {
  color: rgba(15, 23, 42, 0.82);
  line-height: 1.65;
  font-size: 15px;
}

.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; }

/* 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: 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;
}


