/*
Theme Name:Astra Child
Template: astra
Text Domain: astra-child

*/
/* .shop-layout{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
} */

/* form.woocommerce-ordering{
  display: none;
} */
.ast-article-post{
  margin-bottom: 0 !important;
}
.ast-footer-copyright{
  display: none;
}

.primary{
  margin: 9em 0 !important;
}
.woo-fabric-layout{
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 2. Force each li (card) to be the same height in a row */
.woo-fabric-layout li.product {
    display: flex;
    flex-direction: column;
    height: auto; /* Allows them to grow */
    box-shadow: 3px 3px 9px 0 rgb(197 190 190 / 80%);
    border-radius: 3px;
    padding: 5px;
}

/* 3. Ensure the content inside (the link wrapper) fills the card */
.woo-fabric-layout li.product > a:first-child {
    flex: 1; /* This pushes the "Add to Cart" button to the bottom */
    display: flex;
    flex-direction: column;
}

/* 4. Optional: Make the title/price area consistent */
.woocommerce-loop-product__title {
    min-height: 2.5em; /* Adjust based on your longest title */
    margin-bottom: auto; /* Pushes the price down */
}

.products-column{
  padding-left: 20px;
  width:99%;
}
.woocommerce-result-count{
  display: none;
}
.wc-block-product-filters__overlay-content{
  border-right: 1px solid #eee;
  padding-right: 20px;;
}
.shop-layout{
  display: flex !important;
}

li.ast-grid-common-col, li.product{
  list-style-type: none;
}

.woo-fabric-layout{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.fabric-layout {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 30px;
  min-height: 90vh;
}

.filters {
  border-right: 1px solid #eee;
  padding-right: 20px;
}

.filter-group {
  margin: 20px;
}

#fabric_results {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.fabric-card {
  border: 1px solid #eee;
  padding: 5px;
  text-align: center;
  box-shadow: 3px 3px 9px 0 rgb(197 190 190 / 80%);
  border-radius: 3px;;
}
#fabric_results {
  transition: opacity 0.2s ease;
}

.loading {
  opacity: 0.5;
}

#active-filters {
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  /* padding: 10px 0; */
  width: 80%;
  min-height: 46px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  background: #f2f2f2;
  padding: 6px 12px;
  margin: 5px 8px 5px 0;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.filter-chip:hover {
  background: #e0e0e0;
}
.filters {
  width: 160px;
  padding-right: 20px;
  border-right: 1px solid #eee;
  font-family: Arial, sans-serif;
}

.filter-group {
  margin-bottom: 25px;
}

.filter-group h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.filter-group label {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  color: #333;
}

.filter-group input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

.fabric-card img {
  width: 100%;
  height: auto;
}

.price{
  display:block;
  text-align: center;
}

/* Force Add to Cart button into a new row and center it */
.button.product_type_simple.add_to_cart_button.ajax_add_to_cart {
  display: block;
  width: fit-content;
  margin: 15px auto 0 auto;
  clear: both;
}

/* ===== Tablet ===== */
@media (max-width: 1024px) {
    .woo-fabric-layout {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters-column {
        width: 220px;
    }

    #fabric_results{
      grid-template-columns: repeat( 2, 1fr );
    }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .shop-layout {
      flex-direction: column;
      padding: 12px;
  }

  .filters-column {
      width: 100%;
      order: 2;
  }

  .products-column {
      width: 100%;
      order: 1;
  }

  .woo-fabric-layout {
      grid-template-columns: repeat( 2, 1fr );
      gap: 14px;
  }

  #active-filters {
      overflow-x: auto;
      flex-wrap: nowrap;
      white-space: nowrap;
  }

  .filter-chip {
      flex-shrink: 0;
  }

  .price{
    display:block;
    text-align: center;
  }
  
  #fabric_results{
    grid-template-columns: repeat( 2, 1fr );
  }  
  
  img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail{
    width: 100% !important;
  }  
}

/* ==== Small Mobile ==== */
@media( max-width: 360px ){
  #fabric_results{
    grid-template-columns: 1fr;
  }

  .woo-fabric-layout{
    grid-template-columns: 1fr;
  }
}
