/**
 * Product Search Page Styles
 * Matches existing Homecamp design patterns
 * Uses rem units with 4px multiples (0.25rem = 4px, 0.5rem = 8px, etc.)
 * 
 * @package Homecamp
 */

/* Search Page Header */
.hc-customSearch .page-header {
  text-align: center;
  padding: 4rem 0 0 0;
}

.hc-customSearch .page-title {
  color: #949699;
  text-transform: none;
  font-family: inherit;
  font-size: 3rem;
  letter-spacing: -0.01em;
}

@media screen and (max-width: 900px) {
  .hc-customSearch .page-title {
    font-size: 2.25rem;
  }
}

/* Product Search Form */
.hc-customSearch .hc-product-search-form {
  max-width: 50rem;
  margin: 0 auto;
  padding: 2rem 0;
}

.hc-customSearch .hc-product-search-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .hc-customSearch .hc-product-search-form form {
    flex-direction: row;
    align-items: center;
  }
}

.hc-customSearch .search-input-wrapper {
  position: relative;
  flex: 2;
  min-width: 20rem;
  font-family: "MessinaSansWeb", sans-serif;
}

.hc-customSearch input.product-search-input {
  height: 48px !important;
  width: 100%;
  padding: 0 1rem;
  border: 2px solid #ddd;
  border-radius: 0.5rem;
  font-size: 1rem;
  line-height: 1em;
  background: white;
  transition: all 0.3s linear;
}

.hc-customSearch .product-search-input:focus {
  outline: none;
  border-color: #222;
}

.hc-customSearch .search-filters {
  min-width: 12rem;
  flex: 1;
}

.hc-customSearch .search-filters select {
  font-family: "MessinaSansWeb", sans-serif;
  height: 48px;
  padding: 0.75rem 2.5rem 0.75rem 1rem; /* Extra right padding for arrow */
  border: 2px solid #ddd;
  border-radius: 0.5rem;
  font-size: 1rem;
  line-height: 1em;
  background: white url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  width: 100%;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none; /* Remove default arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
}

.hc-customSearch .search-filters select:focus {
  outline: none;
  border-color: #222;
  box-shadow: 0 0 0 0.125rem rgba(34, 34, 34, 0.1);
}

.hc-customSearch .search-filters select:hover {
  border-color: #999;
}

.hc-customSearch .search-button {
  font-family: "MessinaSansWeb", sans-serif;
  flex: 1;
  padding: 1rem 2rem;
  background: #555;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  min-width: 8rem;
}

.hc-customSearch .search-button:hover {
  background: #222;
}

.hc-customSearch .search-results-count {
  font-family: "MessinaSansWeb", sans-serif;
  font-size: 1.25rem;
  color: #222;
  text-align: center;
}

.hc-customSearch .hc-search-products-grid {
  font-family: "MessinaSansWeb", sans-serif;
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 columns by default (small screens) */
  gap: 4vw;
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .hc-customSearch .hc-search-products-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 columns for medium screens */
  }
}

@media (min-width: 1200px) {
  .hc-customSearch .hc-search-products-grid {
    grid-template-columns: repeat(4, 1fr); /* 4 columns for large screens */
  }
}

.hc-customSearch .hc-search-product-item {
  overflow: hidden;
  position: relative;
}

.hc-customSearch .hc-search-product-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.hc-customSearch .hc-product-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.hc-customSearch .hc-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hc-customSearch .hc-product-brand {
  font-family: "MessinaSerifWeb", serif;
  line-height: 1em;
  padding-bottom: 0.5em;
}

.hc-customSearch .hc-product-title {
  padding: 0 0 0.3333rem 0;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  line-height: 1.25em;
}

@media screen and (min-width: 768px) {
  .hc-customSearch .hc-product-title {
    font-size: 1rem;
  }
}

.hc-customSearch .hc-product-price {
  font-weight: 600;
  color: #555;
}

/* No Results */
.hc-customSearch .no-results {
  text-align: center;
  padding: 4rem 1.25rem;
  border: dashed 2px #ddd;
  border-radius: 0.5rem;
  margin: 2rem 0;
}

.hc-customSearch .no-results h2 {
  font-family: "MessinaSansWeb", sans-serif;
  margin: 0;
}

.hc-customSearch .page-numbers {
  font-family: "MessinaSansWeb", sans-serif;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 2.5rem 0;
  list-style: none;
  padding: 0;
}

@media screen and (min-width: 768px) {
  .hc-customSearch .page-numbers {
    font-size: 1.25rem;
    gap: 1rem;
  }
}

.hc-customSearch .page-numbers.current {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.hc-customSearch .page-numbers a,
.hc-customSearch .page-numbers span {
  display: inline-block;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
}

.hc-customSearch .page-numbers a:hover,
.hc-customSearch .page-numbers .current {
  background: #555;
  color: white;
  border-color: #555;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hc-customSearch .search-input-wrapper {
    min-width: unset;
  }

  .hc-customSearch .search-filters {
    min-width: unset;
  }

  .hc-customSearch .search-button {
    width: 100%;
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .hc-customSearch .hc-product-search-form {
    padding: 1.25rem 1rem;
    margin: 1.25rem 0;
  }

  .hc-customSearch .no-results {
    font-family: "MessinaSansWeb", sans-serif;
    padding: 2rem 1rem;
  }
}

.hc-customSearch .search-results-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto;
  font-size: 1.25rem;
}

@media (min-width: 1200px) {
  .hc-customSearch .search-results-footer {
    font-size: 1.25rem;
  }
}
