body {
  margin: 0;
  background: #f5f5f5;
}

.container {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px 20px 50px;
}

.cart-steps {
  text-align: center;
  margin: 20px 0 30px;
  color: #999;
  font-size: 15px;
}

.cart-steps .active {
  color: black;
  font-weight: bold;
}

/* LAYOUT */
.cart-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  align-items: start;
  margin-bottom: 40px;
}

/* LEFT */
.cart-left {
  min-width: 0;
}

.cart-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
  padding: 0 0 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
  gap: 10px;
}

.cart-product {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cart-product img {
  width: 85px;
  height: 85px;
  object-fit: cover;
  border: 1px solid #e5e5e5;
  background: #fff;
}

.cart-product-info h4 {
  margin: 0 0 6px;
  font-size: 16px;
}

.cart-product-info p {
  margin: 0 0 4px;
  color: #555;
  font-size: 14px;
}

.next-qty {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-qty button {
  width: 36px;
  height: 36px;
  border: 1px solid #bbb;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
}

.cart-qty span,
.cart-qty input {
  min-width: 36px;
  text-align: center;
}

/* RIGHT */
.cart-right {
  border-left: 1px solid #ddd;
  padding-left: 25px;
}

.cart-right h3 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 22px;
}

.summary div {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
  font-size: 16px;
}

.checkout-btn {
  width: 100%;
  padding: 15px;
  background: black;
  color: white;
  border: none;
  margin: 20px 0 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

.coupon input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  box-sizing: border-box;
}

.coupon button {
  width: 100%;
  padding: 10px;
}

/* BUTTON */
.continue {
  display: inline-block;
  margin-top: 24px;
  margin-bottom: 10px;
  border: 1px solid black;
  padding: 12px 18px;
  text-decoration: none;
  color: black;
  background: #fff;
}

.cart-qty-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cart-qty-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #d8d8d8;
  background: #fff;
  color: #111;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.cart-qty-input {
  width: 42px;
  height: 34px;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  outline: none;
  background: #fff;
  color: #111;
  padding: 0;
}
.cart-qty-btn:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}
.cart-qty-input:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-qty-input[type="number"] {
  -moz-appearance: textfield;
}

/* FOOTER TÁCH KHỎI CART */
.site-footer {
  margin-top: 40px;
}
.cart-price {
  font-weight: 600;
}

.cart-total {
  font-weight: 700;
}

.cart-stock {
  margin: 0 0 8px;
  color: #9a6d00 !important;
  font-size: 13px !important;
}

.cart-remove-btn {
  border: none;
  background: none;
  color: #c00;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
}
/* RESPONSIVE */
* {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .container {
    width: 100%;
    max-width: 100%;
    padding: 16px 12px 32px;
    margin: 0 auto;
  }

  .cart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cart-left,
  .cart-right {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .cart-right {
    border-left: none;
    border-top: 1px solid #ddd;
    padding-left: 0;
    padding-top: 20px;
  }

  .cart-header {
    display: none;
  }

  .cart-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 0;
  }

  .cart-product {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    width: 100%;
  }

  .cart-product img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
  }

  .cart-product-info {
    min-width: 0;
    width: 100%;
  }

  .cart-product-info h4 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .cart-product-info p {
    margin: 0 0 4px;
    font-size: 13px;
    line-height: 1.4;
  }

  .cart-item > div:not(.cart-product) {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    font-size: 14px;
  }

  .cart-item > div:not(.cart-product)::before {
    font-weight: 600;
    color: #333;
  }

  .cart-item > div:nth-child(2)::before {
    content: "Giá:";
  }

  .cart-item > div:nth-child(3)::before {
    content: "Số lượng:";
  }

  .cart-item > div:nth-child(4)::before {
    content: "Thành tiền:";
  }

  .cart-price,
  .cart-total {
    margin-left: auto;
    text-align: right;
  }

  .cart-qty-box {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    justify-content: flex-end;
  }

  .cart-qty-btn {
    width: 24px;
    height: 24px;
    font-size: 13px;
    border-radius: 6px;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .cart-qty-input {
    width: 30px;
    height: 24px;
    font-size: 12px;
    border-radius: 6px;
    padding: 0;
    text-align: center;
  }

  .checkout-btn,
  .continue {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

