/* === BIẾN CSS (CSS Variables) === */
:root {
  --primary-color: #059669; /* Đổi màu xanh chính */
  --primary-dark: #047857; /* Đổi màu xanh đậm (khi di chuột) */
  --text-dark: #111827;
  --text-gray: #6b7280;
  --bg-light: #f8fafc;
  --white: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  --font-main: "Inter", sans-serif;
}

/* === 2. LỆNH ÉP BOOTSTRAP XÀI MÀU CỦA RAUMACITY === */
/* Ghi đè chữ màu xanh */
.text-success {
  color: var(--primary-color) !important;
}

/* Ghi đè nền màu xanh (Badge, Icon...) */
.bg-success {
  background-color: var(--primary-color) !important;
}

/* Màu nền nhạt (dùng cho 4 cái card tính năng và các badge) */
.bg-success-subtle {
  background-color: #d1fae5 !important;
}
.border-success-subtle {
  border-color: #a7f3d0 !important;
}
.text-success-subtle {
  color: var(--primary-dark) !important;
}

/* Ghi đè nút bấm xanh (Đăng ký, Kiểm tra triệu chứng) */
.btn-success {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: var(--white) !important;
}
.btn-success:hover,
.btn-success:active {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

/* === RESET & CƠ BẢN === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === NÚT BẤM (Buttons) === */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--text-dark);
}

.btn-white {
  background-color: var(--white);
  color: var(--primary-color);
  border: none;
}

.btn-white:hover {
  background-color: #f3f4f6;
}

/* === HEADER (Thanh điều hướng) === */
header {
  padding: 20px 0;
  background-color: var(--white);

  /* THÊM 4 DÒNG NÀY VÀO ĐỂ CỐ ĐỊNH */
  position: sticky; /* Lệnh bám dính */
  top: 0; /* Dính chặt vào sát mép trên cùng của trình duyệt */
  z-index: 1000; /* Đảm bảo nó luôn nằm đè lên trên tất cả các ảnh/chữ bị cuộn qua */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
}

.logo i {
  color: var(--primary-color);
}

.nav-links a {
  font-weight: 500;
  color: var(--text-gray);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

/* === HERO SECTION (Phần giới thiệu chính) === */

.hero-content {
  flex: 1;
  max-width: 550px;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #e0f2f1;
  color: var(--primary-dark);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.hero-title span {
  color: var(--primary-color);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-gray);
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

.hero-visual {
  flex: 1;
  position: relative;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Vòng tròn cho Hero */
.art-circle-1 {
  width: 350px;
  height: 350px;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(25, 166, 149, 0.1);
  border-radius: 50%;
  position: absolute;
  box-shadow:
    inset 0 0 50px rgba(25, 166, 149, 0.05),
    var(--shadow-lg);
  backdrop-filter: blur(5px);
}

.art-circle-2 {
  width: 450px;
  height: 450px;
  border: 1px solid rgba(25, 166, 149, 0.2);
  border-radius: 50%;
  position: absolute;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 50px;
  height: 50px;
  background-color: #e0f2f1;
  color: var(--primary-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-gray);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* === FOOTER (Chân trang) === */
footer {
  background-color: var(--white);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand p {
  color: var(--text-gray);
  margin-top: 16px;
  max-width: 300px;
  font-size: 0.95rem;
}

.footer-links h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-gray);
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  color: var(--text-gray);
  font-size: 0.85rem;
}

/* === RESPONSIVE (Dành cho Mobile/Tablet) === */
@media (max-width: 992px) {
  .hero-content {
    max-width: 100%;
    margin-bottom: 40px;
  }
  .hero-buttons {
    justify-content: center;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* Ẩn menu trên mobile, cần JS để làm menu hamburger nếu muốn */
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
  }
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
  .store-layout {
    grid-template-columns: 1fr; /* Đẩy sidebar lên trên cùng trên mobile */
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .store-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .search-bar {
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

/* --- GIAO DIỆN FORM ĐĂNG KÝ / ĐĂNG NHẬP --- */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  background-color: #f9fafb;
}
.auth-box {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 400px;
}
.auth-box h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #111827;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
}
.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}
.alert {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}
.alert-error {
  background-color: #fee2e2;
  color: #b91c1c;
}

.alert-success {
  background-color: #dcfce3;
  color: #15803d;
}

/* Các class mới tạo để thay thế cho style nội tuyến (inline style) */
.btn-submit {
  width: 100%;
  padding: 12px;
  font-size: 16px;
}
.auth-link-text {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #6b7280;
}
.auth-link-text a {
  color: #059669;
  font-weight: 600;
  text-decoration: none;
}
/* --- Style cho các nút danh mục bên sidebar --- */
.category-item {
  display: block;
  text-decoration: none;
  color: #333; /* Chốt cứng màu chữ đen xám */
  font-size: 16px; /* CHỐT CỨNG CỠ CHỮ: Bạn có thể đổi số 16 thành 15, 14 tùy mắt nhìn nhé */
  transition: all 0.2s ease; /* Thêm hiệu ứng mượt mà */
}

/* Ép các trạng thái: Đã bấm (visited), đang bấm (active) KHÔNG được phép đổi màu hay cỡ chữ */
.category-item:visited,
.category-item:active {
  color: #333;
  font-size: 16px; /* Ép cỡ chữ không đổi */
  text-decoration: none;
}

/* Hiệu ứng khi rê chuột vào (Hover) cho trang web sinh động */
.category-item:hover {
  color: #059669; /* Đổi sang màu xanh lá của RaumaCity */
  text-decoration: none;
}
/* --- Khi một danh mục được gắn thẻ 'active' --- */
.category-item.active {
  background-color: #059669; /* Đổ nền màu xanh lá của RaumaCity */
  color: #ffffff; /* Biến chữ thành màu trắng cho nổi bật */
  font-weight: 600; /* In đậm chữ một chút */
  border-radius: 8px; /* Bo góc cho tròn trịa giống cái nút */
  padding: 10px 15px; /* Tạo khoảng trống bên trong cho nút mập mạp, đẹp mắt */
}

/* Ép luôn màu chữ trắng kể cả khi khách lỡ click giữ chuột */
.category-item.active:visited,
.category-item.active:active {
  color: #ffffff;
}
/* === GIAO DIỆN GIỎ HÀNG (CART MODAL) === */
.cart-modal {
  display: none; /* Ẩn đi chờ gọi mới ra */
  position: fixed;
  z-index: 9999; /* Đè lên mọi thứ trên web */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Nền đen mờ mờ */
}

.cart-content {
  background-color: #f9fafb;
  width: 100%;
  max-width: 450px;
  height: 100vh;
  float: right; /* Ép sang mép phải màn hình */
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  animation: slideInRight 0.3s ease-out; /* Hiệu ứng trượt */
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.cart-header {
  padding: 20px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-btn {
  font-size: 28px;
  cursor: pointer;
  color: #6b7280;
}

.cart-items {
  flex: 1; /* Chiếm hết khoảng trống giữa */
  padding: 20px;
  overflow-y: auto; /* Dài quá thì có thanh cuộn */
}

/* Từng món hàng trong giỏ */
.cart-item {
  background: white;
  padding: 15px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cart-item-info h4 {
  margin-bottom: 5px;
  font-size: 1rem;
  color: #111827;
}

.cart-item-price {
  color: #059669; /* Xanh RaumaCity */
  font-weight: 700;
}

/* Nút Tăng Giảm Số Lượng */
.qty-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #059669;
  background: white;
  color: #059669;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: #059669;
  color: white;
}

.cart-footer {
  padding: 20px;
  background: white;
  border-top: 1px solid #e5e7eb;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 15px;
}

.btn-checkout {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  border-radius: 8px;
}
/* =========================================
   GIAO DIỆN MENU TÀI KHOẢN XỔ XUỐNG
========================================= */
.user-menu {
  position: relative;
  display: inline-block;
  margin-left: 15px;
}

/* Nút hiển thị tên người dùng */
.btn-user {
  background-color: transparent;
  color: #333;
  border: 1px solid #ccc;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-user:hover {
  border-color: #19a695;
  color: #19a695;
}

/* Cái khung chứa danh sách (Mặc định giấu đi) */
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 120%;
  background-color: #fff;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
  z-index: 100;
}

/* THÊM ĐOẠN NÀY VÀO: Chỉ hiện ra khi có class 'show' (do JS gắn vào) */
.dropdown-content.show {
  display: block;
}

/* Trang trí từng món trong danh sách */
.dropdown-content a {
  color: #333;
  padding: 12px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  transition: background-color 0.2s;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
  color: #19a695;
}

.dropdown-content hr {
  margin: 0;
  border: none;
  border-top: 1px solid #eee;
}

/* Riêng nút Đăng xuất khi hover thì cho màu đỏ cảnh báo */
.dropdown-content a.logout-text:hover {
  background-color: #fee2e2;
  color: #dc2626;
}
/* =========================================
   NÚT GIỎ HÀNG VÀ CỤC ĐỎ BÁO SỐ LƯỢNG
========================================= */
#cart-btn {
  position: relative;
  cursor: pointer;
}

#cart-count {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important; /* Hủy lệnh left của Bootstrap để không bị kéo giãn */
  transform: translate(
    25%,
    -25%
  ) !important; /* Chỉnh độ nhô ra ôm sát góc phải */
  background-color: #ef4444 !important; /* Đỏ sáng nổi bật */
  color: white !important;
  border-radius: 50px !important;
  padding: 3px 6px !important;
  font-size: 0.75rem !important;
  font-weight: bold !important;
  min-width: 22px !important;
  text-align: center;
  border: 2px solid white; /* Viền trắng chia cắt không gian chuẩn UI/UX */
}
/* Chữ báo Không có ảnh ở danh sách sản phẩm */
.no-image-text {
  color: #9ca3af;
  font-size: 0.9rem;
  font-style: italic;
}
/* =========================================
   GIAO DIỆN TRANG HỒ SƠ CÁ NHÂN (PROFILE)
========================================= */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr; /* Chia 2 cột: Cột trái 280px, cột phải chiếm phần còn lại */
  gap: 30px;
  align-items: start;
}

.profile-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 30px;
  border: 1px solid var(--border-color);
}

/* --- Cột Trái: Sidebar --- */
.profile-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.profile-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-nav a {
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-gray);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}

.profile-nav a:hover,
.profile-nav a.active {
  background-color: #f0fbfa;
  color: var(--primary-color);
}

.profile-nav a.logout-link {
  color: #ef4444;
}
.profile-nav a.logout-link:hover {
  background-color: #fee2e2;
}

/* --- Cột Phải: Form thông tin --- */
.profile-header-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.profile-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 1 hàng 2 ô input */
  gap: 20px;
}

.profile-form input,
.profile-form select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: #f9fafb; /* Màu nền hơi xám để biết là không sửa được (Readonly) */
  color: var(--text-dark);
  font-family: inherit;
  outline: none;
  /* Thêm dòng này để hộp chọn trông mượt hơn */
  appearance: none;
  -webkit-appearance: none;
  cursor: default;
}
/* Thêm hiệu ứng chuột khi hộp chọn được mở khóa */
.profile-form select:not([disabled]) {
  cursor: pointer;
}
@media (max-width: 768px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
  .profile-form .form-row {
    grid-template-columns: 1fr;
  }
}
/* =========================================
   CÁC CLASS BỔ SUNG CHO TRANG PROFILE
========================================= */
/* Căn lề cho phần thân trang hồ sơ */
.profile-main {
  margin-top: 40px;
  margin-bottom: 60px;
}

/* Dòng chữ Thành viên RaumaCity dưới Avatar */
.member-badge {
  color: #6b7280;
  font-size: 0.9rem;
  margin-top: 5px; /* Đẩy cách cái tên ra một xíu cho đẹp */
}

/* Nút Chỉnh sửa thu gọn lại */
.btn-edit-profile {
  padding: 8px 16px;
}
/* =========================================
   GIAO DIỆN BẢNG LỊCH SỬ MUA HÀNG
========================================= */
.order-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.order-table th,
.order-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.order-table th {
  background-color: #f9fafb;
  font-weight: 600;
  color: var(--text-gray);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-table tbody tr {
  transition: background-color 0.2s;
}

.order-table tbody tr:hover {
  background-color: #f0fbfa;
}

/* Các nhãn trạng thái đơn hàng */
.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

.status-pending {
  background-color: #fef08a; /* Vàng nhạt */
  color: #854d0e; /* Vàng đậm */
}

/* Chuẩn bị sẵn class cho trạng thái Giao thành công sau này Admin sửa */
.status-success {
  background-color: #dcfce3;
  color: #15803d;
}
/* =========================================
   CÁC LỚP CSS TÁCH RỜI CHO TRANG ADMIN
========================================= */

/* Trang trí cột trái Admin */
.avatar-admin {
  background-color: #f59e0b;
}

.badge-admin {
  color: #f59e0b;
  font-weight: bold;
}

/* Thanh công cụ tìm kiếm lọc */
.admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.toolbar-input,
.toolbar-select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.toolbar-input {
  flex: 1; /* Cho ô tìm kiếm dài ra chiếm hết chỗ trống */
}

.btn-search-admin {
  background-color: #f59e0b;
  color: white;
}
.btn-search-admin:hover {
  background-color: #d97706;
}

.row-hidden {
  opacity: 0.6; /* Làm mờ hàng bị ẩn */
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-thumb {
  width: 40px;
  height: 40px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-icon {
  color: #ccc;
}

.price-cell {
  color: #059669;
  font-weight: bold;
}

.status-hidden {
  background: #f3f4f6;
  color: #6b7280;
}

.action-buttons {
  display: flex;
  gap: 5px;
}

.text-center {
  text-align: center;
  padding: 20px !important;
}

/* Cụm nút gầm bảng */
.admin-footer-actions {
  margin-top: 20px;
}

.btn-danger-action {
  background-color: #ef4444;
  color: white;
  padding: 8px 16px;
}
.btn-danger-action:hover {
  background-color: #dc2626;
}
/* =========================================
   GIAO DIỆN POPUP THÊM SẢN PHẨM (ADMIN)
========================================= */
/* Căn giữa và định hình khung Popup */
.modal-add-content {
  max-width: 500px;
  float: none;
  margin: 50px auto;
  border-radius: 12px;

  /* THÊM 2 DÒNG NÀY VÀO ĐỂ TẠO THANH CUỘN: */
  max-height: 85vh; /* Chiều cao tối đa chỉ chiếm 85% màn hình */
  overflow-y: auto; /* Tự động hiện thanh cuộn dọc nếu nội dung dài quá */
}

/* Khoảng cách bên trong Form */
.modal-add-form {
  padding: 20px;
}

/* Kiểu dáng dùng chung cho Thẻ Select và Textarea trong Modal */
.modal-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  font-family: inherit;
  background-color: #fff;
  transition: border-color 0.3s ease;
}

/* Hiệu ứng chớp xanh khi click vào ô nhập */
.modal-input:focus {
  border-color: var(--primary-color);
}

/* Nút Lưu sản phẩm kéo dài 100% */
.btn-full-width {
  width: 100%;
  margin-top: 10px;
}
/* =========================================
   CÁC LỚP CSS TÁCH RỜI CHO FORM SỬA SẢN PHẨM
========================================= */
/* Căn chỉnh khoảng cách cho ô chọn File ảnh */
.file-input-padded {
  padding: 9px 12px;
}

/* Nút Cập nhật (Màu cam vàng) */
.btn-update {
  background-color: #f59e0b;
  color: white;
  border: none;
}

/* Hiệu ứng khi rê chuột vào nút Cập nhật */
.btn-update:hover {
  background-color: #d97706;
}
/* Ép thông báo SweetAlert2 luôn nằm trên cùng (trước cả giỏ hàng) */
.swal2-container {
  z-index: 99999 !important;
}
/* =========================================
   LỊCH SỬ MUA HÀNG (Dùng chung Khách & Admin)
========================================= */
/* Chữ phụ hiển thị địa chỉ giao hàng */
.order-address-detail {
  font-size: 0.85rem;
  color: #6b7280;
  display: block;
  margin-top: 4px;
}

/* Tô đậm màu xanh cho cột Tổng tiền */
.order-price-highlight {
  color: #059669;
  font-weight: bold;
}

/* Cụm thông báo khi chưa có đơn hàng nào */
.empty-state {
  text-align: center;
  padding: 50px 0;
  color: #6b7280;
}

.empty-state-btn {
  margin-top: 15px;
}
/* =========================================
   TRANG THANH TOÁN (CHECKOUT)
========================================= */
.checkout-container {
  max-width: 800px;
  margin: 40px auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.checkout-section {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.checkout-section h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.checkout-item-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.payment-method-box {
  background: #f9fafb;
  padding: 15px;
  border-radius: 8px;
  margin-top: 10px;
}

.payment-method-box label {
  cursor: pointer;
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
}

/* Các class mới tách ra từ file HTML */
.checkout-total-price {
  text-align: right;
  margin-top: 15px;
  color: #059669;
}

.qr-code-wrapper {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  border: 2px dashed #059669;
  text-align: center;
  margin-top: 15px;
}

.qr-instruction {
  color: #6b7280;
  margin-bottom: 10px;
}

.qr-image {
  max-width: 200px;
  border-radius: 10px;
}

.btn-checkout-submit {
  font-size: 1.1rem;
  padding: 15px;
}
/* =========================================
   STYLE CHUẨN CHO MENU VÀ BẢNG ADMIN
========================================= */
/* Layout Bảng */
.admin-content-card {
  flex: 1;
}
.admin-transaction-table {
  width: 100%;
  font-size: 0.95rem;
}
.admin-date-text {
  font-size: 0.8rem;
  color: #6b7280;
}
.admin-sub-text {
  font-size: 0.85rem;
  color: #6b7280;
}
.action-cell-min {
  text-align: right;
  min-width: 110px;
}

/* Text & Trạng thái & Giao diện trống */
.method-qr {
  color: #0284c7;
  font-weight: bold;
}
.method-cod {
  color: #ea580c;
  font-weight: bold;
}
.price-text {
  color: #059669;
  font-weight: bold;
}
.form-inline {
  display: inline-block;
}
.locked-text {
  font-size: 0.85rem;
  color: #9ca3af;
}
.empty-state-box {
  text-align: center;
  padding: 50px 0;
  color: #6b7280;
}
/* =========================================
   DASHBOARD ADMIN (BẢNG THỐNG KÊ)
========================================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.dash-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.3s ease;
}

.dash-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.dash-icon {
  width: 55px;
  height: 55px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

/* Màu sắc riêng cho từng loại thẻ */
.icon-revenue {
  background: #dcfce3;
  color: #15803d;
}
.icon-orders {
  background: #e0f2fe;
  color: #0284c7;
}
.icon-products {
  background: #fef08a;
  color: #a16207;
}
.icon-users {
  background: #f3e8ff;
  color: #7e22ce;
}

.dash-info h4 {
  font-size: 0.85rem;
  color: var(--text-gray);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dash-info p {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
}

.chart-container {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

@media (max-width: 992px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Khoảng cách cho tiêu đề Dashboard */
.dash-header-spacing {
  margin-bottom: 20px;
}

/* Tiêu đề của khung biểu đồ */
.chart-title {
  margin-bottom: 20px;
  color: var(--text-dark);
}
/* Thêm con trỏ chuột dạng bàn tay vào dash-card cũ */
.dash-card {
  /* ... (giữ nguyên các thuộc tính cũ của Sếp) ... */
  cursor: pointer;
  border: 2px solid transparent; /* Chuẩn bị sẵn viền để làm hiệu ứng active */
}

/* Lớp Active: Bật sáng khi Sếp bấm vào thẻ đó */
.dash-card.active-card {
  border-color: var(--primary-color);
  background-color: #f0fbfa;
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
/* =========================================
   GIAO DIỆN BÁC SĨ AI (CHATBOX CHÍNH CHỦ)
========================================= */
/* Cái nút tròn tròn nổi bồng bềnh ở góc phải */
.chatbot-toggle-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  border: none;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(25, 166, 149, 0.4);
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.3s ease;
}
.chatbot-toggle-btn:hover {
  transform: scale(1.1);
}

/* Cái khung Chat chính */
.ai-chatbox-container {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 350px;
  height: 500px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
  display: none; /* Mặc định giấu đi, bấm mới hiện */
  flex-direction: column;
  z-index: 10000;
  overflow: hidden;
  border: 1px solid var(--border-color);
  animation: slideUpChat 0.3s ease-out;
}

@keyframes slideUpChat {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chatbox-header {
  background: var(--primary-color);
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chatbox-title {
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chatbox-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Khu vực hiển thị tin nhắn */
.chatbox-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Định dạng từng bong bóng tin nhắn */
.message {
  display: flex;
  gap: 10px;
  max-width: 85%;
}
.bot-message {
  align-self: flex-start;
}
.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 30px;
  height: 30px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.user-message .msg-avatar {
  background: #e5e7eb;
  color: #4b5563;
}

.msg-text {
  padding: 10px 15px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
}
.bot-message .msg-text {
  background: white;
  border: 1px solid var(--border-color);
  border-top-left-radius: 2px;
}
.user-message .msg-text {
  background: var(--primary-color);
  color: white;
  border-top-right-radius: 2px;
}

/* Chỗ nhập tin nhắn */
.chatbox-footer {
  padding: 15px;
  background: white;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
}
.chatbox-footer input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  outline: none;
}
.chatbox-footer input:focus {
  border-color: var(--primary-color);
}
.chatbox-footer button {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* =========================================
   GHI CHÚ ĐƠN HÀNG (TRANG THANH TOÁN)
========================================= */
.checkout-note-box {
  margin-top: 25px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.checkout-note-title {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-note-desc {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 15px;
}

.checkout-note-textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.3s;
}

/* Hiệu ứng đổi màu viền sang xanh lá khi click chuột vào ô nhập */
.checkout-note-textarea:focus {
  border-color: var(--primary-color);
}
/* =========================================
   GHI CHÚ ĐƠN HÀNG (TRANG ADMIN)
========================================= */
/* Khi khách có để lại lời nhắn */
.admin-note-text {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 0.9rem;
  max-width: 200px;
  word-wrap: break-word; /* Ép chữ rớt dòng nếu khách gõ quá dài */
}

/* Khi khách không nhắn gì */
.admin-note-empty {
  color: #9ca3af;
  font-style: italic;
  font-size: 0.85rem;
}
/* =========================================
  CÁC HIỆU ỨNG CHUNG CHO TRANG ADMIN VÀ DASHBOARD
========================================= */
.feature-card-hover {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.feature-card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* =========================================
   ADMIN PANEL STYLES
========================================= */
body.admin-page {
  font-family: "Inter", sans-serif;
  background-color: #f3f4f6;
}
body.admin-page .admin-sidebar-layout {
  height: 100vh;
}

/* Cấu hình Sidebar bên trái */
body.admin-page .sidebar {
  width: 260px;
  min-height: 100vh;
  background-color: #ffffff;
  border-right: 1px solid #e5e7eb;
}
body.admin-page .nav-link {
  color: #6b7280;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}
body.admin-page .nav-link:hover {
  background-color: #f3f4f6;
  color: #111827;
}
body.admin-page .nav-link.active {
  background-color: #d1fae5 !important;
  color: #059669 !important;
  font-weight: 600;
  border-right: 4px solid #059669;
}

/* Cấu hình Khung nội dung bên phải */
body.admin-page .main-wrapper {
  flex-grow: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
body.admin-page .topbar {
  height: 70px;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

/* Các thành phần nhỏ trong Admin */
body.admin-page .admin-badge-text {
  font-size: 0.6rem;
}
body.admin-page .admin-icon-width {
  width: 20px;
}
body.admin-page .admin-text-small {
  font-size: 0.8rem;
}
body.admin-page .admin-avatar-box {
  width: 42px;
  height: 42px;
}
body.admin-page .admin-footer-layout {
  border-top: 1px solid #e5e7eb;
  font-size: 0.9rem;
  background-color: #ffffff;
}

/* =========================================
   HIỆU ỨNG HOVER DROPDOWN MENU DANH MỤC XML
========================================= */
.dynamic-xml-item:hover {
  background-color: #f0fbfa !important;
  color: #059669 !important;
}

.dynamic-xml-item:hover i {
  color: #059669 !important;
}
/* =========================================
   SỬA LỖI MENU DROPDOWN XML (ẨN DẤU CHẤM & RÊ CHUỘT LÀ XỔ)
========================================= */

/* 1. Xóa sổ dấu chấm đen trước icon danh mục */
.nav-item.dropdown {
  list-style-type: none !important;
}

/* 2. Ép menu phải xổ ra ngay khi rê chuột vào (Hover) thay vì chờ Click */
.nav-item.dropdown:hover .dropdown-menu {
  display: block;
  margin-top: 0; /* Ép menu dính sát vào thanh header để chuột không bị hụt */
}

/* ===================== GỢI Ý TÌM KIẾM ===================== */
#khung-goi-y,
#khung-goi-y-admin {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  z-index: 1050;
  max-height: 350px;
  overflow-y: auto;
  margin-top: 0.25rem;
}

.search-suggest-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-bottom: 1px solid #f1f3f5;
  background: transparent;
  text-align: left;
  transition: background-color 0.2s;
  gap: 1rem;
}
.search-suggest-item:last-child {
  border-bottom: none;
}
.search-suggest-item:hover {
  background-color: #f8f9fa;
  cursor: pointer;
}

.search-suggest-thumb {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
}
.search-suggest-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.search-suggest-noimg {
  color: #adb5bd;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.search-suggest-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.search-suggest-name {
  font-weight: 600;
  color: #212529;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-suggest-cat {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.2rem;
}

.search-suggest-price {
  font-weight: 700;
  color: #198754;
  font-size: 0.95rem;
  white-space: nowrap;
}

.search-suggest-empty {
  padding: 1rem;
  text-align: center;
  color: #6c757d;
  font-style: italic;
}
/* =========================================
   CUSTOM STYLING FOR PRODUCT DETAIL DESU~
   ========================================= */
.product-detail-container {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.product-img-wrapper {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  background: #f8f9fa;
  text-align: center;
  padding: 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.product-img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.product-img-wrapper:hover .product-img {
  transform: scale(1.05);
}

.favorite-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #ccc;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.favorite-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.favorite-btn.active {
  color: #ff4757;
}

.favorite-btn.active i {
  animation: heartBeat 0.5s ease-in-out;
}

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.3);
  }
  50% {
    transform: scale(1);
  }
  75% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.product-title {
  font-size: 2rem;
  font-weight: 700;
  color: #2d3436;
  margin-bottom: 0.5rem;
}

.product-category {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #059669;
  font-weight: 600;
  margin-bottom: 1rem;
}

.rating-stars {
  color: #f1c40f;
  font-size: 1.1rem;
}

.rating-text {
  color: #636e72;
  font-size: 0.95rem;
  margin-left: 8px;
}

.product-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: #e84118;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.price-badge {
  background: #ffeaa7;
  color: #d35400;
  font-size: 0.9rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.product-description {
  color: #636e72;
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.action-buttons .btn {
  border-radius: 50px;
  padding: 12px 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-add-cart {
  background: linear-gradient(135deg, #059669, #10ac84);
  border: none;
  color: white;
}

.btn-add-cart:hover {
  background: linear-gradient(135deg, #10ac84, #059669);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(5, 150, 105, 0.4);
}

/* Nút thêm giỏ hàng riêng cho trang chi tiết (không bị script.js lắng nghe nhầm) */
.btn-chitiet-cart {
  background: linear-gradient(135deg, #059669, #10ac84);
  border: none;
  color: white;
}

.btn-chitiet-cart:hover {
  background: linear-gradient(135deg, #10ac84, #059669);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(5, 150, 105, 0.4);
}

.info-pills {
  display: flex;
  gap: 15px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.info-pill {
  background: #f1f2f6;
  color: #2f3542;
  padding: 8px 15px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-pill i {
  color: #059669;
}

/* =========================================
   REVIEW SECTION STYLING DESU~
   ========================================= */
.reviews-section {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 2.5rem;
  margin-bottom: 3rem;
}
.star-rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}
.star-rating-input input {
  display: none;
}
.star-rating-input label {
  color: #e4e5e9;
  font-size: 2.2rem;
  padding: 0 3px;
  cursor: pointer;
  transition: color 0.2s;
}
.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
  color: #f1c40f;
}
.review-card {
  border-bottom: 1px solid #f1f2f6;
  padding: 1.5rem 0;
}
.review-card:last-child {
  border-bottom: none;
}
.reviewer-name {
  font-weight: 700;
  color: #2d3436;
  font-size: 1.05rem;
}
.review-date {
  font-size: 0.85rem;
  color: #b2bec3;
}
