:root {
  --color-red-24: #4C2C2C;
  --color-red-35: #991B1E;
  --color-white: #fff;
  --color-black: #000;
  --font-hore: "Hore";
  --font-bebas-neue: "Bebas";
  --font-bernier-distressed: "BernierDistressed";
  --bernier-regular-font: "BernierReg";
  --font-bebas: 'Bebas';
  --font-bebas-regular: 'BebasReg';
  --color-grey-80: #CCC;
  --color-newarc-primary-800: #1B2140;
  --color-grey-6: #0F0F0F;
  --color-dove-gray: #666666
}

#rebuy-cart .rebuy-cart__flyout {
  left: auto;
  border-radius: 10px 0px 0px 10px;
  margin: 0;
  width: 100%;
  max-width: 375px;
  gap: 0;

  @media screen and (min-width: 700px) {
    max-width: 490px;
  }

  [data-rebuy-cart-anchor="header"] {
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-grey-80);
  
    .rebuy-cart__title {
      font-family: var(--font-hore);
      font-weight: 400;
      font-size: 24px;
      color: var(--color-red-24);
    }

    [data-rebuy-cart-header-top] {
      padding: 0;
    }

    .rebuy-cart__flyout-close {
      justify-content: end;
    }
  }

  [data-rebuy-component="progress-bar"] {
    padding: 16px 0;
    border-bottom: 1px solid var(--color-red-35);

    .rebuy-cart__progress-gifts .rebuy-cart__progress-gift {
      display: flex;
      width: 100%;
      max-width: 100%;
      flex-direction: row;
      gap: 12px;
      padding: 10px 16px 0;

      @media screen and (min-width: 700px) {
        gap: 15px;
      }
    }

    .rebuy-cart__progress-gift-image {
      width: 85px;
      height: 85px;
      min-width: 85px;
      background-size: contain !important;
      background-color: transparent !important;

      @media screen and (min-width: 700px) {
        width: 110px;
        height: 110px;
        min-width: 110px;
      }
    }

    .rebuy-cart__progress-gift-info {
      width: calc(100% - 100px);

      @media screen and (min-width: 700px) {
        width: calc(100% - 125px); 
      }
    }

    .rebuy-cart__progress-gift-selection-container {
      margin-top: 10px;
      text-align: left;

      .button {
        padding-left: 16px;
        padding-right: 16px;
      }
    }
  }

  .rebuy-cart__progress-gift-title,
  .rebuy-cart__flyout-item-product-title {
    padding: 0;
    font-size: 20px;
    font-family: var(--font-bebas);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-grey-6);
    text-align: left;

    @media screen and (min-width: 700px) {
      font-size: 24px;
    }
  }

  .rebuy-cart__progress-step-wrapper {
    position: relative;
    z-index: 1;
  }

  .rebuy-cart__progress-bar-inner {
    position: relative;
  }

  .rebuy-cart__progress-step-icon {
    width: 24px;
    height: 24px;
    background-color: var(--color-red-24);
    color: var(--color-white);

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

  .rebuy-cart__progress-bar-wrapper {
    position: absolute;
    top: 0;
    width: 100%;
  }

  .rebuy-cart__progress-step-label {
    margin-top: 3px;
    font-size: 14px;
    color: var(--color-newarc-primary-800);

    @media screen and (min-width: 700px) {
      margin-top: 5px;
    }
  }

  .rebuy-cart__progress-bar-prompt {
    margin-bottom: 7px;
    margin-top: 0;
    padding: 0 20px;
    font-size: 14px;

    @media screen and (min-width: 700px) {
      font-size: 16px;
    }

    b {
      font-weight: 400;
    }
  }

  .rebuy-cart__progress-bar-meter-fill {
    background-color: var(--color-red-35);
  }

  .rebuy-cart__progress-step.complete .rebuy-cart__progress-step-icon {
    background-color: var(--color-red-35);
  }

  [data-rebuy-component=cart-items] {
    border: none;
    padding: 0;

    [data-smartcart-items] {
      margin: 0;
    }

    .rebuy-cart__flyout-item {
      padding: 16px 20px;
      column-gap: 15px;
      row-gap: 12px;
      align-items: start;
      border-bottom: 1px solid var(--color-grey-80); 
    }

    .rebuy-cart__flyout-item-property,
    .rebuy-cart__flyout-item-property span,
    .rebuy-cart__flyout-item-variant-title {
      font-size: 15px;
      font-style: normal;
      font-weight: 500;
      opacity: 0.7;
      line-height: 1;
      color: var(--color-grey-6);

      @media screen and (min-width: 700px) {
        font-size: 16px;
        opacity: 0.6;
      }
    }

    .rebuy-cart__flyout-item-remove-button {
      font-size: 14px;
      font-weight: 400;
      line-height: 1;
      text-decoration: underline;

      &:hover {
        opacity: 0.6;
      }
    }

    .rebuy-cart__flyout-item-price .rebuy-money,
    .rebuy-cart__flyout-item-price span,
    .rebuy-cart__flyout-item-price {
      font-family: var(--font-bebas);
      font-size: 17px;
      line-height: 1;
      font-weight: 700;
      color: var(--color-grey-6);

      @media screen and (min-width: 700px) {
        font-size: 20px;
      }
    }

    .rebuy-cart__flyout-item-price .rebuy-money.sale span {
      color: var(--color-red-35);
    }

    .rebuy-cart__flyout-item-info-row {
      display: flex;
      justify-content: space-between;
      gap: 15px;
      width: 100%;
    }

    .rebuy-cart__flyout-item-info-row.info-row-2 {
      justify-content: space-between;
      align-items: center;
      margin-top: 10px;
  
      @media screen and (min-width: 700px) {
        justify-content: start;
        margin-top: 15px;
      }
    }

    .rebuy-cart__flyout-item-info-row--gift.info-row-2 {
      margin-top: 0;
      justify-content: space-between;
    }

    .rebuy-cart__flyout-item-discount-message {
      font-size: var(--text-font-size);
      color: var(--text-color);
      opacity: 0.6;
      font-weight: 500;
    }

    .rebuy-cart__flyout-item-quantity {
      width: auto;
      margin: 0;
    }

    .rebuy-cart__flyout-item-price {
      width: auto;
      margin: 0;
    }

    .rebuy-cart__flyout-item-variant-title {
      margin-top: 2px;
      font-weight: 500;

      @media screen and (min-width: 700px) {
        margin-top: 7px;
      }
    }

    .rebuy-cart__flyout-item-media video,
    .rebuy-cart__flyout-item-media img,
    .rebuy-cart__flyout-item-media {
      width: 85px;
      height: 85px;
      object-fit: contain;
      border-radius: 4px;

      @media screen and (min-width: 700px) {
        width: 110px;
        height: 110px;
        border-radius: 10px;
      }
    }

    .rebuy-cart__flyout-item-info {
      width: calc(100% - 100px);
      padding: 0;

      @media screen and (min-width: 700px) {
        width: calc(100% - 125px);
      }
    }

    .rebuy-cart__flyout-item-quantity-widget {
      border-radius: 6px;
      overflow: hidden;
      border: 1px solid var(--color-grey-80);

      i {
        color: var(--color-dove-gray);
      }
    }

    .rebuy-cart__flyout-item-quantity-widget-label,
    .rebuy-cart__flyout-item-quantity-widget-button {
      display: flex;
      align-items: center;
      justify-content: center;
      border: 0;
      height: 36px;
      width: 36px;
    }

    .rebuy-cart__flyout-item-quantity-widget-label {
      font-size: 18px;

      @media screen and (min-width: 700px) {
        font-size: 20px;
        font-family: var(--font-bebas);
        font-weight: 700;
        line-height: 1;
      }
    }

    .rebuy-cart__flyout-item-price-inner {
      display: flex;
      gap: 10px;
    }
  }

  [data-rebuy-cart-anchor="footer"] {
    border-top: 1px solid var(--color-grey-80);
    padding: 16px 0 30px;
    gap: 0;

    [data-rebuy-component="announcement-bar"] {
      background-color: transparent;
      margin-bottom: 16px;

      .message {
        padding: 0 20px;
        font-size: 15px;
        font-style: normal;
        line-height: 1.2;
        text-align: left;
        opacity: 0.6;
        color: var(--color-grey-6);

        @media screen and (min-width: 700px) {
          font-size: 16px;
        }
      }
    }
  }

  .rebuy-cart__flyout-installments {
    font-size: 13px;
    font-style: normal;
    line-height: 1.2;
    opacity: 0.6;
    color: var(--color-grey-6);
  }

  [data-rebuy-component=notes] {
    padding: 0 20px;
    margin-bottom: 10px;

    @media screen and (min-width: 700px) {
      margin-bottom: 16px;
    }

    .rebuy-cart__notes-toggle-label {
      margin: 0;
      font-size: 14px;
      font-weight: 600;
      line-height: 1.4;
      text-decoration: underline;

      &:hover {
        text-decoration: none;
      }

      @media screen and (min-width: 700px) {
        font-weight: 500;
      }

      &::before {
        content: '+ ';
      }
    }

    .rebuy-cart__notes-toggle-input {
      display: none;
    }

    .rebuy-cart__notes-toggle-input:checked + .rebuy-cart__notes-toggle-label::before {
      content: '- ';
    }

    textarea {
      border-color: var(--color-grey-80);
    }
  }

  .rebuy-cart__flyout-item-buy-more-save-more {
    margin-top: 10px;
  }

  .rebuy-cart__flyout-empty-cart {
    a {
      --button-background: var(--button-background-primary) / var(--button-background-opacity, 1);

      font-family: var(--bernier-regular-font);
      font-size: 30px;
      font-weight: 400;
      line-height: 1;
      text-transform: lowercase;
      background-color: rgb(var(--button-background));
      color: #F5F8F7;
      display: flex;
      justify-content: center;
      align-items: center;
      margin-top: 16px;
      border: none;
      border-radius: var(--rounded-button);
      height: 60px;
      line-height: 1.2;

      &:hover {
        --button-background-opacity: 0.85;
      }
    }
  }

  .rebuy-button.rebuy-cart__flyout-item-buy-more-save-more-button {
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 6px;
    border: 1px solid var(--color-red-24);
    background: #F8F5ED;
    padding: 8px 10px;
    color: var(--color-red-24);

    &:hover {
      opacity: 0.8;
    }

    @media screen and (min-width: 700px) {
      font-size: 16px;
      padding: 8px 12px;
    }
  }

  .rebuy-cart__flyout-item-subscription {
    .rebuy-button {
      border-radius: 10px;
      border: 1px solid var(--color-red-24);
      display: flex;
      padding: 11px;
      justify-content: center;
      align-items: center;
      color: var(--color-red-24);
      font-size: 18px;
      font-style: normal;
      font-weight: 700;
      line-height: 1;
      font-family: var(--font-bebas-neue);
      text-transform: uppercase;

      &:hover {
        opacity: 0.8;
      }

      @media screen and (min-width: 700px) {
        font-size: 20px;
      }

      span {
        line-height: 1;
      }
    }

    .select-wrapper {
      position: relative;

      svg {
        position: absolute;
        top: 50%;
        right: 17px;
        transform: translateY(-50%);
      }
    }

    .select-wrapper select {
      border: 1px solid #ACACAC;
      border-radius: 10px;
      padding: 8px 17px;
      font-size: 14px;
      font-weight: 400;
      height: 44px;
      line-height: 1.2;

      @media screen and (min-width: 700px) {
        font-size: 16px;
        line-height: 1.4;
      }
    }
  }

  [data-rebuy-component="discount-input"] {
    margin-bottom: 21px;

    @media screen and (min-width: 700px) {
      margin-bottom: 16px;
    }

    .rebuy-cart__discount-form {
      gap: 10px;
    }

    .rebuy-input-label {
      display: none;
    }

    .rebuy-input {
      border-radius: 10px;
      border: 1px solid var(--color-grey-80);
      padding: 13px 20px;
      font-size: 16px;
      text-transform: none;
      line-height: 1;
      color: var(--color-grey-6);
      height: 48px;

      @media screen and (min-width: 700px) {
        font-size: 18px;
        height: 49px;
      }

      &:focus-visible {
        border-color: var(--color-red-35) !important;
      }

      &::placeholder {
        color: var(--color-grey-6);
        opacity: 1;
      }
    }

    .rebuy-button {
      height: 48px;
      background-color: var(--color-white);
      color: var(--color-red-35);
      border: 2px solid var(--color-red-35);
      border-radius: var(--rounded-button);
      font-family: var(--bernier-regular-font);
      font-size: 18px;
      font-weight: 400;
      line-height: 1;
      text-transform: lowercase;
      padding-left: 10px;
      padding-right: 10px;
      min-width: 77px;

      @media screen and (min-width: 700px) {
        height: 49px;
        font-size: 24px;
        min-width: 110px;
      }

      &:hover {
        background-color: var(--color-red-35);
        color: var(--color-white);
      }
    }
  }

  [data-rebuy-component="cart-subtotal"] {
    margin-bottom: 6px;

    @media screen and (min-width: 700px) {
      margin-bottom: 13px;
    }

    .rebuy-cart__flyout-subtotal-amount span,
    .rebuy-cart__flyout-subtotal-label {
      font-family: var(--font-bebas);
      font-size: 24px;
      font-style: normal;
      font-weight: 700;
      line-height: 1;
      color: var(--color-grey-6);
    }

    .rebuy-cart__flyout-subtotal-final-amount span {
      color: var(--color-red-35);
    }
  }

  [data-rebuy-component="cart-subtotal"],
  [data-rebuy-component="discount-input"],
  [data-rebuy-component="checkout-area"] {
    padding: 0 20px;
  }

  [data-rebuy-component="checkout-area"] {
    gap: 9px;

    @media screen and (min-width: 700px) {
      gap: 16px;
    }

    .rebuy-button {
      --button-background: var(--button-background-primary) / var(--button-background-opacity, 1);
      height: 50px;
      font-family: var(--bernier-regular-font);
      font-size: 24px;
      font-weight: 400;
      background-color: rgb(var(--button-background));
      color: #F5F8F7;
      border: 0;
      border-radius: var(--rounded-button);
      line-height: 1;
      text-transform: lowercase;

      @media screen and (min-width: 700px) {
        height: 60px;
        font-size: 30px;
      }
    }
  }

  [data-rebuy-component="cross-sell-widget"] {
    padding: 0;

    .widget-layout-list {
      padding: 0 20px;
      background: #EFEDDC;
    }

    .rebuy-carousel__arrows {
      position: absolute;
      right: 20px;
      top: -40px;
      width: 56px;
      height: 24px;

      .splide__arrow {
        width: 24px;
        height: 24px;
        background-color: var(--color-red-24);

        &:hover {
          opacity: 0.8;
        }

        svg {
          height: 8px;
          fill: #fff;
        }
      }
    }

    .rebuy-carousel__pagination {
      bottom: 10px;

      li {
        display: flex;
      }
    }

    .splide__pagination__page {
      width: 8px;
      height: 8px;
      border-radius: 100%;
      background: transparent;
      opacity: 1;
      border: 1px solid var(--color-black);
    }

    .splide__pagination__page.is-active {
      background: var(--color-black);
    }
  
    .rebuy-product-actions,
    .rebuy-product-options,
    .rebuy-product-media,
    .rebuy-product-info {
      width: 100%;
      padding: 0;
      margin: 0;
    }

    .rebuy-product-info {
      display: flex;
      flex-direction: column;
    }

    .rebuy-product-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }

    .rebuy-product-media {
      width: 60px;
    }

    .rebuy-product-title {
      padding: 0;
      margin: 0;
      font-size: 20px;
      font-family: var(--font-bebas);
      font-weight: 400;
      line-height: 1;
      color: var(--color-grey-6);
    }

    .rebuy-product-price {
      margin-top: 2px;
      line-height: 1;

      @media screen and (min-width: 700px) {
        margin-top: 7px;
      }
    }

    .rebuy-product-price span {
      font-family: var(--font-bebas);
      font-size: 17px;
      line-height: 1;
      font-weight: 400;
      color: var(--color-grey-6);

      @media screen and (min-width: 700px) {
        font-size: 17px;
      }
    }

    .rebuy-product-actions {
      width: auto;

      .button {
        height: 48px;
        background-color: var(--color-white);
        color: var(--color-red-35);
        border: 2px solid var(--color-red-35);
        font-family: var(--bernier-regular-font);
        font-size: 18px;
        font-weight: 400;
        line-height: 1;
        text-transform: lowercase;
        padding-left: 5px;
        padding-right: 5px;
        min-width: 58px;

        @media screen and (min-width: 700px) {
          height: 49px;
          font-size: 24px;
        }

        &:hover {
          background-color: var(--color-red-35);
          color: var(--color-white);
        }
      }
    }

    .rebuy-product-block {
      padding: 8px 16px 16px;
      background-color: var(--color-white);
      margin-right: 11px;
      border-radius: 10px;
      max-width: 326px;
      display: flex;
      justify-content: center;

      @media screen and (min-width: 700px) {
        max-width: 358px;
      }
    }

    .primary-title {
      text-align: left;
      color: var(--color-red-24);
      font-family: var(--font-hore);
      font-size: 16px;
      font-weight: 400;
      padding-top: 11px;
      padding-bottom: 12px;

      @media screen and (min-width: 700px) {
        font-size: 24px;
        padding-bottom: 12px;
      }
    }

    .rebuy-product-grid {
      padding: 10px 0 40px;

      @media screen and (min-width: 700px) {
        padding: 10px 0 32px;
      }
    }

    .rebuy-product-options {
      margin-top: 10px;
    }

    .rebuy-product-options .select-wrapper {
      position: relative;

      svg {
        position: absolute;
        top: 50%;
        right: 17px;
        transform: translateY(-50%);
      }
    }

    .rebuy-product-options .select-wrapper select {
      border: 1px solid #ACACAC;
      border-radius: 10px;
      padding: 8px 17px;
      font-size: 14px;
      font-weight: 400;
      height: 44px;
      line-height: 1.2;

      @media screen and (min-width: 700px) {
        font-size: 16px;
        line-height: 1.4;
      }
    }

    .rebuy-product-grid {
      margin-left: -20px;
      margin-right: -20px;
    }

    .rebuy-product-grid .splide__track {
      padding-left: 20px !important;
      padding-right: 20px !important;
    }

    .rebuy-product-grid .splide__pagination {
      padding-right: 20px !important;
    }

    .widget-layout-grid {
      padding: 0 20px;

      .primary-title {
        text-align: center;
      }

      .rebuy-product-grid {
        padding-top: 0;
      }

      .rebuy-product-block {
        margin-right: 0;
        background: transparent;
        padding-bottom: 30px;
      }

      .rebuy-product-media {
        width: 100%;
        max-width: 160px;
      }

      .rebuy-product-inner {
        flex-direction: column;
        align-items: center;
        justify-content: center;
      }

      .rebuy-product-price {
        display: none;
      }

      .rebuy-product-actions {
        display: none;
      }
    }
  }

  [data-rebuy-cart-anchor="body"] {
    gap: 0;
  }

  a:focus-visible, button:focus-visible,
  select:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  .rebuy-cart__progress-free-product-variant-select:focus-visible {
    outline: none !important;
  }
}

#rebuy-cart .rebuy-cart__progress-bar-wrapper,
#rebuy-cart .rebuy-cart__progress-step-wrapper {
  padding-left: 20px;
  padding-right: 20px;
}

#rebuy-cart [data-rebuy-component=progress-bar] {
  padding: 0;
}
