/* Best prices block under home banner */

.ld-best-prices{
  position:relative;
  padding-top:clamp(28px, 4vw, 48px);
  padding-bottom:clamp(36px, 5vw, 64px);
  overflow:hidden;
}

.ld-best-prices::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(var(--brand-rgb, 110, 24, 162), .12), transparent 60%),
    radial-gradient(700px 360px at 92% 0%, rgba(var(--accent-rgb, 183, 184, 234), .28), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.2), transparent 40%);
}

.ld-best-prices .container{
  position:relative;
  z-index:1;
}

.ld-best-prices__head{
  max-width:720px;
  margin-bottom:clamp(18px, 3vw, 28px);
}

.ld-best-prices__track{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
}

.ld-best-prices__card{
  position:relative;
  display:flex;
  flex-direction:column;
  min-height:100%;
  padding:20px 18px 18px;
  border-radius:22px;
  border:1px solid rgba(var(--accent-rgb, 183, 184, 234), .45);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(var(--accent-rgb, 183, 184, 234), .12)),
    #fff;
  box-shadow:0 14px 36px rgba(21, 27, 48, .06);
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  overflow:hidden;
  isolation:isolate;
}

.ld-best-prices__save-ghost{
  position:absolute;
  right:5%;
  /* Над блоком кнопок: одна кнопка ~3.5rem + отступ; две кнопки задаём отдельно */
  bottom:4.75rem;
  z-index:0;
  margin:0;
  padding:0;
  border:0;
  pointer-events:none;
  user-select:none;
  font-size:clamp(42px, 5.2vw, 64px);
  font-weight:var(--fw-semibold, 600);
  line-height:1;
  letter-spacing:-.04em;
  white-space:nowrap;
  color:rgb(133 133 133 / 9%);
  transform:rotate(0deg);
}

.ld-best-prices__card:has(.btn-outline) .ld-best-prices__save-ghost{
  bottom:7.25rem;
}

.ld-best-prices__task,
.ld-best-prices__title,
.ld-best-prices__meta,
.ld-best-prices__price-row,
.ld-best-prices__actions{
  position:relative;
  z-index:1;
}

.ld-best-prices__card--featured .ld-best-prices__save-ghost{
  color:rgb(110 24 162 / 10%);
  font-size:clamp(48px, 5.8vw, 72px);
}

.ld-best-prices__card::before{
  content:"";
  position:absolute;
  inset:0 auto auto 0;
  width:100%;
  height:3px;
  background:linear-gradient(90deg, var(--accent, #b7b8ea), var(--brand, #6e18a2), #d32973);
  opacity:.85;
}

.ld-best-prices__card:hover{
  transform:translateY(-3px);
  border-color:rgba(var(--brand-rgb, 110, 24, 162), .32);
  box-shadow:0 18px 42px rgba(110, 24, 162, .12);
}

.ld-best-prices__card--featured{
  grid-column:span 1;
  background:
    linear-gradient(145deg, rgba(var(--brand-rgb, 110, 24, 162), .12), rgba(var(--accent-rgb, 183, 184, 234), .22) 45%, rgba(211, 41, 115, .08)),
    #fff;
  border-color:rgba(var(--brand-rgb, 110, 24, 162), .35);
  box-shadow:0 18px 44px rgba(110, 24, 162, .14);
}

.ld-best-prices__card--featured .ld-best-prices__title{
  font-size:clamp(18px, 1.6vw, 22px);
}

.ld-best-prices__card > .ld-best-prices__badge{
  position:absolute;
  top:14px;
  right:14px;
  left:auto;
  z-index:2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:auto;
  min-width:54px;
  max-width:none;
  margin:0;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:var(--fw-semibold, 600);
  letter-spacing:.02em;
  color:#fff;
  background:linear-gradient(135deg, var(--brand, #6e18a2), #9b26a8 55%, #d32973);
  box-shadow:0 8px 18px rgba(110, 24, 162, .28);
}

.ld-best-prices__task{
  margin:0 72px 10px 0;
  padding-right:0;
  font-size:12px;
  font-weight:var(--fw-medium, 500);
  letter-spacing:.04em;
  text-transform:uppercase;
  line-height:1.35;
  color:var(--brand, #6e18a2);
  overflow-wrap:anywhere;
}

.ld-best-prices__title{
  margin:0 0 6px;
  font-size:clamp(16px, 1.35vw, 19px);
  line-height:1.25;
  letter-spacing:-.015em;
  color:var(--black, #151b30);
}

.ld-best-prices__meta{
  margin:0 0 16px;
  font-size:13px;
  line-height:1.4;
  color:var(--gray-600, #667085);
}

.ld-best-prices__price-row{
  margin-top:auto;
  display:grid;
  gap:8px;
  padding-top:4px;
}

.ld-best-prices__price{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:8px 12px;
}

.ld-best-prices__price-now{
  font-size:clamp(22px, 2vw, 28px);
  font-weight:var(--fw-semibold, 600);
  line-height:1;
  letter-spacing:-.02em;
  color:var(--black, #151b30);
}

.ld-best-prices__price-old{
  font-size:14px;
  color:var(--gray-600, #667085);
}

.ld-best-prices__price-old s{
  text-decoration-thickness:1.5px;
  text-decoration-color:rgba(21, 27, 48, .35);
}

.ld-best-prices__actions{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  margin-top:16px;
}

.ld-best-prices__actions .btn{
  width:100%;
  justify-content:center;
}

.ld-best-prices__actions .btn-primary{
  box-shadow:0 10px 24px rgba(var(--brand-rgb, 110, 24, 162), .22);
}

/* Стрелки как у других каруселей — только на мобиле (на десктопе сетка) */
.ld-best-prices__nav{
  display:none;
}

@media (min-width: 900px){
  .ld-best-prices__card--featured{
    grid-column:span 1;
  }

  .ld-best-prices__actions{
    grid-template-columns:1.2fr .9fr;
  }

  .ld-best-prices__actions .btn-outline:only-of-type,
  .ld-best-prices__card:not(:has(.btn-outline)) .ld-best-prices__actions{
    grid-template-columns:1fr;
  }

  /* На десктопе кнопки в ряд — высота actions меньше */
  .ld-best-prices__card:has(.btn-outline) .ld-best-prices__save-ghost{
    bottom:4.75rem;
  }
}

@media (max-width: 1024px){
  .ld-best-prices__track{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  .ld-best-prices{
    padding-top:22px;
    padding-bottom:28px;
  }

  .ld-best-prices__head{
    margin-bottom:14px;
    padding-right:8px;
  }

  .ld-best-prices__track{
    display:flex;
    gap:12px;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scroll-snap-type:x mandatory;
    scroll-padding-inline:16px;
    padding:4px 2px 10px;
    margin-inline:-4px;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }

  .ld-best-prices__track::-webkit-scrollbar{
    display:none;
  }

  .ld-best-prices__card{
    flex:0 0 min(82vw, 320px);
    scroll-snap-align:start;
    min-height:auto;
    box-shadow:none;
  }

  .ld-best-prices__card:hover,
  .ld-best-prices__card--featured{
    box-shadow:none;
  }

  .ld-best-prices__card--featured{
    flex-basis:min(88vw, 340px);
  }

  .ld-best-prices__actions{
    grid-template-columns:1fr;
  }

  .ld-best-prices__save-ghost{
    right:4%;
    font-size:clamp(40px, 12vw, 56px);
  }

  .ld-best-prices__card:has(.btn-outline) .ld-best-prices__save-ghost{
    bottom:7.5rem;
  }

  .ld-best-prices__card:not(:has(.btn-outline)) .ld-best-prices__save-ghost{
    bottom:4.5rem;
  }

  .ld-best-prices__nav{
    display:flex;
    margin-top:12px;
  }
}
