/* Reset & Base Styles */
:root {
  --primary-color: #f0601e;
  --primary-hover: #d55318;
  --secondary-color: #0099cc;
  --accent-color: #e94a35;
  --text-dark: #222222;
  --text-muted: #666666;
  --bg-light: #f4f6f8;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
}

/* Category Sidebar (Hình 1) */
.sidebar-category-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}
.sidebar-header {
  background-color: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}
.category-item {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}
.category-item:hover {
  background-color: #fff7ed !important;
  border-left-color: var(--primary-color);
  padding-left: 1.25rem !important;
}
.category-item .category-name {
  color: #1e293b;
}
.category-item:hover .category-name {
  color: var(--primary-color) !important;
}

/* Sidebar Price Filter */
.sidebar-price-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}
.sidebar-price-list .list-group-item {
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}
.sidebar-price-list .list-group-item:hover {
  background-color: #fff7ed !important;
  color: var(--primary-color) !important;
  border-left-color: var(--primary-color);
  padding-left: 1.25rem !important;
}


/* Hero Banner U23 (Hình 1) - Chiều cao 2/3 */
.hero-banner-card {
  background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 50%, #450a0a 100%);
  min-height: 185px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.hero-banner-content {
  min-height: 185px;
  background-image: radial-gradient(circle at right center, rgba(245, 158, 11, 0.3) 0%, transparent 60%);
  padding: 1.25rem 1.5rem !important;
}
.hero-title {
  font-size: 1.5rem !important;
  line-height: 1.15;
}
.hero-subtitle {
  font-size: 0.95rem !important;
  margin-bottom: 0.5rem !important;
}
.hero-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s;
}
.hero-dots .dot.active {
  width: 18px;
  border-radius: 8px;
  background-color: #ffcc00;
}

/* Sub Banners (Hình 1) - Chiều cao 2/3 */
.sub-banner-card {
  min-height: 115px;
  padding: 0.75rem 1rem !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #e2e8f0;
}
.sub-banner-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}
.sub-banner-card h6 {
  font-size: 0.85rem;
}
.banner-lazada {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-top: 3px solid #0284c7;
}
.banner-lotte {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-top: 3px solid #f59e0b;
}
.banner-tiki {
  background: linear-gradient(135deg, #fef08a 0%, #fde047 100%);
  border-top: 3px solid #0284c7;
}

/* Tabs Giá tốt mỗi ngày (Hình 1 & 2) */
.daily-deals-tabs .nav-link {
  color: #475569;
  border: 1px solid transparent;
  padding: 10px 18px;
  border-radius: 4px 4px 0 0;
}
.daily-deals-tabs .nav-link.active {
  color: #dc2626 !important;
  border-color: #dc2626 #dc2626 #ffffff;
  border-top: 3px solid #dc2626;
  background-color: #ffffff;
}
.daily-deals-tabs .nav-link:hover:not(.active) {
  border-color: #e2e8f0 #e2e8f0 #e2e8f0;
  color: #dc2626;
}

/* Product Card (Hình 2) */
.product-card {
  transition: all 0.25s ease;
  border-radius: 6px;
  background: #ffffff;
}
.product-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: #fca5a5 !important;
  transform: translateY(-2px);
}
.discount-badge-corner {
  z-index: 2;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}
.product-thumb-box {
  background-color: #f8fafc;
  transition: transform 0.3s ease;
}
.product-card:hover .product-thumb-box .product-emoji {
  transform: scale(1.1);
}
.product-emoji {
  transition: transform 0.2s ease;
}
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Promo Category Banners (Hình 2) - Chiều cao 2/3 */
.category-banner-item {
  min-height: 135px !important;
  padding: 0.85rem 1.25rem !important;
  border-radius: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.category-banner-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}
.comet-banner {
  background: linear-gradient(135deg, #d97706 0%, #b45309 50%, #78350f 100%);
}
.bobby-banner {
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 50%, #581c87 100%);
}
.category-banner-item .banner-tag {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.category-banner-item .banner-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
}
.category-banner-item .banner-desc {
  font-size: 0.75rem;
  line-height: 1.35;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1020;
}
.top-nav-links .nav-link {
  padding: 10px 15px;
  font-size: 0.95rem;
}
.top-nav-links .nav-link:hover {
  color: var(--primary-color) !important;
}
.cursor-pointer {
  cursor: pointer;
}

/* Product Image Zoom & Lightbox */
.product-main-image-wrap {
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.product-main-image-wrap:hover .zoom-hint-btn {
  opacity: 1;
  transform: translateY(0);
}
.zoom-hint-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.85;
  transition: all 0.25s ease;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.gallery-thumb {
  border: 2px solid #cbd5e1 !important;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gallery-thumb:hover {
  border-color: var(--primary-color) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(240, 96, 30, 0.2);
}
.gallery-thumb.active {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}
.product-zoom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 15, 29, 0.92);
  backdrop-filter: blur(10px);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.product-zoom-modal.active {
  opacity: 1;
  visibility: visible;
}
.zoom-modal-header {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  z-index: 10;
}
.zoom-modal-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  user-select: none;
}
.zoom-img-container {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1);
  cursor: grab;
}
.zoom-img-container.zoomed {
  cursor: grab;
}
.zoom-img-container.dragging {
  cursor: grabbing;
}
.zoom-img-target {
  max-height: 75vh;
  max-width: 85vw;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  transition: box-shadow 0.3s;
}
.zoom-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}
.zoom-nav-btn:hover {
  background: rgba(240, 96, 30, 0.9);
  color: #fff;
  border-color: #f0601e;
  transform: translateY(-50%) scale(1.1);
}
.zoom-prev-btn { left: 24px; }
.zoom-next-btn { right: 24px; }
.zoom-modal-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 10;
}
.zoom-modal-footer .modal-thumb {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 2px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}
.zoom-modal-footer .modal-thumb.active {
  border-color: #f0601e;
  transform: scale(1.08);
}
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.zoom-controls button {
  background: transparent;
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.zoom-controls button:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Header Top Bar Alignment & No-Wrap */
.search-form {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form:focus-within {
  border-color: #f0601e;
  box-shadow: 0 0 0 3px rgba(240, 96, 30, 0.15);
}
.search-form .search-input {
  border: none !important;
  box-shadow: none !important;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
}
.search-form .search-btn {
  border: none !important;
  border-radius: 0 !important;
  background-color: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-form .search-btn:hover {
  background-color: #d97706;
}

.header-top .cart-btn,
.header-top .hotline-box,
.header-top .btn-dark,
.header-top .search-btn {
  white-space: nowrap !important;
  flex-shrink: 0;
}

.header-top .cart-btn span {
  white-space: nowrap !important;
}

/* Spacing adjustments: 10px vertical rhythm */
.site-main {
  padding-top: 10px !important;
  padding-bottom: 0 !important;
}
.site-main > .container,
.site-main > div > .container {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
nav[aria-label="breadcrumb"],
.breadcrumb {
  margin-top: 0 !important;
  margin-bottom: 10px !important;
  padding: 0 !important;
}
.breadcrumb-item {
  font-size: 0.88rem;
}

/* Footer Blue Theme - Giảm chiều cao còn 2/3 kích thước cũ & ẩn dòng bản quyền */
footer,
.site-footer,
.footer {
  margin-top: 1.25rem !important;
  padding-top: 1.25rem !important;
  padding-bottom: 0.75rem !important;
}
.site-main > .container:last-child {
  margin-bottom: 0 !important;
}
footer h5, footer h6,
.site-footer h5, .site-footer h6,
.footer h5, .footer h6 {
  color: #ffffff !important;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem !important;
  font-size: 0.95rem !important;
}
footer p, footer p.small,
.site-footer p, .site-footer p.small,
.footer p, .footer p.small {
  margin-bottom: 0.35rem !important;
  line-height: 1.35 !important;
  font-size: 0.82rem !important;
}
footer .row,
.site-footer .row,
.footer .row {
  margin-bottom: 0 !important;
  --bs-gutter-y: 0.5rem !important;
}
footer ul,
.site-footer ul,
.footer ul {
  margin-bottom: 0 !important;
}
footer ul li,
.site-footer ul li,
.footer ul li {
  margin-bottom: 0.2rem !important;
}
.site-footer .text-secondary {
  color: #e2e8f0 !important;
}
.site-footer a.text-secondary {
  color: #e2e8f0 !important;
  transition: all 0.2s ease;
}
.site-footer a.text-secondary:hover {
  color: #ffd166 !important;
  padding-left: 5px;
}
.site-footer .footer-socials .btn {
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  transition: all 0.2s;
}
.site-footer .footer-socials .btn:hover {
  background-color: #ffffff;
  color: #0a4d7d;
  border-color: #ffffff;
}
footer hr,
.site-footer hr,
.footer hr,
footer .text-center:last-child,
.site-footer .text-center:last-child,
.footer .text-center:last-child {
  display: none !important;
}
.site-footer .badge.bg-secondary {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Article Content Image Styling */
.article-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px;
  margin: 12px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  display: block;
}
.article-content p {
  margin-bottom: 1rem;
}

/* Canh lề tất cả các trang: cách mép màn hình trái 100px, phải 100px */
body {
  padding-left: 100px !important;
  padding-right: 100px !important;
  box-sizing: border-box !important;
}

@media (max-width: 576px) {
  body {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

.container,
.container-fluid {
  max-width: 100% !important;
  width: 100% !important;
}

/* ==========================================================================
   GIAO DIỆN ĐIỆN THOẠI (MOBILE): LIỆT KÊ SẢN PHẨM TUẦN TỰ 1 CỘT (DANH SÁCH RÕ NÉT)
   MÁY TÍNH VẪN GIỮ NGUYÊN 100% GIAO DIỆN LƯỚI CŨ (4 CỘT)
   ========================================================================== */
@media (max-width: 576px) {
  /* Mỗi sản phẩm chiếm trọn 100% chiều ngang (tuần tự 1 cột) */
  /* Giam khoang cach giua 2 san pham tren dien thoai */
  .deal-product-item,
  #productsGrid > div,
  #product-list > div,
  .related-products > div,
  .products-grid > div {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 6px !important;
  }

  /* Thẻ sản phẩm chuyển sang dạng Card ngang rộng rãi, dễ nhìn */
  .deal-product-item .product-card,
  #productsGrid .product-card,
  #product-list .product-card,
  .related-products .product-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 10px !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  }

  /* Khung ảnh sản phẩm to rõ bên trái (115px x 115px) */
  /* Tang kich thuoc theo chieu ngang moi hinh them 50px (tu 115px len 165px) */
  .deal-product-item .product-thumb-box,
  #productsGrid .product-thumb-box,
  #product-list .product-thumb-box,
  .related-products .product-thumb-box {
    width: 165px !important;
    height: 140px !important;
    min-width: 165px !important;
    max-width: 165px !important;
    border-radius: 8px !important;
    padding: 6px !important;
    margin: 0 !important;
  }

  .deal-product-item .product-thumb-box img,
  #productsGrid .product-thumb-box img,
  #product-list .product-thumb-box img,
  .related-products .product-thumb-box img {
    max-height: 130px !important;
    max-width: 155px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  /* Phần nội dung bên phải rộng rãi */
  .deal-product-item .product-card .card-body,
  #productsGrid .product-card .card-body,
  #product-list .product-card .card-body,
  .related-products .product-card .card-body {
    padding: 0 0 0 14px !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  /* Tên sản phẩm gọn gàng, rõ ràng, không bị ngắt chữ */
  .deal-product-item .product-title,
  #productsGrid .product-title,
  #product-list .product-title,
  .related-products .product-title {
    height: auto !important;
    max-height: none !important;
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
    margin-bottom: 6px !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  /* Khung giá sản phẩm */
  .deal-product-item .product-pricing,
  #productsGrid .product-pricing,
  #product-list .product-pricing,
  .related-products .product-pricing {
    border-top: none !important;
    padding-top: 4px !important;
  }

  /* Gia mau do nho lai vua van man hinh tren dien thoai */
  .deal-product-item .product-pricing .text-danger,
  #productsGrid .product-pricing .text-danger,
  #product-list .product-pricing .text-danger,
  .related-products .product-pricing .text-danger {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    display: inline-block !important;
    margin-right: 4px !important;
    white-space: nowrap !important;
  }

  .deal-product-item .product-pricing .text-muted,
  #productsGrid .product-pricing .text-muted,
  #product-list .product-pricing .text-muted,
  .related-products .product-pricing .text-muted {
    font-size: 0.78rem !important;
    white-space: nowrap !important;
  }

  .deal-product-item .product-pricing .d-flex,
  #productsGrid .product-pricing .d-flex,
  #product-list .product-pricing .d-flex,
  .related-products .product-pricing .d-flex {
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 4px !important;
    margin-bottom: 4px !important;
  }

  /* Nút thêm vào giỏ hàng gọn gàng 1 dòng */
  /* Nut them vao gio nho gon, vua van, hien thi day du chu tren dien thoai */
  /* Tang chieu ngang nut them 50px de vua du ca Icon + Them vao gio hang */
  .deal-product-item .btn-add-to-cart,
  #productsGrid .btn-add-to-cart,
  #product-list .btn-add-to-cart,
  .related-products .btn-add-to-cart {
    width: 100% !important;
    min-width: 185px !important;
    max-width: 220px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
    line-height: 1.25 !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    margin-top: 5px !important;
  }

  .deal-product-item .btn-add-to-cart i,
  #productsGrid .btn-add-to-cart i,
  #product-list .btn-add-to-cart i,
  .related-products .btn-add-to-cart i {
    font-size: 0.78rem !important;
    margin-right: 4px !important;
  }

  /* Huy hiệu giảm giá - góc ảnh */
  .deal-product-item .discount-badge-corner,
  #productsGrid .discount-badge-corner,
  #product-list .discount-badge-corner {
    font-size: 0.75rem !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
  }
}




/* ==========================================================================
   TOI UU GIAO DIEN MOBILE (DIEN THOAI) CHO NGUOI DUNG & TRANG QUAN TRI (ADMIN)
   Dam bao noi dung vua van man hinh tren dien thoai, khong phat sinh loi
   May tinh (Desktop) giu nguyen 100% dep va chuan
   ========================================================================== */

/* 1. TOI UU CHUNG CHO MAN HINH NHO */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  body {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .container, .container-fluid {
    padding-left: 6px !important;
    padding-right: 6px !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  /* Khong cho bat cu thanh phan nao tran ra ngoai man hinh */
  img, video, iframe, embed, object {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Bang du lieu tu cuon ngang muot ma */
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .table-responsive table {
    min-width: 580px;
  }

  /* Canh lề modal tren mobile */
  .modal-dialog {
    margin: 0.5rem !important;
    max-width: calc(100% - 1rem) !important;
  }

  .modal-content {
    border-radius: 12px !important;
    overflow: hidden !important;
  }
}

/* 2. TOI UU RIENG TRANG ADMIN TREN DIEN THOAI */
@media (max-width: 768px) {
  /* Thanh Menu Tabs cuon ngang muot ma tren dien thoai */
  .admin-mobile-tabs-container {
    background: #1e293b;
    padding: 8px 6px;
    border-radius: 8px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  }

  .admin-mobile-tabs-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 6px;
    padding-bottom: 4px;
  }

  .admin-mobile-tabs-scroll::-webkit-scrollbar {
    height: 4px;
  }

  .admin-mobile-tabs-scroll::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
  }

  .admin-mobile-tabs-scroll .nav-link {
    white-space: nowrap !important;
    font-size: 0.82rem !important;
    padding: 6px 12px !important;
    color: #cbd5e1 !important;
    background: #334155 !important;
    border-radius: 20px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    text-decoration: none !important;
  }

  .admin-mobile-tabs-scroll .nav-link.active {
    background: #f0601e !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-color: #f0601e !important;
  }

  /* Khung noi dung admin tren mobile */
  #admin-main-content .col-md-10 {
    padding: 10px 4px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Card thong ke tren mobile */
  .stat-card {
    margin-bottom: 8px !important;
    border-radius: 10px !important;
    padding: 12px !important;
  }

  .stat-card h3 {
    font-size: 1.35rem !important;
  }

  .stat-card .fs-1 {
    font-size: 1.75rem !important;
  }

  /* Admin Header Toolbar tren mobile */
  nav.navbar.navbar-dark.bg-dark {
    padding-left: 10px !important;
    padding-right: 10px !important;
    flex-wrap: wrap !important;
  }

  nav.navbar.navbar-dark.bg-dark .navbar-brand {
    font-size: 1.15rem !important;
  }

  nav.navbar.navbar-dark.bg-dark .d-flex.align-items-center.gap-3 {
    gap: 8px !important;
  }

  /* Card khung vien gon dep */
  #admin-main-content .card {
    padding: 14px !important;
    border-radius: 10px !important;
  }
}


/* Toi uu nut Them vao gio tren moi man hinh (Desktop & Mobile) */
.product-card .btn-add-to-cart,
.btn-add-to-cart {
  width: 100% !important;
  min-width: 185px !important;
  max-width: 100% !important;
  padding: 6px 10px !important;
  font-size: 0.82rem !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  letter-spacing: -0.1px !important;
}

.product-card .card-body {
  padding: 8px 10px !important;
}

.product-pricing {
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
}


/* Giam khoang cach giua cac o san pham tren tat ca man hinh */
#productsGrid.row,
#product-list.row,
.products-grid.row {
  --bs-gutter-x: 0.5rem !important;
  --bs-gutter-y: 0.5rem !important;
}

/* Tang chieu ngang khung anh san pham them 50px tren Desktop */
@media (min-width: 577px) {
  .product-thumb-box {
    width: 100% !important;
    min-height: 200px !important;
    padding: 10px !important;
  }
  .product-thumb-box img {
    max-height: 190px !important;
    object-fit: contain !important;
  }
}


/* Canh chinh nut Them vao gio can giua ngay ngan, vua van voi the san pham */
.product-card .btn-add-to-cart,
.btn-add-to-cart {
  position: static !important;
  left: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 6px 4px !important;
  font-size: 0.8rem !important;
  line-height: 1.25 !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

.product-card {
  overflow: hidden !important;
}

.product-card .card-body {
  padding: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}



/* Bo tron huy hieu giam gia (% giam gia o goc) */
.discount-badge-corner {
  border-radius: 8px !important;
  top: 6px !important;
  left: 6px !important;
  padding: 3px 8px !important;
  font-size: 0.8rem !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15) !important;
}


/* Canh Hotline, Gio hang, Admin luon nam tren 1 hang ngang khong bi xuong dong */
.main-header .row.align-items-center > div:last-child,
header .row.align-items-center > div:last-child {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  white-space: nowrap !important;
}

.main-header .row.align-items-center > div:last-child .me-4,
header .row.align-items-center > div:last-child .me-4 {
  margin-right: 0 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.main-header .row.align-items-center > div:last-child .btn,
header .row.align-items-center > div:last-child .btn {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}


/* ==========================================================================
   GIAO DIEN DIEN THOAI (MOBILE) CHIEU DOC: TU DONG CO VUA KHUNG HINH & CHU
   Desktop va Laptop giu nguyen 100% dep va chuan
   ========================================================================== */
@media (max-width: 576px) {
  body {
    padding-left: 8px !important;
    padding-right: 8px !important;
    overflow-x: hidden !important;
  }

  .container,
  .container-fluid {
    padding-left: 4px !important;
    padding-right: 4px !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  /* 1. O san pham tren dien thoai: Card ngang tu dong co gian vua van 100% man hinh */
  .deal-product-item,
  #productsGrid > div,
  #product-list > div,
  .related-products > div,
  .products-grid > div {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 8px !important;
    box-sizing: border-box !important;
  }

  .deal-product-item .product-card,
  #productsGrid .product-card,
  #product-list .product-card,
  .related-products .product-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 8px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  /* 2. Khung hinh san pham ben trai: Chiem ty le hop ly (38% ~ 125px), anh tu dong co vua khit */
  .deal-product-item .product-thumb-box,
  #productsGrid .product-thumb-box,
  #product-list .product-thumb-box,
  .related-products .product-thumb-box {
    width: 125px !important;
    min-width: 120px !important;
    max-width: 130px !important;
    height: 125px !important;
    border-radius: 8px !important;
    padding: 4px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #f8fafc !important;
    overflow: hidden !important;
  }

  .deal-product-item .product-thumb-box img,
  #productsGrid .product-thumb-box img,
  #product-list .product-thumb-box img,
  .related-products .product-thumb-box img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
  }

  /* 3. Khung noi dung ben phai: Chiếm toan bo phan con lai, khong bi tran */
  .deal-product-item .product-card .card-body,
  #productsGrid .product-card .card-body,
  #product-list .product-card .card-body,
  .related-products .product-card .card-body {
    padding: 0 0 0 10px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  /* Ten san pham: Tu co chu va hien thi 2 dong gon dep */
  .deal-product-item .product-title,
  #productsGrid .product-title,
  #product-list .product-title,
  .related-products .product-title {
    height: auto !important;
    max-height: none !important;
    font-size: 0.88rem !important;
    line-height: 1.3 !important;
    margin-bottom: 4px !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    word-break: break-word !important;
  }

  /* Khung gia san pham tren mobile */
  .deal-product-item .product-pricing,
  #productsGrid .product-pricing,
  #product-list .product-pricing,
  .related-products .product-pricing {
    border-top: none !important;
    padding-top: 2px !important;
    width: 100% !important;
  }

  .deal-product-item .product-pricing .d-flex,
  #productsGrid .product-pricing .d-flex,
  #product-list .product-pricing .d-flex,
  .related-products .product-pricing .d-flex {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 4px !important;
    margin-bottom: 4px !important;
  }

  .deal-product-item .product-pricing .text-danger,
  #productsGrid .product-pricing .text-danger,
  #product-list .product-pricing .text-danger,
  .related-products .product-pricing .text-danger {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    margin-right: 4px !important;
  }

  .deal-product-item .product-pricing .text-muted,
  #productsGrid .product-pricing .text-muted,
  #product-list .product-pricing .text-muted,
  .related-products .product-pricing .text-muted {
    font-size: 0.76rem !important;
    white-space: nowrap !important;
  }

  /* 4. Nut Them vao gio hang: Can deu giua khung, chu va icon tu co gon trong nut */
  .deal-product-item .btn-add-to-cart,
  #productsGrid .btn-add-to-cart,
  #product-list .btn-add-to-cart,
  .related-products .btn-add-to-cart,
  .product-card .btn-add-to-cart {
    position: static !important;
    left: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 4px 0 0 0 !important;
    padding: 5px 6px !important;
    font-size: 0.78rem !important;
    line-height: 1.2 !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .deal-product-item .btn-add-to-cart i,
  #productsGrid .btn-add-to-cart i,
  #product-list .btn-add-to-cart i,
  .related-products .btn-add-to-cart i {
    font-size: 0.76rem !important;
    margin-right: 4px !important;
  }

  /* Huy hieu giam gia tren anh bo tron mem mai */
  .deal-product-item .discount-badge-corner,
  #productsGrid .discount-badge-corner,
  #product-list .discount-badge-corner,
  .discount-badge-corner {
    border-radius: 6px !important;
    top: 4px !important;
    left: 4px !important;
    font-size: 0.72rem !important;
    padding: 2px 5px !important;
  }
}
