:root {
  --primary: #46c8dd;
  --primary-hover: #35bcd3;
  --text: #173640;
  --muted: #7b8b92;
  --border: #eef0f2;
  --discount: #ef4056;
  --success: #169b72;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font-family: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.cart-app {
  width: 100%;

  min-height: 100vh;
  min-height: 100dvh;

  padding-bottom:
    calc(
      104px +
      env(safe-area-inset-bottom)
    );

  background: #ffffff;
}

/*
|--------------------------------------------------------------------------
| HEADER
|--------------------------------------------------------------------------
*/

.cart-page-header {
  position: sticky;
  top: 0;
  z-index: 100;

  height: auto;

min-height:
  calc(
    58px +
    env(safe-area-inset-top)
  );

padding:
  env(safe-area-inset-top)
  14px
  0;

  border-bottom: 1px solid var(--border);
  background: #ffffff;

  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-back-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;

  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-back-btn span {
  width: 10px;
  height: 10px;

  border-top: 2px solid var(--text);
  border-right: 2px solid var(--text);

  transform: rotate(45deg);
}

.cart-page-title {
  margin: 0;
  flex: 1;

  font-size: 16px;
  font-weight: 800;
}

.cart-page-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| PAGE
|--------------------------------------------------------------------------
*/

.cart-page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;

  /*
   * سمت چپ کمی بیشتر است تا کپسول تخفیف بریده نشود.
   */
  padding: 12px 12px 12px 18px;

  overflow: visible;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;

  overflow: visible;
}

/*
|--------------------------------------------------------------------------
| PRODUCT CARD
|--------------------------------------------------------------------------
*/

.cart-item {
  position: relative;

  min-height: 154px;
  height: auto;
  padding: 11px 12px;

  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;

  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: stretch;
  gap: 8px 10px;

  overflow: visible;
}
/*
|--------------------------------------------------------------------------
| PRODUCT IMAGE
|--------------------------------------------------------------------------
*/

.cart-item-image {
  width: 82px;
  height: 103px;
  min-height: 103px;
  max-height: 103px;

  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  max-width: 82px;
  max-height: 103px;

  padding: 3px;
  object-fit: contain;
  display: block;

  background: transparent;
}


.cart-item-no-image {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| PRODUCT CONTENT
|--------------------------------------------------------------------------
*/

.cart-item-content {
  min-width: 0;
  min-height: 132px;

  display: flex;
  flex-direction: column;
}
.cart-item-name {
  min-height: 42px;

  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;

  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cart-item-variant {
  min-height: 19px;
  margin-top: 2px;

  color: #63737a;
  font-size: 11.5px;
  font-weight: 700;

  display: flex;
  align-items: center;
  gap: 5px;
}

.cart-item-color-dot {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;

  border: 1px solid rgba(15, 41, 49, 0.12);
  border-radius: 5px;
}

/*
|--------------------------------------------------------------------------
| PRODUCT PRICE
|--------------------------------------------------------------------------
*/
.cart-item-middle {
  position: absolute;

  left: 12px;
  bottom: 11px;

  width: calc(100% - 122px);
  min-height: 30px;
  margin: 0;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  overflow: visible;
}

.cart-item-price-box {
  min-width: 0;
  margin: 0;
transform: translateX(18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;

  text-align: center;
  direction: rtl;
}
.cart-item-old-price-row {
  width: 100%;
  min-height: 17px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-old-price {
  position: relative;
  display: inline-block;
  width: max-content;

  color: #9aa6ad;
  font-size: 12.7px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;

  text-decoration: none;

  transform: translateX(4px);
}

.cart-item-old-price::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  top: 40%;

  height: 0.70px;
  background: #9aa6ad;

  transform: translateY(-50%);
  pointer-events: none;
}
.cart-item-current-price {
  margin-top: 2px;

  color: var(--text);
  font-size: 14.5px;
  font-weight: 900;
  line-height: 1.35;

  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;

  direction: rtl;
  text-align: center;
  white-space: nowrap;
}

/*
|--------------------------------------------------------------------------
| DISCOUNT RIBBON
|--------------------------------------------------------------------------
*/

/*
 * در PHP بهتر است کلاس درصد تخفیف:
 * cart-item-discount-ribbon
 * باشد.
 */

.cart-item-discount-ribbon,
.cart-item-discount {
  position: absolute;
  left: -12px;
  top: 22%;
  transform: translateY(-50%);

  min-width: 37px;
  height: 18px;
  padding: 0 6px;

  border-radius: 0 999px 999px 0;
  background: var(--discount);
  color: #ffffff;

  font-size: 10px;
  font-weight: 900;
  line-height: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  white-space: nowrap;
  z-index: 4;

  box-shadow: 0 3px 9px rgba(239, 64, 86, 0.17);
}
/*
|--------------------------------------------------------------------------
| QUANTITY
|--------------------------------------------------------------------------
*/

.cart-item-bottom {
  position: absolute;
  right: 12px;
  bottom: 11px;

  width: 88px;
  min-height: 30px;
  margin: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 5;
}

.cart-quantity {
  position: relative;

  width: 88px;
  height: 30px;

  border: 1px solid #e3e7ea;
  border-radius: 9px;
  background: #ffffff;
  overflow: hidden;

  display: grid;
  grid-template-columns: 28px 32px 28px;
  align-items: center;

  direction: ltr;
}

.cart-qty-btn {
  width: 28px;
  height: 30px;
  min-width: 28px;
  padding: 0;
  border: 0;

  background: transparent;
  color: var(--primary);

  font-family: inherit;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

.cart-qty-btn:disabled {
  cursor: default;
}

.cart-quantity input {
  width: 32px;
  height: 30px;
  padding: 0;

  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);

  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 30px;
  text-align: center;

  pointer-events: none;
  user-select: none;

  -moz-appearance: textfield;
}

.cart-quantity input::-webkit-inner-spin-button,
.cart-quantity input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.cart-minus-symbol[hidden],
.cart-trash-icon[hidden] {
  display: none !important;
}

.cart-trash-icon {
  width: 15px;
  height: 15px;

  background: var(--primary);

  -webkit-mask: url("/icons/trash.svg") center / contain no-repeat;
  mask: url("/icons/trash.svg") center / contain no-repeat;
}

/*
|--------------------------------------------------------------------------
| ITEM LOADING
|--------------------------------------------------------------------------
*/

.cart-item-loading {
  position: absolute;
  inset: 0;
  z-index: 20;

  display: none;
  align-items: center;
  justify-content: center;
  gap: 5px;

  border-radius: inherit;
  background: rgba(255, 255, 255, 0.95);

  pointer-events: none;
}

.cart-item.is-loading .cart-item-loading {
  display: flex;
}

.cart-item-loading i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;

  border-radius: 50%;
  background: var(--primary);

  animation: cart-dot 0.9s infinite ease-in-out;
}

.cart-item-loading i:nth-child(2) {
  animation-delay: 0.15s;
}

.cart-item-loading i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes cart-dot {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }

  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/*
|--------------------------------------------------------------------------
| SUMMARY
|--------------------------------------------------------------------------
*/

.cart-summary {
  margin-top: 12px;
  padding: 13px 14px;

  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
}

.cart-summary-row {
  min-height: 39px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  color: #62737a;
  font-size: 13px;
}

.cart-summary-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.cart-summary-row strong {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 900;
  white-space: nowrap;
}

/*
 * ردیف تخفیف و مبلغ آن سبز
 */
.cart-summary-discount,
.cart-summary-row.is-discount {
  color: var(--success);
}

.cart-summary-discount span,
.cart-summary-discount strong,
.cart-summary-discount small,
.cart-summary-row.is-discount span,
.cart-summary-row.is-discount strong,
.cart-summary-row.is-discount small {
  color: var(--success);
}

.cart-summary-final {
  margin-top: 6px;
  padding-top: 10px;

  border-top: 1px solid var(--border);

  color: var(--text);
  font-weight: 900;
}

/*
|--------------------------------------------------------------------------
| EMPTY CART
|--------------------------------------------------------------------------
*/

.cart-empty {
  min-height: 62vh;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.cart-empty-icon {
  width: 72px;
  height: 72px;

  background: var(--primary);

  -webkit-mask: url("/icons/basket.svg") center / contain no-repeat;
  mask: url("/icons/basket.svg") center / contain no-repeat;

  opacity: 0.8;
}

.cart-empty h2 {
  margin: 18px 0 6px;

  font-size: 17px;
  font-weight: 900;
}

.cart-empty p {
  max-width: 290px;
  margin: 0;

  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}

.cart-empty-button {
  height: 42px;
  margin-top: 18px;
  padding: 0 20px;

  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;

  font-size: 13px;
  font-weight: 900;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/*
|--------------------------------------------------------------------------
| CHECKOUT BAR
|--------------------------------------------------------------------------
*/

.cart-checkout-bar {
  position: fixed;
  right:
  max(
    10px,
    env(safe-area-inset-right)
  );

left:
  max(
    10px,
    env(safe-area-inset-left)
  );

bottom:
  calc(
    8px +
    env(safe-area-inset-bottom)
  );
  z-index: 200;

  min-height: 72px;
  padding: 8px 10px;

  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;

  /*
   * در صفحه RTL ستون اول سمت راست است؛
   * پس دکمه فرایند خرید سمت راست قرار می‌گیرد.
   */
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  align-items: center;
  gap: 10px;

  box-shadow: 0 8px 30px rgba(15, 41, 49, 0.09);
}

.cart-checkout-btn {
  grid-column: 1;

  height: 46px;

  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;

  font-size: 13px;
  font-weight: 900;

  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-checkout-btn:active {
  background: var(--primary-hover);
}

.cart-checkout-price {
  grid-column: 2;

  min-width: 0;
  padding-left: 12px;
  padding-right: 6px;

  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;

  text-align: left;
}

.cart-checkout-price > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.cart-checkout-price strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;

  white-space: nowrap;
}
.cart-message-box {
  position: fixed;
  right: 16px;
  left: 16px;
  bottom:
  calc(
    92px +
    env(safe-area-inset-bottom)
  );
  z-index: 999999;

  max-width: 440px;
  min-height: 48px;
  margin: 0 auto;
  padding: 12px 14px;

  border: 1px solid #e6eaed;
  border-radius: 12px;
  background: #ffffff;
  color: #173640;

  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.8;
  text-align: right;
  direction: rtl;

  display: flex;
  align-items: center;

  box-shadow: 0 8px 28px rgba(15, 41, 49, 0.12);

  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;

  pointer-events: none;
}

.cart-message-box.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cart-message-box.is-error {
  border-color: #ffd4d4;
  background: #fff7f7;
  color: #c93838;
}

.cart-message-box.is-success {
  border-color: #cdeee5;
  background: #f4fffb;
  color: #16835f;
}

/*
|--------------------------------------------------------------------------
| SMALL SCREENS
|--------------------------------------------------------------------------
*/

/*
|--------------------------------------------------------------------------
| CART LOGIN BOTTOM SHEET
|--------------------------------------------------------------------------
*/

.cart-login-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;

  background: rgba(0, 0, 0, 0.45);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.cart-login-sheet-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cart-login-sheet {
  position: fixed;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 9999;

  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding:
  14px
  16px
  calc(
    22px +
    env(safe-area-inset-bottom)
  );

  background: #fff;
  border-radius: 22px 22px 0 0;

  transform: translateY(110%);
  transition: transform 0.25s ease;
}
.cart-login-sheet.is-open {
  transform: translateY(0);
}







.cart-login-sheet-handle {
  width: 44px;
  height: 5px;
  margin: 0 auto 14px;

  border-radius: 999px;
  background: #dfe5e8;
}

.cart-login-sheet-close {
  position: absolute;
  top: 13px;
  left: 16px;

  width: 36px;
  height: 36px;
  padding: 0;

  border: 0;
  border-radius: 50%;
  background: #f3f5f6;
  color: var(--text);

  font-size: 24px;
  line-height: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

.cart-login-sheet-content {
  padding-top: 6px;
  text-align: center;
}

.cart-login-sheet-content h2 {
  margin: 0;

  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.cart-login-sheet-content p {
  max-width: 330px;
  margin: 10px auto 20px;

  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.9;
}

.cart-login-sheet-button {
  width: calc(100% - 32px);
  max-width: 360px;
  height: 48px;
  margin: 0 auto;

  border-radius: 13px;
  background: var(--primary);
  color: #ffffff;

  font-size: 14px;
  font-weight: 900;

  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-login-sheet-button:active {
  background: var(--primary-hover);
}

body.cart-login-sheet-open {
  overflow: hidden;
}
/* =========================================================
   CART RESPONSIVE
========================================================= */

@media (max-width: 359px) {

  .cart-page {
    padding:
      10px
      9px
      10px
      15px;
  }

  .cart-page-header {
    padding-right: 10px;
    padding-left: 10px;
  }

  .cart-item {
    min-height: 150px;

    padding-right: 9px;
    padding-left: 9px;

    grid-template-columns:
      76px
      minmax(0, 1fr);

    gap: 7px 8px;
  }

  .cart-item-image {
    width: 76px;
    height: 96px;
    min-height: 96px;
    max-height: 96px;
  }

  .cart-item-image img {
    max-width: 76px;
    max-height: 96px;
  }

  .cart-item-name {
    font-size: 12px;
  }

  .cart-item-variant {
    font-size: 10.5px;
  }

  .cart-item-middle {
    left: 9px;
    width: calc(100% - 110px);
  }

  .cart-item-bottom {
    right: 9px;
  }

  .cart-item-price-box {
    transform: translateX(12px);
  }

  .cart-item-current-price {
    font-size: 13px;
  }

  .cart-checkout-bar {
    right: 8px;
    left: 8px;

    padding:
      7px
      8px;

    gap: 7px;

    grid-template-columns:
      132px
      minmax(0, 1fr);
  }

  .cart-checkout-btn {
    font-size: 11.5px;
  }

  .cart-checkout-price {
    padding-right: 2px;
    padding-left: 2px;
  }

  .cart-checkout-price > span {
    font-size: 10px;
  }

  .cart-checkout-price strong {
    font-size: 13px;
  }

  .cart-summary {
    padding-right: 11px;
    padding-left: 11px;
  }
}


/* =========================================================
   CART TABLET
========================================================= */

@media (
  min-width: 600px
) and (
  max-width: 899px
) {

  .cart-page {
    max-width: 760px;

    padding:
      18px
      18px
      18px
      24px;
  }

  .cart-items {
    gap: 13px;
  }

  .cart-item {
    padding: 15px;
  }

  .cart-summary {
    margin-top: 16px;
    padding: 18px;
  }

  .cart-checkout-bar {
    right: auto;
    left: 50%;

    width: min(
      calc(100% - 40px),
      720px
    );

    transform: translateX(-50%);
  }

  .cart-login-sheet {
    max-width: 560px;
  }
}


/* =========================================================
   CART DESKTOP
========================================================= */

@media (min-width: 900px) {

  body {
    background: #f7f8f9;
  }

  .cart-app {
    padding-bottom: 130px;
    background: #f7f8f9;
  }

  .cart-page-header {
    padding-right:
      max(
        24px,
        calc((100vw - 900px) / 2)
      );

    padding-left:
      max(
        24px,
        calc((100vw - 900px) / 2)
      );
  }

  .cart-page-title {
    font-size: 18px;
  }

  /*
   * در دسکتاپ، محصولات و خلاصه سفارش
   * در دو ستون نمایش داده می‌شوند.
   */
  .cart-page {
    width: 100%;
    max-width: 900px;

    margin-right: auto;
    margin-left: auto;

    padding:
      24px
      24px
      24px
      30px;

    display: grid;

    grid-template-columns:
      minmax(0, 1fr)
      300px;

    align-items: start;
    gap: 20px;
  }

  .cart-items {
    min-width: 0;
    grid-column: 1;
    gap: 14px;
  }

  .cart-item {
    min-height: 166px;
    padding: 14px;
  }

  .cart-item-name {
    font-size: 13.5px;
  }

  .cart-summary {
    grid-column: 2;

    position: sticky;
    top: 82px;

    margin-top: 0;
    padding: 18px;
  }

  .cart-summary-row {
    min-height: 44px;
  }

  .cart-empty {
    grid-column: 1 / -1;
  }

  /*
   * نوار ثبت سفارش دسکتاپ
   */
  .cart-checkout-bar {
    right: auto;
    left: 50%;

    bottom:
      calc(
        24px +
        env(safe-area-inset-bottom)
      );

    width: min(
      calc(100% - 48px),
      720px
    );

    min-height: 80px;
    padding: 9px 10px;

    grid-template-columns:
      180px
      minmax(0, 1fr);

    gap: 12px;

    transform: translateX(-50%);

    box-shadow:
      0
      12px
      35px
      rgba(15, 41, 49, 0.13);
  }

  .cart-checkout-btn {
    height: 52px;
    font-size: 14px;
  }

  .cart-checkout-price strong {
    font-size: 16px;
  }

  .cart-message-box {
    bottom: 118px;
  }

  .cart-login-sheet {
    max-width: 580px;

    padding:
      20px
      24px
      30px;
  }

  .cart-login-sheet-content h2 {
    font-size: 19px;
  }
}


/* =========================================================
   CART DESKTOP HOVER
========================================================= */

@media (
  min-width: 900px
) and (
  hover: hover
) and (
  pointer: fine
) {

  .cart-item,
  .cart-checkout-btn,
  .cart-empty-button,
  .cart-login-sheet-button {
    transition:
      transform 0.18s ease,
      border-color 0.18s ease,
      background-color 0.18s ease;
  }

  .cart-item:hover {
    border-color:
      rgba(70, 200, 221, 0.32);
  }

  .cart-checkout-btn:hover,
  .cart-empty-button:hover,
  .cart-login-sheet-button:hover {
    background: var(--primary-hover);
  }
}
/*
|--------------------------------------------------------------------------
| Cart Recommendations
|--------------------------------------------------------------------------
*/

.cart-recommendations {
  width: 100%;
  margin: 12px 0 18px;
  padding: 15px 0 12px;

  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;

  overflow: hidden;
}

.cart-recommendations-header {
  margin-bottom: 12px;
  padding: 0 13px;
}

.cart-recommendations-header h2 {
  margin: 0;

  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.7;
}

.cart-recommendations-header p {
  margin: 2px 0 0;

  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
}

.cart-recommendations-track {
  width: 100%;
  padding: 0 0 4px;

  display: flex;
  align-items: stretch;
  gap: 0;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-snap-type: x mandatory;
  scroll-padding-inline: 14px;
  overscroll-behavior-inline: contain;

  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

/*
 * فاصله واقعی ابتدا و انتهای اسکرول.
 * در حالت RTL از margin مطمئن تر است.
 */
.cart-recommendations-track::before,
.cart-recommendations-track::after {
  content: "";
  display: block;
  flex: 0 0 14px;
}

/*
 * فاصله بین کارت ها
 */
.cart-recommendation-card +
.cart-recommendation-card {
  margin-right: 10px;
}
.cart-recommendations-track::-webkit-scrollbar {
  display: none;
}

.cart-recommendation-card {
  width: 150px;
  min-width: 150px;

  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;

  display: flex;
  flex-direction: column;

  overflow: hidden;
  scroll-snap-align: start;
  
}

/*
|--------------------------------------------------------------------------
| Recommendation Image
|--------------------------------------------------------------------------
*/

.cart-recommendation-image {
  width: 100%;
  height: 145px;
  padding: 6px;

  border: 0;
  border-radius: 0;
  background: transparent;

  color: var(--muted);

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
}

.cart-recommendation-image img {
  width: 100%;
  height: 100%;
  padding: 2px;

  object-fit: contain;
  display: block;

  background: transparent;
}

.cart-recommendation-image > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

/*
|--------------------------------------------------------------------------
| Recommendation Content
|--------------------------------------------------------------------------
*/

.cart-recommendation-content {
  min-width: 0;
  min-height: 112px;
  padding: 8px 9px 9px;

  display: flex;
  flex: 1;
  flex-direction: column;

  border-top: 1px solid var(--border);
}

.cart-recommendation-name {
  min-height: 39px;

  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.75;

  display: -webkit-box;
  overflow: hidden;

  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cart-recommendation-variant {
  min-width: 0;
  min-height: 20px;
  margin-top: 3px;

  color: #63737a;
  font-size: 9.5px;
  font-weight: 700;

  display: flex;
  align-items: center;
  gap: 5px;
}

.cart-recommendation-variant > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-recommendation-color {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;

  border: 1px solid rgba(15, 41, 49, 0.12);
  border-radius: 4px;
}

/*
|--------------------------------------------------------------------------
| Recommendation Price And Button
|--------------------------------------------------------------------------
*/

.cart-recommendation-bottom {
  min-width: 0;
  margin-top: auto;
  padding-top: 8px;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
}

.cart-recommendation-price {
  min-width: 0;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.cart-recommendation-price del {
  margin-bottom: 1px;

  color: #9aa6ad;
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1.3;
}

.cart-recommendation-price strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.45;
  white-space: nowrap;
}

.cart-recommendation-price small {
  margin-right: 2px;

  color: var(--muted);
  font-size: 7px;
  font-weight: 600;
}

/*
|--------------------------------------------------------------------------
| Recommendation Add Button
|--------------------------------------------------------------------------
*/

.cart-recommendation-add {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;

  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

.cart-recommendation-add:disabled {
  cursor: default;
  opacity: 0.6;
}

.cart-recommendation-cart-icon {
  width: 20px;
  height: 20px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-recommendation-cart-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/*
|--------------------------------------------------------------------------
| Recommendation Loading
|--------------------------------------------------------------------------
*/

.cart-recommendation-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.cart-recommendation-loading i {
  width: 4px;
  height: 4px;

  border-radius: 50%;
  background: #ffffff;

  animation:
    cart-recommendation-dot
    800ms
    infinite
    ease-in-out;
}

.cart-recommendation-loading i:nth-child(2) {
  animation-delay: 120ms;
}

.cart-recommendation-loading i:nth-child(3) {
  animation-delay: 240ms;
}

.cart-recommendation-add.is-loading
.cart-recommendation-cart-icon {
  display: none;
}

.cart-recommendation-add.is-loading
.cart-recommendation-loading {
  display: flex;
}

@keyframes cart-recommendation-dot {
  0%,
  100% {
    opacity: 0.35;
  }

  50% {
    opacity: 1;
  }
}

/*
|--------------------------------------------------------------------------
| Recommendation Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 359px) {
  .cart-recommendation-card {
    width: 142px;
    min-width: 142px;
  }

  .cart-recommendation-image {
    height: 137px;
  }

  .cart-recommendation-price strong {
    font-size: 10px;
  }
}

@media (min-width: 600px) {
  .cart-recommendation-card {
    width: 166px;
    min-width: 166px;
  }

  .cart-recommendation-image {
    height: 158px;
  }
}

@media (min-width: 900px) {
  .cart-recommendations {
    grid-column: 1 / -1;
    margin-top: 0;
  }

.cart-recommendations-header {
    padding-right: 17px;
    padding-left: 17px;
}

.cart-recommendations-track {
  scroll-padding-inline: 17px;
}

.cart-recommendations-track::before,
.cart-recommendations-track::after {
  flex-basis: 17px;
}
}
/*
|--------------------------------------------------------------------------
| Cart Coupon
|--------------------------------------------------------------------------
*/

.cart-coupon {
    margin-top: 12px;
    padding: 13px;

    border: 1px solid rgba(15, 41, 49, .07);
    border-radius: 13px;

    background: #ffffff;
}

.cart-coupon-head {
    margin-bottom: 10px;
}

.cart-coupon-head strong {
    display: block;

    color: #0f2931;

    font-size: 12px;
    font-weight: 700;
}

.cart-coupon-head span {
    display: block;

    margin-top: 2px;

    color: #7d98a1;

    font-size: 9px;
}


/*
|--------------------------------------------------------------------------
| Coupon Form
|--------------------------------------------------------------------------
*/

.cart-coupon-form {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        76px;

    gap: 7px;
}

.cart-coupon-input {
    width: 100%;
    min-width: 0;
    height: 42px;

    padding: 0 11px;

    border:
        1px solid
        rgba(15, 41, 49, .10);

    border-radius: 10px;

    outline: 0;

    background: #ffffff;
    color: #173640;

    font: inherit;

    direction: ltr;
    text-align: left;

    text-transform: uppercase;

    transition:
        border-color .16s ease,
        box-shadow .16s ease;
}

.cart-coupon-input::placeholder {
    color: #9eb0b6;
}

.cart-coupon-input:focus {
    border-color: #46c8dd;

    box-shadow:
        0 0 0 3px
        rgba(70, 200, 221, .10);
}


/*
|--------------------------------------------------------------------------
| Apply Button
|--------------------------------------------------------------------------
*/

.cart-coupon-button {
    min-width: 76px;
    height: 42px;

    padding: 0 10px;

    border: 0;
    border-radius: 10px;

    background: #46c8dd;
    color: #ffffff;

    font: inherit;
    font-size: 10px;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        opacity .16s ease,
        transform .16s ease;
}

.cart-coupon-button:active {
    transform: scale(.97);
}

.cart-coupon-button:disabled {
    cursor: wait;
    opacity: .72;
}


/*
|--------------------------------------------------------------------------
| Coupon Messages
|--------------------------------------------------------------------------
*/

.cart-coupon-message {
    margin-bottom: 9px;
    padding: 8px 9px;

    border-radius: 8px;

    font-size: 9px;
    font-weight: 600;
    line-height: 1.8;
}

.cart-coupon-message.is-success {
    border:
        1px solid
        rgba(22, 152, 115, .10);

    background: #eafaf4;
    color: #169873;
}

.cart-coupon-message.is-error {
    border:
        1px solid
        rgba(225, 29, 72, .10);

    background: #fff0f3;
    color: #e11d48;
}


/*
|--------------------------------------------------------------------------
| Applied Coupon
|--------------------------------------------------------------------------
*/

.cart-coupon-applied {
    min-height: 48px;

    padding: 8px 9px;

    border:
        1px solid
        rgba(22, 152, 115, .12);

    border-radius: 10px;

    background: #eafaf4;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}

.cart-coupon-applied-info {
    min-width: 0;
}

.cart-coupon-applied-info span {
    display: block;

    color: #6f9289;

    font-size: 8px;
}

.cart-coupon-applied-info strong {
    display: block;

    margin-top: 2px;

    color: #169873;

    font-size: 11px;
    font-weight: 700;

    direction: ltr;
    text-align: right;

    overflow-wrap: anywhere;
}


/*
|--------------------------------------------------------------------------
| Remove Coupon
|--------------------------------------------------------------------------
*/

.cart-coupon-remove {
    min-width: 54px;
    height: 32px;

    padding: 0 9px;

    border:
        1px solid
        rgba(225, 29, 72, .11);

    border-radius: 8px;

    background: #ffffff;
    color: #e11d48;

    font: inherit;
    font-size: 9px;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        opacity .16s ease,
        transform .16s ease;
}

.cart-coupon-remove:active {
    transform: scale(.96);
}

.cart-coupon-remove:disabled {
    cursor: wait;
    opacity: .68;
}


/*
|--------------------------------------------------------------------------
| Coupon In Summary
|--------------------------------------------------------------------------
*/

.cart-summary-coupon {
    color: #169873;
}

.cart-summary-coupon > span {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 4px;
}

.cart-summary-coupon small {
    padding: 2px 6px;

    border-radius: 999px;

    background: #eafaf4;
    color: #169873;

    font-size: 8px;
    font-weight: 700;

    direction: ltr;
}

.cart-summary-coupon strong {
    color: #169873;
}


/*
|--------------------------------------------------------------------------
| Coupon Three Dot Loading
|--------------------------------------------------------------------------
*/

.cart-coupon-loading {
    height: 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 3px;
}

.cart-coupon-loading[hidden] {
    display: none;
}

.cart-coupon-loading i {
    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: currentColor;

    animation:
        cartCouponLoadingDot
        .9s
        infinite
        ease-in-out;
}

.cart-coupon-loading i:nth-child(2) {
    animation-delay: .12s;
}

.cart-coupon-loading i:nth-child(3) {
    animation-delay: .24s;
}

@keyframes cartCouponLoadingDot {

    0%,
    60%,
    100% {
        opacity: .30;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-3px);
    }
}


/*
|--------------------------------------------------------------------------
| Small Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 340px) {

    .cart-coupon {
        padding: 11px;
    }

    .cart-coupon-form {
        grid-template-columns:
            minmax(0, 1fr)
            68px;
    }

    .cart-coupon-button {
        min-width: 68px;
    }
}