/* 
 * Custom CSS for shop page layout improvements
 * This file addresses spacing and image sizing on desktop
 */

/* Mobile first styles */
.woocommerce-page #content,
.woocommerce #content,
body.woocommerce #primary,
body.woocommerce-page #primary {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding-left: 15px;
  padding-right: 15px;
}

/* Content area spacing */
.woocommerce #content {
  padding: 20px 0;
}

/* Tablet - padding lateral médio */
@media (min-width: 768px) and (max-width: 991px) {
  .woocommerce-page #content,
  .woocommerce #content,
  body.woocommerce #primary,
  body.woocommerce-page #primary {
    padding-left: 30px;
    padding-right: 30px;
  }
}

/* Desktop - medio (992px-1459px) */
@media (min-width: 992px) and (max-width: 1459px) {
  /* Create main container for shop page with fixed width and centered */
  .woocommerce-page #content,
  .woocommerce #content,
  body.woocommerce #primary,
  body.woocommerce-page #primary {
    max-width: 1400px;
    padding-left: 200px;
    padding-right: 200px;
  }
}

/* Grandes telas (1460px+) incluindo 1920px, 2K, 4K */
@media (min-width: 1460px) {
  .woocommerce-page #content,
  .woocommerce #content,
  body.woocommerce #primary,
  body.woocommerce-page #primary {
    max-width: none;
    padding-left: 300px;
    padding-right: 300px;
    width: 100%;
    box-sizing: border-box;
  }
}

/* Improve product image container */
.woocommerce ul.products li.product a img {
  width: 100%;
  height: 320px;
  object-fit: contain !important; /* Prevents image distortion */
  margin: 0 auto 15px !important;
  padding: 20px;
  background-color: #fff;
  transition: all 0.3s ease;
}

/* Fix card layout to be consistent height */
.woocommerce ul.products li.product {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 0 20px 0 !important;
}

/* Make the product link fill available space */
.woocommerce ul.products li.product .woocommerce-loop-product__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 15px;
}

/* Fix spacing for titles */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  margin: 10px 0 !important;
  min-height: 50px; /* Ensure consistent height for different length titles */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Add some breathing room to add-to-cart button */
.woocommerce ul.products li.product .button {
  margin-top: 15px !important;
  margin-bottom: 5px !important;
  width: auto;
  display: inline-block;
  padding: 10px 20px;
}

/* Increase page side margins */
.woocommerce-products-header {
  margin-bottom: 30px;
}
