/* Product catalogue styles */
.search-group { display: flex; align-items: center; gap: 12px; margin-left: 40px; flex: 1; min-width: 0; }
.search-input {
  width: min(260px, 100%); height: 46px; background: #b0b0b0;
  border: 0; border-radius: 25px; padding: 0 20px; font-size: 15px;
  color: #000; text-align: center; outline-offset: 3px;
  min-width: 0;
}
.search-input::placeholder { color: #111; opacity: .85; }
.search-icon-btn {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%;
  background: #777; border: 0; display: flex; align-items: center;
  justify-content: center; cursor: pointer; box-shadow: 0 4px 8px rgba(0,0,0,.28);
}
.products-grid {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr));
  column-gap: 44px; row-gap: 38px; padding: 18px 34px;
  max-width: 1360px; margin: 0 auto;
}
.product-item { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.product-card {
  background: #c5cfd6; border-radius: 32px; width: 100%; padding: 14px 18px 18px;
  display: flex; flex-direction: column; align-items: center;
  color: #000; text-decoration: none;
}
.price-badge {
  background: #a8a8a8; padding: 10px 16px; border-radius: 8px;
  font-size: 15px; font-weight: 500; margin-bottom: -14px; z-index: 1; text-align: center;
}
.product-image-box {
  background: #b5b5b5; width: 100%; aspect-ratio: 1; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #000; margin-bottom: 14px;
  overflow: hidden;
}
.product-image {
  display: block;
  width: 100%;
  height: 100%;
  padding: 10px;
  object-fit: contain;
}
.image-fallback {
  padding: 10px;
  font-size: 13px;
  text-align: center;
}
.image-fallback[hidden] { display: none; }
.product-name-box {
  background: #a8a8a8; width: 100%; padding: 13px 10px;
  border-radius: 8px; text-align: center; font-size: 15px;
  overflow-wrap: anywhere;
}
.cart-action-btn {
  width: 100%; min-height: 46px; border: 0; border-radius: 8px;
  background: linear-gradient(90deg,#8b5cf6 0%,#5eead4 100%);
  color: #000; font-size: 15px; font-weight: 500; text-transform: uppercase;
  cursor: pointer; box-shadow: 0 5px 10px rgba(0,0,0,.3);
}
.cart-action-btn.in-cart { background: linear-gradient(90deg,#0d9488 0%,#84cc16 100%); }
.empty-results { grid-column: 1 / -1; color: #fff; text-align: center; padding: 40px 12px; }

@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .products-page .page-shell { padding: 10px 10px 18px; }

  /* Compact two-row product header, with a full-width Make PDF action. */
  .products-page .nav-bar {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "logo search"
      "action action";
    align-items: center;
    gap: 8px 10px;
    padding: 8px 10px;
    border-radius: 22px;
    margin-bottom: 14px;
    top: 8px;
  }

  .products-page .nav-bar > .logo-circle {
    grid-area: logo;
    width: 56px;
    height: 56px;
    margin: 0;
    font-size: 13px;
  }

  .products-page .search-group {
    grid-area: search;
    width: 100%;
    min-width: 0;
    margin: 0;
    gap: 8px;
  }

  .products-page .search-input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 13px;
    font-size: 14px;
    text-align: left;
  }

  .products-page .search-icon-btn {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .products-page .nav-bar > .theme-btn {
    grid-area: action;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 12px;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 16px;
    padding: 8px 2px;
  }

  .product-item { gap: 9px; }
  .product-card { padding: 10px 10px 12px; border-radius: 20px; }
  .price-badge { padding: 8px 11px; font-size: 13px; border-radius: 7px; }
  .product-image-box { margin-bottom: 10px; font-size: 13px; }
  .product-name-box { padding: 10px 6px; font-size: 13px; border-radius: 7px; }
  .cart-action-btn { min-height: 44px; padding: 7px 5px; font-size: 11px; line-height: 1.25; }
  .empty-results { padding: 32px 10px; }
}

@media (max-width: 360px) {
  .products-grid {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 8px;
  }

  .product-item { width: 100%; max-width: 320px; justify-self: center; }
  .product-card { padding: 12px 14px 14px; }
  .cart-action-btn { font-size: 13px; }
}
