body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
 
  background: #dad8d8;
  color: #333;
  margin: 0;
  padding: 0;
  height: 100%;
}
 .hidden{
    display: none;
 } 
  .topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #000;
    color: #fff;
  }
  
  .logo img {
    height: 40px;
    margin-right: 10px;
  }
  .logo {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
  }
  .hotline{
    color: yellow;
    font-size: 16px;
    font-weight: bold;
  }
  .clock {
    font-size: 18px;
    font-weight: bold;
  }
 
#searchInput {
    height: 36px;
    font-size: 14px;
    padding: 4px 8px;
    width: 100%;
}
/* === FILTER GROUP === */
.filtergroup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 10px;
  justify-content: flex-start;
  align-items: center;
  background-color: #f1f1f1;
}

/* Mỗi ô lọc */
.filtergroup > div {
  flex: 1 1 160px;
  max-width: 180px;
  min-width: 120px;
}

/* Nút & select */
.filtergroup select,
.filtergroup button {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  height: 38px;
  padding: 6px 10px;
  box-sizing: border-box;
  background-color: #fff;
  transition: border-color 0.2s ease;
}

.filtergroup select:focus,
.filtergroup button:hover {
  border-color: #333;
  outline: none;
}

/* === Select2 === */
.select2-container .select2-selection--single {
  display: flex;
  align-items: center;
  height: 38px !important;
  border-radius: 6px !important;
  border: 1px solid #ccc !important;
  padding: 0 8px;
  box-sizing: border-box;
}

.select2-selection__rendered {
  padding-left: 4px !important;
}

.select2-selection__arrow {
  height: 100% !important;
  top: 0 !important;
  right: 4px !important;
}

/* === Responsive Mobile === */
@media (max-width: 600px) {
  /* Ẩn filter mặc định */
  .filtergroup {
    display: none;
  }

  /* Khi bật class .show thì hiện ra */
  .filtergroup.show {
    display: flex;
  }

  /* Mỗi filter chiếm 48% chiều rộng */
  .filtergroup > div {
    flex: 1 1 48%;
    max-width: 48%;
  }

  /* Nút "Bộ lọc" hiển thị trên mobile */
  .toggle-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
   
    background: #007bff;
    color: white;
    border: none;
     width: 100%; /* 👈 Chiếm toàn bộ chiều ngang */
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .toggle-filter-btn:hover {
    background-color: #0056b3;
  }
}

/* === Responsive PC === */
@media (min-width: 601px) {
  .toggle-filter-btn {
    display: none;
  }

  .filtergroup {
    display: flex !important;
  }
}


/**/
  #fullscreenButton {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: #f8f5f5;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
  }
  
  #fullscreenButton:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #d7e613;
  }
 



  .logo span.hotline {
    margin-left: 20px;
    font-size: 18px;
    color: #e1f85d;
  }
  
 
  .product-list {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 5px;
  padding: 5px;  
  overflow-y: auto;
}
 .pos-container {
  display: flex;
  height: 100vh; /* Chiều cao toàn màn hình */
  overflow: hidden; /* Không tràn nội dung */
}

/* Bên trái */
.pos-left {
  flex: 1 1 80%;
  min-width: 300px;
  overflow-y: auto;
  padding: 10px;
  box-sizing: border-box;
}

/* Bên phải (giỏ hàng) */
.cart-panel {
  flex: 1 1 30%;
  min-width: 280px;
  padding: 10px;
  border-left: 2px solid #ccc;
  background-color: #d6d4d4;
  border-radius: 12px 0 0 12px;
  overflow-y: auto;
  box-sizing: border-box;
}

.cart-panel-header{
  display:flex;
  justify-content: space-between;
  align-items: center;
}
#documentno{
  width: 135px;
  font-weight: bold;
  color: red;
  text-align: center;
}
  .pos-wrapper {
  display: flex;
  gap: 20px;
  padding: 10px;
  flex-wrap: wrap; /* Cho responsive trên mobile */
}

  .cart-panel h5 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
  }
  #cart-items {
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-size: 15px;
    max-height: 280px;
    overflow-y: auto;
  }
  #cart-items li {
    border-bottom: 1px dashed #ccc;
    padding: 6px 0;
  }
  
  .cart-total {
    font-size: 18px;
    font-weight: bold;
    margin: 12px 0;
    text-align: right;
  }
  
  .call-link {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
  }
  
  .call-link:hover {
    color: #ffd700;
  }
  
  .phone-icon {
    animation: shakeGlow 2s infinite;
    transform-origin: center;
    font-size: 1.2rem;
  }
  
 /* phần css cho menu*/
 

 /*ket thuc */
 .img-qr {
  width: auto;
  height: auto;
  max-width: 250px;
  display: block;
  margin: auto;
}


@media (min-width: 768px) {
  .img-qr {
    width: 25%;  /* Điều chỉnh cho màn hình lớn */
  }
}
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .qr-section img {
    width: 80%;
  }

  .logo span {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .logo img {
    width: 40px;
    height: auto;
  }

  .hotline {
    font-size: 0.85rem;
  }
}


  /* Kết hợp hiệu ứng lắc nhẹ và sáng */
  @keyframes shakeGlow {
    0% {
      transform: translateX(0);
      text-shadow: 0 0 0px rgba(255, 255, 0, 0.2);
    }
    25% {
      transform: translateX(-1px);
      text-shadow: 0 0 5px rgba(255, 255, 0, 0.4);
    }
    50% {
      transform: translateX(1px);
      text-shadow: 0 0 10px rgba(255, 255, 0, 0.8);
    }
    75% {
      transform: translateX(-1px);
      text-shadow: 0 0 5px rgba(255, 255, 0, 0.4);
    }
    100% {
      transform: translateX(0);
      text-shadow: 0 0 0px rgba(255, 255, 0, 0.2);
    }
  }
  
  
  .form-group {
    margin-bottom: 10px;
  }
  .form-group label {
    font-size: 14px;
    font-weight: 500;
  }
  .form-group input {
    font-size: 16px;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid #ccc;
    width: 100%;
  }
  
 
  .denomination-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  
  .denomination-wrap button {
    flex: 1 0 calc(14.2% - 4px); /* 7 nút/row nếu đủ chiều rộng */
    padding: 6px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #fff;
    color: #000;
    border-radius: 4px;
    cursor: pointer;
    min-width: 40px;
  }
  
  
  .denomination-wrap button:hover {
    background: #000;
    color: #fff;
  }
  
  .denomination-wrap .clear-btn {
    background: #f44336;
    color: #fff;
  }
   /* Phần tổng quan doanh thu */
.sales-summary {
  display: flex;
  flex-wrap: wrap; /* Cho phép xuống hàng nếu hẹp */
  gap: 10px;
  justify-content: space-between;
  margin-top: 10px;
}

.sales-item {
  flex: 1;
  min-width: 120px; /* Đảm bảo không quá nhỏ khi co lại */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background-color: #f5f5f5;
  border-radius: 8px;
}

.sales-item .label {
  font-weight: 500;
}

.sales-item .value {
  font-weight: bold;
}


  @media (max-width: 768px) {
    .pos-container {
      flex-direction: column;
    }
    .cart-panel {
      border-left: none;
      border-top: 2px solid #ccc;
      margin-top: 15px;
    }
    .product-list {
      grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
  }
  @page {
  size: 80mm auto;
  margin: 5mm;
}
.page-btn {
  margin: 2px;
  padding: 5px 10px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}
.page-btn.active {
  background: #000;
  color: #fff;
  font-weight: bold;
}
  
#customer_info {
    background-color: #d6d4d4;
  border-radius: 10px;
 
  margin-top: 10px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.input-with-mic {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.input-with-mic input[type="text"],
.input-with-mic input[type="number"] {
  flex: 1;
  padding: 10px 12px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ced4da;
  background-color: #fff;
}

.input-with-mic button {
  background-color: #0d6efd;
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.input-with-mic button:hover {
  background-color: #0b5ed7;
}

.input-with-mic button#getLocationBtn {
  background-color: #198754; /* Xanh lá cho nút định vị */
}

.input-with-mic button#getLocationBtn:hover {
  background-color: #157347;
}
.recording-indicator {
  display: none;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffc107;
  color: #000;
  padding: 10px 16px;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 9999;
}
 .price{
  display: flex;
 }
.price-original {
  text-decoration: line-through;
  color: #999;
  margin-right: 4px;
}

.price-discount {
  color: red;
  font-weight: bold;
}

.sale-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background-color: red;
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

.image-wrapper {
  position: relative;
}


/* === LƯỚI SẢN PHẨM === */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding: 5px;
  margin: 0 auto 40px auto;
}

@media (max-width: 360px) {
  #product-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid-item {
  background: white;
  border-radius: 8px;
  padding: 2px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  transition: box-shadow 0.3s ease;
}

.grid-item:hover {
  box-shadow: 0 6px 12px rgb(0 0 0 / 0.15);
}

/* === ẢNH VÀ QR === */
.image-container {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 150px; /* Chiều cao cố định */
}

.image-container img {
  max-width: 100%;
  max-height: 100%;
  height: 100%; /* Bắt buộc ảnh lấp đầy container theo chiều cao */
  object-fit: contain;
  display: block;
}


.image-container canvas {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: white;
  padding: 5px;
  border-radius: 4px;
  box-shadow: 0 0 3px rgb(0 0 0 / 0.2);
  width: 45px !important;
  height: 45px !important;
}
/*định dạng qrcode*/
.qrcode-wrapper {
  text-align: center;
  padding: 6px;
  cursor: pointer;
  border: 1px dashed #ccc;
  border-radius: 8px;
  display: inline-block;
  background-color: #f9f9f9;
  transition: all 0.2s ease-in-out;
}
.qrcode-wrapper:hover {
  background-color: #f0f0f0;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}

.qrcode {
  display: block;
  margin: 0 auto;
}

.qrcode-label {
  font-size: 10px;
  color: #555;
  margin-top: 4px;
}

.print-icon {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(255,255,255,0.9);
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 12px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.print-icon:hover {
  background: #eee;
}

/* === LINK SẢN PHẨM === */

.grid-item {
  background: white;
  border-radius: 8px;
  padding: 2px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.3s ease;
}
.grid-item > div a {
  display: block;
  margin-top: 6px;
  color: #1a73e8;
  font-weight: 600;
  text-decoration: none;
  font-size: clamp(10px, 2.5vw, 16px); /* 👈 nhỏ nhất 12px, lớn nhất 16px */
  text-align: center;
}

.grid-item > div a:hover {
  text-decoration: underline;
}
.iteminfo{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
   font-size: clamp(12px, 2.5vw, 16px); /* 👈 nhỏ nhất 12px, lớn nhất 16px */
}

.item-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.product-link {
  font-size: clamp(12px, 2.5vw, 16px); /* 👈 nhỏ nhất 12px, lớn nhất 16px */
}

/* === NÚT CHUNG === */
.action-button,
.share-button,
.add-to-cart {
  background: none;
  border: none;
  font-size: 18px;
  color: #333;
  cursor: pointer;
  transition: color 0.2s ease;
}

.action-button:hover,
.share-button:hover,
.add-to-cart:hover {
  color: #000;
}
/* === PHÂN TRANG === */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 10px;
}

.page-link {
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  background: #f9f9f9;
}

.page-link.active {
  background: #333;
  color: #fff;
  font-weight: bold;
}

.page-link:hover {
  background: #ddd;
}

.ellipsis {
  padding: 4px 6px;
  color: #888;
  font-size: 13px;
}


