/* Biến CSS cho màu sắc và font chữ */
:root {
    --primary-color: #FFD700;
    --secondary-color: #FFC107;
    --danger-color: #ff4d4d;
    --danger-hover-color: #e60000;
    --text-color: #333;
    --background-color: #f9f9f9;
    --font-family: 'Arial', sans-serif;
}

/* Định dạng tổng thể cho trang giỏ hàng */
.cart-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background-color: var(--background-color);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: var(--font-family);
}

.cart-container h1 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--text-color);
    font-weight: bold;
}

/* Bảng hiển thị sản phẩm */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cart-table th,
.cart-table td {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
    font-size: 16px;
}

.cart-table th {
    background-color: var(--primary-color);
    color: #000;
    font-weight: bold;
}

.cart-table td img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-table td input {
    width: 50px;
    padding: 5px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Danh sách yêu cầu đặc biệt */
.cart-table ul {
    list-style-type: disc;
    margin: 10px 0;
    padding-left: 20px;
    color: #555;
    text-align: left;
}

/* Ô nhập yêu cầu đặc biệt */
.cart-table .add-note {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    resize: none; /* Không cho phép thay đổi kích thước ô */
}

.cart-table .add-note:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Nút xóa sản phẩm */
.cart-table .remove-btn {
    background-color: var(--danger-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cart-table .remove-btn:hover {
    background-color: var(--danger-hover-color);
}

/* Phần tổng tiền */
.cart-summary {
    text-align: right;
    margin-top: 20px;
    font-size: 18px;
}

.cart-summary p {
    margin: 10px 0;
    font-weight: bold;
}

#checkout-button {
    background-color: #ff5252;;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#checkout-button:hover {
    background-color: #f02525;;
}

/* Toast thông báo */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4caf50;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Định dạng thông báo khi giỏ hàng trống */
.empty-cart-message {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #555;
    padding: 20px 0;
}

/* Hiệu ứng loading */
#checkout-button.processing {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

#checkout-button.processing::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* [Phần CSS gốc vẫn giữ nguyên] */

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .cart-container {
      margin: 20px 10px !important; /* Giảm lề cho nhỏ gọn */
      padding: 10px !important;
    }
  
    .cart-container h1 {
      font-size: 24px !important; /* Giảm kích thước tiêu đề */
      line-height: 1.2; /* Tăng độ dễ đọc */
    }
  
    .cart-table {
      font-size: 14px;
      display: block; /* Cho phép cuộn ngang */
      overflow-x: auto;
      white-space: nowrap; /* Giữ nguyên định dạng bảng */
    }
  
    .cart-table td {
      padding: 8px 5px !important; /* Giảm padding ô */
      min-width: 80px; /* Đảm bảo ô không bị ép quá nhỏ */
    }
  
    .cart-table td img {
      width: 35px !important; /* Tối ưu kích thước ảnh */
      height: 35px !important;
    }
  
    .cart-table input[type="number"] {
      width: 45px !important; /* Điều chỉnh ô nhập số lượng */
      padding: 3px 5px !important;
      font-size: 14px;
    }
  
    #checkout-button {
      width: 100% !important; /* Nút full width */
      padding: 12px !important;
      font-size: 16px !important;
      margin-top: 15px;
    }
  
    /* Tối ưu hiển thị danh sách yêu cầu */
    .cart-table ul {
      padding-left: 15px;
      margin: 5px 0;
      font-size: 12px;
    }
  }
  
  @media screen and (max-width: 480px) {
    .cart-container h1 {
      font-size: 20px !important; /* Tiêu đề nhỏ hơn cho màn hình rất nhỏ */
      margin-bottom: 10px !important;
    }
  
    .cart-table td {
      font-size: 13px !important;
      padding: 6px 3px !important;
    }
  
    .remove-btn {
      padding: 6px 10px !important; /* Nút xóa nhỏ gọn */
      font-size: 12px !important;
    }
  }
  
  /* Tối ưu hiệu ứng loading */
  @media screen and (max-width: 768px) {
    #checkout-button.processing::after {
      width: 16px;
      height: 16px;
      right: 5px;
    }
  }
  /* Trong file styles/components/cart.css */
/* Thêm vào cuối file */

/* Phần tùy chỉnh gia vị */
.condiments-section {
  margin: 30px 0;
  padding: 20px;
  background-color: #fff9e6;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.condiments-section h2 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #333;
  font-weight: bold;
}

.condiments-info {
  margin-bottom: 20px;
  color: #666;
  font-size: 14px;
}

.condiments-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.condiment-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.condiment-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.condiment-item label {
  margin-bottom: 10px;
  font-weight: 500;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 5px;
}

.quantity-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  background-color: var(--primary-color);
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

.quantity-btn:hover {
  background-color: var(--secondary-color);
}

.quantity-control input {
  width: 60px;
  text-align: center;
  margin: 0 10px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.condiments-actions {
  margin-top: 20px;
  text-align: center;
}

#reset-condiments {
  background-color: #f0f0f0;
  color: #333;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#reset-condiments:hover {
  background-color: #e0e0e0;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
  .condiments-container {
      grid-template-columns: 1fr;
  }
  
  .condiment-item {
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
  }
  
  .condiment-icon {
      margin-bottom: 0;
      margin-right: 10px;
  }
}

@media screen and (max-width: 480px) {
  .condiment-item {
      flex-direction: column;
      text-align: center;
  }
  
  .condiment-icon {
      margin-bottom: 10px;
      margin-right: 0;
  }
}
/* Hiển thị hình ảnh kết hợp */
.combined-image {
  position: relative;
  width: 100%;
  height: 50px;
  overflow: hidden;
}

.half-image {
  position: absolute;
  width: 50%;
  height: 100%;
  object-fit: cover;
}

.half-image.left {
  left: 0;
  border-radius: 5px 0 0 5px;
}

.half-image.right {
  right: 0;
  border-radius: 0 5px 5px 0;
}
