/* weekly-deals */

.deals {
  display: flex;
  flex-direction: column;
  gap: 18px;

  @media (max-width: 767px) {
    padding-left: 0;
    padding-right: 0;
  }
}

.deals__header {
  display: flex;
  background: linear-gradient(to bottom, #f1a234 0%, #fec06a 100%);
  padding: 12px 120px 14px 60px;
  justify-content: space-between;
  align-items: center;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  overflow: hidden;

  @media (max-width: 767px) {
    padding-right: 40px;
    padding-left: 18px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  & .deals__header--left {
    display: flex;
    flex-direction: column;
    gap: 5px;

    & .deals__title {
      color: var(--brand-black);
      font-size: 38px;
      font-weight: bold;
      line-height: 40px;
      letter-spacing: 0;
      margin-right: 8px;

      @media (max-width: 767px) {
        font-size: 34px;
        line-height: 1;
      }

      @media (max-width: 400px) {
        font-size: 30px;
        line-height: 1;
        margin-right: 12px;
      }
    }

    & .deals__header--dates-desktop {
      display: none;
      font-size: 30px;
      color: var(--brand-black);
      letter-spacing: 0;
      line-height: 1;

      @media (max-width: 499px) {
        display: none;
      }
    }
  }
}

.deals__countdown {
  position: relative;
  z-index: 1;

  & .deals__thunder {
    position: absolute;
    right: -50px;
    top: -65px;
    z-index: -1;

    & svg {
      height: 200px;
    }
  }
}

.deals__countdown-title {
  color: var(--brand-black);
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 5px;
}

.deals__countdown-cta {
  color: var(--brand-black);
  font-size: 16px;
  text-align: center;
  margin-top: 5px;
  font-style: italic;
  letter-spacing: 0;
}

.deals__countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.deals__countdown-timer--time-block {
  background: linear-gradient(to bottom, #971b1b 0%, #6c1515 50%, #971b1b 100%);
  border-radius: 5px;
  min-width: 50px;
  padding: 0 4px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  font-weight: 700;
  color: white;
  position: relative;
  overflow: hidden;

  @media (min-width: 768px) {
    min-width: 80px;
  }
}

.deals__countdown-timer--bright-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, #b92121 0%, #8a1c1c 50%, #b92121 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 0;

  @media (min-width: 768px) {
    min-width: 80px;
  }
}

.deals__countdown-timer--number {
  position: relative;
  z-index: 1;
}

.deals__countdown-timer--separator {
  color: var(--brand-red);
  font-size: 30px;
  line-height: 0;
  font-weight: 700;
}

.deals__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: var(--spacer-l);

  @media (max-width: 767px) {
    padding: 0 12px;
    gap: 28px;
  }

  & .deals__body--dates-mobile {
    display: none;
    font-size: 28px;
    color: var(--brand-black);
    letter-spacing: 0;
    line-height: 1;
    margin-left: 6px;

    @media (min-width: 500px) {
      display: none;
    }
  }

  & .deals__body--products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;

    @media (max-width: 1250px) {
      grid-template-columns: repeat(2, 1fr);
    }

    @media (max-width: 767px) {
      grid-template-columns: repeat(1, 1fr);
    }
  }
}

.deals-product {
  position: relative;
  background-color: #fafafa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  padding: 10px;
  /* max-width: 480px; */
  /* place-self: stretch; */
}

.deals-product-top {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 10px;
}

button.deals-product-top__left--image-container {
  position: relative;
  padding: 0;
  border-radius: 5px;
  /*aspect-ratio: 4 / 5;*/
  background-color: var(--brand-gray-light);
  overflow: hidden;

  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .svg-wrapper {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    color: #fff;
    width: 30px;
    height: 30px;
    padding: 4px;
  }
}

.deals-product-top__left--image-container .svg-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  color: #fff;

  svg {
    fill: currentColor;
  }
}

.deals-product-top__left--image-container:hover .svg-wrapper {
  opacity: 1;
}

.deals-product-top__right {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.deals-product-top__right--title {
  color: black;
  font-size: 20px;
  font-weight: bold;
  line-height: 1.1;
}

.deals-product-top__right--title,
.deals-product-top__right-msrp,
.deals-product-top__right-pack-deal,
.deals-product-top__right-deal,
.deals-product-top__right-total-savings {
  padding: 0 3px;
}

.deals-product-top__right-msrp,
.deals-product-top__right-pack-deal,
.deals-product-top__right-deal,
.deals-product-top__right-total-savings {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;

  & p {
    line-height: 1;
  }
}

.deals-product-top__right-msrp {
  color: #667085;

  & .deals-product-top__right-msrp--price {
    text-decoration: line-through;
  }
}

.deals-product-top__right-deal--price {
  color: var(--brand-red);
}

.deals-product-top__right-deal--label {
  display: flex;
  align-items: center;

  img {
    margin-right: 4px;
  }

  & svg {
    height: 14px;
    width: 12px;
  }
}

.deals-product-top__right-deal {
  background-color: var(--brand-red);
  border-radius: 50px;
  padding: 4px 12px;
  height: 26px;
  font-weight: bold;

  &,
  .deals-product-top__right-deal--price {
    color: #fff;
  }
}

.deals-product-top__right-total-savings--label,
.deals-product-top__right-total-savings--price {
  font-size: 13px;
  text-transform: capitalize;
  word-wrap: break-word;
  letter-spacing: 0;

  @media (max-width: 500px) {
    & span.deals-product-top__total-text {
      display: none;
    }
  }
}

.deals-product-bottom__claim-deal {
  width: 100%;
  background: linear-gradient(to bottom, #f1a234 0%, #fec06a 100%);
  border-radius: 5px;
  display: flex;
  gap: 7px;
  border: solid #d6881a 1px;
  align-items: center;
  padding: 15px;
  line-height: 1;
  justify-content: center;
  margin: 12px 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  transform-origin: center;
  will-change: transform, box-shadow;
  position: relative;
  overflow: hidden;

  &::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(to bottom, #ffa832 0%, #ffd283 100%);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }

  & > * {
    position: relative;
    z-index: 1;
  }

  &:hover {
    box-shadow: 0 4px 12px rgba(214, 136, 26, 0.3);
    transform: translateY(-1px) scale(1.005);

    &::before {
      opacity: 1;
    }
  }

  &:active {
    box-shadow: 0 2px 6px rgba(214, 136, 26, 0.3);
    transform: translateY(0) scale(1);
    transition-duration: 0.1s;

    &::before {
      transition-duration: 0.1s;
    }
  }
}

.deals-product-bottom__claim-deal--text {
  color: #222222;
  font-size: 18px;
  font-weight: 700;
  word-wrap: break-word;
  text-transform: capitalize;
}

.deals-product-bottom__claim-deal--icon {
  display: flex;
  width: 24px;
  height: 24px;

  svg {
    width: 100%;
    height: auto;
  }
}
.deals-product-bottom__claimed {
  display: grid;
  grid-template-columns: 1fr max-content;
  align-items: center;
  width: 100%;
  gap: 10px;
}

.deals-product-bottom__claimed--progress-bar {
  width: 100%;
  height: 15px;
  border-radius: 50px;
  background-color: var(--brand-gray-light);
  overflow: hidden;
}

.deals-product-bottom__claimed--progress-bar-completed {
  background: linear-gradient(
    60deg,
    var(--brand-red) 0%,
    #b92121 35%,
    var(--brand-red) 50%,
    #b92121 65%,
    var(--brand-red) 100%
  );
  background-size: 600% 100%;
  border-top-left-radius: 50px;
  border-bottom-left-radius: 50px;
  height: 100%;
  animation: flow-gradient 6s linear infinite;
  position: relative;
}

.deals-product-bottom__claimed--progress-bar-completed::before {
  content: '';
  position: absolute;
  top: 0;
  right: -2px;
  width: 40px;
  height: 100%;
  background: linear-gradient(to right, transparent, #d92727 100%);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

@keyframes flow-gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.deals-product-bottom__claimed--text {
  color: var(--brand-red);
  font-size: 14px;
  font-weight: bold;
  text-transform: capitalize;
}

@keyframes number-fade {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes flash-background {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.flash-update .deals__countdown-timer--number {
  animation: number-fade 0.25s ease-in-out;
}

.flash-update .deals__countdown-timer--bright-bg {
  animation: flash-background 0.25s ease-in-out;
}

.weekly-deals__wrapper.deals-banner {
  padding: 0;

  @media (min-width: 768px) {
    background: linear-gradient(to bottom, #f3f3f3, #dadada);
    padding: 50px 20px;
  }

  & .deals {
    padding: 0;
    gap: 0;

    @media (min-width: 768px) {
      flex-direction: row;
      max-width: 1160px;
      margin: 0 auto;
      gap: 20px;
    }

    & .content-wrapper {
      padding: 0;
      gap: 0;
    }
  }

  & .deals__header-container {
    background: linear-gradient(to bottom, #f1a234 0%, #fec06a 100%);
    padding-bottom: 20px;

    @media (min-width: 768px) {
      background: transparent;
      display: flex;
      width: 50%;
      flex-direction: column;
      justify-content: center;
      gap: 20px;
      padding-bottom: 0;
    }
  }

  & .deals__header {
    border-radius: 0;
    background: transparent;

    @media (min-width: 768px) {
      width: 100%;
      padding: 12px;
      flex-direction: column;
      justify-content: center;
      gap: 10px;

      & .deals__header--left {
        text-align: center;
      }
    }

    @media (min-width: 1100px) {
      gap: 24px;
      flex-direction: row;
    }

    & .deals__header--dates-desktop {
      display: none;
      @media (max-width: 500px) {
        font-size: 15px;
      }
    }
  }

  & .deals__body {
    padding: 30px 14px;
    margin: 0;

    @media (min-width: 768px) {
      padding-top: 0;
      width: 50%;
    }

    & .deals__body--dates-mobile {
      display: none;
    }

    & .deals__body--products {
      @media (min-width: 768px) {
        display: block;
      }
    }
  }

  & .deals__countdown .deals__thunder {
    top: -55px;

    @media (min-width: 768px) {
      right: -20px;
    }
  }

  & .deals__body--featured-deal {
    font-size: 30px;
    color: var(--brand-black);
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
    font-weight: 600;
    text-transform: capitalize;
  }

  & .deals__header--cta {
    display: block;
    width: fit-content;
    border-radius: 5px;
    background: #fff;
    background-color: #971b1b;
    color: #fff;
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    padding: 5px 20px;
    text-transform: capitalize;
    border: none;
    margin: 0 auto;
    transition: all 0.3s ease-in-out;

    &:hover {
      text-decoration: none;
      transform: scale(1.05);
    }
  }
}

.weekly-deals__email-form-wrapper {
  align-items: center;
  padding: 0;
  margin-bottom: 20px;
  background: linear-gradient(to bottom, #f1a234 0%, #fec06a 100%);

  & .klaviyo-form-TyMiSc {
    width: 500px;

    @media (max-width: 767px) {
      width: 100%;
    }
  }
}

.weekly-deals__wrapper.weekly-deals__wrapper--grid .deals__body {
  @media (max-width: 650px) {
    padding: 0 0.5rem;
  }
}

.weekly-deals__wrapper.weekly-deals__wrapper--grid .deals__body--products {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--grid-gap-s);

  & .deals-product-top__left--image-container svg {
    display: none;
  }

  & .deals-product-bottom__claim-deal {
    padding: 8px;
    margin: var(--grid-gap-xs) 0;

    & .deals-product-bottom__claim-deal--icon {
      display: none;
    }
  }

  @media (max-width: 1200px) {
    grid-template-columns: repeat(4, 1fr);
  }

  @media (max-width: 900px) {
    grid-template-columns: repeat(3, 1fr);
  }

  @media (max-width: 650px) {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: var(--grid-gap-xs);
    row-gap: var(--grid-gap-s);
  }

  & .deals-product {
    & .deals-product-top__right--title {
      font-size: 16px;
      height: 35px;
    }

    @media (max-width: 650px) {
      padding: 0;
      border: none;

      & .deals-product-top__right--title {
        font-size: 16px;
        height: 35px;
      }
    }

    & > .deals-product-top {
      display: block;
    }
  }

  & .deals-product-bottom__claim-deal--text > span {
    display: none;
  }
}

.deals-product-top__app-exclusive {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
}

.deals-product-top__app-exclusive--caption {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  z-index: 2;

  & h4 {
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    color: #fff;
  }

  & p {
    font-size: 14px;
    font-weight: normal;
    text-align: center;
    color: #fff;
  }
}

.deals-product-top__app-exclusive--lock-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;

  & svg {
    max-height: 50px;
  }
}

.deals-product-top__app-exclusive--app-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0 auto;
  z-index: 2;

  & a {
    display: block;
    width: fit-content;
    height: fit-content;
    color: #fff !important;

    & svg {
      height: 45px;
    }
  }
}
