/* icon cart header */

.cart-trigger {
  position: relative;
  cursor: pointer;
}

.cart-trigger .icon-svg {
  color: #fff;
}

.cart-trigger .cart-counter {
  position: absolute;
  top: -8px;
  right: -8px;
  background: red;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  padding: 4px 7px;
  line-height: 1;
  min-width: 20px;
  text-align: center;
}

/* Cart popup */

.small-cart-item-wrapper {
  max-height: calc(100vh - 100px);
  overflow-y: auto;

  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  width: 340px;
  background: #fff;
  border: 1px solid var(--primary-background);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  /* transform: translateY(12px); */
  transform: translateX(20%) !important;
  transition: all 0.25s ease;
  z-index: 1000;
  font-family: Montserrat, sans-serif;
}

.cart-trigger:hover .small-cart-item-wrapper,
.small-cart-item-wrapper:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.item-cart-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
}

.item-cart-header + .item-cart-header {
  border-top: 1px solid #efefef;
  padding-top: 15px;
}

.item-cart-header:last-child {
  border-bottom: none;
}

.item-cart-header .image img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 8px;
}

.item-cart-header .content {
  flex: 1;
}

.item-cart-header .content .cart-name a {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-color2) !important;
  text-decoration: none;
  line-height: 1.4;
  display: block;
}

.item-cart-header .content .attribute-text-cart {
  font-size: 13px;
  line-height: 22px;
  margin-top: 3px;
}

.item-cart-header .content .cart-quantity {
  font-size: 13px;
  margin-top: 4px;
  line-height: 18px;
}

.item-cart-header .content .cart-quantity .price-box {
  border-left: 1px solid #ccc;
  padding-left: 10px;
  width: 90px;
  text-align: right;
  justify-content: end;
}

.item-cart-header .fa-close {
  margin-left: auto;
  cursor: pointer;
  /* color: var(--primary-color2); */
  transition: color 0.2s;
}
.item-cart-header .fa-close:hover {
  /* color: #e74c3c; */
}

/* === TỔNG ĐƠN === */
.cart-calculation-table {
  font-size: 14px;
  font-weight: 500;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #efefef;
}

.cart-calculation-table table {
  margin-bottom: 10px;
}

.cart-calculation-table table td {
  border: unset;
  padding: 0;
}

.cart-calculation-table .cart-buttons .btn {
  border-radius: 20px;
  width: 100%;
}

/** Cart page */

.price-old {
  opacity: 0.7;
}

.text-note {
  background-color: #ffc500;
  border-radius: 5px;
  border: 1px solid #eee;
}

.checkout-page .order-table td {
  border: 1px solid #ccc;
}

.cart-page th,
.checkout-page th {
  border: 1px solid #e3e3e3;
  background-color: #ededed;
  border-bottom: none;
}

.cart-page .tr-statistic,
.cart-page .item-cart td {
  border: 1px solid #eeeeee;
}

.cart-page .tr-statistic td.title {
  background-color: #ededed;
  border: 1px solid #e3e3e3 !important;
}

.cart-page .item-cart a {
  color: var(--primary-color);
}

.cart-page .item-cart a img {
  max-width: 80px;
}

.attribute-text-cart {
  font-size: 13px;
}

.js-remove-vouchers {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid #efefef;
  padding: 5px;
}

/* Form Cart */

#checkout-form {
  margin-top: 15px;
}

.cart-title {
  border-bottom: 1px solid #eee;
  text-transform: uppercase;
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-size: 18px;
  background-color: #f9f9f9;
}

#checkout-form .form-group {
  margin-bottom: 15px;
}

.order-province,
.order-country {
  display: none;
}

.cart-page,
.checkout-area {
  color: #000;
}

.continue-buy {
  margin-bottom: 20px;
  color: var(--text-color);
  font-size: 1.8rem;
  /* line-height: 2.5rem; */
  text-transform: capitalize;
  font-weight: 400;
  display: block;
  margin-top: 20px;
  max-width: max-content;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 15px;
}

.continue-buy a {
  color: var(--text-color);
}

td.pro-thumbnail img {
  max-width: 100px;
}

.cart-page .checkout-title {
  text-decoration: none;
}

.checkout-title h2 {
  border-bottom: 1px solid #2d2d2d;
  font-size: 25px;
  margin: 0 0 10px;
  padding-bottom: 10px;
}

.form_input {
  /* background-color: #242424; */
  /*color: #afafaf;*/
  padding: 10px;
  width: 100%;
  /*height: 3rem;*/
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
  border: 1px solid #b7dbff;
}

.cart-page input:not(.quantity-input),
.cart-page select,
.cart-page textarea {
  border-color: #efefef;
}

.cart-page select {
  padding: 10px 12px;
  height: unset !important;
  font-size: 15px;
}

.error {
  margin-bottom: 10px;
  color: #da0000;
}

.cart-success {
  position: fixed;
  background-color: var(--primary-background);
  color: #fff !important;
  border-radius: 10px;
  padding: 10px 15px;
  top: 150px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  color: #242424;
  transition: 0.2s;
  opacity: 0;
  z-index: -1;
}

.cart-success-active {
  z-index: 3 !important;
  opacity: 1 !important;
}

.cart-page .cart-table {
  padding: 15px;
  box-shadow: 0 0 3px #ccc;
}

.cart-page .cart-table .table-product .table {
  margin-bottom: 0;
}

.quantity {
  position: relative;
  margin: 0 1em;
  /* width: 15rem; */
  -webkit-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  -moz-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  -ms-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  -o-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  overflow: hidden;
}

.box-number {
  position: relative;
}

.cart-page .quantity {
  max-width: 150px;
}
.quantity-input {
  float: unset !important;
  width: calc(100% - 25px) !important;
  font-size: 16px;
  border: 1px solid #eee !important;
  border-right: none;
  padding: 8px 10px;
  background-color: unset;
  -webkit-border-radius: 5px 0px 0px 5px;
  -moz-border-radius: 5px 0px 0px 5px;
  -ms-border-radius: 5px 0px 0px 5px;
  -o-border-radius: 5px 0px 0px 5px;
  border-radius: 5px 0px 0px 5px;
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  -o-appearance: none;
  appearance: none;
}

/* Button Tang - Giam So luong */

/* OLD */
/* .quantity .qtybutton {
    position: absolute;
    right: 0;
    width: 25px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    text-align: center;
    cursor: pointer;
    -webkit-transition: all 0.3s ease-in;
    -moz-transition: all 0.3s ease-in;
    -ms-transition: all 0.3s ease-in;
    -o-transition: all 0.3s ease-in;
    transition: all 0.3s ease-in;
    background: var(--white);
}
.quantity .qtybutton.dec {
    bottom: 0;
    -webkit-border-radius: 0px 0px 5px 0px;
    -moz-border-radius: 0px 0px 5px 0px;
    -ms-border-radius: 0px 0px 5px 0px;
    -o-border-radius: 0px 0px 5px 0px;
    border-radius: 0px 0px 5px 0px;
}
.quantity .qtybutton.inc {
    top: 0;
    border-bottom: none;
    -webkit-border-radius: 0px 5px 0px 0px;
    -moz-border-radius: 0px 5px 0px 0px;
    -ms-border-radius: 0px 5px 0px 0px;
    -o-border-radius: 0px 5px 0px 0px;
    border-radius: 0px 5px 0px 0px;
} */

/** NEW */

.quantity {
  display: flex;
  align-items: center;
  border: 1px solid #eee;
  border-radius: 5px;
}

.quantity .box-number,
.quantity .box-number input {
  width: 100% !important;
  min-width: 100px;
  max-width: 100px !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0;
}

.quantity .qtybutton {
  height: 100% !important;
  width: 30px;
  position: relative;
}

/* END Button Tang - Giam So luong */

.cart-shiping-update-wrapper {
  display: flex;
  justify-content: space-between;
  padding: 15px 0px;
}

.delete-cart {
  cursor: pointer;
  color: #df2121 !important;
  background-color: #ffd5d5;
  padding: 5px 10px;
  border: 1px solid #df2121;
  border-radius: 5px;
  display: flex;
  align-items: center;
}

.cart-payment-box {
  background-color: #f9f9f9;
  border: 1px solid #ebebeb;
  border-radius: 5px;
  padding: 15px;
}

.cart-payment-title {
  /*color: var(--primary-color);*/
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 0px;
}

textarea#order_note {
  padding: 10px;
  height: 100px;
}

.heading-tertiary {
  font-size: 25px;
}

.checkout-payment {
  margin-top: 20px;
}

.cart-box {
  display: none !important;
}

.payment-group.single-ship label {
  display: flex;
  /* display: inline-block; */
}

.payment-group.single-ship input {
  float: left;
  margin-right: 10px;
}

.payment-btn-group {
  margin-top: 10px;
}

.cart-page td.pro-remove .note-delete {
  display: none;
}

/* Ẩn nút tăng giảm trên Chrome, Safari, Edge */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Ẩn nút tăng giảm trên Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

@media screen and (max-width: 767px) {
  .cart-table .table thead {
    display: none;
  }

  table.table tbody {
    display: table-row;
  }

  .cart-page tr.item-cart {
    display: grid;
    min-width: 100%;
  }

  .cart-page tr.item-cart + .item-cart {
    padding-top: 20px;
    border-bottom: 1px solid #eee;
    border-top: 1px solid #eee;
  }

  .cart-page .item-cart td {
    text-align: center;
    width: 100%;

    float: left;
    border-bottom: none !important;
    white-space: revert !important;

    display: grid;
  }

  .cart-page .item-cart td.head-td {
    font-weight: 600;
    background-color: var(--primary-background);
  }

  .cart-page .item-cart td.stt {
    text-align: center;
    clear: left;
    background-color: var(--primary-color);
    color: #fff;
  }

  .cart-page .item-cart td.pro-title {
    /*width: calc(100% - 160px) !important;*/
    width: 100%;
  }

  .cart-page .item-cart td.pro-thumbnail {
    width: calc(100% - 40px) !important;
    text-align: center;
  }

  .cart-page .item-cart td.pro-thumbnail img {
    max-width: 100px;
  }

  .cart-page .item-cart td.pro-price,
  .cart-page .item-cart td.pro-quantity,
  .cart-page .item-cart td.cart-price {
    width: calc(100% / 3) !important;
  }

  .cart-page .item-cart td.pro-price {
    clear: left;
  }

  .cart-page .item-cart .quantity {
    width: 80px;
  }

  .cart-page .item-cart td.cart-price {
    text-align: right;
  }

  .cart-page .item-cart td.pro-remove {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-background-gray);
  }

  .cart-page .item-cart td.pro-remove .note-delete {
    display: block;
    color: var(--primary-color);
  }

  .cart-page .item-cart td.pro-remove .delete-item-cart {
    background-color: #c00303;
    padding: 10px;
    line-height: 0;
    color: #fff !important;
  }

  .cart-page .item-cart .delete-cart {
    float: left;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .cart-page .item-cart .quantity {
    width: 150px;
    margin: auto;
  }

  .cart-page .item-cart .quantity .quantity-input {
    width: 100% !important;
    padding: 5px 10px;
    padding-right: 30px;
  }

  .cart-page .item-cart .delete-box {
    background-color: #dc3545;
    color: #fff;
  }

  .cart-page .item-cart .delete-box .svg-icon {
    display: none;
  }

  /* .cart-page .cart-clear {
        float: left;
    } */

  .cart-page .cart-payment-box {
    float: left;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }

  /** Tr statistic */

  .cart-page .tr-statistic {
    display: grid;
    text-align: center;
    margin-top: 20px;
  }

  .cart-page .tr-statistic td {
    text-align: center;
  }

  .cart-page .tr-statistic td.title {
    text-transform: uppercase;
    /* background-color: var(--primary-background); */
  }
}

/**
Checkout Page
*/

.checkout-page {
  /* padding: 50px 0; */
}

.checkout-page .cart-table .table-product .table td {
  border: 1px solid #eee;
}

@media screen and (min-width: 768px) {
  .checkout-page .customer-box tr.tr-customer td {
    text-align: left;
  }
}

@media screen and (max-width: 767px) {
  .checkout-page .customer-box tr.tr-customer {
    display: block;
    columns: 2;
  }

  .checkout-page .customer-box tr.tr-customer td {
    width: 100%;
    display: block;
    padding: 5px 10px;
  }

  .checkout-page .customer-box tr.tr-customer td + td {
    border-top: 0 !important;
  }

  .checkout-page .cart-table .table-product .table td .bottom-table {
    gap: 10px !important;
  }

  .checkout-page .cart-table .table-product .table td.td-stt {
    background-color: #f5f5f5;
  }

  .checkout-page .cart-table .table-product .table td .text-statistic {
    flex-basis: 100%;
  }
}

@media screen and (max-width: 500px) {
  .checkout-page .customer-box tr.tr-customer {
    columns: 1;
  }
}
