/* --- Product Grid Layout Refinements for Broken Crust Pies --- */

/* --- Product Grid Layout for Title + Price + Meta Row --- */

.wc-block-product {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "image header"
    "image meta";
  column-gap: 3.5rem;
  row-gap: 0.75rem;
  align-items: start;
  padding: 2rem 0;
  border-bottom: 2px dotted #ccc;
}

/* --- Product Image --- */
.wc-block-components-product-image {
  grid-area: image;
  width: 110px;
    margin-bottom: 0 !important;


}


.wc-block-components-product-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
      margin-bottom: 0 !important;
}

/* --- Title --- */
.wc-block-product h3 {
  grid-area: header;
  display: inline-block;

  font-size: 3rem;
  color: #0b0b2a;
  margin: 0;
  vertical-align: baseline;
}

/* --- Price --- */
.wc-block-components-product-price {
  grid-area: header;
  display: inline-block;

  font-size: 1.8rem;
  color: #0b0b2a;
  margin-left: 2rem;
  vertical-align: baseline;
}

/* --- Availability, Pickup, Button Row --- */
.psm-availability {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  font-size: 1.1rem;

  margin-top: 0.25rem;
}

/* --- Button Styles --- */
.psm-availability .buy-now,
.psm-availability .button.disabled {
  font-size: 1rem;
  padding: 0.4rem 1.2rem;
  border-radius: 0.25rem;
  font-weight: 600;
  text-transform: none;
  text-decoration: underline;
  white-space: nowrap;
  border: none;
}

.psm-availability .buy-now {
  background-color: #111;
  color: white;
}

.psm-availability .button.disabled {
  background: #ddd;
  color: #666;
}

.button.disabled.current.week {
  background: #eee !important;
  color: #333 !important;
}


/* --- Status Colors --- */
.psm-status.available {
  color: green;
  font-weight: 600;
}

.psm-status.upcoming {
  color: #f97316;
}

.psm-status.soldout {
  color: #ff0000;
}

.psm-pickup {
  color: #222;
}

/* --- Cleanup Woo layout --- */
.wc-block-product-template.columns-4,
.wc-block-product-template__responsive.columns-4 {
  display: block !important;
}

.wc-block-product .wp-block-spacer {
  display: none;
}



/* --- Title + Price container --- */
.psm-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  padding-top: 0.5rem;
  gap: 1rem;
}

.psm-header h3 {
  font-size: 2rem;
  margin: 0;
  color: #0b0b2a;
}

.psm-header .wc-block-components-product-price {
  font-size: 1.8rem;
  margin: 0;
  color: #0b0b2a;
}

/* --- Title and Price Shared Row --- */
.wp-block-post-title a {
  pointer-events: none;
  text-decoration: none;
  color: inherit;
  cursor: default;
}



.wc-block-product h3 {
/*   font-weight: 800; */
  font-size: 3rem;
  color: #0b0b2a;
  margin: 0;
  display: inline-block;
  vertical-align: baseline;
}

.wc-block-components-product-price {
/*   font-weight: 800; */
  font-size: 1.8rem;
  color: #0b0b2a;
  margin-left: 2rem;
  display: inline-block;
  vertical-align: baseline;
}

/* Clear following row of data beneath title+price */
.psm-availability {
  clear: both;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  font-size: 1.1rem;
  margin-top: 0.75rem;
}

/* === Override product title and price sizes === */
li.product h3,
.wc-block-product h3 {
  font-size: 2.3rem !important;
/*   font-weight: 800; */
  color: #0b0b2a;
  margin: 0;
}

li.product .wc-block-components-product-price,
.wc-block-product .wc-block-components-product-price {
  font-size: 1.75rem !important;
  font-weight: 700;
  color: #0b0b2a;
  margin-left: 1.5rem;
  vertical-align: baseline;
}

.wc-block-product-template .wc-block-product > *:not(:last-child) {
    margin-bottom: 0 !important;
}




body.post-type-archive-product .wc-block-product-template {
  max-width: 1125px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

body.post-type-archive-product .wp-block-group.is-layout-constrained > .wp-block-query-title {
  max-width: 1125px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  text-align: left;
}


@media screen and (max-width: 768px) {
  body.post-type-archive-product .wc-block-product-template {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}


@media screen and (max-width: 768px) {
  .wc-block-product h3,
  li.product h3,
  .psm-header h3 {
    white-space: normal !important;
    word-break: normal !important;
    display: block !important;
  }
}

/* Responsive layout for mobile */
@media screen and (max-width: 768px) {
  .psm-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .psm-header .wc-block-components-product-price {
    margin-left: 0 !important;
    margin-top: 0.25rem;
    display: block;
    text-align: left;
  }
}


/*new mobile fix*/

@media screen and (max-width: 768px) {
  /* Shrink image container */
  .wc-block-components-product-image {
    width: 80px !important;
  }

  /* Shrink image itself */
  .wc-block-components-product-image img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain;
  }

  /* Adjust column gap to tighten spacing */
  .wc-block-product {
    column-gap: 1.5rem;
  }

  /* Optional: Let text have more room */
  .wc-block-product h3,
  .wc-block-components-product-price {
    font-size: 1.5rem !important;
  }

  .psm-availability {
    font-size: 0.95rem;
  }
}

/*new mobile fix*/


/* Archive Footer Help */
body.post-type-archive-product footer,
body.post-type-archive-product .wp-block-template-part[data-title="footer"] {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}


/* Fixing WC buttons */


/* === WooCommerce Blocks: Cart + Checkout + Mini Cart buttons === */
.wc-block-cart .wc-block-components-button,
.wc-block-checkout .wc-block-components-button,
.wc-block-mini-cart .wc-block-components-button, .wc-block-mini-cart__empty-cart-wrapper .wc-block-components-button, .woocommerce-form-login__submit, .woocommerce-button {
  border-radius: 4px !important;
  background-color: #7f1d1d !important;
  color: #fff !important;
  font-weight: 600;
  padding: 0.75em 1.5em;
  border: none;
  box-shadow: none;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Button text styling */
.wc-block-components-button__text {
  color: #fff !important;
}

/* Hover styling */
.wc-block-cart .wc-block-components-button:hover,
.wc-block-checkout .wc-block-components-button:hover,
.wc-block-mini-cart .wc-block-components-button:hover, .wc-block-mini-cart__empty-cart-wrapper .wc-block-components-button:hover, .woocommerce-form-login__submit:hover, .woocommerce-button:hover {
  background-color: #E06837 !important;
     transition: background-color 0.5s ease, color 0.5s ease;
}


/* Style for "View my cart" button in mini cart */
.wc-block-mini-cart__footer a:not(.wc-block-mini-cart__footer-checkout) {
  background-color: #000 !important;
  color: #fff !important;
  border-radius: 4px !important;
  padding: 0.75em 1.5em !important;
  display: inline-block;
  font-weight: 600;
  text-align: center;
  border: none !important;
  box-shadow: none !important;
   transition: background-color 0.5s ease, color 0.5s ease;
}

/* Hover state for "View my cart" */
.wc-block-mini-cart__footer a:not(.wc-block-mini-cart__footer-checkout):hover {
  background-color: #222 !important;
}




/* Style for "Go to checkout" button in mini cart */
.wc-block-mini-cart__footer-checkout {
  background-color: #7f1d1d !important;
  color: #fff !important;
  border-radius: 4px !important;
  padding: 0.75em 1.5em !important;
  font-weight: 600;
  text-align: center;
  border: none !important;
  box-shadow: none !important;
   transition: background-color 0.5s ease, color 0.5s ease;
}

/* Hover state for "Go to checkout" */
.wc-block-mini-cart__footer-checkout:hover {
  background-color: #E06837 !important;
     transition: background-color 0.5s ease, color 0.5s ease;
}


/* Makes Product Titles Non Clickable */

/* Mini Cart & Cart – disable pointer and link appearance */
.wc-block-components-product-name {
  pointer-events: none;
  color: inherit;
  text-decoration: none;
  cursor: default;
}


body.woocommerce-view-order .woocommerce-table__product-name a {
  pointer-events: none;
  color: inherit;
  text-decoration: none;
  cursor: default;
}


/* Forces adherence to only small thumbnails */

/* 
.wc-block-components-product-image img {
  width: 300px !important;
  max-width: 300px !important;
  height: auto !important;
  object-fit: cover;
}
 */


