/* overall */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: #f3f3f3;
  /* background: #fff; */
  color: #222;
  overflow-x: hidden;
  /* stop horizontal scroll caused by slider */
  background-color: #fff;
}

/* the whole container( all element put inside */
.container {
  width: 95%;
  margin: 0 auto;
}

/* section title */
.section-title-page {
  background: #001176;
  color: #fff;
  padding: 18px 14px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0px;
}

.filter-bar {
  margin: 5px auto 5px;
  padding: 10px 0px;
  border-bottom: 1px solid #ccc;
  display: flex;
  align-items: center;
  /* justify-content: space-between; */
}

.div-back-btn {
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

.get-back-btn {
  display: inline-block;
  background: #011776;
  color: #fff;
  border: none;
  padding: 13px 23px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  align-items: center;
  transition: all 0.2s ease;
}

.get-back-btn:hover {
  background: #d73925;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.get-back-btn:active {
  transform: scale(0.95);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.2);
}

.filter-form-input {
  /* flex-wrap: wrap; */
  gap: 15px;
  /* justify-content: flex-end; */
  align-items: center;
  display: flex;
  position: relative;
  display: inline-block;
  border-bottom: none;
  margin-right: 5px;
}

.filter-form-input input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
  width: auto;
  min-width: 320px;
  max-width: 500px;
  background: #f4f4f4;
  border-bottom: none;
}

#searchInput {
  width: 250px;
  padding: 12px 16px;
  border: 2px solid #222;
  border-radius: 16px;
  outline: none;
}

#data_input {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  z-index: 999;
  display: none;
  max-height: 250px;
  overflow-y: auto;
}

/* #data_input .data-list a,
#data_input .data-list div{
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: #222;
    border-bottom: 1px solid #f1f1f1;
    background: #fff;
} */

#data_input .data-list a:hover,
#data_input .data-list div:hover {
  background: #f7f7f7;
}

.input-product-image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 8px;
}

.input-product-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #1f2f7a;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid #eee;
  white-space: normal;
  line-height: 1.35;
}

#data_input div:last-child .input-product-link {
  border-bottom: none;
}

.input-product-link:hover {
  background: #f7f7f7;
  color: #d73925;
}

.filter-form {
  /* flex-wrap: wrap; */
  gap: 15px;
  /* justify-content: flex-end; */
  align-items: center;
  display: flex;
}

.filter-form-input {
  margin-left: auto;
}

.filter-form select {
  padding: 12px 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
  width: auto;
  min-width: 200px;
  max-width: 300px;
  font-weight: 700;
  background: #f4f4f4;
}

/* cart */
/* adjust to right */
/* .div-cart {
  margin-left: 0;
  grid-column: 3;
  justify-self: end;

  display: flex;
  align-items: center;
  gap: 15px;
} */

/* .cart-icon-a {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #011776;
  transition: all 0.3s ease;
} */

/* .cart-icon {
  width: 28px;
  height: 28px;
} */

/* .cart-icon-a:hover {
  background: #000e4b;
  box-shadow: #444 0px 4px 12px;
} */

/* .cart-icon-a:active {
  background: #00082e;
  transform: scale(0.95);
} */

/* .div-cart-num {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #dbdbdb;
  transition: all 0.3s ease;
} */

/* .div-cart-num p {
  color: #000;
  font-size: 16px;
  font-weight: 600;
} */

/* category title */
.div-category-title {
  color: #7f7f7f;
}

.category-title {
  margin: 0;
  font-size: 16px;
}

.products-des {
  display: grid;
  grid-template-areas: "image info" "content content";
  grid-template-columns: 45% 55%;
}

/* .div-products-image {
  grid-area: image;
  padding: 10px 0px 10px 0px;
  display: flex;
  justify-content: center;
  align-items: center;
} */

.div-products-image {
  grid-area: image;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.product-image {
  max-width: 400px !important;
  max-height: 400px !important;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.product-title {
  font-size: 24px;
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 5px;
  color: #001176;
}

.quote-actions {
  display: flex;
  gap: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ccc;
}

.price {
  /* color: #e60000; */
  color: #011776;
  /* background: #ffe5e5; */
  background: #d1d9ff;
  padding: 6px 15px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.price p {
  margin: 0;
}

/* add to cart button */
.get-quote-btn {
  background: #ff1a1a;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  display: inline-block;
  box-shadow: 3px 3px 1px #2a2a2a;
}

.get-quote-btn:hover {
  background: #e60000;
}

.get-quote-btn:active {
  /* transform: scale(0.95);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.2); */
  transform: translateY(3px);
  box-shadow: 0px 0px 0px #2a2a2a;
}

.get-quote-btn {
  transition: all 0.15s ease;
}

.get-quote-btn-a {
  text-decoration: none;
}

.products-des div.div-products-info {
  grid-area: info;
  padding: 3px 0px 3px 0px;
}

.products-des div.div-products-content {
  grid-area: content;
}

.product-short-des {
  padding-top: 3px;
}

.product-short-des-arrow ul {
  list-style: none;
  padding-left: 20px;
}

.product-short-des-arrow ul li {
  margin-bottom: 5px;
  position: relative;
  padding-left: 20px;
}

.product-short-des-arrow ul li::before {
  content: "➤";
  position: absolute;
  left: 0;
  color: #001176;
}

.product-short-des-true ul {
  list-style: none;
  padding-left: 20px;
}

.product-short-des-true ul li {
  margin-bottom: 5px;
  position: relative;
  padding-left: 20px;
}

.product-short-des-true ul li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #001176;
  -webkit-text-fill-color: #001176;
  font-weight: 700;
  font-family:
    "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

.div-products-content {
  width: 95%;
  margin: 0 auto;
  margin-top: 15px;
}

/* .product-content-title-one {
  position: relative;
  width: fit-content;
  background: #e0e0e0;
  border: 3px solid #001176;
  border-radius: 10px 10px 0px 0px;
  padding: 3px 30px;
  margin: 0;
  z-index: -1;
  top: 3px;
  left: 1px;
  font-weight: 700;
  font-size: 23px;
}

.product-content-title-two {
  position: relative;
  width: fit-content;
  background: #e0e0e0;
  border: 3px solid #001176;
  border-radius: 10px 10px 0px 0px;
  padding: 3px 30px;
  margin: 0;
  z-index: -1;
  top: 3px;
  left: 1px;
  font-weight: 700;
  font-size: 23px;
  cursor: pointer;
} */

/* .product-content-title-one:hover,
.product-content-title-two:hover {
  background: #c0c0c0;
} */

.div-products-content-title {
  padding: 10px 0px 0px 0px;
  display: flex;
  width: 100%;
  gap: 10px;
}

/* button.product-content-btn {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  flex: 1 1 0;
  width: 50%;
  margin: 0;
  padding: 15px;
  border: 0;
  border-radius: 5px;
  background: #e0e0e0;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  -webkit-tap-highlight-color: transparent;
}

button.product-content-btn span {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}

button.product-content-btn:hover,
button.product-content-btn:focus,
button.product-content-btn:active {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}

button.product-content-btn.active {
  background: #acacac;
  font-weight: 700;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}

button.product-content-btn.active span {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
} */

.product-content-btn {
  flex: 1;
  width: 50%;
  padding: 15px;
  background: #d1d9ff;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-weight: 600;
  color: #001176;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 17, 118, 0.1);
  position: relative;
  overflow: hidden;
}

.product-content-btn:hover {
  background: #b8c4ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 17, 118, 0.15);
}

.product-content-btn.active {
  font-weight: 700;
  background: #001176;
  color: #fff;
  transform: translateY(0);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tabcontent {
  display: none;
  animation: slideFadeIn 0.4s ease-out forwards;
}

.tabcontent.active {
  display: block;
  animation: slideFadeIn 0.4s ease-out forwards;
}

/* @keyframes pop {
  0%   { transform: scale(0.75); }
  60%  { transform: scale(1.02); }
  100% { transform: scale(1); }
} */

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.div-products-content-des {
  padding: 15px 35px 10px 35px;
  background: #eef1fb;
  z-index: 1;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 17, 118, 0.05);
}

.div-products-content-des p {
  margin: 0;
}

.product-content-des-non-grid {
  background: white;
  border-radius: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 0px 20px 20px 20px;
  box-shadow: 0 4px 15px rgba(0, 17, 118, 0.05);
}

.product-content-des-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0px 60px;
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 17, 118, 0.05);
}

.product-content-des-arrow ul {
  list-style: none;
  padding-left: 20px;
  margin: 5px 0px;
}

.product-content-des-arrow ul li {
  margin-bottom: 5px;
  position: relative;
  padding-left: 20px;
}

.product-content-des-arrow ul li::before {
  content: "➤";
  position: absolute;
  left: 0;
  color: #001176;
}

.product-content-des-true ul {
  list-style: none;
  padding-left: 20px;
  margin: 5px 0px;
}

.product-content-des-true ul li {
  margin-bottom: 5px;
  position: relative;
  padding-left: 20px;
}

.product-content-des-true ul li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #001176;
  -webkit-text-fill-color: #001176;
  font-weight: 700;
  font-family:
    "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

.div-products-content-des h3 {
  margin: 0;
  padding-top: 20px;
  padding-bottom: 5px;
  font-weight: 700;
  font-size: 24px;
  color: #001176;
}

.div-products-content-des h4 {
  margin: 0;
  padding-top: 0px;
  font-weight: 700;
  font-size: 20px;
  color: #001176;
}

.div-products-content-des p {
  text-align: justify;
}

.footer-section {
  border-top: none !important;
}

/* card title */
.related-products-title {
  font-weight: 700;
  color: #001176;
  font-size: 28px;
  text-align: center;
  margin: 0;
}

/* card */
.related-slider-container {
  width: 95%;
  margin: 0 auto 5px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.related-slider-window {
  overflow: hidden;
  width: 100%;
  cursor: grab;
  user-select: none;
  transition: height 0.35s ease;
}

.related-slider-window.dragging {
  cursor: grabbing;
}

.related-products-track {
  display: flex;
  transition: transform 0.4s ease;
  width: 100%;
  align-items: flex-start;
}

/* Base: Desktop Layout (3 columns) */
.related-products-page {
  min-width: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 cards per slide */
  gap: 20px;
  align-items: stretch;
  box-sizing: border-box;
  flex-shrink: 0;
}

.related-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  box-shadow: 0 4px 15px rgba(0, 17, 118, 0.05);
  border: 1px solid #eef1fb;
  transition: all 0.3s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 17, 118, 0.1);
}

.related-card a {
  text-decoration: none;
}

.related-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto 12px;
}

.related-card-title {
  color: #001176;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.related-btn {
  display: inline-block;
  margin: 0 auto;
  background: #ff2b2b;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
}

.related-btn:hover {
  background: #d90000;
  transform: translateY(-2px);
}

/* Pagination container */
.related-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 25px;
  flex-wrap: wrap;
}

/* Pagination Buttons */
.rel-page-btn {
  min-width: 40px;
  height: 40px;
  border: 1px solid #dcdcdc;
  background: #fff;
  color: #001176;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rel-page-btn:hover:not(:disabled) {
  background: #001176;
  color: #fff;
}

.rel-page-btn.active {
  background: #001176;
  color: #fff;
  border-color: #001176;
}

.rel-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* @media (min-width: 1500px) {
  .product-image {
    width: 50%;
  }
} */

/* =========================
   1200px layout
========================= */
@media (max-width: 1200px) {
  .container {
    width: 94%;
  }

  .filter-bar {
    gap: 12px;
    flex-wrap: wrap;
  }

  .filter-form-input {
    margin-left: auto;
  }

  .filter-form-input input,
  #searchInput {
    width: 220px;
    min-width: 220px;
  }

  .filter-form select {
    min-width: 180px;
    max-width: 220px;
  }

  .products-des {
    grid-template-columns: 42% 58%;
    gap: 20px;
    align-items: start;
  }

  .product-title {
    font-size: 22px;
  }

  .div-products-content {
    width: 100%;
  }

  .div-products-content-des {
    padding: 20px 24px;
  }

  .product-content-des-grid {
    gap: 0 30px;
  }

  .related-products-title {
    font-size: 26px;
  }

  .related-card-title {
    font-size: 15px;
    -webkit-line-clamp: 2;
  }

  .footer-section {
    padding: 20px 15px 10px !important;
  }
}

/* =========================
   Tablet layout
========================= */
@media (max-width: 768px) {
  .section-title {
    font-size: 24px;
  }

  .container {
    width: 94%;
  }

  .filter-bar {
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
  }

  .div-back-btn {
    width: 100%;
  }

  .div-back-btn a {
    display: inline-block;
    width: 100%;
  }

  .get-back-btn {
    width: 100%;
    text-align: center;
  }

  .filter-form-input {
    width: 100%;
    margin-left: 0;
    display: block;
  }

  .filter-form-input input,
  #searchInput {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }

  #data_input {
    width: 100%;
  }

  .filter-form {
    width: 100%;
  }

  .filter-form select {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .products-des {
    grid-template-areas:
      "image"
      "info"
      "content";
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .products-des div.div-products-image,
  .products-des div.div-products-info,
  .products-des div.div-products-content {
    width: 100%;
  }

  .product-image {
    max-width: 290px !important;
    max-height: 290px !important;
  }

  .product-title {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    line-height: 1.3;
  }

  .quote-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* stack item */
  .quote-actions {
    flex-direction: column;
  }

  .get-quote-btn {
    display: block;
    width: 80%;
    text-align: center;
    /* down + center */
    margin: 10px auto 0;
  }

  .div-products-content {
    width: 100%;
    margin-top: 10px;
  }

  .div-products-content-title {
    flex-direction: column;
    gap: 8px;
    padding: 0 0 10px 0;
  }

  .product-content-btn {
    width: 100%;
  }

  .div-products-content-des {
    padding: 18px 16px;
  }

  .product-content-des-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .div-products-content-des h3 {
    font-size: 20px;
    text-align: center;
    padding: 20px 0px 10px 0px;
    line-height: 1.2;
  }

  .div-products-content-des h4 {
    font-size: 18px;
  }

  .related-products-title {
    font-size: 22px;
  }

  .related-products-page {
    grid-template-columns: repeat(1, 1fr);
    gap: 15px;
  }

  /* Mobile Specific Card Adjustments */
  .related-card {
    /* adjust width slightly smaller and center it */
    margin: 0 auto;
    max-width: 100% !important;
    padding: 14px !important;
    border-radius: 12px;
  }
  .related-card img {
    width: 80%;
    height: 320px !important;
    margin-bottom: 10px;
    object-fit: contain;
  }
  .related-card-title {
    font-size: 16px !important;
    line-height: 1.4;
  }
}

/* =========================
   Small mobile layout
========================= */
@media (max-width: 480px) {
  .section-title-page {
    padding: 16px 12px;
  }

  .section-title {
    font-size: 22px;
  }

  .filter-bar {
    margin: 4px auto;
    padding: 10px 0;
  }

  .get-back-btn {
    padding: 12px 18px;
    font-size: 13px;
  }

  #searchInput {
    padding: 11px 14px;
    font-size: 14px;
    border-radius: 12px;
  }

  .filter-form select {
    padding: 11px 12px;
    font-size: 14px;
  }

  .category-title {
    font-size: 15px;
  }

  .product-title {
    display: flex;
    font-size: 20px;
    text-align: center;
  }

  .product-short-des,
  .div-products-content-des p,
  .div-products-content-des li {
    font-size: 14px;
    line-height: 1.6;
  }

  /* stack item */
  .quote-actions {
    flex-direction: column;
  }

  .get-quote-btn {
    display: block;
    width: 80%;
    text-align: center;
    /* down + center */
    margin: 10px auto 0;
  }

  .div-products-content-des {
    padding: 16px 14px;
    border-radius: 8px;
  }

  .product-content-btn {
    padding: 12px;
    font-size: 14px;
  }

  /* Mobile Specific Card Adjustments */
  .related-card {
    /* adjust width slightly smaller and center it */
    margin: 0 auto;
    min-width: 350px !important;
    max-width: 100% !important;
    padding: 14px !important;
    border-radius: 12px;
  }
  .related-card img {
    min-width: 240px !important;
    min-height: 240px !important;
    margin-bottom: 10px;
    object-fit: contain;
  }
  .related-card-title {
    font-size: 16px !important;
    line-height: 1.4;
  }
}
