/*
Theme Name: child
Theme URI: https://essentials.pixfort.com/
Author: pixfort
Author URI: https://1.envato.market/pixfort
Description: Essentials theme
Template: essentials
Version: 1.0
*/
 
 
/* =Theme customization starts here
------------------------------------------------------- */

/* Wrapper for the entire page */
.products-page-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Filter section styling */
.product-filters {
  width: 100%;
  padding: 25px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.product-filters h3 {
  margin-bottom: 20px;
  font-size: 1.4em;
  color: #333;
  border-bottom: 2px solid #98d662;
  padding-bottom: 10px;
}

.product-filters label {
  display: block;
  margin: 15px 0 8px;
  font-weight: 600;
  color: #444;
}

/* Enhanced select styling */
.product-filters select {
  width: 100%;
  padding: 12px 35px 12px 12px; /* Increased right padding for arrow */
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 1em;
  appearance: none; /* Remove default arrow */
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) center;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.product-filters input[type="text"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 1em;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.product-filters select:hover,
.product-filters input[type="text"]:hover {
  border-color: #98d662;
}

.product-filters select:focus,
.product-filters input[type="text"]:focus {
  outline: none;
  border-color: #98d662;
  box-shadow: 0 0 0 3px rgba(152, 214, 98, 0.2);
}

.product-filters button {
  display: inline-block;
  padding: 12px 24px;
  background-color: #98d662;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 600;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
}

.product-filters button:hover {
  background-color: #61CE70;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Products list section styling */
.products-list {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  position: relative;
}

/* Individual product card styling */
.product-item {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.product-item .product-image {
  text-align: center;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 6px;
}

.product-item .product-image img {
  max-width: 100%;
  height: auto;
  transition: transform 0.3s;
}

.product-item:hover .product-image img {
  transform: scale(1.05);
}

.product-item h2 {
  font-weight: 700;
  font-size: 1.3em;
  margin-top: 15px;
  margin-bottom: 10px;
  color: #333;
  line-height: 1.3;
}

.product-item p {
  color: #555;
  flex-grow: 1;
  line-height: 1.6;
}

/* Product metadata styling */
.product-item .product-meta {
  margin-top: 15px;
  font-size: 0.9em;
  color: #777;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.product-item .product-meta p {
  margin: 5px 0;
}

.product-item .product-meta strong {
  color: #555;
}

/* Loading spinner and end of products message */
#loading-spinner, #end-of-products {
  text-align: center;
  padding: 30px;
  font-style: italic;
  grid-column: 1 / -1;
  width: 100%;
  clear: both;
  color: #666;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #98d662;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Media Queries for responsiveness */
@media screen and (min-width: 768px) {
  .products-page-wrapper {
    flex-direction: row;
    padding: 50px;
  }

  .product-filters {
    width: 30%;
    max-width: 300px;
    align-self: flex-start;
    position: sticky;
  }

  .products-list {
    width: 70%;
    flex: 1;
  }
}

@media screen and (min-width: 1024px) {
  .products-page-wrapper {
    padding: 60px;
  }
}

@media screen and (min-width: 1440px) {
  .products-page-wrapper {
    padding: 80px;
  }
}

/* Ensure content doesn't stretch too wide on 4K and larger screens */
@media screen and (min-width: 2560px) {
  .products-page-wrapper {
    max-width: 1800px;
  }
}

/* Accessibility improvements */
.product-item a:focus,
.product-filters button:focus {
  outline: 3px solid #98d662;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .product-filters {
    display: none;
  }

  .products-list {
    display: block;
  }

  .product-item {
    page-break-inside: avoid;
    border: none;
    box-shadow: none;
  }
}

/* Code for single product */

.single-product-page {
    padding: 20px 0;
}

.single-product-page .product-page-wrapper {
    margin: auto;
    padding: 60px 20px 0;
    max-width: 1200px;
}

.single-product-page .product-main-content {
    display: flex;
    gap: 50px;
    margin-bottom: 60px;
}

.single-product-page .product-image-sticky {
    flex: 0 0 45%;
	position: -webkit-sticky;
	position: sticky;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
}

.single-product-page .product-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    position: relative;
}


.single-product-page .product-meta-icons {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
	background: linear-gradient(to top, 
        rgba(240, 240, 240, 0.6) 0%,
        rgba(240, 240, 240, 0.4) 35%,
        rgba(240, 240, 240, 0) 100%
    );
    padding: 60px 0 20px;
}

.single-product-page .icon-box {
    flex: 0 0 auto;
    margin: 0 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 8px 16px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.single-product-page .icon-box:hover {
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 1);
}

.single-product-page .pix-likes-box,
.single-product-page .pix-comments-box,
.single-product-page .pix-comments-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4fc753;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.single-product-page .pix-comment-icon svg {
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

@media (max-width: 768px) {
	single-product-page .product-meta-icons {
        padding: 40px 0 15px; /* Slightly reduced for mobile */
    }
}


.single-product-page .product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom right, rgba(255,255,255,0.1), rgba(255,255,255,0));
    pointer-events: none;
}

.single-product-page .product-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    filter: brightness(1.05);
}

.single-product-page .product-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    border-radius: 20px; /* Add border radius to the image */
    border: 1px solid #ddd; /* Add a border to the image */
}

.single-product-page .product-image:hover img {
    transform: scale(1.05);
}

.single-product-page .product-details {
    flex: 0 0 55%;
}

.single-product-page .product-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.2;
}

.single-product-page .product-excerpt {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.single-product-page .product-meta-item {
    margin-bottom: 15px;
    font-size: 1em;
    color: #555;
}

.single-product-page .product-meta-item strong {
    color: #333;
    font-weight: 600;
    margin-right: 5px;
}

.single-product-page .product-files {
    margin-top: 30px;
}

.single-product-page .product-files ul {
    list-style-type: none;
    margin-top: 5px;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.single-product-page .product-files li {
    margin-bottom: 10px;
}

.single-product-page .product-files .download-button {
    display: inline-flex;
    align-items: center;
    padding: 5px 18px;
    background-color: #98d662;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0, 115, 170, 0.2);
}

.single-product-page .product-files .download-button::before {
    content: "↓";
    margin-right: 8px;
    font-size: 1.2em;
}

.single-product-page .product-files .download-button:hover {
    background-color: #61CE70;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 115, 170, 0.3);
}

.single-product-page .product-description {
    margin-top: 60px;
}

.single-product-page .product-description h2 {
    font-weight: 600;
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #333;
}

.single-product-page .related-products {
    margin-top: 60px;
    padding-bottom: 60px;
}

.single-product-page .related-products h2 {
    font-weight: 600;
    font-size: 1.8em;
    margin-bottom: 30px;
    color: #333;
}

.single-product-page .related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.single-product-page .related-product-item {
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.single-product-page .related-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.single-product-page .related-product-item .product-image-wrapper {
    position: relative;
    padding-top: 100%; /* Creates a perfect square */
    overflow: hidden;
}

.single-product-page .related-product-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.single-product-page .related-product-item:hover img {
    transform: scale(1.1);
}

.single-product-page .related-product-item .product-meta {
    padding: 15px;
}

.single-product-page .related-product-item h3 {
    font-weight: 600;
    font-size: 1.1em;
    color: #333;
    margin: 10px 0 5px;
    transition: color 0.3s ease;
}

.single-product-page .related-product-item:hover h3 {
    color: #61CE70;
}

.single-product-page .related-product-item .product-categories {
    padding: 0 15px 15px;
}

.single-product-page .related-product-item .category-link {
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
    padding: 3px 8px;
    background-color: #f0f0f0;
    border-radius: 5px;
    color: #666;
    font-size: 0.8em;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.single-product-page .related-product-item .category-link:hover {
    background-color: #61CE70;
    color: #fff;
}

@media (max-width: 1200px) {
    .single-product-page .related-products-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for medium-sized screens */
    }
}

@media (max-width: 992px) {
    .single-product-page .related-products-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablet-sized screens */
    }
}

@media (max-width: 768px) {
    .single-product-page .product-main-content {
        flex-direction: column;
    }

    .single-product-page .product-image-sticky,
    .single-product-page .product-details {
        flex: 0 0 100%;
    }

    .single-product-page .product-image-sticky {
        position: static;
        margin-bottom: 30px;
    }

    .single-product-page .product-title {
        font-size: 2em;
    }

    .single-product-page .product-excerpt {
        font-size: 1em;
    }

    .single-product-page .related-products-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for mobile landscape */
    }

    .single-product-page .product-page-wrapper {
        padding: 30px 20px 0; /* Maintain 20px padding on mobile */
    }
}

@media (max-width: 480px) {
    .single-product-page .product-page-wrapper {
        padding: 30px 20px 0; /* Maintain 20px padding on smaller mobile */
    }

    .single-product-page .product-title {
        font-size: 1.8em;
    }

    .single-product-page .product-excerpt {
        font-size: 0.9em;
    }

    .single-product-page .product-meta-item {
        font-size: 0.9em;
    }

    .single-product-page .related-products-grid {
        grid-template-columns: 1fr; /* 1 column for mobile portrait */
    }
}

/* Retailers Page Styles */

/* Search Box Styles */
#search-box {
  width: 100%;
  max-width: 786px;
  padding: 10px;
  margin-bottom: 30px;
  font-size: 16px; /* Increased for better readability on mobile */
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box; /* Ensures padding doesn't affect width */
}

#search-box:focus {
  outline: none;
  border-color: #61CE70;
  box-shadow: 0 0 5px rgba(0, 115, 170, 0.5);
}

.retailers-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1200px; /* Set a max-width for larger screens */
  margin: 0 auto; /* Center the wrapper */
}

.retailers-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 20px; /* Increased gap for better spacing */
  width: 100%;
}

.retailer-item {
  flex: 1 1 300px; /* Changed to grow and shrink, with a base width */
  max-width: calc(33.333% - 20px); /* Max width for larger screens */
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  padding: 20px;
  border-radius: 10px;
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
  background-color: #fff; /* Ensure background color */
}

.retailer-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Pagination Styles */
.pagination {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pagination a, .pagination span {
  cursor: pointer;
  padding: 10px 15px;
  border: 1px solid #ddd;
  color: #61CE70;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
}

.pagination a:hover {
  background-color: #61CE70;
  color: #fff;
}

.pagination .current {
  background-color: #61CE70;
  color: #fff;
}

.pagination .disabled {
  cursor: default;
  color: #aaa;
}

/* Media Queries for Responsive Design */
@media (max-width: 1024px) {
  .retailer-item {
    max-width: calc(50% - 20px);
  }
}

@media (max-width: 768px) {
  #search-box {
    font-size: 14px;
    padding: 8px;
  }

  .retailer-item {
    max-width: 100%;
  }

  .pagination a, .pagination span {
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .retailers-list {
    gap: 15px;
  }

  .retailer-item {
    padding: 15px;
  }

  .pagination {
    gap: 5px;
  }

  .pagination a, .pagination span {
    padding: 6px 10px;
    font-size: 14px;
  }
}

/* Ensure touch targets are large enough on mobile */
@media (hover: none) and (pointer: coarse) {
  .pagination a, .pagination span {
    padding: 12px 18px;
  }
}