.online-shop-section {
  width: 100%;
  padding: clamp(50px, 5.4vw, 56px) 24px 30px;
  background-color: var(--color-sand);
  color: var(--color-wine-dusty);
}

.online-shop-section__inner {
  position: relative;
  width: min(100%, 990px);
  margin: 0 auto;
}

.online-shop-section__header {
  margin-bottom: 40px;
  text-align: center;
}

.online-shop-section__title {
  margin: 0 0 8px;
  color: var(--color-wine-dusty);
  font-family: var(--font-display);
  font-size: clamp(32px, 3.2vw, 39px);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.online-shop-section__subtitle {
  margin: 0 auto;
  max-width: 720px;
  color: var(--color-wine-dusty);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.65vw, 19px);
  font-weight: 400;
  line-height: 1.22;
}

.online-shop-section__carousel {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 22px;
}

.online-shop-section__grid {
  --carousel-gap: 68px;
  --cards-per-view: 3;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--carousel-gap) * (var(--cards-per-view) - 1))) / var(--cards-per-view));
  gap: var(--carousel-gap);
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.online-shop-section__grid::-webkit-scrollbar {
  display: none;
}

.online-shop-section__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 84px;
  padding: 0;
  border: 0;
  background-color: var(--color-sand);
  cursor: pointer;
}

.online-shop-section__arrow img {
  display: block;
  width: auto;
  height: 61px;
  transition: filter 220ms ease, transform 220ms ease;
}

.online-shop-section__arrow:hover img,
.online-shop-section__arrow:focus-visible img {
  filter: contrast(1.12);
  transform: scale(1.04);
}

.online-shop-section__arrow:focus-visible {
  outline: 2px solid var(--color-wine-dusty);
  outline-offset: 6px;
}

.online-product-card {
  overflow: hidden;
  border-radius: 18px;
  background-color: var(--color-white);
  box-shadow: 0 18px 40px rgba(86, 3, 3, 0.10);
  scroll-snap-align: start;
}

.online-product-card__media {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

.online-product-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 233 / 139;
  object-fit: cover;
  transition: filter 320ms ease, transform 320ms ease;
  transform-origin: center;
}

.online-product-card--zoom-active .online-product-card__image {
  filter: brightness(1.02) saturate(1.02);
}

.online-product-card__zoom {
  position: absolute;
  left: var(--zoom-x, 50%);
  top: var(--zoom-y, 50%);
  width: 104px;
  height: 104px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  background-image: var(--zoom-image);
  background-position: var(--zoom-bg-x, 50%) var(--zoom-bg-y, 50%);
  background-repeat: no-repeat;
  background-size: var(--zoom-bg-size, 220%);
  box-shadow: 0 12px 28px rgba(86, 3, 3, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 180ms ease, transform 180ms ease;
}

.online-product-card--zoom-active .online-product-card__zoom {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.online-product-card__body {
  padding: 16px 16px 18px;
}

.online-product-card__title,
.online-product-card__price {
  display: block;
  height: auto;
}

.online-product-card__title {
  width: 185px;
  max-width: 100%;
  margin-bottom: 8px;
}

.online-product-card__purchase {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.online-product-card__price {
  width: 62px;
  max-width: 42%;
  filter: drop-shadow(0 2px 3px rgba(86, 3, 3, 0.28));
}

.online-product-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 86px;
  height: 28px;
  border: 0;
  border-radius: 24px;
  background: var(--color-shop-orange);
  color: var(--color-white);
  cursor: pointer;
  font: 700 12px/1 "Lato", Arial, sans-serif;
  transition: filter 220ms ease, transform 220ms ease;
}

.online-product-card__button:hover,
.online-product-card__button:focus-visible {
  background: var(--color-shop-orange-hover);
  box-shadow: 0 7px 14px rgba(86, 3, 3, 0.22);
  filter: brightness(1.07) saturate(1.08);
  transform: translateY(-2px) scale(1.04);
}

.online-product-card__button:focus-visible {
  outline: 2px solid var(--color-wine-dusty);
  outline-offset: 4px;
}

.online-shop-section__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  margin: 43px auto 0;
  gap: 13px;
}

.online-shop-section__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background-color: var(--color-shop-dot);
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.online-shop-section__dot--active {
  width: 14px;
  height: 14px;
}

.online-shop-section__dot:hover,
.online-shop-section__dot:focus-visible {
  background-color: var(--color-shop-dot-hover);
  transform: scale(1.18);
}

.online-shop-section__dot:focus-visible {
  outline: 2px solid var(--color-wine-dusty);
  outline-offset: 4px;
}

@media (max-width: 860px) {
  .online-shop-section__carousel {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 12px;
  }

  .online-shop-section__arrow {
    width: 34px;
    height: 46px;
  }

  .online-shop-section__arrow img {
    height: 30px;
  }

  .online-shop-section__grid {
    --carousel-gap: 28px;
    --cards-per-view: 2;
  }
}

@media (max-width: 560px) {
  .online-shop-section {
    padding: 42px 20px 30px;
  }

  .online-shop-section__subtitle br {
    display: none;
  }

  .online-shop-section__grid {
    --cards-per-view: 1;
  }
}
