:root {
  --primary: #00487a;
  --accent: #eb3e51;
  --bg-gray: #f4f6f8;
  --white: #ffffff;
  --text: #333;
  --border: #e5e7eb;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  background-color: var(--bg-gray);
  color: var(--text);
  font-size: 14px;
  padding-top: 64px;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

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

/* =========================================
   2. HEADER & NAVBAR 
========================================= */

nav {
  background: var(--primary);
  height: 64px;
  display: flex;
  align-items: center;
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

nav .nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

nav .logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
nav a {
  font-weight: 600;
}
/* Search Box */
nav .search-box {
  position: relative;
  z-index: 10001;
  flex: 1;
  max-width: 500px;
  height: 36px;
  display: flex;
  background: var(--white);
  border-radius: 4px;
  margin: 0 20px;
}

nav .search-box input {
  flex: 1;
  padding: 0 15px;
  border: none;
  outline: none;
  font-size: 14px;
  border-radius: 15px;
}

nav .search-box button {
  color: rgb(0, 0, 0);
  border: none;
  width: 45px;
  cursor: pointer;
  background-color: white;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

/* Menu Chính */
nav .menu {
  display: flex;
  align-items: center;
  gap: 15px;
}

nav .menu-item {
  color: white;
  font-size: 14px;
  text-decoration: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
  border-radius: 5px;
  transition: 0.2s;
  cursor: pointer;
  min-width: auto;
}

/* --- CART VARIANT DROPDOWN --- */
.cart-variant-box {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f2f6;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  margin-top: 5px;
  position: relative;
  user-select: none;
}
.variant-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  z-index: 100;
  margin-top: 5px;
  overflow: hidden;
  display: none;
}
.variant-dropdown-menu.show {
  display: block;
}
.variant-option {
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}
.variant-option:last-child {
  border-bottom: none;
}
.variant-option:hover {
  background: #f8f9fa;
}
.variant-option.active {
  background: #eef5ff;
  font-weight: bold;
  color: #00487a;
}
.variant-option .v-price {
  color: #d70018;
  font-weight: 600;
}

nav .menu-item i {
  margin-bottom: 0;
  font-size: 18px;
}
nav .menu-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background-color: var(--accent);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  height: 16px;
  min-width: 16px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

/* Dropdown User */
.user-dropdown-container {
  position: relative;
  height: 100%;
}
.dropdown-content.show {
  display: block;
  animation: fadeIn 0.2s;
  padding: 6px 0 6px 6px;
}
.dropdown-content {
  display: none;
  position: absolute;
  top: 50px;
  right: 0;
  background-color: white;
  min-width: 180px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  z-index: 1001;
  overflow: hidden;
}
.dropdown-content a {
  color: #333;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  transition: 0.2s;
}
.dropdown-content a:hover {
  background-color: #f5f5f5;
  color: var(--primary);
}
/* =========================================
   3. HERO SECTION (Trang chủ)
========================================= */
.hero-section {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 220px 1fr 265px;
  gap: 10px;
  height: 380px;
}

/* Menu Dọc Trái */
.sidebar-menu {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  height: 100%;
}

.sidebar-menu li {
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
}

.sidebar-menu li:hover {
  background: #f0f0f0;
  color: var(--primary);
}

/* Slider & Banner */
.main-banner {
  background: #ddd;
  border-radius: 10px;
  overflow: hidden;
}
.main-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.right-banners {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}
.right-banners img {
  border-radius: 10px;
  height: 32%;
  object-fit: cover;
  width: 100%;
}

/* Hot Sale */
.hot-sale-container {
  margin-top: 30px;
  background: linear-gradient(to right, #00487a, #0086e6);
  box-shadow: 0 4px 15px rgba(0, 72, 122, 0.4);
  padding: 20px;
  border-radius: 10px;
}

.hot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  margin-bottom: 20px;
}

.hot-header h2 {
  font-weight: 800;
  font-style: italic;
  font-size: 28px;
  text-transform: uppercase;
}

.hot-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.hot-timer .timer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  min-width: 50px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hot-timer .timer-block b {
  font-size: 30px;
  line-height: 1;
  font-weight: bold;
}
.hot-timer .text {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}
.hot-timer .timer-block small {
  font-size: 11px;
  margin-top: 3px;
  color: #fff;
  text-transform: uppercase;
  opacity: 0.9;
}
#fs-display-title {
  color: linear-gradient(135deg, #ff4e00, #ec9f05);
}
/* =========================================
   4. PRODUCT CARD & GRID
========================================= */
.section-title {
  margin: 30px 0 20px;
  font-size: 20px;
  font-weight: 700;
  color: #444;
  text-transform: uppercase;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 10px 0;
}
.product-grid .price {
  font-weight: 500;
  color: rgb(208, 9, 9);
}
.product-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card img {
  height: 180px;
  width: 100%;
  object-fit: contain;
  margin-bottom: 15px;
  transition: 0.3s;
}

.product-card:hover img {
  transform: scale(1.05);
}
.product-card,
.tracking-result {
  cursor: pointer;
  transition: transform 0.2s ease;
}
.product-card:hover,
.tracking-result:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.product-card h3 {
  font-size: 14px;
  height: 43px;
  overflow: hidden;
  line-height: 1.4;
}

.product-price {
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  display: block;
}
.sale-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.price-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 5px 0;
}

.price-new {
  color: #d70018;
  font-weight: 800;
  font-size: 16px;
}

.price-old {
  text-decoration: line-through;
  color: #999;
  font-size: 13px;
}

.card-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 12px;
  margin: 4px 0 2px;
  min-height: 18px;
}

.card-rating-num {
  font-size: 11px;
  color: #888;
  margin-left: 4px;
  font-weight: 600;
}
.product-card button,
.btn-add {
  width: 100%;
  padding: 10px 15px;
  margin-top: 10px;
  border: 2px solid var(--primary);
  background: white;
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.product-card button:hover,
.btn-add:hover {
  background: linear-gradient(to right, #284be9, #3474cf);
  border-color: transparent;
  color: white;
  transform: translateY(-2px);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 72, 122, 0.3);
}

.product-card button::before {
  content: "\f07a";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

/* =========================================
   5. PRODUCT DETAIL PAGE
========================================= */
.attr-select {
  width: 100%;
  max-width: 250px;
  padding: 10px 15px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #f9f9f9;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.attr-select:focus,
.attr-select:hover {
  border-color: var(--primary);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 72, 122, 0.1);
}

.product-detail-page {
  max-width: 1200px !important;
  margin-top: 30px;
  margin-bottom: 50px;
}

.pd-top-section {
  display: flex;
  gap: 30px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.pd-image-gallery {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 8px;
}

.pd-main-info {
  flex: 1.3;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.pd-title {
  font-size: 24px;
  font-weight: 700;
}

.pd-price-current {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
}

/* Nút THÊM GIỎ  */
.btn-add-cart-pd {
  flex: 1;
  background: white;
  color: #d70018;
  border: 2px solid #d70018;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-add-cart-pd i {
  font-size: 18px;
  margin-bottom: 3px;
}

.btn-add-cart-pd:hover {
  background: #fff0f0;
}
.pd-bottom-section {
  margin-top: 30px;
  background: #fff;
  padding: 25px;
  border-radius: 12px;
}

/* =========================================
   6. CART PAGE 
========================================= */
.cart-wrapper {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 50px;
  align-items: flex-start;
}

.cart-list {
  flex: 2;
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* --- CART HEADER --- */
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin-bottom: 15px;
  min-height: 35px;
}
.cart-header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.select-all-wrapper {
  display: flex;
  gap: 10px;
}
.select-all {
  transform: translateY(6px);
}
.delete-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#btn-delete-all {
  background: linear-gradient(to right, #e6394c, #f94c4c);
  color: white;
  border: 1px solid transparent;
  padding: 0 15px !important;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}
#btn-delete-selected {
  background: #ffecec;
  color: #e82e44;
  border: 1px solid #ffb3b3;
  padding: 0 15px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  transition: 0.2s;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

#btn-delete-selected:hover {
  background: linear-gradient(to right, #e6394c, #f94c4c);
  color: white;
}

/* --- CART ITEM  --- */
.cart-item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f5f5f5;
  gap: 15px;
  cursor: pointer;
}

/* 1. Ô Checkbox */
.cart-item .cart-checkbox,
.cart-item input[type="checkbox"] {
  flex: 0 0 20px;
  text-align: center;
  cursor: pointer;
}

/* 2. Ô Hình ảnh */
.cart-item img {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  object-fit: contain;
  border: 1px solid #eee;
  border-radius: 5px;
}

/* 3. Ô Tên sản phẩm, Giá, Số Lượng  */
.cart-item-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.item-name-group {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}

.cart-item-title-link {
  max-width: 100%;
}
.pay-check {
  height: 18px;
}
.item-name-group .cart-item-title {
  margin: 0;
  font-size: 15px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cart-variant-box {
  background: #e3e3e3;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #000000;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* 4. Ô Giá tiền  */
.cart-item-price {
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cart-item-price .flash-badge {
  display: inline-block;
  background: #ff6b35;
  color: #fff;
  font-size: 10px;
  padding: 4px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
  font-weight: bold;
}
.flash-badge {
  display: inline-block;
  background: #ff6b35;
  color: #fff;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 2px;
  font-weight: bold;
}
.cart-item-price .flash-badge {
  display: none;
}

.cart-item-price .current-price {
  font-weight: bold;
  color: #d70018;
  font-size: 15px;
}
.current-price {
  font-weight: bold;
}
.old-price {
  color: #999;
  font-size: 12px;
}
.cart-item-price .old-price {
  color: #999;
  font-size: 13px;
  text-decoration: line-through;
  margin-top: 2px;
}

/* 5. Ô Chỉnh Số lượng */
.qty-control {
  flex: 0 0 110px;
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  height: 32px;
  overflow: hidden;
  background: #fff;
}

.qty-control button {
  width: 32px;
  height: 32px;
  border: none;
  background: #f9f9f9;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  color: #555;
  transition: 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.qty-control button:hover {
  background: #e0e0e0;
  color: #d70018;
}

.qty-control span {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 14px;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  height: 100%;
}

/* 6. Ô Nút Xóa Từng Sản Phẩm */
.btn-remove-item {
  flex: 0 0 30px;
  text-align: right;
  color: #999;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 20px;
  transition: 0.2s;
}

.btn-remove-item:hover {
  color: #d70018;
}

/* --- CHECKOUT BAR --- */
.checkout-bar {
  background: white;
  padding: 20px;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  bottom: 0;
  z-index: 99;
}

.checkout-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 16px;
  color: #555;
}

.checkout-info .total-price {
  font-size: 24px;
  margin: 10px 0;
  color: #d70018;
  font-weight: 800;
}

.btn-checkout-trigger {
  background: linear-gradient(to right, #e6394c, #f94c4c);
  color: white;
  padding: 12px 40px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(215, 0, 24, 0.4);
  transition: 0.3s;
}

.btn-checkout-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(215, 0, 24, 0.6);
}
/* --- MODAL (Popup Form) --- */
.modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  scrollbar-width: none;
}
.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 0;
  border-radius: 12px;
  width: 500px;
  max-width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
}

#total_price {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 18px;
  align-items: flex-end;
}
.total-price-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
#modal-old-total {
  color: #999;
  font-size: 14px;
  display: none;
}
#modal-total-money {
  color: #d70018;
  margin: 0;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.empty-cart-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #eee;
  padding: 100px;
  border-radius: 8px;
}
.modal-header {
  background: #00487a;
  color: white;
  padding: 15px 20px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.close-modal {
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0 10px;
}
.close-modal:hover {
  color: #ea5858;
}
.modal-body {
  padding: 20px;
}

.modal-input {
  width: 100%;
  padding: 12px;
  margin: 8px 0 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: #f9f9f9;
}
.modal-input:focus {
  background: white;
  border-color: #00487a;
  outline: none;
}
#c-coupon {
  flex: 1;
  background-color: #f8f9fa;
  padding-right: 35px;
}
.active-code {
  transform: translateY(0px);
  margin: 0;
  font-weight: 600;
}
.modal-summary {
  background: #fff5f5;
  padding: 15px;
  border-radius: 6px;
  text-align: right;
  border: 1px dashed #ffcccc;
}
.modal-summary h3 {
  margin: 5px 0 0;
  color: var(--accent);
  font-size: 22px;
}

.modal-footer {
  padding: 15px 20px;
  background: #f1f1f1;
  border-radius: 0 0 12px 12px;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-confirm {
  background: var(--accent);
  color: white;
  padding: 16px 25px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}
.btn-cancel {
  background: #888;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* =========================================
   8. CHAT SYSTEM (Widget & Admin)
========================================= */
.chat-welcome-bubble {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 220px;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-size: 13px;
  color: #333;
  display: none;
  z-index: 99998;
  border: 1px solid #e0e0e0;
  animation: floatUp 0.5s ease;
}
.chat-welcome-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 25px;
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: white transparent transparent transparent;
}
.close-bubble {
  position: absolute;
  top: 5px;
  right: 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 16px;
}
.close-bubble {
  color: red;
  font-weight: bold;
}
.chat-welcome-bubble b {
  color: var(--primary);
  cursor: pointer;
}

#chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#chat-toggle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00487a, #0073c4);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 72, 122, 0.4);
  transition: transform 0.2s;
  position: relative;
  margin-top: -80px;
}
#chat-toggle:hover {
  transform: scale(1.1);
}

.chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--accent);
  color: white;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 10px;
  border: 2px solid white;
}

/* --- Khung Chat Chính --- */
#chat-box {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 350px;
  height: 450px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  z-index: 100000;
  overflow: visible;
  border: 1px solid #f0f0f0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transform-origin: bottom right;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
#chat-box::after {
  content: "";
  position: absolute;
  bottom: -9px;
  right: 21px;
  border-width: 9px 9px 0;
  border-style: solid;
  border-color: white transparent transparent transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.08));
}
#chat-box.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-header,
.chat-footer {
  flex-shrink: 0;
}
#chat-content {
  flex-grow: 1;
  overflow-y: auto;
}
.chat-header {
  display: flex;
  height: 45px;
  background: var(--primary);
  user-select: none;
  border-radius: 15px 15px 0 0;
  overflow: hidden;
}
.chat-tab {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.1);
}
.chat-tab.active {
  background: var(--primary);
  color: white;
  border-bottom: 3px solid #ffcc00;
}
.chat-tab.active {
  color: white;
  border-bottom: 3px solid #ffcc00;
  background: rgba(0, 0, 0, 0.1);
}
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}

#chat-window {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f5f7fa;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Bong bóng chat  */
.msg {
  display: flex;
  flex-direction: column;
  max-width: 75%;
  margin-bottom: 10px;
  position: relative;
}

.msg-text {
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* --- TIN NHẮN CỦA USER --- */
.msg.user {
  align-self: flex-end;
  align-items: flex-end;
}

.msg.user .msg-text {
  background-color: #0084ff;
  color: white;
  border-bottom-right-radius: 4px;
}

/* --- TIN NHẮN CỦA SHOP/BOT (MÀU XÁM) --- */
.msg.shop,
.msg.bot {
  align-self: flex-start;
  align-items: flex-start;
}

.msg.shop .msg-text,
.msg.bot .msg-text {
  background-color: #f0f0f0;
  color: #050505;
  border-bottom-left-radius: 4px;
}

/* --- PHẦN THỜI GIAN (Tách riêng) --- */
.msg-meta {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  margin-left: 2px;
  margin-right: 2px;
}

.chat-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #f5f7fa;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Body tin nhắn */
#chat-window,
.chat-messages,
.chat-body {
  flex: 1;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px;
  padding: 15px;
  overflow-y: auto;
  background-color: #f5f7fa;
}

/* Bong bóng chat */
.msg,
.msg-row {
  max-width: 75% !important;
  width: fit-content !important;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  position: relative;
}

.msg.admin,
.msg.user,
.msg-row.admin {
  align-self: flex-end !important;
  border-bottom-right-radius: 4px !important;
}

.msg.shop,
.msg.bot,
.msg-row.user {
  align-self: flex-start !important;
  color: #050505 !important;
  border-bottom-left-radius: 4px;
}

.chat-footer,
.chat-input {
  padding: 10px;
  background: white;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 0 0 15px 15px;
  overflow: hidden;
}

.chat-footer input,
.chat-input input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #f0f2f5;
  outline: none;
}

.chat-footer button,
.chat-input button {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00487a, #0073c4);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-layout {
  display: flex;
  flex-direction: row !important;
  height: 75vh;
  background: white;
  border-radius: 12px;
  border: 1px solid #ddd;
  overflow: hidden;
}

.user-list {
  width: 220px !important;
  border-right: 1px solid #eee;
  background: #fff;
  overflow-y: auto;
  flex-shrink: 0;
}
.user-item:hover {
  background: #f9f9f9;
}
.user-item.active {
  background: #ebf5ff;
  border-left: 4px solid #0084ff;
}
.user-item {
  padding: 15px;
  border-bottom: 2px solid #f5f5f5;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-item.active {
  background: #ebf5ff;
  border-left: 4px solid #0084ff;
}

/* =========================================
    FOOTER
========================================= */
.msg.admin {
  align-self: flex-end;
  background: #0084ff;
  color: white;
  border-bottom-right-radius: 2px;
}
.msg.user {
  align-self: flex-start;
  color: black;
}

.chat-input {
  padding: 15px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
}
/* =========================================
    AUTH (LOGIN / REGISTER)
========================================= */

.auth-wrapper {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-gray);
}

.auth-box {
  background: white;
  width: 400px;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  text-align: center;
}

.auth-box h2 {
  color: var(--primary);
  margin-bottom: 25px;
  font-size: 24px;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #f9f9f9;
  outline: none;
  font-size: 14px;
  transition: 0.2s;
}

.auth-form input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 72, 122, 0.1);
}

.auth-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(to right, #00487a, #0060a0);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.3s;
}

.auth-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.auth-link {
  margin-top: 20px;
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.auth-link a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-link a:hover {
  text-decoration: underline;
}
/* --- TABLE SCROLL WRAPPER --- */
.table-wrapper {
  max-height: 65vh;
  overflow-y: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  margin-top: 20px;
}

.msg.bot .msg-text {
  background-color: #e3f2fd;
  border: 1px solid #bbdefb;
  color: #0d47a1;
}

.msg.bot .msg-text::before {
  content: "";
  font-size: 14px;
}

.msg.bot a {
  text-decoration: underline;
  font-weight: bold;
}
.hot-timer {
  font-size: 18px;
  color: white;
}

.filter-btn {
  cursor: pointer;
}

.chat-tab[data-tab="bot"].active {
  border-bottom-color: #ffcc00;
}
.chat-tab[data-tab="shop"].active {
  border-bottom-color: #ffcc00;
}

.dropdown-content.show {
  display: block;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Badge thông báo trên Tab Chat */
.tab-badge {
  background-color: #d70018;
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 50%;
  margin-left: 6px;
  display: none;
  box-shadow: 0 0 0 2px #fff;
}
.tab-badge.show {
  display: inline-block;
}
.close-chat {
  width: 40px;
  font-size: 26px;
  text-align: center;
  padding-right: 6px;
  padding-top: 2px;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
  color: white;
  background: #04416b;
}
.close-chat:hover {
  background-color: rgb(246, 39, 39);
}
@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes popIn {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
.btn-delete-selected {
  background: white;
  color: #d70018;
  border: 1px solid #d70018;
  padding: 5px 15px;
  border-radius: 4px;
  cursor: pointer;
  display: none;
  font-weight: 600;
  transition: 0.2s;
}

.search-suggestions-box {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  z-index: 10002 !important;
  border: 1px solid #ddd;
  border-top: none;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.19),
    0 6px 6px rgba(0, 0, 0, 0.23);
  border-radius: 0 0 8px 8px;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

.suggest-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #f1f1f1;
  cursor: pointer;
  background: #fff;
  text-decoration: none;
  transition: background 0.2s;
}

.suggest-item:hover {
  background-color: #f8f9fa;
}

.suggest-item img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  margin-right: 12px;
  border-radius: 4px;
  border: 1px solid #eee;
}

.suggest-info {
  display: flex;
  flex-direction: column;
}

.suggest-info h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #000;
}

.suggest-info span {
  color: #d70018;
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
}
.sidebar-menu {
  overflow: visible !important;
}

.sidebar-menu li {
  position: relative;
}

.sub-menu {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  width: 800px;
  min-height: 100%;
  background: white;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;
  border-left: 2px solid #105aed;
  z-index: 9999;
  padding: 20px;
  border-radius: 0 8px 8px 8px;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  align-items: start;
}

.sidebar-menu li:hover .sub-menu {
  display: grid;
}

.sub-column h4 {
  font-size: 15px;
  font-weight: bold;
  color: #03355a;
  margin-bottom: 15px;
  text-transform: uppercase;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.sub-column a {
  display: inline-block;
  position: relative;
  font-size: 14px;
  color: #555;
  padding: 6px 0;
  transition: 0.2s;
  text-decoration: none;
}

.sub-column a:hover {
  color: #dc0e26;
  transform: translateX(5px);
  font-weight: 500;
}
.sub-column a::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #dc0e26;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.sub-column a:hover::after {
  transform: scaleX(1);
}
.sort-btn {
  text-decoration: none;
  padding: 8px 15px;
  border: 1px solid #ddd;
  border-radius: 20px;
  color: #333;
  font-size: 14px;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: 0.2s;
}

.sort-btn:hover {
  background: #eee;
}

.sort-btn.active {
  background: #ffecec;
  color: #d70018;
  border-color: #d70018;
  font-weight: bold;
}
/* =========================================
   CHI TIẾT SẢN PHẨM 
========================================= */
.pd-breadcrumb {
  margin-bottom: 20px;
  color: #666;
  font-size: 14px;
}
.pd-breadcrumb a {
  color: #666;
  text-decoration: none;
  transition: 0.2s;
}
.pd-breadcrumb a:hover {
  color: #d70018;
}
.pd-breadcrumb span.current {
  color: #000;
  font-weight: bold;
}

.pd-top-section {
  display: flex;
  gap: 30px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.pd-image-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.pd-main-img-box {
  text-align: center;
  border: 1px solid #eee;
  padding: 20px;
  border-radius: 8px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-main-img-box img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: 0.3s;
}
.pd-thumb-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 5px;
}
.thumb-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.6;
  transition: 0.2s;
}
.thumb-img:hover,
.thumb-img.active {
  opacity: 1;
  border-color: #d70018;
  border-width: 2px;
}

/* Cột Thông tin */
.pd-info-col {
  flex: 1.3;
}
.pd-name {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}
.pd-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 13px;
}
.pd-badge {
  padding: 5px 10px;
  border-radius: 4px;
}
.badge-brand {
  background: #e3f2fd;
  color: #0d47a1;
}
.badge-stock {
  background: #e8f5e9;
  color: #1b5e20;
}

.pd-price {
  font-size: 28px;
  font-weight: 800;
  color: #d70018;
  margin-bottom: 20px;
}

.pd-option-group {
  margin-bottom: 20px;
}
.option-label {
  font-size: 14px;
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}
.color-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
/* Cấu hình */
.pd-specs-box {
  margin-bottom: 25px;
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #eee;
}
.pd-specs-list {
  margin-top: 10px;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.8;
  color: #555;
}

.btn-add-cart-pd {
  flex: 1;
  background: white;
  color: #eb3e51;
  border: 2px solid #eb3e51;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: 0.2s;
}
.btn-add-cart-pd i {
  font-size: 20px;
  margin-bottom: 2px;
}
.btn-add-cart-pd:hover {
  background: #fff0f0;
}

/* Mô tả chi tiết */
.pd-bottom-section {
  margin-top: 30px;
  background: white;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #eee;
}
.content-desc {
  line-height: 1.8;
  color: #444;
  font-size: 15px;
}

.sidebar-menu li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.sidebar-menu li a span {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-menu li i:first-child {
  width: 20px;
  text-align: center;
}
.search-form-wrap {
  position: relative;
  flex: 1;
  max-width: 500px;
  margin: 0 20px;
}

/* 2. Giỏ hàng trên Menu */
.menu-cart-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.menu-cart-icon {
  font-size: 20px;
  margin-bottom: 2px;
}

.menu-cart-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background-color: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hidden {
  display: none !important;
}

.user-box-trigger {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 6px;
}

.user-avatar-icon {
  font-size: 22px;
}

.user-name-text {
  font-size: 14px;
  font-weight: 600;
  max-width: 100px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-caret-icon {
  font-size: 12px;
}

.sort-wrap select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ddd;
  outline: none;
  cursor: pointer;
}
.sale-code {
  background: #333;
  color: white;
  border: none;
  padding: 0 15px;
  border-radius: 6px;
  cursor: pointer;
}
.qty-btn {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate();
}
/* =========================================
   TOAST NOTIFICATION 
========================================= */
#toast-container {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 999999;
}

.toast {
  display: flex;
  align-items: center;
  background-color: #fff;
  border-radius: 4px;
  padding: 15px 20px;
  min-width: 300px;
  max-width: 400px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  margin-bottom: 15px;
  animation:
    slideInLeft 0.5s ease,
    fadeOut 1s 3s forwards;
  border-left: 6px solid;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Các loại thông báo */
.toast--success {
  border-color: #47d864;
}
.toast--success .toast__icon {
  color: #47d864;
}

.toast--error {
  border-color: #ff623d;
}
.toast--error .toast__icon {
  color: #ff623d;
}

.toast--warning {
  border-color: #ffcc00;
}
.toast--warning .toast__icon {
  color: #ffcc00;
}

.toast__icon {
  font-size: 24px;
  margin-right: 15px;
}
.toast__body {
  flex-grow: 1;
}
.toast__title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}
.toast__msg {
  font-size: 14px;
  color: #666;
}
.toast__close {
  font-size: 20px;
  color: #999;
  cursor: pointer;
}

/* =========================================
   CUSTOM CONFIRM MODAL 
========================================= */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100000;
  display: none;
  justify-content: center;
  align-items: center;
}
.confirm-box {
  background: white;
  width: 400px;
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: popIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.confirm-box h3 {
  margin-bottom: 10px;
  color: #333;
}
.confirm-box p {
  margin-bottom: 20px;
  color: #666;
}
.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.btn-yes {
  background: linear-gradient(to right, #e6394c, #f94c4c);
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 4px;
  cursor: pointer;
}
.btn-yes:hover {
  background: linear-gradient(to right, #e6394c, #f94c4c);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(207, 56, 56, 0.5);
}
.btn-no {
  background: #eee;
  color: #333;
  border: none;
  padding: 10px 25px;
  border-radius: 4px;
  cursor: pointer;
}
.btn-no:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 196, 196, 0.5);
}
@keyframes popIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.filter-sidebar a:hover {
  color: #d70018 !important;
  text-decoration: underline !important;
}
.main-menu {
  display: flex;
  list-style: none;
  gap: 20px;
  padding: 0;
  margin: 0;
}
.main-menu > li {
  position: relative;
  padding: 10px 0;
}
.main-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}
.header-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn-add-new {
  background: #28a745;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}

.btn-add-new:hover {
  background: #218838;
}

.spec-tag {
  background: #eee;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  margin-right: 4px;
}

.sb-link {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-badge {
  background-color: #d70018;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  padding: 0 4px;
  display: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-left: 10px;
}
/* =============================================
   NOTIFICATION DROPDOWN (Navbar)
   ============================================= */
#nav-notif-btn {
  position: relative;
}
#notif-dropdown {
  display: none;
  position: absolute;
  right: -8px;
  top: calc(100% + 12px);
  width: 340px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14);
  z-index: 9998;
  overflow: hidden;
}
#notif-dropdown.open {
  display: block;
}
.notif-header {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}
.notif-header b {
  font-size: 14px;
  color: #222;
}
.notif-header a {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
#notif-list {
  max-height: 360px;
  overflow-y: auto;
  scroll-behavior: smooth;
}
#notif-list::-webkit-scrollbar {
  width: 4px;
}
#notif-list::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid #f2f2f2;
  text-decoration: none;
  color: #333;
  transition: background 0.12s;
  cursor: pointer;
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-item:hover {
  background: #f8f9fb;
}
.notif-item.unread {
  background: #f0f7ff;
}
.notif-item.unread:hover {
  background: #e6f1fc;
}
.notif-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}
.notif-body {
  flex: 1;
  min-width: 0;
}
.notif-title {
  font-size: 13px;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-msg {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-time {
  font-size: 11px;
  color: #aaa;
  margin-top: 4px;
}
.notif-dot {
  width: 8px;
  height: 8px;
  background: #e74c3c;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.notif-empty {
  text-align: center;
  padding: 30px 20px;
  color: #bbb;
  font-size: 13px;
}
.notif-footer {
  text-align: center;
  padding: 10px;
  border-top: 1px solid #eee;
  background: #fafafa;
  font-size: 12px;
}
.notif-footer a {
  color: var(--primary);
  text-decoration: none;
}
.notif-footer a:hover {
  text-decoration: underline;
}

/* Badge chung cho notif + wishlist */
#nav-notif-badge,
#nav-wishlist-count {
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 10px;
  line-height: 18px;
  text-align: center;
}

/* Notif type-label (Order Status, Wishlist Price Alert...) */
.notif-type-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0.75;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

/* Nav Notif Wrap */
.nav-notif-wrap {
  margin-left: 2px;
}
/* =========================================
   10. ORDER HISTORY PAGE 
========================================= */

.history-wrapper {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  margin-top: 30px;
  margin-bottom: 50px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.history-header h2 {
  font-size: 24px;
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 700;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.history-table thead th {
  background-color: #f8f9fa;
  color: #555;
  font-weight: 700;
  text-transform: uppercase;
  padding: 15px;
  text-align: left;
  border-bottom: 2px solid #eee;
}

.history-table tbody td {
  padding: 15px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  color: #333;
}

.history-table tbody tr:hover {
  background-color: #f9f9f9;
}

.badge-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}

.bg-pending {
  background-color: #fff3cd;
  color: #856404;
}

.bg-shipping {
  background-color: #cce5ff;
  color: #004085;
}

.bg-completed {
  background-color: #d4edda;
  color: #155724;
}

.bg-cancelled {
  background-color: #f8d7da;
  color: #721c24;
}

.total-money {
  color: #d70018;
  font-weight: 700;
  font-size: 15px;
}

.btn-view-detail {
  border: 1px solid #ddd;
  padding: 10px 12px;
  border-radius: 14px;
  color: #ffffff;
  font-size: 12px;
  transition: 0.2s;
  background: #00487a;
  font-weight: 600;
}
.btn-view-detail:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  border-color: var(--primary);
}
.detail-wrapper {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  margin: 30px auto;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

/* Timeline Step */
.timeline {
  display: flex;
  justify-content: space-between;
  margin: 30px 0 50px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 4px;
  background: #eee;
  z-index: 0;
}

.step {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}

.step-icon {
  width: 45px;
  height: 45px;
  background: #eee;
  color: #999;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 18px;
  border: 4px solid #fff;
  transition: 0.3s;
}

.step-label {
  font-size: 13px;
  font-weight: 600;
  color: #999;
}

/* Active State */
.step.active .step-icon {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px #e0efff;
}

.step.active .step-label {
  color: var(--primary);
}

.step.cancelled .step-icon {
  background: #d70018;
  color: white;
}

/* Info Box */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.info-box {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #eee;
}

.info-title {
  font-size: 14px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  margin-bottom: 15px;
  border-bottom: 2px solid #ddd;
  display: inline-block;
  padding-bottom: 5px;
}

.info-row {
  margin-bottom: 10px;
  font-size: 14px;
}

.info-row i {
  width: 25px;
  color: #888;
}

/* Product List */
.item-row {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.item-row:last-child {
  border-bottom: none;
}

.item-img {
  width: 70px;
  height: 70px;
  border: 1px solid #eee;
  border-radius: 6px;
  object-fit: contain;
  margin-right: 15px;
}

.item-info {
  flex: 1;
}

.item-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 5px;
  display: block;
}

.item-meta {
  font-size: 13px;
  color: #666;
}

.item-total {
  font-weight: 700;
  color: #333;
  font-size: 15px;
}

/* Summary Footer */
.summary-box {
  background: #fffdfd;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 20px;
  text-align: right;
}

.sum-row {
  display: flex;
  justify-content: flex-end;
  gap: 50px;
  margin-bottom: 8px;
  font-size: 14px;
}

.sum-label {
  color: #666;
}

.sum-val {
  font-weight: 600;
  width: 120px;
}

.final-total {
  font-size: 20px;
  color: #1e62b5;
  font-weight: 800;
  margin-top: 10px;
  border-top: 1px dashed #ddd;
  padding-top: 10px;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.filter-bar {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-link {
  text-decoration: none;
  color: #333;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #ddd;
  transition: 0.2s;
  background: white;
  font-size: 14px;
}

.filter-link:hover,
.filter-link.active {
  background: #1e62b5;
  color: white;
  border-color: #1e62b5;
}

.product-card button {
  cursor: pointer;
}
/* =========================================
   11. NEW FOOTER 
========================================= */
footer {
  background-color: var(--primary);
  color: white;
  padding-top: 40px;
  margin-top: 50px;
  font-size: 13px;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-col h4 {
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 15px;
  font-weight: 700;
}

.ft-col ul {
  list-style: none;
  padding: 0;
}

.ft-col ul li {
  margin-bottom: 0;
}

.ft-col ul li a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: 0.2s;
  display: block;
  padding: 8px 0;
}

.ft-col ul li a:hover {
  color: white;
  padding-left: 5px;
  border-left: 3px solid #dcdcdc;
}

.pay-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.pay-icon {
  background: white;
  width: 45px;
  height: 30px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 20px;
}

/* Hotline to */
.hotline-box {
  margin-bottom: 15px;
}
.hotline-num {
  font-size: 18px;
  font-weight: 800;
  display: block;
  color: #ffcc00;
}
.hotline-desc {
  font-size: 12px;
  opacity: 0.8;
}

/* Social icons */
.social-list {
  display: flex;
  gap: 10px;
}
.social-item {
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  transition: 0.3s;
}
.social-item:first-child:hover {
  background: #0044ff;
  transform: translateY(-3px);
}
.social-item:nth-child(2):hover {
  background: #ff0000;
  transform: translateY(-3px);
}

.social-item:nth-child(3):hover {
  background: rgb(18, 17, 17);
  transform: translateY(-3px);
}
.social-item:nth-child(4):hover {
  background: #833ab4;
  background: linear-gradient(
    45deg,
    #405de6,
    #5851db,
    #833ab4,
    #c13584,
    #e1306c,
    #fd1d1d,
    #f56040,
    #f77737,
    #fcaf45,
    #ffdc80
  );
  color: white;
  transform: translateY(-3px);
}

/* Footer Bottom */
.footer-bottom {
  padding: 20px 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1.6;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.form-section {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.form-label {
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  color: #444;
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
}

.form-control:focus {
  border-color: #00487a;
  outline: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.btn-submit {
  background: #00487a;
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  width: 100%;
  transition: 0.2s;
}

.btn-submit:hover {
  background: #00365a;
}

.pd-price-current {
  color: #d70018;
  font-size: 28px;
  font-weight: bold;
}
.sale_price {
  color: #d70018;
  font-size: 28px;
  font-weight: bold;
}
.pd-price-old {
  text-decoration: line-through;
  color: #888;
  font-size: 18px;
  margin: 0 10px;
}
.pd-badge-sale {
  background: #d70018;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  vertical-align: middle;
}
/* =========================================
   TRANG CHI TIẾT SẢN PHẨM (PRODUCT DETAIL)
========================================= */
.pd-wrapper {
  background: #fff;
  padding: 20px 45px 30px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.pd-header {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 30px;
  margin-bottom: 30px;
}
/* Gallery Ảnh */
.pd-gallery-container {
  position: relative;
}
.pd-main-img-wrap {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  text-align: center;
  padding: 10px;
}
.pd-main-img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  transition: transform 0.3s;
}
.pd-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}
.pd-thumb-item {
  width: 60px;
  height: 60px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  object-fit: cover;
  opacity: 0.6;
}
.pd-thumb-item.active,
.pd-thumb-item:hover {
  border-color: #d70018;
  opacity: 1;
}

/* Thông tin sản phẩm */
.pd-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}
/* Thống nhất giao diện giá */
.pd-price-box {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 15px 0;
}
.pd-price-current {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
}
.pd-price-old {
  font-size: 18px;
  color: #999;
  text-decoration: line-through;
}
.pd-label-sale {
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
}

.pd-color-option {
  margin-bottom: 20px;
}
.btn-color {
  border: 1px solid #d70018;
  color: #d70018;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
  margin-right: 10px;
  margin-bottom: 5px;
}
.btn-color.active {
  border: 2px solid #d70018;
  color: #d70018;
  background: #ffebeb;
  font-weight: bold;
}
.pd-promo-box {
  border: 1px solid #d70018;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  background: #fffcfc;
}
.pd-promo-header {
  color: #d70018;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.pd-promo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pd-promo-list li {
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
}
.pd-promo-list li i {
  color: #28a745;
  margin-top: 3px;
}

.btn-buy-now {
  flex: 2;
  background: #eb3e51;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
  text-align: center;
}
.btn-buy-now:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 15px rgba(215, 0, 24, 0.4);
}
.btn-buy-now strong {
  display: block;
  font-size: 16px;
  margin-bottom: 2px;
}
.btn-buy-now span {
  font-size: 12px;
  opacity: 0.9;
}

.btn-add-cart-large {
  flex: 1;
  border: 2px solid #eb3e51;
  background: #fff;
  color: #eb3e51;
  border-radius: 8px;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 12px;
}
.btn-add-cart-large:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 15px rgba(215, 0, 24, 0.3);
}
.btn-add-cart-large i {
  font-size: 20px;
  margin-bottom: 3px;
}

/* SLIDER SẢN PHẨM LIÊN QUAN */
.related-wrapper {
  background: #fff;
  padding: 20px;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: relative;
}
.related-title {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  border-left: 5px solid var(--primary);
  padding-left: 10px;
}
.related-slider-container {
  position: relative;
  overflow: hidden;
  padding: 5px 0;
}
.related-track {
  display: flex;
  gap: 15px;
  transition: transform 0.4s ease-in-out;
}
.related-card {
  min-width: calc(25% - 11.25px);
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.related-card > a {
  flex: 1;
  display: block;
}
.related-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: var(--primary);
}
.related-img-wrap {
  position: relative;
  width: 100%;
}
.related-img-wrap img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  margin-bottom: 10px;
  display: block;
}
.related-flash-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #ff6b35;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  z-index: 2;
  line-height: 1.4;
  pointer-events: none;
}
.related-card h3 {
  font-size: 14px;
  height: 38px;
  overflow: hidden;
  margin-bottom: 5px;
  color: #333;
}
.related-card .price {
  color: #d70018;
  font-weight: bold;
  font-size: 15px;
}

/* Nút Slider */
.slider-btn {
  position: absolute;
  top: 55%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: 0.2s;
}
.slider-btn:hover {
  background: var(--accent);
}
.slider-btn.prev {
  left: 6px;
  top: 100px;
}
.slider-btn.next {
  right: 6px;
  top: 100px;
}

/* --- REVIEW CONTAINER --- */
.review-section {
  width: 100%;
  height: auto !important;
  min-height: 200px;
  overflow: hidden;
  padding-bottom: 30px;
  box-sizing: border-box;
}

.review-list {
  display: flex;
  flex-direction: column; /* Xếp dọc các review */
  gap: 15px; /* Khoảng cách đều giữa các review */
  height: auto !important; /* Cho phép co dãn theo số lượng review */
  margin-top: 20px;
}

.review-header-box {
  display: flex;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.review-score-box {
  text-align: center;
  width: 180px;
  border-right: 1px solid #eee;
}
.review-score-box h1 {
  font-size: 48px;
  color: var(--primary);
  margin: 0;
  line-height: 1;
}
.review-score-box .stars {
  color: #f39c12;
  font-size: 20px;
  margin: 10px 0;
}
.review-score-box p {
  font-size: 13px;
  color: #666;
}

.review-progress-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.progress-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.progress-bg {
  flex: 1;
  height: 8px;
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
  max-width: 350px;
}
.progress-fill {
  height: 100%;
  background: #f39c12;
  border-radius: 10px;
}

.review-action-box {
  width: 200px;
  margin-right: 120px;
  text-align: center;
}
.btn-write-review {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: 0.2s;
  box-shadow: 0 4px 10px rgba(0, 25, 215, 0.2);
}
.btn-write-review:hover {
  background: #025b9b;
  transform: translateY(-2px);
}

/* 2. Filter Bar */
.review-filter {
  margin: 25px 10px 0;
  display: flex;
  gap: 10px;
}
.review-filter button {
  background: #fff;
  border: 1px solid #ddd;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s;
  color: #555;
}
.review-filter button.active,
.review-filter button:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f3f0ff;
  font-weight: 600;
}
.container.review-section {
  background: white;
  margin-top: 20px;
  padding-top: 20px;
}

.review-card {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  width: 100%; /* Đảm bảo không bị tràn chiều ngang */
  box-sizing: border-box;
}
.review-card:last-child {
  border: none;
}

.review-avatar {
  width: 50px;
  height: 50px;
  background: #ddd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #555;
  font-size: 18px;
  flex-shrink: 0;
}

.review-body {
  flex: 1;
}

.review-author {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-right: 10px;
}
.review-date {
  font-size: 12px;
  color: #999;
}
.review-stars {
  color: #f39c12;
  font-size: 13px;
  margin: 5px 0 10px;
}
.review-content {
  font-size: 15px;
  line-height: 1.6;
  color: #444;
  margin-bottom: 12px;
}

/* Ảnh trong review */
.review-gallery {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.review-gallery img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #eee;
  cursor: zoom-in;
}

/* Register */
.login-box {
  width: 450px;
  margin: 100px auto;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

input {
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #ccc;
}

button {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}
#btn-register {
  font-weight: bold;
  height: 42px;
}
#btn-register:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.btn-like-review {
  background: none;
  border: none;
  color: #00487a;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: 0.2s ease-in-out;
}
.btn-like-review.liked {
  color: #00487a;
  font-weight: 600;
  border-color: #00487a;
}
.btn-like-review.liked i {
  transform: scale(1.1);
}
.btn-like-review i {
  font-size: 16px;
}
.btn-like-review:hover {
  text-decoration: underline;
}

/* 4. MODAL REVIEW */
#review-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}
.review-modal-size {
  max-width: 600px;
  margin: 5% auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  animation: slideDown 0.3s ease;
}
.rating-input {
  text-align: center;
  margin-bottom: 20px;
}
.rating-input p {
  font-weight: bold;
  margin-bottom: 10px;
}
.star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 8px;
}
.star-rating label {
  font-size: 35px;
  color: #ddd;
  cursor: pointer;
  transition: 0.2s;
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: #f39c12;
}
.star-rating input {
  display: none;
}

.review-modal-size textarea {
  width: 100%;
  height: 120px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  resize: none;
  font-family: inherit;
}
.image-upload-wrap {
  margin: 15px 0;
  border: 1px dashed #00487a;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  background: #f8fbff;
}
.upload-label {
  cursor: pointer;
  color: #00487a;
  font-weight: 600;
}
.btn-submit-review {
  width: 100%;
  padding: 15px;
  background: var(--primary);
  color: white;
  border: none;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
}
/* Animation cho Review Mới */
.review-card.fade-in {
  animation: fadeInReview 0.5s ease;
}

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

.review-loading,
.empty-review {
  text-align: center;
  padding: 40px;
  color: #666;
  background: #f9f9f9;
  border-radius: 8px;
}
.empty-review i {
  font-size: 40px;
  margin-bottom: 10px;
  color: #ccc;
}

.btn-view-all-reviews {
  display: inline-block;
  padding: 10px 30px;
  border: 1px solid #00487a;
  color: #00487a;
  background: white;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}
.btn-view-all-reviews:hover {
  background: #00487a;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 72, 122, 0.2);
}

/* chage_password */
.password-container {
  max-width: 450px;
  margin: 60px auto;
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group label {
  display: block;
  font-weight: bold;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.btn-save {
  background: var(--primary);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  width: 100%;
  font-size: 16px;
  margin-top: 10px;
}

.btn-save:hover {
  background: #01518a;
}

.back-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: #00487a;
  text-decoration: none;
  font-weight: bold;
}

.back-link:hover {
  text-decoration: underline;
}

/* VOUCHER TICKET */
.voucher-page-wrapper {
  max-width: 800px;
  margin: 40px auto;
  min-height: 50vh;
}

.voucher-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
  margin-bottom: 30px;
  border-bottom: 2px solid #eee;
  padding-bottom: 15px;
}

.voucher-header h2 {
  margin: 0;
  color: #00487a;
}

.voucher-ticket {
  display: flex;
  background: #fff;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
  border: 1px solid #f0f0f0;
}

.voucher-left {
  width: 200px;
  background: linear-gradient(135deg, #00487a, #0077c2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  padding: 15px;
  position: relative;
}

.voucher-left i {
  font-size: 35px;
  margin-bottom: 5px;
}

.voucher-left span {
  font-size: 13px;
  font-weight: bold;
  text-align: center;
}

.voucher-left::after {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 0;
  width: 6px;
  background-image: radial-gradient(
    circle at 0px 7px,
    #fff 6px,
    transparent 6.5px
  );
  background-size: 6px 20px;
  background-repeat: repeat-y;
  z-index: 10;
}

.voucher-right {
  flex: 1;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.voucher-info h3 {
  margin: 0 0 5px 0;
  font-size: 18px;
  color: #333;
}

.voucher-code {
  display: inline-block;
  background: #f8f9fa;
  border: 1px dashed #00487a;
  color: #00487a;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 8px;
}

.voucher-desc {
  font-size: 13px;
  color: #666;
  margin: 0 0 5px 0;
  line-height: 1.5;
}

.voucher-expiry {
  font-size: 12px;
  color: #d70018;
  font-weight: 600;
}

.voucher-action {
  position: relative;
  padding-left: 40px;
  margin-right: 20px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.voucher-action::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -20px;
  bottom: -20px;
  border-left: 2px dashed #ccc;
  z-index: 1;
}

.voucher-action::after {
  content: "";
  position: absolute;
  left: -7px;
  top: -20px;
  bottom: -20px;
  width: 14px;
  background-image:
    radial-gradient(circle at 50% 0, #eff1f3 6px, transparent 6.5px),
    radial-gradient(circle at 50% 100%, #e8eaec 6px, transparent 6.5px);
  background-repeat: no-repeat;
  z-index: 2;
}

.btn-use {
  background: linear-gradient(135deg, #00487a, #0077c2);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: 0.2s;
  font-size: 14px;
}

.btn-use:hover {
  background: linear-gradient(135deg, #015591, #0184d6);
  transform: translateY(-2px);
}

.usage-count {
  margin-top: 4px;
  font-size: 12px;
  color: #888;
}
.btn-primary {
  width: 60px;
  height: 46px;
  padding: 10px 15px;
  border-radius: 14px;
}
#btn-clear-voucher {
  display: none;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: #999;
  border: none;
  font-size: 16px;
  padding: 5px;
  cursor: pointer;
  margin: 0;
  width: auto;
  height: auto;
  z-index: 10;
}
#btn-clear-voucher:hover {
  color: #dc3545;
}

.payment-option {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  padding: 12px 15px;
  border-radius: 8px;
  flex: 1;
  transition: all 0.2s ease;
  background: #fff;
}
.payment-radio {
  display: none;
}
.payment-content {
  flex: 1;
}
.payment-content i {
  margin-left: 170px;
}
.payment-content b {
  color: #333;
  font-size: 14px;
}
.payment-sub {
  font-size: 12px;
  color: #666;
}
.check-icon {
  font-size: 18px;
  color: #eee;
  transition: 0.2s;
}

.payment-option:has(.payment-radio:checked) {
  border-color: #00487a;
  background: #f0f7ff;
}
.payment-option:has(.payment-radio:checked) .check-icon {
  color: #00487a;
}
.payment-option:has(.payment-radio:checked) .payment-content b {
  color: #00487a;
}

/* =========================================
   7. UTILITIES
========================================= */
.text-center {
  text-align: center;
}
.mt-20 {
  margin-top: 20px;
}
.mb-20 {
  margin-bottom: 20px;
}
.hidden {
  display: none !important;
}

/* =========================================
   8. RESPONSIVE / MOBILE OPTIMIZATION
========================================= */

@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 200px 1fr 200px;
    height: auto;
  }
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .pd-top-section {
    gap: 20px;
  }
  .review-header-box {
    flex-wrap: wrap;
    gap: 15px;
  }
  .main-banner {
    height: 300px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 56px;
  }
  nav {
    height: 56px;
  }
  nav .menu {
    display: none;
  }
  nav .search-box {
    margin: 0 10px;
  }
  .hero-section {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .sidebar-menu,
  .right-banners {
    display: none;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .pd-top-section {
    flex-direction: column;
  }
  .pd-main-img-box {
    height: 300px;
  }
  .pd-header {
    grid-template-columns: 1fr;
  }
  .price-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 5px 0;
    flex-direction: column;
  }
  .pd-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
  }
  .pd-wrapper {
    padding-bottom: 80px;
  }
  .related-card {
    min-width: calc(50% - 7.5px);
  }
  .review-card {
    flex-direction: column;
  }
  .cart-wrapper {
    flex-direction: column;
  }
  .cart-item {
    flex-wrap: wrap;
  }
  .cart-item-info {
    width: 100%;
    order: 3;
    margin-top: 10px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
}

@media (max-width: 480px) {
  nav .search-box {
    max-width: 150px;
  }

  .hero-section {
    margin-top: 10px;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .hot-header h2 {
    font-size: 20px;
  }
  .btn-add-cart-pd i {
    font-size: 14px;
    margin-bottom: 0;
  }
  .btn-add-cart-pd {
    font-size: 9px;
    padding: 8px 5px;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .review-score-box {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
  }
}

/* =========================================
   TYPING ANIMATION FOR CHATBOT
========================================= */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 5px;
}
.typing-indicator span {
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
}
.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}
.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}
@keyframes typing {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* =========================================
   UTILITY CLASSES 
========================================= */

.confirm-icon-danger {
  font-size: 50px;
  color: #d70018;
  margin-bottom: 15px;
}

.footer-dmca {
  margin-top: 10px;
}

.footer-dmca img {
  height: 25px;
  display: inline-block;
  opacity: 0.8;
}
.sidebar-icon-flex {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-icon-width {
  width: 20px;
  text-align: center;
}

/* =========================================
   ORDER CANCEL BUTTON STYLES
========================================= */
.btn-cancel-order {
  width: 150px;
  background: #fff;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 15px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel-order:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(215, 0, 24, 0.2);
  transform: translateY(-2px);
}

/* =========================================
   REGISTRATION SUCCESS MODAL STYLES
========================================= */
.reg-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}
.reg-modal-box {
  background: #fff;
  width: 90%;
  max-width: 400px;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: popIn 0.3s ease-out forwards;
}
.reg-modal-icon {
  font-size: 50px;
  color: #28a745;
  margin-bottom: 15px;
}
.reg-modal-title {
  color: var(--primary);
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
}
.reg-modal-msg {
  color: #666;
  margin-bottom: 25px;
  font-size: 15px;
  line-height: 1.5;
}
.reg-modal-box .btn-reg-login {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 12px 30px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s;
}
.reg-modal-box .btn-reg-login:hover {
  background: #00365d;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 72, 122, 0.3);
  transform: translateY(-2px);
}
/* =============================================
   WISHLIST BUTTON (product_detail)
   ============================================= */
#btn-wishlist {
  width: 10%;
  padding: 12px 16px;
  border: 2px solid #e74c3c;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition:
    background 0.2s,
    transform 0.15s;
}
#btn-wishlist:hover {
  background: #ffeaea;
  transform: scale(1.05);
}
#btn-wishlist.active {
  background: #ffeaea;
}

/* =============================================
   WISHLIST PAGE STYLES
   ============================================= */
.wishlist-wrapper {
  max-width: 960px;
  margin: 30px auto;
  padding: 0 15px;
}
.wishlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.wishlist-header h2 {
  color: var(--primary, #d70018);
  font-size: 22px;
}
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.wishlist-card {
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s;
}
.wishlist-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.wishlist-card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  padding: 12px;
}
.wishlist-card-body {
  padding: 10px 12px 14px;
}
.wishlist-card-body a {
  text-decoration: none;
  color: #333;
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
  line-height: 1.4;
  height: 40px;
  overflow: hidden;
}
.wishlist-price {
  color: #d70018;
  font-weight: bold;
  font-size: 15px;
}
.wishlist-old-price {
  color: #999;
  font-size: 12px;
  text-decoration: line-through;
  margin-left: 6px;
}
.wishlist-drop-badge {
  background: #27ae60;
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 6px;
}
.wishlist-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.btn-remove-wish {
  width: 20%;
  border: none;
  background: #ffeaea;
  color: #eb3e51;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}
.btn-add-wish-cart {
  flex: 1;
  background: #eb3e51;
  color: #fff;
  border: none;
  padding: 7px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.btn-add-wish-cart:hover {
  opacity: 0.9;

  transform: scale(1.02);
  box-shadow: 0 6px 15px rgba(215, 0, 24, 0.4);
}
.btn-remove-wish:hover {
  background: #eb3e51;
  color: #ffeaea;
  transform: scale(1.02);
  box-shadow: 0 6px 15px rgba(215, 0, 24, 0.4);
}
.wishlist-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.wishlist-empty i {
  font-size: 60px;
  color: #ffd0d0;
  margin-bottom: 16px;
}
.alert-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #eb3e51;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
}

/* =========================================
   SCROLL TO TOP BUTTON
========================================= */
#scroll-top-btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #00487a, #0073c4);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  cursor: pointer;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    background 0.2s ease;
}
#scroll-top-btn:hover {
  background: #005fa3;
  transform: translateY(6px);
}
#scroll-top-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  margin-right: 4px;
  margin-bottom: 98px;
}

.mobile-bottom-nav,
.m-backdrop,
.m-bottom-sheet {
  display: none !important;
}
.cart-recommendation-add-btn {
  background: #e6394c !important;
  border: 1px solid #e6394c !important;
  color: #ffffff !important;
  padding: 7px !important;
  border-radius: 8px !important;
  cursor: pointer;
  font-size: 12px !important;
  font-weight: 400 !important;
  transition: 0.2s;
}
.cart-recommendation-add-btn:hover {
  box-shadow: 0 6px 15px rgba(215, 0, 24, 0.4) !important;
}
.cart-recommendation-add-btn:active {
  transform: scale(0.98);
}

.swal2-container.swal2-top-end {
  top: 70px !important;
  z-index: 99999 !important;
}
