body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  color: #111;
}

.container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 20px auto;
  gap: 20px;
}

.cart-layout {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 20px auto;
  gap: 20px;
}

.cart-left {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-right {
  flex: 1;
  background: white;
  border-radius: 6px;
  padding: 20px;
  min-width: 280px;
}

.cart-main {
  flex: 3;
  background: white;
  border-radius: 6px;
  padding: 20px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-main h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  margin-bottom: 12px;
}

.cart-summary {
  flex: 1;
  background: white;
  border-radius: 6px;
  padding: 20px;
  min-width: 280px;
  height: fit-content;
}

.cart-summary.sticky-middle {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  right: 50px; /* điều chỉnh nếu cần */
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cart-summary h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

.summary-total {
  font-size: 16px;
  font-weight: normal;
  color: #111;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.summary-total span {
  color: red;
  font-weight: bold;
  font-size: 20px;
  float: right;
}

.cart-summary label {
  font-weight: bold;
  font-size: 14px;
  display: block;
  margin-top: 15px;
  margin-bottom: 6px;
}

textarea,
input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

.checkout-btn {
  background: #dc9a00;
  color: white;
  padding: 12px;
  width: 100%;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 15px;
  margin-top: 20px;
  cursor: pointer;
}

.back-shop {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  color: #222;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}

.back-shop::before {
  content: "\21A9";
  font-weight: bold;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  padding-top: 10px;
  gap: 10px;
}

.cart-item img {
  width: 80px;
  height: auto;
  margin-right: 10px;
}

.cart-info {
  flex: 1;
  margin-left: 10px;
}

.cart-info h4 {
  margin: 0;
  font-size: 16px;
}

.cart-info .price {
  color: red;
  font-weight: bold;
}

.price {
  font-size: 12px;
  color: #000;
}

.cart-info_name {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 10px;
}

.size {
  font-size: 12px;
  color: #666;
  margin-right: 2px;
}

.cart-info .old-price {
  color: gray;
  text-decoration: line-through;
  font-size: 13px;
  margin-left: 8px;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.qty-box {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  height: 32px;
  width: fit-content;
}

.qty-box button {
  width: 32px;
  height: 32px;
  border: none;
  background: #f0f0f0;
  cursor: pointer;
}

.qty-box input {
  width: 40px;
  text-align: center;
  border: none;
  outline: none;
}

.remove-link {
  font-size: 13px;
  text-align: center;
  color: #000;
  text-decoration: underline;
  cursor: pointer;
}

.discount-box {
  display: flex;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eee;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.discount-left {
  background: #dc9a00;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 20px;
  font-weight: bold;
  width: 70px;
}

.discount-right {
  flex: 1;
  padding: 12px;
}

.discount-right strong {
  font-size: 14px;
  display: block;
}

.discount-right small {
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.copy-btn {
  background: #000;
  color: white;
  border: none;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 20px;
  float: right;
  margin-top: 6px;
  cursor: pointer;
}

.view-product {
  background-color: var(--white-color);
  text-align: center;
  max-width: 1200px;
  margin: 30px auto 0;
  padding-bottom: 20px;
  margin-top: 10px;
}

.view-title {
  font-size: 2rem;
  font-weight: bold;
  display: inline-block;
  text-transform: uppercase;
  margin: 20px 0;
  position: relative;
}

.view-title::before,
.view-title::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40px;
  height: 2px;
  background-color: #333;
}

.view-title::before {
  right: 100%;
  margin-right: 10px;
}

.view-title::after {
  left: 100%;
  margin-left: 10px;
}

.home-product {
  width: 100%;
  padding: 0 8px;
  box-sizing: border-box;
}

.grid__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 0 -6px;
}

.grid_column-2-4 {
  width: 19%;
  padding: 0 6px;
  box-sizing: border-box;
}

.grid_column-2-4 .home-product-item {
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.grid_column-2-4 .home-product-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 600px) {
  .cart-layout {
    flex-direction: column;
    padding: 0 10px;
    margin: 10px auto;
  }

  .cart-left,
  .cart-main,
  .cart-summary,
  .cart-right {
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
    position: static !important;
    transform: none !important;
    box-shadow: none !important;
    padding: 10px;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-item img {
    width: 100px;
    height: auto;
    margin: 0 0 10px 0;
  }

  .qty-box {
    width: 100%;
    justify-content: space-between;
  }

  .cart-actions {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }

  .summary-total span {
    float: none;
    display: block;
    text-align: right;
  }

  .discount-box {
    flex-direction: column;
  }

  .discount-left {
    width: 100%;
    padding: 10px 0;
    text-align: center;
  }

  .discount-right {
    width: 100%;
    padding: 10px;
  }
}
