.rec-overlay,
.rec-overlay * {
  box-sizing: border-box;
}

body.rec-overlay-open {
  overflow: hidden;
}

.rec-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.rec-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rec-overlay__empty {
  margin: 0;
  padding: 28px 0;
  text-align: center;
  color: #5d7182;
}

.rec-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 21, 35, 0.58);
  backdrop-filter: blur(4px);
}

.rec-panel {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100vw - 24px));
  max-height: min(94dvh, 980px);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(11, 43, 67, 0.08);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(242, 247, 251, 0.96) 0%, rgba(255, 255, 255, 0.99) 28%, #ffffff 100%);
  box-shadow: 0 28px 80px rgba(4, 24, 39, 0.26);
  overflow-x: hidden;
  overflow-y: auto;
  transform: translateY(16px) scale(0.985);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.rec-overlay.active .rec-panel {
  transform: translateY(0) scale(1);
}

.rec-overlay.rec-overlay--compact .rec-panel {
  width: min(900px, calc(100vw - 24px));
}

.rec-handle {
  display: none;
  width: 52px;
  height: 5px;
  margin: 0 auto -6px;
  border-radius: 999px;
  background: rgba(11, 43, 67, 0.14);
}

.rec-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(11, 43, 67, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #0b2b43;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.rec-close:hover,
.rec-close:focus-visible {
  background: #eef3f8;
  border-color: rgba(11, 43, 67, 0.16);
  transform: translateY(-1px);
}

.rec-intro {
  display: grid;
  gap: 6px;
  padding-right: 112px;
}

.rec-eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(52, 168, 83, 0.1);
  color: #23693a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rec-summary {
  margin: 0;
  max-width: 720px;
  color: #5d7182;
  font-size: 15px;
  line-height: 1.55;
}

.rec-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.rec-header .section-copy {
  display: grid;
  gap: 6px;
  max-width: 720px;
}

.rec-header h3 {
  margin: 0;
  color: #0b2b43;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.05;
}

.rec-subtitle {
  margin: 0;
  color: #5d7182;
  font-size: 15px;
  line-height: 1.55;
}

.rec-panel .slider-controls {
  display: inline-flex;
  gap: 10px;
}

.rec-overlay:not(.rec-has-pages) .slider-controls {
  display: none;
}

.rec-panel .slider-controls button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(11, 43, 67, 0.1);
  background: #eef3f8;
  color: #0b2b43;
  font-size: 18px;
  line-height: 1;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.rec-panel .slider-controls button:hover,
.rec-panel .slider-controls button:focus-visible {
  background: #e3edf5;
  border-color: rgba(11, 43, 67, 0.2);
  transform: translateY(-1px);
}

.rec-panel .slider-controls button:disabled {
  opacity: 0.38;
  cursor: default;
  transform: none;
}

.rec-carousel {
  min-height: 0;
  display: grid;
}

.rec-carousel .splide__track {
  overflow: hidden !important;
  padding: 2px;
  touch-action: pan-y pinch-zoom;
  -webkit-tap-highlight-color: transparent;
}

.rec-carousel .splide__list {
  align-items: stretch;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.rec-carousel .splide__slide {
  min-width: 0;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

.rec-carousel .splide__slide > * {
  height: 100%;
}

.rec-carousel--compact .splide__list {
  justify-content: center;
}

.rec-carousel--compact .splide__slide {
  width: min(100%, 380px) !important;
  max-width: 380px;
}

.rec-carousel .splide__pagination {
  position: static;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}

.rec-carousel .splide__pagination li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rec-carousel .splide__pagination__page {
  width: 8px;
  height: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(11, 43, 67, 0.18);
  opacity: 1;
  transform: none;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.rec-carousel .splide__pagination__page.is-active {
  width: 22px;
  background: #0b2b43;
  transform: none;
}

.rec-product-card {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 100%;
  height: 100%;
  padding: 14px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(11, 43, 67, 0.08);
  text-align: center;
  overflow: hidden;
}

.rec-product-card__content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.rec-product-card__media {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 96%);
  min-height: 196px;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  padding: 10px;
  border-radius: 20px;
}

.rec-product-card__image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 208px);
  max-height: 172px;
  margin: 0 auto;
  object-fit: contain;
}

.rec-product-card__reason {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: 2px auto 12px;
  padding: 5px 11px;
  max-width: min(96%, 300px);
  border-radius: 999px;
  background: #eef3f9;
  color: #415364;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.rec-product-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-height: 30px;
  max-height: none;
  padding: 6px 11px;
  border-radius: 9px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  z-index: 2;
}

.rec-product-card__badge--sale {
  background: #e53027;
}

.rec-product-card__badge--contract {
  background: #e53027;
  padding: 6px 10px;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.rec-product-card__body {
  display: grid;
  flex: 1 1 auto;
  gap: 9px;
  align-content: start;
  justify-items: center;
  width: 100%;
}

.rec-product-card__title {
  margin: 0;
  color: #0b2b43;
  font-size: 18px;
  line-height: 1.28;
  min-height: calc(1.34em * 2);
  width: 100%;
  max-width: none;
}

.rec-product-card__meta {
  margin: 0;
  color: #687d8d;
  font-size: 15px;
  line-height: 1.42;
}

.rec-product-card__meta--stock strong {
  color: #0b2b43;
  font-weight: 800;
}

.rec-product-card__stock {
  min-height: 28px;
}

.rec-product-card__stock-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.rec-product-card__stock-pill.is-in {
  background: rgba(56, 161, 105, 0.1);
  color: #216a43;
}

.rec-product-card__stock-pill.is-out {
  background: rgba(179, 65, 65, 0.08);
  color: #8d3838;
}

.rec-product-card__stock-pill img {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.rec-product-card__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 6px 10px;
  width: 100%;
  margin-top: auto;
  padding-top: 8px;
}

.rec-product-card__price-old {
  color: #8e9ba7;
  font-size: 14px;
  font-weight: 700;
  text-decoration: line-through;
}

.rec-product-card__price-current {
  color: #0b2b43;
  font-size: clamp(24px, 2vw, 28px);
  font-weight: 800;
  line-height: 1;
}

.rec-product-card__unit {
  color: #6b7d8c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rec-product-card__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(11, 43, 67, 0.08);
}

.rec-product-card__cart-form {
  display: grid;
  justify-items: center;
  width: 100%;
  gap: 10px;
}

.rec-product-card__quantity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.rec-product-card__quantity .button-yellow,
.rec-product-card__quantity .button-green {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 999px;
  box-shadow: none;
}

.rec-product-card__quantity .input-quantity {
  width: 56px;
  min-width: 56px;
  height: 34px;
  border-radius: 999px;
  text-align: center;
}

.rec-product-card__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 176px);
  min-height: 38px;
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 14px;
}

.rec-product-card__disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 188px);
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(179, 65, 65, 0.08);
  color: #8d3838;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.rec-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.rec-overlay--compact .rec-actions {
  justify-content: center;
}

.rec-action-secondary,
.rec-action-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 188px;
  width: 188px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  text-align: center;
  white-space: nowrap;
}

.rec-action-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(11, 43, 67, 0.14);
  background: #ffffff;
  color: #0b2b43;
  font-size: 15px;
  font-weight: 700;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.rec-action-secondary:hover,
.rec-action-secondary:focus-visible {
  background: #f5f8fb;
  border-color: rgba(11, 43, 67, 0.22);
  transform: translateY(-1px);
}

.rec-action-primary {
  min-width: 188px;
}

@media (max-width: 1024px) {
  .rec-overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .rec-panel {
    width: min(1100px, calc(100vw - 12px));
    max-height: min(95dvh, 860px);
    gap: 14px;
    padding: 20px 18px 18px;
    border-radius: 28px 28px 22px 22px;
  }

  .rec-overlay.rec-overlay--compact .rec-panel {
    width: min(780px, calc(100vw - 12px));
  }

  .rec-intro {
    padding-right: 56px;
  }
}

@media (max-width: 720px) {
  .rec-overlay {
    padding: 2px;
    align-items: flex-end;
  }

  .rec-panel {
    width: min(100%, calc(100vw - 2px));
    min-height: calc(100dvh - 6px);
    max-height: calc(100dvh - 2px);
    gap: 12px;
    padding: 12px 12px calc(16px + env(safe-area-inset-bottom));
    border-radius: 28px 28px 18px 18px;
    transform: translateY(24px);
  }

  .rec-overlay.rec-overlay--compact .rec-panel {
    width: min(100%, calc(100vw - 2px));
  }

  .rec-overlay.active .rec-panel {
    transform: translateY(0);
  }

  .rec-handle {
    display: block;
  }

  .rec-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    font-size: 24px;
  }

  .rec-intro {
    gap: 6px;
    padding-top: 2px;
    padding-right: 44px;
  }

  .rec-summary,
  .rec-subtitle {
    font-size: 14px;
    line-height: 1.45;
  }

  .rec-header {
    align-items: flex-start;
  }

  .rec-header h3 {
    font-size: 26px;
  }

  .rec-panel .slider-controls {
    display: none;
  }

  .rec-carousel--compact .splide__slide,
  .rec-carousel .splide__slide {
    width: 100% !important;
    max-width: none;
  }

  .rec-product-card {
    padding: 14px 12px 12px;
  }

  .rec-product-card__content {
    gap: 8px;
  }

  .rec-product-card__media {
    place-items: end center;
    min-height: 148px;
    height: 148px;
    padding: 0;
    margin-bottom: -2px;
  }

  .rec-product-card__image {
    max-width: min(100%, 176px);
    max-height: 136px;
  }

  .rec-product-card__title {
    font-size: 16px;
    min-height: auto;
    width: 100%;
    max-width: none;
    line-height: 1.2;
  }

  .rec-product-card__meta {
    font-size: 13px;
    line-height: 1.35;
  }

  .rec-product-card__stock {
    display: none;
  }

  .rec-product-card__price-current {
    font-size: 22px;
  }

  .rec-product-card__reason {
    margin: 0 auto 0;
    padding: 3px 9px;
    font-size: 10px;
  }

  .rec-product-card__body {
    gap: 5px;
    margin-top: 0;
  }

  .rec-product-card__actions {
    margin-top: 0;
    padding-top: 6px;
  }

  .rec-product-card__cart-form {
    display: grid;
    justify-items: center;
    width: 100%;
    gap: 10px;
  }

  .rec-product-card__quantity {
    gap: 6px;
    width: 100%;
    justify-content: center;
  }

  .rec-product-card__quantity .button-yellow,
  .rec-product-card__quantity .button-green {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .rec-product-card__quantity .input-quantity {
    width: 46px;
    min-width: 46px;
    height: 32px;
    padding: 4px 6px;
    font-size: 13px;
  }

  .rec-product-card__add {
    width: min(100%, 168px);
    min-width: 0;
    min-height: 36px;
    padding: 8px 14px;
    font-size: 13px;
  }

  .rec-product-card__badge {
    top: 10px;
    right: 10px;
    min-height: 28px;
    padding: 6px 10px;
    font-size: 13px;
  }

  .rec-product-card__badge--contract {
    font-size: 11.5px;
    padding: 6px 9px;
  }

  .rec-actions {
    flex-direction: row;
    align-items: center;
    justify-content: stretch;
    gap: 8px;
    margin-top: 4px;
  }

  .rec-action-primary,
  .rec-action-secondary {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 44px;
    padding: 0 12px;
    font-size: 14px;
  }
}
