.popular-bouquets {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
  padding-top: 72px;
  padding-bottom: 72px;
  color: var(--text-main);
}

.popular-bouquets__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, .95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.popular-bouquets__intro {
  min-width: 0;
}

.popular-bouquets h2,
.popular-author h2 {
  margin: 0;
  color: var(--green-main);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -.045em;
}

.popular-bouquets h2 {
  max-width: 760px;
  font-size: clamp(40px, 3.5vw, 52px);
  line-height: .98;
}

.popular-bouquets__description {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.45;
}

.popular-bouquets__head-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-bottom: 3px;
}

.popular-bouquets__all,
.popular-bouquets__mobile-cta,
.popular-author__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green-main);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.popular-bouquets__all .icon,
.popular-bouquets__mobile-cta .icon,
.popular-author__link .icon {
  width: 16px;
  height: 16px;
}

.popular-bouquets__controls {
  display: flex;
  gap: 8px;
}

.popular-bouquets__arrow {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: var(--green-main);
  background: #f3f6f5;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.popular-bouquets__arrow--next {
  color: var(--green-main);
  background: #f3f6f5;
  border-color: var(--border-soft);
}

.popular-bouquets__arrow:hover {
  color: #fff;
  background: var(--green-main);
  border-color: var(--green-main);
}

.popular-bouquets__arrow--previous .icon {
  transform: rotate(180deg);
}

.popular-bouquets__arrow .icon {
  width: 15px;
  height: 15px;
}

.popular-bouquets__browse {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  margin-top: 0;
}

.popular-bouquets__categories {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 4px;
  align-items: stretch;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid #edf0ef;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 54, 48, .045);
  scrollbar-width: none;
}

.popular-bouquets__categories::-webkit-scrollbar,
.popular-products::-webkit-scrollbar {
  display: none;
}

.popular-category {
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 82px;
  height: 94px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 5px 7px;
  color: #405057;
  font-size: 12px;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 18px;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.popular-category img {
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  object-fit: cover;
  border: 5px solid #f7eded;
  border-radius: 50%;
  background: #f8f4f3;
}

.popular-category--active {
  color: var(--pink-main);
  background: var(--pink-soft);
  border-color: var(--pink-soft);
}

.popular-category:hover {
  color: var(--green-main);
  border-color: #eef3f1;
  background: #fafcfb;
  transform: translateY(-1px);
}

.popular-category--active:hover {
  color: var(--pink-main);
  border-color: #ffe2e5;
  background: #ffecef;
}

.popular-products {
  display: flex;
  gap: 20px;
  margin: -16px 0;
  padding: 16px 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.popular-products-wrap {
  position: relative;
  margin-top: 24px;
}

.popular-products__empty {
  display: grid;
  min-height: 180px;
  place-content: center;
  gap: 8px;
  width: 100%;
  padding: 28px;
  border: 1px dashed var(--color-border-accent, #e8d9d4);
  border-radius: 18px;
  color: var(--color-text-muted, #68747a);
  background: var(--color-surface-blush, #fff7f6);
  text-align: center;
}

.popular-products__empty strong { color: var(--color-green, #173e33); font-size: 18px; }
.popular-products__empty a { color: var(--color-pink, #c96f7b); font-weight: 600; }

.popular-product {
  position: relative;
  flex: 0 0 calc((100% - 80px) / 5);
  min-width: 0;
  overflow: hidden;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  box-shadow: 0 7px 18px rgba(18, 54, 48, .035);
  transition: transform .18s ease, box-shadow .18s ease;
}

.popular-product__link {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
}

.popular-product__link:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: -3px;
}

.popular-product:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(18, 54, 48, .08);
}

.popular-product__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f8eaea;
}

.popular-product__media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popular-product__tag,
.popular-product__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.popular-product__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  color: var(--pink-main);
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, .94);
  border-radius: 999px;
}

.popular-product__tag--discount {
  color: #fff;
  background: var(--pink-main);
}

.popular-product__tag--new {
  color: #fff;
  background: #36ad6e;
}

.popular-product__tag--popular {
  color: #fff;
  background: #d39a32;
}

.popular-product__tag .icon {
  display: none;
  width: 12px;
  height: 12px;
}

.popular-product__favorite {
  position: absolute;
  top: 11px;
  right: 11px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: var(--text-main);
  background: rgba(255, 255, 255, .95);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.popular-product__favorite,
.popular-product__cart {
  position: relative;
  z-index: 3;
}

.popular-product__favorite .icon {
  width: 19px;
  height: 19px;
}

.popular-product__body {
  position: relative;
  display: flex;
  height: 156px;
  min-height: 156px;
  flex-direction: column;
  padding: 13px 16px 15px;
}

.popular-product__status {
  align-self: flex-start;
  position: absolute;
  z-index: 2;
  top: -5px;
  left: 14px;
  transform: translateY(-100%);
  margin-bottom: 0;
  padding: 4px 8px;
  color: #28755c;
  font-size: 11px;
  background: #eef8f3;
  border-radius: 999px;
}

.popular-product__status i {
  width: 7px;
  height: 7px;
  background: #27b875;
  border-radius: 50%;
}

.popular-product__title {
  display: block;
  min-height: 1.3em;
  margin-top: 0;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.popular-product__description {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.popular-product__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 11px;
}

.popular-product__current-price {
  color: var(--text-main);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

.popular-product__current-price.is-discount { color: var(--pink-main); }

.popular-product__price {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}

.popular-product__price del {
  order: 2;
  width: auto;
  color: #98a1a5;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.popular-product__price .popular-product__current-price { order: 1; }

.popular-product__discount {
  padding: 3px 6px;
  color: var(--pink-main);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  background: var(--pink-soft);
  border-radius: 999px;
}

.popular-product__cart {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  place-items: center;
  color: var(--pink-main);
  background: var(--pink-soft);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .18s ease;
}

.popular-product__cart:hover { background: #ffe0e5; }

.popular-product--unavailable .popular-product__media > img {
  filter: grayscale(.55);
  opacity: .72;
}

.popular-product--unavailable .popular-product__status--unavailable {
  top: auto;
  right: auto;
  bottom: 10px;
  left: 12px;
  color: #7d8788;
  background: #eef1f0;
  transform: none;
}

.popular-product--unavailable .popular-product__status--unavailable i {
  background: #9aa5a3;
}

.popular-product--unavailable .popular-product__current-price {
  color: #7d8788;
}

.popular-product--unavailable .popular-product__cart,
.popular-product--unavailable .popular-product__cart:hover {
  color: #7d8788;
  background: #e1e6e4;
  cursor: not-allowed;
  transform: none;
}

.popular-product__cart .icon {
  width: 19px;
  height: 19px;
}

.popular-bouquets__dots,
.popular-bouquets__mobile-cta {
  display: none;
}

.popular-products-wrap > .popular-bouquets__controls {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -18px;
  left: -18px;
  display: block;
  height: 36px;
  transform: translateY(-50%);
  pointer-events: none;
}

.popular-products-wrap > .popular-bouquets__controls .popular-bouquets__arrow {
  position: absolute;
  top: 0;
}

.popular-products-wrap > .popular-bouquets__controls .popular-bouquets__arrow--previous {
  left: 0;
}

.popular-products-wrap > .popular-bouquets__controls .popular-bouquets__arrow--next {
  right: 0;
}

.popular-products-wrap > .popular-bouquets__controls .popular-bouquets__arrow {
  pointer-events: auto;
}

.popular-bouquets__arrow[hidden] {
  display: none;
}

.home-promo {
  padding-top: 0;
  padding-bottom: 72px;
}

.popular-author {
  position: relative;
  display: block;
  height: 250px;
  overflow: hidden;
  background: #fff3f2;
  border-radius: 22px;
}

.popular-author::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(255, 246, 245, .98) 0%, rgba(255, 246, 245, .94) 27%, rgba(255, 246, 245, .7) 43%, rgba(255, 246, 245, .2) 59%, rgba(255, 246, 245, 0) 75%);
  pointer-events: none;
}

.popular-author__copy {
  position: relative;
  z-index: 2;
  width: 43%;
  height: 100%;
  padding: 27px 30px;
}

.popular-bouquets__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  color: var(--pink-main);
  font-size: 13px;
}

.popular-bouquets__badge .icon {
  width: 16px;
  height: 16px;
}

.popular-author h2 {
  font-size: 31px;
  line-height: 1.02;
}

.popular-author__copy > p:not(.popular-bouquets__badge) {
  max-width: 390px;
  margin: 12px 0 18px;
  color: #718087;
  font-size: 14px;
  line-height: 1.4;
}

.popular-author__link {
  padding: 12px 16px;
  color: #fff;
  background: var(--green-main);
  border-radius: 11px;
}

.popular-author > img {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 1179px) and (min-width: 768px) {
  .popular-bouquets,
  .home-promo {
    width: calc(100% - (var(--page-padding) * 2));
    padding-inline: 0;
  }

  .popular-bouquets__head {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .popular-bouquets__browse {
    max-width: 720px;
  }

  .popular-product {
    flex-basis: calc((100% - 20px) / 2);
  }
}

@media (max-width: 767px) {
  .popular-bouquets {
    width: 100%;
    margin: 0;
    padding: 48px 16px 52px;
  }

  .popular-bouquets__head {
    display: block;
  }

  .popular-bouquets h2 {
    font-size: clamp(30px, 9vw, 36px);
    line-height: 1;
  }

  .popular-bouquets__description {
    margin-top: 12px;
    font-size: 15px;
  }

  .popular-bouquets__head-actions {
    display: none;
  }

  .popular-bouquets__browse {
    justify-content: flex-start;
    margin: 24px -16px 0;
  }

  .popular-bouquets__categories {
    gap: 3px;
    padding: 8px 16px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .popular-category {
    min-width: 78px;
    height: 86px;
    gap: 6px;
    padding: 5px 7px 6px;
    font-size: 12px;
  }

  .popular-category img {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-width: 4px;
  }

  .popular-products {
    gap: 5px;
    margin: 4px 0 -25px;
    padding: 16px 16px 28px;
  }

  .popular-products-wrap {
    margin-top: 20px;
  }

  .popular-products-wrap > .popular-bouquets__controls {
    display: none;
  }

  .popular-product {
    /* Two readable cards fill the viewport; the next pair stays swipeable. */
    flex-basis: calc((100% - 5px) / 2);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(18, 54, 48, .08);
  }

  .popular-product__media {
    aspect-ratio: 1 / 1;
  }

  .popular-product__tag {
    top: 4px;
    left: 4px;
    padding: 5px 10px;
    font-size: 11px;
  }

  .popular-product__favorite {
    top: 4px;
    right: 4px;
    width: 25px;
    height: 25px;
  }

  .popular-product__favorite .icon {
    width: 14px;
    height: 14px;
  }

  .popular-product__body {
    position: relative;
    height: 150px;
    min-height: 150px;
    padding: 8px 12px 8px;
  }

  .popular-product__status {
    position: absolute;
    z-index: 1;
    top: -5px;
    left: 5px;
    transform: translateY(-100%);
    padding: 5px 10px;
    color: #15955f;
    font-size: 10px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 3px 10px rgba(27, 74, 57, .08);
  }

  .popular-product__status i {
    width: 5px;
    height: 5px;
    top: 1px;
    position: relative;
  }

  .popular-product__title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 1.3em;
    margin-top: 0;
    font-size: 16px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .popular-product__description {
    font-size: 13px;
    line-height: 1.3;
  }

  .popular-product__footer {
    justify-content: center;
    height: 38px;
    min-height: 38px;
    margin-top: auto;
    padding: 0;
    align-items: center;
    border-radius: 9px;
    background: var(--green-main);
    box-shadow: 0 3px 6px rgba(18, 54, 48, .12);
  }

  .popular-product__current-price {
    color: #fff;
    font-size: clamp(16px, 4.5vw, 18px);
    white-space: nowrap;
  }

  .popular-product__price .popular-product__current-price {
    color: #fff;
  }

  .popular-product__price {
    display: grid;
    width: auto;
    max-width: 100%;
    flex: 0 1 auto;
    grid-template-columns: minmax(0, auto) auto;
    align-items: baseline;
    column-gap: 6px;
    white-space: nowrap;
  }

  .popular-product__price .popular-product__current-price {
    grid-column: 1;
    grid-row: 1;
  }

  .popular-product__price del {
    grid-column: 2;
    grid-row: 1;
    order: 2;
    width: auto;
    color: rgba(255, 255, 255, .72);
    font-size: clamp(8px, 2.5vw, 10px);
    white-space: nowrap;
  }

  .popular-product__discount,
  .popular-product__cart {
    display: none;
  }

  .popular-bouquets__dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
  }

  .popular-bouquets__dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    background: #d7dada;
    border: 0;
    border-radius: 50%;
  }

  .popular-bouquets__dots button.is-active {
    width: 18px;
    background: var(--pink-main);
    border-radius: 999px;
  }

  .popular-bouquets__mobile-cta {
    display: flex;
    justify-content: center;
    margin-top: 18px;
    padding: 13px 16px;
    color: var(--pink-main);
    background: var(--pink-soft);
    border: 1px solid #f8dfe2;
    border-radius: 12px;
  }

  .home-promo {
    width: 100%;
    padding: 0 16px 48px;
  }

  .popular-author {
    height: 300px;
  }

  .popular-author__copy {
    width: 100%;
    padding: 24px 22px;
  }

  .popular-author h2 {
    max-width: 330px;
    font-size: 28px;
  }

  .popular-author::after {
    background: linear-gradient(180deg, rgba(255, 246, 245, .98) 0%, rgba(255, 246, 245, .9) 40%, rgba(255, 246, 245, .12) 82%, rgba(255, 246, 245, 0) 100%);
  }

  .popular-author > img {
    object-position: 65% center;
  }
}
