/* GIỎ HÀNG CHI TIẾT */

/* khối bao bọc chi tiết từng sản phẩm trong giỏ hàng và phần thanh toán*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.cart-detail-container {
  width: 1170px;
  margin: auto;
  margin-top: 100px;
  margin-bottom: 100px;
  overflow: auto;
}

/* chi tiết từng sản phẩm trong giỏ hàng */

.main-cart-detail {
  float: left;
  width: 70%;
  padding-right: 50px;
  line-height: 1.8;
}

.heading-cart h1 {
  font-size: 25px;
  margin: 0;
  border-bottom: 1px solid #e7e7e7;
  padding: 10px 15px;
}

.list-form-cart {
  padding: 10px 15px;
}

.title-number-cart {
  font-weight: 400;
  font-size: 20px;
  margin: 0 0 15px;
}

.title-number-cart strong {
  color: #f6bf61;
}

.table-cart {
  background-color: white;
  border: 2px solid #e7e7e7;
  border-radius: 8px;
  padding: 15px 20px;
  overflow: hidden;
}

.media-left .media-right .media-total {
  display: table-cell;
}

.media-left {
  position: relative;
  display: block;
}

.media-right {
  flex: 1 1 auto;
}

.media-total {
  text-align: right;
  font-size: 20px;
}

.checkout-buttons {
  margin: 20px 0 10px;
  background-color: rgba(0, 0, 0, 0.03);
  padding: 10px 12px 15px;
}

.note-label {
  display: block;
  margin: 0 0px 0 10px;
  font-weight: 600;
  font-size: 18px;
}

.order-noted-block textarea {
  padding: 10px 15px;
  width: 100% !important;
  height: 80px;
  min-height: 80px;
  max-width: 100%;
  border: 1px solid black;
  box-shadow: none;
  border-radius: 4px;
}

.order-noted-block textarea:focus {
  outline: none;
}

.bill-field {
  display: none;
  margin-top: 20px;
}

.invoice-grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.form-group {
  margin-bottom: 15px;
  margin-right: 15px;
  appearance: none;
}

.form-group input {
  font-size: 15px;
  height: 40px;
  color: black;
  box-shadow: none;
  background-clip: padding-box;
  border-radius: 2px;
  border: 1px solid #e7e7e7;
  padding: 6px 12px;
}

.form-group input:focus {
  outline: none;
}

.grid-full-width {
  grid-column: 1 / 4;
}

.form-control {
  width: 100%;
}

.checkbox .title {
  font-size: 18px;
  font-weight: bold;
}

.checkbox .regular-checkbox:hover,
.title:hover {
  cursor: pointer;
}

/* phần thanh toán */

.side-bar-cart-sticky {
  top: 95px;
  float: left;
  width: 30%;
  position: sticky;
  height: fit-content;
}

.side-bar-cart-sticky>* {
  margin: 25px;
}

.summary-title {
  font-size: 25px;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 15px;
  line-height: 1.2;
}

.summary-total {
  font-size: 20px;
  padding: 15px 0;
  font-weight: bold;
  border-top: 1px solid #dfe0e1;
  border-bottom: 1px solid #dfe0e1;
  margin: 25px 0;
}

.summary-total p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
}

.summary-total span {
  font-weight: bold;
  float: right;
  color: #f6bf61;
  font-size: 24px;
}

.summary-action p::before {
  content: "";
  width: 4px;
  height: 4px;
  background-color: #999999;
  left: 0;
  opacity: 1;
  position: absolute;
  top: 8px;
  border-radius: 50%;
}

.summary-action p {
  position: relative;
  font-size: 18px;
  margin-bottom: 4px;
  padding-left: 15px;
  font-weight: 400;
  text-align: left;
}

.summary-warning {
  padding: 12px 15px;
  border-radius: 4px;
  background-color: #d9edf7;
  border: 1px solid #bce8f1;
}

.textmr {
  margin-bottom: 5px;
}

/* nút bấm chung */

.button {
  display: block;
  text-decoration: none;
  text-transform: uppercase;
  padding: 10px 5px;
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  border-radius: 5px;
}

/* nút thanh toán */

.summary-button {
  margin-top: 30px;
}

.checkout-button {
  width: 100%;
  border: 3px solid #f6bf61;
  color: #f6bf61;
  background: linear-gradient(to right, #f6bf61 50%, white 50%);
  background-size: 200% 100%;
  background-position: right bottom;
  transition: all .3s ease;
  font-size: 20px;
}

.checkout-button:hover {
  color: white;
  text-decoration: none;
  background-position: left bottom;
}

/* nút lưu thông tin hóa đơn */

.save-button {
  width: 180px;
  color: white;
  background: linear-gradient(to right, black 50%, #2c2c2c 50%);
  background-size: 200% 100%;
  background-position: right bottom;
  transition: all .3s ease;
}

.save-button:hover {
  background-position: left bottom;
  text-decoration: none;
  color: #f6bf61;
}

/* các thẻ sản phẩm trong giỏ hàng */

.card_item {
  display: flex;
  position: relative;
  flex-direction: row;
  justify-content: space-between;
  padding: 15px 10px;
  margin: 10px 0;
}

.card_item:not(:last-child) {
  border-bottom: solid 1px #e7e7e7;
}

.close-btn {
  position: absolute;
  right: 10px;
  top: 5px;
}

.card_item .product_img img {
  border-radius: 10px;
  position: relative;
  width: 80px;
}

.product_info {
  margin-left: 50px;
}

.product_info h1 {
  font-size: 20px;
  color: #1e212d;
  margin: 5px 0;
}

.product_info p {
  color: #a1a1a1;
  font-size: 16px;
}

.product_rate_info {
  display: flex;
  flex-direction: row-reverse;
  margin: 5px 0;
  align-items: center;
  font-weight: bold;
}

/* nút bấm (+) và (-) thêm bớt số lượng sản phẩm */

.pqt {
  font-weight: 500;
  font-size: 20px;
  width: 36px;
  height: 28px;
  padding: 0;
  background-color: white;
  text-align: center;
  outline: none;
  border: 1px solid #dedede;
  margin: 0 3px;
  border-radius: 4px;
}

.pqt-plus,
.pqt-minus {
  all: initial;
  background-color: white;
  border: none;
  font-size: 25px;
  text-align: center;
  height: 30px;
  width: 35px;
  padding: 0;
  border-radius: 4px;
  border: solid 1px #999999;
}

.product-remove {
  position: absolute;
  top: -20px;
  left: -20px;
}

.pqt-discard {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.1);
  background-image: url(../img/discard_cart_item_icon.svg);
  background-color: white;
  transition: all .3s ease;
}

/* .pqt-discard:hover {
  cursor: pointer;
} */

.pqt-discard:hover {
  background-image: url(../img/discard_cart_item_icon_hover.svg);
}

.pqt-plus:hover,
.pqt-minus:hover,
.pqt-discard:hover {
  cursor: pointer;
}

.pqt-plus:hover,
.pqt-minus:hover {
  border: 1px solid black;
}

.pqt-plus:active,
.pqt-minus:active {
  border-color: #b1b1b1;
  color: #b1b1b1;
}

/* giá tiền */

.order_price,
.order_service,
.order_total {
  display: flex;

  justify-content: space-between;
  padding: 10px;
}

.order_price p,
.order_service p {
  color: #a1a1a1;
}

.order_total p {
  font-weight: 600;
}

/* xử lý giao diện tối */

.darkMode .main-cart-detail .table-cart {
  background-color: #081225;
  border: 2px solid #535e67;
}

.darkMode .main-cart-detail .heading-cart h1 {
  border-bottom: 1px solid #535a67;
}

.darkMode .main-cart-detail .product_info h1 {
  color: #9fa8bb;
}

.darkMode .main-cart-detail .pqt-minus {
  background-color: #1a2d4d;
  border-color: black;
  color: white;
}

.darkMode .main-cart-detail .pqt-minus:hover {
  background-color: #324A81;
}

.darkMode .main-cart-detail .pqt-plus:hover {
  background-color: #324A81;
}

.darkMode .main-cart-detail .pqt-plus {
  background-color: #1a2d4d;
  border-color: black;
  color: white;
}

.darkMode .main-cart-detail .pqt {
  background-color: #17223B;
  border: none;
  color: #9fa8bb;
}

.darkMode .main-cart-detail .pqt:focus {
  background-color: #29345D;
}

.darkMode .main-cart-detail .pqt-discard {
  background-color: #1e2c4d;
}

.darkMode .main-cart-detail .card_item:not(:last-child) {
  border-bottom: solid 1px #545e67;
}

.darkMode .main-cart-detail .order-noted-block textarea {
  background-color: #17223B;
  border-color: black;
  color: #9fa8bb;
}

.darkMode .main-cart-detail .order-noted-block textarea:focus {
  background-color: #29345D;
}

.darkMode .main-cart-detail .invoice-grid-container .form-group input {
  background-color: #17223B;
  border-color: black;
  color: #9fa8bb;
}

.darkMode .main-cart-detail .invoice-grid-container .form-group input:focus {
  background-color: #29345D;
}

.darkMode .main-cart-detail .order-invoice-block .save-button {
  background: linear-gradient(to right, #2B2B2E 50%, #141415 50%);
  background-size: 200% 100%;
  background-position: right bottom;
}

.darkMode .main-cart-detail .order-invoice-block .save-button:hover {
  background-position: left bottom;
}

.darkMode .side-bar-cart-sticky .order-summary-block .summary-total {
  border-top: 1px solid #545e67;
  border-bottom: 1px solid #545e67;
}

.darkMode .side-bar-cart-sticky .order-summary-block .checkout-button {
  background: linear-gradient(to right, #f6bf61 50%, #1a2d4d 50%);
  background-size: 200% 100%;
  background-position: right bottom;
}

.darkMode .side-bar-cart-sticky .order-summary-block .checkout-button:hover {
  background-position: left bottom;
}

.darkMode .side-bar-cart-sticky .summary-warning {
  background-color: #1a2d4d;
  border: none;
}

/* responsive */

@media screen and (max-width: 1199px) {
  .cart-detail-container {
    width: 100%;
  }
}

@media screen and (max-width: 991px) {

  .main-cart-detail,
  .side-bar-cart-sticky {
    padding: 0;
    display: block;
    width: 100%;
  }
}

@media screen and (max-width: 649px) {
  .main-cart-detail h1 {
    font-size: 15px;
  }
}