:root {
  --cv-cart-green: #427a25;
  --cv-cart-mint: #67c5a5;
  --cv-cart-lime: #96cb6f;
  --cv-cart-line: #dedede;
}

body.cv-side-cart-open {
  overflow: hidden;
}

/* The custom shortcode is the active cart UI on the frontend. */
html.cv-has-side-cart body:not(.elementor-editor-active) .elementor-menu-cart__container {
  display: none !important;
}

#cv-side-cart.cv-scart {
  position: fixed;
  inset: 0;
  z-index: 100000;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
  font-family: "Inter Tight", Inter, Arial, sans-serif;
  color: #000;
}

#cv-side-cart.cv-scart.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.cv-scart__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .19);
  backdrop-filter: blur(5.4px);
  -webkit-backdrop-filter: blur(5.4px);
  cursor: default;
}

.cv-scart__panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(65.2vw, 1043px);
  min-width: 520px;
  height: 100%;
  padding: 90px 38px 38px;
  overflow: hidden;
  border-radius: 30px 0 0 30px;
  background: #fff;
  box-shadow: -12px 0 35px rgba(0, 0, 0, .08);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}

#cv-side-cart.cv-scart.is-open .cv-scart__panel {
  transform: translateX(0);
}

.cv-scart__close {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 2;
  padding: 0;
  border-radius: 50% !important;
  background: transparent;
  cursor: pointer;

  border: 2px solid rgba(0, 0, 0, 1) !important;
  color: transparent !important;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
}

.cv-scart__close::before,
.cv-scart__close::after {
    content: "";
    position: absolute;
    top: 17px;
    left: 9px;
    width: 18px;
    height: 1.5px;
    background: #000;
}

.cv-scart__close::before { transform: rotate(45deg); }
.cv-scart__close::after { transform: rotate(-45deg); }

.cv-scart__heading {
  position: relative;
  flex: 0 0 auto;
  padding-bottom: 36px;
}

.cv-scart__heading::after {
  content: "";
  position: absolute;
  left: 0;
  top: 36px;
  width: 85px;
  height: 6px;
  background: #000;
}

.cv-scart__label {
  font-family: Inter Tight;
  font-weight: 300;
  font-size: 18px;
  line-height: 100%;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0 0 20px;
}

.cv-scart__title {
  margin: 0;
  color: #000;
  font-family: Inter Tight;
  font-weight: 500;
  font-size: 52px;
  line-height: 100%;
  letter-spacing: -0.03em;
  padding: 16px 0 0;
}

.cv-scart__items {
  flex: 0 0 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--cv-cart-line);
  scrollbar-color: #d8d8d8 transparent;
  scrollbar-width: thin;
}

.cv-scart__items::-webkit-scrollbar { width: 4px; }
.cv-scart__items::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #d8d8d8;
}

.cv-scart__item {
  display: grid;
  grid-template-columns: 109px minmax(0, 1fr) auto 66px auto 30px;
  grid-template-rows: 100px;
  column-gap: 8px;
  align-items: start;
  box-sizing: border-box;
  min-height: 100px;
  padding: 0;
}

.cv-scart__item + .cv-scart__item {
  margin-top: 23px;
}

.cv-scart__item.is-loading {
  opacity: .55;
  pointer-events: none;
}

.cv-scart__thumb {
  grid-column: 1;
  grid-row: 1;
  display: block;
  width: 109px;
  height: 100px;
}

.cv-scart__thumb img {
  display: block;
  width: 109px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
}

.cv-scart__info {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  height: 100px;
  padding-left: 12px;
}

.cv-scart__name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-family: Inter Tight;
  font-weight: 400;
  font-size: 30px;
  line-height: 100%;
  letter-spacing: -0.03em;
  color: rgba(66, 122, 37, 1);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-scart__name:hover,
.cv-scart__name:focus { color: #315d1c; }

.cv-scart__sku,
.cv-scart__disc-note,
.cv-scart__meta {
  margin-top: 7px;
  color: #000;
  font-size: 10px;
  line-height: 1;
}

.cv-scart__meta dl,
.cv-scart__meta p { margin: 0; }
.cv-scart__meta dd { display: inline; margin: 0 0 0 3px; }
.cv-scart__meta dt { display: inline; font-weight: 600; }
.cv-scart__meta { display: none; }

.cv-scart__badge {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  margin-top: 16px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #000;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.cv-scart__item  .cv-scart__qty {
  grid-column: 4;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  width: 66px;
  height: 30px;
  margin-top: 10px;
  padding: 0 10px;
  border-radius: 90px;
  background: #f0f0f0;
  color: #000;
  font-size: 16px;
  line-height: 1;
}

.cv-scart__item .cv-scart__qty-btn {
  width: 12px;
  height: 30px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #000;
  font-size: 16px;
  font-weight: 300;
  line-height: 30px;
  cursor: pointer;

  &.minus {
    padding: 0 6px 0 0;
  }

  &.plus {
    padding: 0 0 0 6px;
  }
}

.cv-scart__qty-num { min-width: 10px; text-align: center; }

.cv-scart__prices {
  font-family: Inter Tight;
  grid-column: 5;
  grid-row: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
  color: rgba(66, 122, 37, 1);
  font-size: 30px;
  line-height: 1;
  white-space: nowrap;
}

.cv-scart__price-now .amount,
.cv-scart__price-old .amount { color: inherit; }
.cv-scart__price-old { color: rgba(0, 0, 0, .5); text-decoration: line-through; }

.cv-scart__item .cv-scart__remove {
  grid-column: 6;
  grid-row: 1;
  align-self: start;
  background: transparent;
  font-weight: 300;
  cursor: pointer;
  padding: 0 0 2px;
  width: 18px;
  height: 18px;
  border: 2px solid #000;
  border-radius: 50%;
  line-height: 13px;
  text-align: center;
  color: #000;
  margin: 13px 0 0;
}

.cv-scart__remove:hover,
.cv-scart__remove:focus { color: var(--cv-cart-green); }

.cv-scart__empty {
  padding: 30px 0;
  color: #555;
  font-size: 18px;
}

.cv-scart__footer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-top: 34px;
}

.cv-scart__actions { min-width: 0; }

.cv-scart__order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  min-height: 50px;
  box-sizing: border-box;
  padding: 15px 34px;
  border-radius: 81px;
  background: linear-gradient(105deg, var(--cv-cart-mint), var(--cv-cart-lime));
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: filter .2s ease, transform .2s ease;
  text-transform: uppercase;
}

.cv-scart__order-btn:hover,
.cv-scart__order-btn:focus { color: #fff; filter: brightness(.94); transform: translateY(-1px); }

.cv-scart__legal {
  max-width: 300px;
  margin-top: 9px;
  color: #555;
  font-size: 11px;
  line-height: 1.35;
}

.cv-scart__legal a { color: inherit; text-decoration: underline; }

.cv-scart__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  color: #000;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;

  > span {
    color: rgba(66, 122, 37, 1);
  }
}

.cv-scart__total .amount { color: var(--cv-cart-green); }

.cv-scart__perks {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: auto;
  padding-top: 24px;
  color: #000;
  font-size: 15px;
  line-height: 1.2;
}

@media (max-width: 1199px) {
  .cv-scart__panel {
    left: 9.5vw;
    width: auto;
    min-width: 0;
    padding-right: 19px;
    padding-left: 19px;
  }

  .cv-scart__name,
  .cv-scart__prices { font-size: 18px; }

  .cv-scart__items { padding-bottom: 24px; }
}

@media (max-width: 767px) {
  .cv-scart__panel {
    left: 10px;
    padding: 90px 12px 28px;
    border-radius: 30px 0 0 30px;
  }

  .cv-scart__close { top: 17px; right: 18px; }
  .cv-scart__heading { margin-bottom: 28px; padding-bottom: 19px; }
  .cv-scart__title { font-size: 31px; }

  .cv-scart__item {
    grid-template-columns: 109px minmax(0, 1fr) 24px;
    grid-template-rows: 100px;
    column-gap: 19px;
    min-height: 147px;
  }

  .cv-scart__thumb,
  .cv-scart__thumb img {
    width: 109px;
    height: 100px;
  }

  .cv-scart__info {
    grid-column: 2;
    grid-row: 1;
  }

  .cv-scart__badge { display: none; }

  .cv-scart__qty {
    grid-column: 2;
    grid-row: 1;
    margin-top: 67px;
  }

  .cv-scart__name,
  .cv-scart__prices { font-size: 18px; }

  .cv-scart__prices {
    grid-column: 2;
    grid-row: 1;
    margin-top: 104px;
  }

  .cv-scart__remove {
    grid-column: 3;
    grid-row: 1;
    width: 24px;
    height: 24px;
    margin-top: 101px;
    font-size: 18px;
  }

  .cv-scart__items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .cv-scart__footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
  }

  .cv-scart__order-btn {
    display: flex;
    width: 100%;
  }

  .cv-scart__perks { display: none; }
  .cv-scart__total { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  #cv-side-cart.cv-scart,
  .cv-scart__panel,
  .cv-scart__order-btn { transition: none; }
}
