/* Product Listing Element Styles */

.product-listing-wrapper {
  width: 100%;
  max-width: 100%;
  position: relative;
  margin-bottom: 40px;
  padding: 0;
}

/* Header */
.product-listing-header {
  margin-bottom: 20px;
}

.product-listing-heading {
  font-size: 28px;
  font-weight: 700;
  color: #168BEF;
  text-align: left;
  position: relative;
  display: inline-block;
  margin-bottom: 0;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* Filter Bar */
.product-listing-filter {
  background-color: #f7f7f7;
  border: 1px solid #eaeaea;
  border-radius: 5px;
  margin-bottom: 30px;
  padding: 12px 15px;
}

.product-listing-filter-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.product-listing-results {
  font-size: 14px;
  color: #666;
}

.product-listing-sorting {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-label {
  font-size: 15px;
  font-weight: 500;
}

.woocommerce-ordering {
  margin: 0;
}

.orderby {
  border: 1px solid #ddd;
  padding: 6px 35px 6px 10px;
  border-radius: 4px;
  font-size: 14px;
  background-color: #fff;
  color: #333;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3e%3cpath fill='none' d='M0 0h24v24H0z'/%3e%3cpath d='M12 13.172l4.95-4.95 1.414 1.414L12 16 5.636 9.636 7.05 8.222z' fill='rgba(0,0,0,0.5)'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: calc(100% - 8px) center;
  background-size: 16px;
  cursor: pointer;
  min-width: 180px;
}

/* Product Grid */
.product-listing-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 40px;
}

/* Define columns */
.product-listing-grid.columns-1 {
  grid-template-columns: repeat(1, 1fr);
}

.product-listing-grid.columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.product-listing-grid.columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.product-listing-grid.columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Product Item */
.product-item {
  background-color: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  transition: transform 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

.product-item:hover {
  transform: translateY(-5px);
  box-shadow: none;
  border: none;
}

/* Product Link */
.product-link {
  display: block;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  background-color: transparent;
  padding: 0;
  margin: 0;
}

/* Product Image */
.product-image {
  height: auto;
  position: relative;
  overflow: hidden;
  background-color: transparent;
  width: 100%;
  border-radius: 0;
  padding: 0;
  margin: 0;
  aspect-ratio: 4/3;
}

/* Improved image handling */
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
  display: block;
  border-radius: 0;
  padding: 0;
  margin: 0;
}

.product-no-image {
  width: 100%;
  height: 100%;
  background-color: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

.product-no-image:after {
  content: '\f03e';
  font-family: 'Font Awesome 5 Free';
  font-size: 40px;
  color: #ddd;
}

.product-overlay {
  display: none;
}

.product-item:hover .product-image img {
  transform: scale(1);
}

/* Product Contact Info */
.product-contact-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 12px 15px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.3s ease;
}

.product-item:hover .product-contact-info {
  opacity: 1;
  transform: translateY(0);
}

.product-phone,
.product-website {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.product-phone i,
.product-website i {
  margin-right: 8px;
  font-size: 14px;
  color: #168BEF;
}

/* Product Title */
.product-title-wrapper {
  padding: 15px 0 8px;
  text-align: center;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-title a {
  color: #333333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.product-title a:hover {
  color: #168BEF;
}

/* Product Action */
.product-action {
  padding: 0 0 15px;
  text-align: center;
  margin-top: auto;
}

.product-contact-button {
  display: inline-block;
  background-color: #168BEF;
  color: #ffffff;
  border: none;
  border-radius: 50px;
  padding: 10px 25px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 8px rgba(22, 139, 239, 0.2);
}

.product-contact-button:hover {
  background-color: #0e7ad9;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(22, 139, 239, 0.3);
}

/* Pagination */
.product-listing-pagination {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.product-listing-pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #dddddd;
  background-color: #ffffff;
  color: #333333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.product-listing-pagination .page-numbers.current {
  background-color: #168BEF;
  border-color: #168BEF;
  color: #ffffff;
}

.product-listing-pagination .page-numbers:hover:not(.current) {
  border-color: #168BEF;
  color: #168BEF;
}

.product-listing-pagination .prev,
.product-listing-pagination .next {
  font-size: 12px;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-item {
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}

.product-item:nth-child(1) { animation-delay: 0.1s; }
.product-item:nth-child(2) { animation-delay: 0.15s; }
.product-item:nth-child(3) { animation-delay: 0.2s; }
.product-item:nth-child(4) { animation-delay: 0.25s; }
.product-item:nth-child(5) { animation-delay: 0.3s; }
.product-item:nth-child(6) { animation-delay: 0.35s; }
.product-item:nth-child(7) { animation-delay: 0.4s; }
.product-item:nth-child(8) { animation-delay: 0.45s; }

/* Responsive styles */
@media (max-width: 1200px) {
  .product-listing-grid.columns-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  .product-listing-grid.columns-4,
  .product-listing-grid.columns-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .product-listing-heading {
    font-size: 24px;
  }
  
  .product-listing-filter-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .product-listing-sorting {
    width: 100%;
  }
  
  .orderby {
    flex-grow: 1;
  }
}

@media (max-width: 767px) {
  .product-listing-grid {
    gap: 15px;
  }
  
  .product-title {
    min-height: auto;
  }
}

@media (max-width: 576px) {
  .product-listing-grid.columns-4,
  .product-listing-grid.columns-3,
  .product-listing-grid.columns-2 {
    grid-template-columns: repeat(1, 1fr);
  }
  
  .product-listing-heading {
    font-size: 22px;
  }
} 