.header-ex {
  margin-top: 50px;
  color: #ff6806;
}

.banner-title {
  font-size: 2em;
  font-weight: bold;
  color: #0e1541;
}

.banner-desc {
  font-size: 16px;
  max-width: 700px;
  color: #a8a8a8;
  font-weight: 300 !important;
}

@media (max-width: 768px) {
  .banner-title {
    font-size: 25px;
  }

  .banner-desc {
    font-size: 13px;
  }

  .header-ex {
    margin-top: 30px;
    font-size: 12px;
  }
}
.product-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  background-color: #f8f9fa;
  border-radius: 15px 15px 0 0;
}

.product-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card-minimal {
  border-radius: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  background: #fff;
}

.product-card-minimal:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0, 123, 255, 0.15);
}

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

.hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 115, 0, 0.1),
    rgba(0, 0, 255, 0.05)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.product-card-minimal:hover .hover-overlay {
  opacity: 1;
}

/* จัด layout Brand + Color ให้อยู่บรรทัดเดียวกัน */
.brand-color-row {
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  flex-wrap: nowrap;
  align-items: center;
  font-size: 0.85rem;
  color: #6c757d;
  /* muted */
}

/* กำหนดพื้นที่และตัดข้อความยาวเกิน */
.brand-color-row > div {
  max-width: 50%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-color-row .badge {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ชื่อสินค้าและรหัส ตัดข้อความถ้ายาว */
.card-body h6 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

/* ปรับ font ของแบรนด์ */
.brand-d {
  font-weight: 300;
  font-size: 13px;
  color: #555555;
}

/* สีของ badge */
.color-ban {
  font-weight: 300;
  font-size: 13px;
  color: #555555;
  margin-left: -5px;
}

/* ราคาสินค้า */
.price {
  margin-top: 0.5rem;
  margin-bottom: 0;
  color: #0e1541;
  /* Bootstrap primary blue */
  font-weight: 600;
  font-size: 17px;
}

/* ปิด underline link และกำหนด cursor */
.product-card-minimal {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

/* hover color ถ้าต้องการ */
.product-card-minimal:hover {
  text-decoration: none;
  color: inherit;
}

@media (max-width: 490px) {
  .price {
    font-size: 14px;
  }

  .card-body h6 {
    font-size: 13px !important;
  }

  .brand-color-row * {
    font-size: 11px;
  }
}

.custom-btn {
  border-radius: 10px;
  font-size: 16px;
  padding: 3px 15px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.custom-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-group-responsive {
  margin: -40px;
  margin-right: 0px;
}
.input-field,
.input-area {
  font-size: 14px;
  font-weight: 400;
  padding: 10px 20px;
  border-radius: 15px;
  border: solid 1px #c9c9c9;
  width: 100%;
  box-sizing: border-box;
  transition: all ease 0.3s;
  height: 42px;
}

.input-field:focus,
.input-area:focus {
  border: solid 1px #ff6806;
  outline: #ff6806;
}

.custom-btn {
  border-radius: 10px;
  font-size: 16px;
  padding: 3px 15px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.custom-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  border: none;
}

.btn-primary:hover {
  background: #0e1541;
  border: none;
}

.header-input {
  font-size: 15px;
  font-weight: 500;
  color: #0e1541;
}

.modal-content {
  border-radius: 15px !important;
}

.btn-cancel {
  background-color: #d6d6d6;
  border: none;
  border-radius: 10px;
  padding: 5px 1em;
}

.btn-cancel:hover {
  background-color: #c2c2c2;
  border: none;
}

.btn-search-submit {
  background-color: #0e1541;
  border: none;
  border-radius: 10px;
  padding: 5px 1em;
}

.btn-search-submit:hover {
  background-color: #ff6806;
}

@media (max-width: 576px) {
  .btn-search span {
    display: none;
  }
}
#pagination {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  /* ห้าม wrap */
  overflow-x: auto;
  /* ให้เลื่อนซ้ายขวาได้ถ้าปุ่มเยอะ */
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
  /* สำหรับ smooth scroll บนมือถือ */
}

#pagination button {
  flex: 0 0 auto;
  /* ปุ่มไม่ยืดและไม่หด */
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background-color: #ffffff;
  color: #0e1541;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(14, 21, 65, 0.1);
  outline: none;
  margin: 0 4px;
  cursor: pointer;
  white-space: nowrap;
}

#pagination button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #0e15413a;
}

#pagination button.btn-warning {
  background-color: #0e1541 !important;
  color: #ffffff !important;
  border-color: #0e1541;
  box-shadow: 0 4px 12px #0e15413f;
}

#pagination .ellipsis {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  border: none;
  background: transparent;
  font-size: 18px;
  color: #bbb;
  cursor: default;
  margin: 0 8px;
  user-select: none;
  box-shadow: none;
}

#paginate-pre {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
}

#paginate-pre.fade-out {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 992px) {
  #pagination button {
    width: 36px;
    height: 36px;
    font-size: 14px;
    margin: 0 3px;
  }
}

@media (max-width: 576px) {
  #pagination button {
    width: 30px;
    height: 30px;
    font-size: 12px;
    margin: 0 2px;
  }
}
