/* ===============================
   Product filter / search / grid
   =============================== */

/* Product Container - Responsive with dvw */
.product-search-section .container,
.product-grid-section .container {
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5dvw;
  box-sizing: border-box;
  max-width: none;
}

@media (min-width: 768px) {
  .product-search-section .container,
  .product-grid-section .container {
    padding: 0 2.5dvw;
  }
}

@media (min-width: 1200px) {
  .product-search-section .container,
  .product-grid-section .container {
    padding: 0 3.5dvw;
  }
}

@media (min-width: 1600px) {
  .product-search-section .container,
  .product-grid-section .container {
    padding: 0 4.5dvw;
  }
}

@media (min-width: 1920px) {
  .product-search-section .container,
  .product-grid-section .container {
    padding: 0 5dvw;
  }
}

.per-page-select {
  padding: 12px 44px 12px 20px; /* space for icon */
  border-radius: 8px;
  background-color: #fff;
  border: 1px solid #acafb4;
  color: #111827;
  cursor: pointer;

  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 11px;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  color: #1f2937;
  line-height: 1.5;
}

.product-filter-panel {
  position: static;
  width: 100%;
  margin-top: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.08);
  padding: 10px 10px 16px 10px;
  border-radius: 6px;
  pointer-events: auto;
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  overflow: hidden;
  transition:
    max-height 320ms cubic-bezier(0.2, 0.9, 0.2, 1),
    opacity 220ms ease,
    transform 260ms ease;
}

.product-filter-panel.open {
  max-height: 1400px;
  opacity: 1;
  transform: translateY(0);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.filter-column {
  border-right: 1px solid #f3f4f6;
  padding-right: 18px;
}

.filter-column:last-child {
  border-right: none;
  padding-right: 0;
}

.filter-column h4 {
  margin: 4px 0 12px;
  font-size: 15px;
  color: #374151;
}

.filter-search {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #e6e6e6;
  outline: none;
}

.filter-list {
  margin-top: 12px;
  max-height: 280px;
  overflow: auto;
  padding-right: 6px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  color: #111827;
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.filter-actions button {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
}

.filter-actions .apply-btn {
  background: #0b4a8d;
  color: #fff;
  border-color: #111827;
}

@media (max-width: 900px) {
  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .product-filter-panel {
    position: static;
  }
}

/* Product grid / card entrance animation */

.product-grid .product-card {
  opacity: 0;
  transform: translateY(10px);
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04);
  transition:
    transform 180ms cubic-bezier(0.2, 0.9, 0.2, 1),
    box-shadow 180ms ease,
    opacity 180ms ease,
    border-color 180ms ease;
  will-change: transform, box-shadow, border-color;
  border: 5px solid rgba(14, 32, 55, 0.04);
}

.product-grid.show .product-card {
  opacity: 1;
  transform: translateY(0);
}

/* Hover / focus effect: lift the card and increase shadow */
.product-grid .product-btn:hover,
.product-grid .product-btn:focus-within {
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.12);
  border-color: rgba(14, 32, 55, 0.08);
}

/* Make product info stretch so the CTA button sits at the bottom */
.product-card .product-info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.product-card .product-info .product-name {
  margin-bottom: 12px;
}

.product-card .product-info .product-btn {
  margin-top: auto;
}

/* center the category inside the flex column product-info */
.product-card .product-cat {
  text-align: center;
}

/* Note: product search/button rules are consolidated below to avoid duplicates. */

/* ===============================
   Product page styles (additional)
   =============================== */
/* Product Hero Section */
.product-hero {
  background-image: url("../img/banner/product-banner.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 60px 0;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.product-hero #particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.product-hero .container {
  position: relative;
  z-index: 2;
}

.product-hero-title {
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.product-hero-subtitle {
  font-size: 18px;
  opacity: 0.9;
  font-weight: 300;
}

.product-search-container {
  display: flex;
  align-items: center;
  justify-content: space-between; /* keep search input left and buttons right */
  margin-top: 20px;
}

.product-search-form {
  flex: 1 1 auto;
  margin-right: 12px;
}

/* Desktop & general search input styling (consolidated) */
.product-search-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: none;
  padding: 14px 20px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s ease;
  position: relative;
  z-index: 0;
  pointer-events: auto !important;
}

.product-search-container .search-controls {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.product-search-input:focus {
  border-color: #3b5998;
  box-shadow: 0 0 0 3px rgba(59, 89, 152, 0.1);
}

.product-search-btn {
  padding: 18px 20px;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: #0b4a8d;
  color: white;
  border-radius: 8px;
  gap: 8px;
  z-index: 1;
  min-width: 48px;
}

.product-search-btn:active {
  transform: scale(0.985);
}

.product-filter-btn:active {
  transform: scale(0.985);
}

.product-search-btn:hover {
  background-color: #2d4373;
}

.product-search-btn .search-icon {
  width: 16px;
  height: 16px;
}

.product-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #acafb4;
  color: #111827;
  cursor: pointer;
}

/* When dropdown is open */
.filter-dropdown[open] > .product-filter-btn {
  border-color: #3b5998;
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(59, 89, 152, 0.1);
}

.product-filter-btn:hover {
  background-color: #eeeeee;
}

.product-filter-btn .filter-icon,
.product-filter-btn .dropdown-icon {
  width: 16px;
  height: 16px;
}

.product-grid-section {
  padding: 20px 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Responsive grid: 4 cols desktop, 3 cols <=1200px, 2 cols <=900px, 1 col <=600px */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive & utility overrides for product page */
@media (max-width: 900px) {
  .product-search-container {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    position: relative;
    z-index: 900;
    pointer-events: auto;
  }

  /* On mobile make the form stack so input and buttons match width/height */
  .product-search-form {
    width: 100%;
    max-width: 720px;
    margin: 0 auto 6px;
    position: relative;
    z-index: 901;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  /* Make inputs and buttons scale smoothly and stay proportional on mobile */
  .product-search-input {
    width: 100%;
    max-width: 720px;
    transform-origin: center;
    border-radius: 8px;
    position: relative;
    z-index: 902;
    pointer-events: auto !important;
    transition:
      transform 140ms ease,
      box-shadow 140ms ease,
      border-color 140ms ease;
    box-sizing: border-box;
    min-height: 48px;
  }

  /* Buttons follow the same transform so they appear to grow/shrink together */
  .product-search-btn,
  .product-filter-btn {
    transition:
      transform 140ms ease,
      background-color 140ms ease;
    transform-origin: center;
  }

  /* On small screens make buttons full width under the input and match height */
  .product-search-btn,
  .product-filter-btn {
    width: 100%;
    max-width: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 8px;
  }

  .product-search-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 89, 152, 0.08);
  }

  .product-search-container:focus-within .product-search-input,
  .product-search-container:focus-within .product-search-btn,
  .product-search-container:focus-within .product-filter-btn {
    transform: scale(1.02);
  }
}

@media (max-width: 500px) {
  .product-hero-title {
    font-size: 20px;
  }
}

/* End additional product page styles */

/* Product card / listing styles (moved from main.css) */
.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.product-info {
  padding: 20px;
}

.product-company {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
  font-weight: 400;
}

.product-name {
  font-size: 20px;
  font-weight: 500;
  color: #111827;
  margin-bottom: 12px;
  line-height: 1.4;
  min-height: 44px;
}

.product-tag {
  display: flex;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 15px;
  background-color: #eef2ff;
  color: #000000;
}

/* This ensures the category pill visuals are applied in the listing even if
   other per-page rules unintentionally override them. */

/* .product-cat {
   display: inline-block;
   padding: 6px 14px;
   border-radius: 20px;
   font-size: 13px;
   font-weight: 500;
   margin-bottom: 15px;
   background: #eef2ff;
   color: #1e3a8a;
}
.product-cat.medical { background-color: #fef3c7; color: #92400e; }
.product-cat.wellness { background-color: #fce7f3; color: #9f1239; } */

.product-btn {
  width: 100%;
  background-color: #1e3a8a;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
}

.product-btn .arrow {
  transition: transform 0.3s ease;
}

.product-btn:hover .arrow {
  transform: translateX(50px);
}
.product-btn:hover {
  background-color: #285bac;
  color: white;
}
