* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

:root {
  --primary-main: #133ebf;
  --warning-main: #ffb400;
  --text-dark: #262b38;
  --border-color-financing: #d8dbe5;
  --text-gray-heavy: #586280;
  --light-blue-bg: #d9e3ff;
  --lighter-blue-bg: #e8eeff;
  --text-red: #e70839;
  --white: #fff;
  --section-background: #f5f7fc;
  --btn-active: #262b38;
}

/* Font Faces */
@font-face {
  font-display: swap;
  font-family: Roobert;
  font-style: normal;
  font-weight: 400;
  src: url(https://media.residenthome.com/fonts/roobert/Roobert-Regular.woff2)
    format('woff2');
}

@font-face {
  font-display: swap;
  font-family: Roobert;
  font-style: normal;
  font-weight: 500;
  src: url(https://media.residenthome.com/fonts/roobert/Roobert-Medium.woff2)
    format('woff2');
}

@font-face {
  font-display: swap;
  font-family: Roobert;
  font-style: normal;
  font-weight: 600;
  src: url(https://media.residenthome.com/fonts/roobert/Roobert-SemiBold.woff2)
    format('woff2');
}

/* General Styles */
img {
  display: block;
}

/* Containers */
.container {
  width: 100%;
  padding: 0 16px;
}

@media (min-width: 1240px) {
  .container {
    padding: 0 80px;
  }

	.finance-options .container {
		padding: 0 40px;
	}
}

@media (min-width: 1536px) {
  .container {
    padding: 0;
    margin: 0 auto;
    max-width: 1456px;
  }
		.finance-options .container {
		padding: 0;
	}
}

/* Hero Section */
.hero {
  padding: 24px 0 32px 0;
  background: var(--primary-main);
}

.hero__content {
  padding: 0 16px;
}

.hero__warning {
  color: var(--warning-main);
  text-align: center;
  font-family: Roobert;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  margin-bottom: 16px;
}

.hero__title {
  color: var(--white);
  text-align: center;
  font-family: Roobert;
  font-size: 28px;
  font-weight: 600;
  line-height: 32px;
  margin-bottom: 16px;
}

.hero__subtitle {
  color: var(--light-blue-bg);
  text-align: center;
  font-family: Roobert;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
}

@media (min-width: 1025px) {
  .hero {
    padding: 40px 0;
  }

  .hero__content {
    padding: 0;
  }

  .hero__warning {
    font-size: 18px;
    line-height: 24px;
    margin-bottom: 24px;
  }

  .hero__title {
    font-size: 40px;
    line-height: 44px;
    margin-bottom: 24px;
  }

  .hero__subtitle {
    font-size: 18px;
    line-height: 24px;
  }
}

/* Financing Section */
.financing {
  background: linear-gradient(
    to bottom,
    var(--primary-main) 50%,
    var(--section-background) 50%
  );
  padding-bottom: 24px;
}

.financing__tabs {
  display: flex;
  border-radius: 8px 8px 0 0;
}

.financing__tab {
  width: 100%;
  background-color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-bottom: 1px solid var(--border-color-financing);
  position: relative;
	  border-bottom: none;
  background: var(--light-blue-bg);
	  border-radius: 8px 8px 0 0;
}




.financing__tab::after {
  content: '';
  width: 12px;
  height: 12px;
  background-color: var(--light-blue-bg);
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translate(-50%) rotate(45deg);
}

.financing__details {
  background-color: var(--white);
  padding: 16px;
  box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.24);
  border-radius: 0 0 8px 8px;
}

.feature-list {
  margin-left: 22px;
}

.feature-list__item {
  color: var(--text-dark);
  font-family: Roobert;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.financing__feature {
  display: none;
}

.financing__feature.active {
  display: block;
}

.financing__tab:nth-child(1) img {
  height: 24px;
}
.financing__tab:nth-child(2) img {
  height: 18px;
}

@media (min-width: 1025px) {
  .financing__mobile {
    display: none;
  }
}

.financing__container {
  display: flex;
}

.financing__container .feature-list__item {
  font-size: 18px;
  line-height: 24px;
}

.financing__container .feature-list {
  margin-left: 30px;
}

.financing__affirm{
  display: flex;
  align-items: center;
  gap: 32px;
}

.financing__split {
  padding-left: 32px;
}

.financing__desktop {
  background-color: var(--white);
  padding: 32px;
  border-radius: 8px;
  max-width: fit-content;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .financing__desktop {
    display: none;
  }
}

/* Finance Options Section */
.finance-options {
  padding: 0 0 40px 0;
  background: var(--section-background);

}

.finance-options__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.finance-options__divider-line {
  height: 1px;
  background-color: var(--border-color-financing);
  width: 100%;
}

.finance-options__title {
  color: var(--primary-main);
  font-family: Roobert;
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
  flex-grow: 1;
  flex-shrink: 0;
}

.finance-options__label {
  color: var(--text-gray-heavy);
  font-family: Roobert;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  margin-bottom: 12px !important;
}

.mattress__buttons {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.mattress__button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 50%;
  border: 1px solid var(--border-color-financing);
  background: var(--white);
  height: 48px;
  padding: 4px;
  cursor: pointer;
}

.mattress__button:nth-child(1) {
  border-radius: 8px 0 0 8px;
}

.mattress__button:nth-child(2) {
  border-radius: 0 8px 8px 0;
}

.mattress__button.active {
  border: 2px solid var(--primary-main);
  background: var(--lighter-blue-bg);
  --btn-active: #133ebf;
}

.mattress__button-text {
  color: var(--text-dark);
  text-align: center;
  font-family: Roobert;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.mattress__button-subtext {
  color: var(--text-dark);
  text-align: center;
  font-family: Roobert;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

.mattress__button.active .mattress__button-text,
.mattress__button.active .mattress__button-subtext {
  color: var(--primary-main);
}

/* Affirm and Split Buttons */
.finance-options__buttons {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.finance-options__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  border: 1px solid var(--border-color-financing);
  background: var(--white);
  pointer-events: none;
border-radius: 8px;
}



.finance-options__button.active {
  border: 2px solid var(--primary-main);
  background: var(--lighter-blue-bg);
}

.finance-options__button--affirm img {
  height: 24px;
}

.finance-options__button--splitit img {
  height: 18px;
}

.mattress__size {
  margin-bottom: 24px;
}

.finance-options__select {
  margin-bottom: 40px;
}

/* Radio Buttons */

.finance__installments input {
  position: absolute;
  visibility: hidden;
}

.installment__form {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 0;
  margin-bottom: 12px;
}

.radio__lable {
  border-radius: 200px;
  background: var(--light-blue-bg);
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-main);
  font-family: Roobert;
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  line-height: 24px;
  cursor: pointer;
  transition: all 0.5s;
  z-index: 10;
}

.installment__form input:checked + span {
  background: var(--primary-main);
  color: var(--white);
}

.installment__feature {
  color: var(--text-dark);
  text-align: right;
  font-family: Roobert;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
  height: 24px;
  width: 100%;
  background-color: var(--white);
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding-right: 6px;
  justify-content: end;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: -1;
}

.apr__alert {
  color: var(--text-gray-heavy);
  font-family: Roobert;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
  margin-bottom: 24px !important;
}

.qualify__btn {
  display: flex;
  width: 100%;
  height: 56px;
  padding: 0px 32px;
  justify-content: center;
  align-items: center;
  background-color: var(--primary-main);
  color: var(--white);
  font-family: Roobert;
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: 22px;
  border-radius: 200px;
  text-decoration: none;
}

.qualify__btn:hover {
  text-decoration: underline;
}

.finance__installment {
  display: none;
}

.finance__installment.active {
  display: block;
}

/* Product Grid */

.product__item--img img {
  display: block;
  width: 100%;
}

.product__item--img {
  border-radius: 8px 8px 0 0;
  border-top: 1px solid var(--border-color-financing);
  border-left: 1px solid var(--border-color-financing);
  border-right: 1px solid var(--border-color-financing);
  overflow: hidden;
  position: relative;
}

.product__award img {
  height: 20px;
}
.product__award--text {
  color: var(--white);
  font-family: Roobert;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: 20px;
  text-transform: uppercase;
  flex-grow: 1;
  flex-shrink: 0;
}

.product__award {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 12px;
  border-radius: 4px;
  overflow: hidden;
  position: absolute;
  top: 16px;
  left: 16px;
}

.product__inch {
  border-radius: 4px;
  background: var(--white);
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  font-family: Roobert;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: 20px;
  padding: 0 12px;
  position: absolute;
  top: 16px;
  right: 16px;
}

.product__item--detail {
  padding: 16px;
  border-radius: 0px 0px 8px 8px;
  border-bottom: 1px solid var(--border-color-financing);
  border-left: 1px solid var(--border-color-financing);
  border-right: 1px solid var(--border-color-financing);

}

.product__item--title {
  color: var(--text-dark);
  font-family: Roobert;
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  line-height: 24px;
  margin-bottom: 4px;
}

.product__item--subtitle {
  color: var(--text-gray-heavy);
  font-family: Roobert;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
  margin-bottom: 16px !important;
}

.product__item--price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.product__price--discounted {
  color: var(--text-dark);
  font-family: Roobert;
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: 22px;
}

.product__price--total {
  color: var(--text-gray-heavy);
  font-family: Roobert;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
}

/* CTA */

.product__cta {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 56px;
  padding: 0px 32px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-family: Roobert;
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: 22px;
  border-radius: 200px;
  background: var(--primary-main);
  text-decoration: none;
}

.product__cta:hover {
  text-decoration: underline;
}

.product__item--stars {
  list-style: none;
  display: inline-flex;
  align-items: center;
}

.star img {
  height: 16px;
}
.product__item--review {
  color: var(--primary-main);
  font-family: Roobert;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.product__item--rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  position: relative;
  width: fit-content;
}

.product__item--lease {
  margin-bottom: 16px;
}
.lease__amount {
  color: var(--text-red);
  font-family: Roobert;
  font-size: 24px;
  font-style: normal;
  font-weight: 600;
  line-height: 28px;
}

.lease__qualify-btn {
  color: var(--text-gray-heavy);
  font-family: Roobert;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
  align-self: flex-end;
}

.product__item--lease {
  display: flex;
  justify-content: space-between;
}

.no__lease {
  color: var(--text-dark);
  font-family: Roobert;
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: 22px;
}
/* =========================== */
/* Grid  */

.products__grid-container {
  display: grid;
  gap: 16px;
}

/* =============================== */
/* ToolTip */

.rating__tooltip {
  width: 328px;
  border-radius: 8px;
  background: var(--white);
  padding: 20px 16px 16px 16px;
  border: 1px solid var(--border-color-financing);
  box-shadow: rgba(0, 0, 0, 0.1) 0px 5px 5px -3px,
    rgba(0, 0, 0, 0.1) 0px 8px 10px 1px, rgba(0, 0, 0, 0.1) 0px 3px 14px 2px;
  position: absolute;
  left: -8px;
  top: 20px;

	display: none;
}

.product__item--rating:hover .rating__tooltip {
	display: block;
}


.rating__num {
  color: var(--text-dark);
  font-family: Roobert;
  font-size: 40px;
  font-style: normal;
  font-weight: 600;
  line-height: 44px;
}

.total__num {
  color: var(--text-dark);
  font-family: Roobert;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
}

.total__review-count {
  color: var(--text-dark);
  font-family: Roobert;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
}

.rating__tooltip--stars {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tooltip__stars {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 3px;
}

.tooltip__number {
  display: flex;
  gap: 4px;
  align-items: end;
}

.star__count {
  color: var(--text-dark);
  font-family: Roobert;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
}

.total_review-count {
  color: var(--text-dark);
  text-align: right;
  font-family: Roobert;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
}

.tooltip__bar-container {
  display: grid;
  grid-template-columns: 50px 1fr 56px;
  align-items: center;
  gap: 8px;
}

.tooltip__bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color-financing);
  margin-bottom: 16px;
}

.tooltip_bar {
  border-radius: 2px;
  background: var(--border-color-financing);
  height: 4px;
  position: relative;
}

.tooltip__bar-blue {
  position: absolute;
  background-color: var(--primary-main);
  height: 4px;
  border: 2px;
  top: 0;
  left: 0;
border-radius: 2px
}

.tooltip__qualify-btn {
  color: var(--text-gray-heavy);
  display: block;
  text-align: center;
  font-family: Roobert;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  text-decoration-line: underline;
}
/* ToolTip /
/* ========================== */

/* Desktop CSS */

@media (min-width: 1025px) {
  .finance-options__grid {
    display: grid;
    gap: 32px;
    grid-template-columns: 340px 1fr;
    position: relative;
  }

  .products__grid-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .mattress__buttons {
    width: 340px;
    position: absolute;
    top: -72px;
    left: 50%;
    transform: translateX(-50%);
  }

  .finance-options__divider {
    margin-bottom: 112px;
  }
}

/* Finance-Process */
.finance__process {
  padding: 40px 0;
  background-color: #fff;
}

.finance__process--title {
  color: var(--primary-main);
  text-align: center;
  font-family: Roobert;
  font-size: 28px;
  font-style: normal;
  font-weight: 600;
  line-height: 32px;
  margin-bottom: 40px;
}


.finance__process--box__desc {
  color: var(--text-gray-heavy);
  text-align: center;
  font-family: Roobert;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px; /* 137.5% */
}
.finance__process--box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
}

.arrow__divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.finance__process--boxes {
  display: grid;
  gap: 24px;
  padding: 0 16px;
}

@media (max-width: 1024px) {
  .desktop__only {
    display: none;
  }
}

@media (min-width: 1025px) {
  .mobile__only {
    display: none;
  }

  .finance__process {
    padding: 80px 0;
  }

  .finance__process--title {
    font-size: 40px;
    line-height: 44px;
    margin-bottom: 80px;
  }
  .finance__process--boxes {
    display: flex;
    align-self: center;
    justify-content: center;
    gap: 32px;
    padding: 0;
  }

  .finance__process--box {
    width: 304px;
  }

  .finance__process--box__desc {
    font-size: 18px;
    line-height: 24px;
  }
}

.no__financing {
  color: #262b38;
  font-feature-settings: 'liga' off;
  font-family: Roobert;
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: 22px; /* 137.5% */
  margin: 0;
}

.finance__plan {
  display: flex;
  align-items: end;
  gap: 4px;
}

.plan__text {
  color: #586280;
font-feature-settings: 'liga' off;
font-family: Roobert;
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 22px;
}

.finance__company-logo img {
  display: block;
  width: 36px;
  height: 15px;
  /* margin-left: 4px; */
}
.finance__affirm .finance__company-logo img {
  margin-bottom: 6px;
}

.finance__splitit .finance__company-logo img {
	width: 48px;
	margin-bottom: 6px;
}

.financing__desktop .financing__split img {
	width: 140px;
}

.affirm__logo {
	width: 97px;
}