/* ShopBlocks WP Styles */
/* === ShopBlocks WP Styles === */

/* Product Top Section */
.shoppable-product-top-wrapper {
  background: #f9f9f9;
  padding: 40px 20px;
}

.shoppable-product-top-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.shoppable-product-top-image {
  flex: 1 1 300px;
  text-align: center;
}

.shoppable-product-top-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.summary.entry-summary {
  flex: 1 1 400px;
}

.summary.entry-summary .price {
  font-size: 1.5rem;
  color: #27ae60;
  margin-bottom: 20px;
}

.summary.entry-summary .woocommerce-product-details__short-description {
  font-size: 1rem;
  margin-bottom: 20px;
}

.summary.entry-summary form.cart:not(.variations_form) {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Make sure the variable form stays block and behaves normally */
.summary.entry-summary .variations_form.cart {
  display: block;           /* don't flex the entire variation form */
}

/* Ensure the button shows when a valid variation is selected */
.summary.entry-summary .single_variation_wrap .single_add_to_cart_button {
  display: inline-flex;
}

/* Optional: make selects full-width in your layout */
.summary.entry-summary .variations select {
  width: 100%;
}

/* Grid Layout for Multiple Products */
.local-product-grid {
  padding: 40px 20px;
  background: #fff;
}

.local-product-grid__container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.local-product-card {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.local-product-card:hover {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
}

.local-product-card__image img {
  width: 100%;
  height: auto;
  display: block;
}

.local-product-card__content {
  padding: 15px;
  text-align: center;
}

.local-product-card__title {
  font-size: 1rem;
  margin: 10px 0 5px;
}

.local-product-card__price {
  color: #27ae60;
  font-weight: bold;
}

/* === Mobile Responsive Fixes === */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .shoppable-product-top-container {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0 15px;
    overflow-x: hidden;
  }

  .shoppable-product-top-image,
  .summary.entry-summary {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  .shoppable-product-top-image img {
    width: 100% !important;
    height: auto;
    display: block;
  }

  .summary.entry-summary {
    padding-top: 20px;
  }

  .summary.entry-summary form.cart,
  .summary.entry-summary .variations_form.cart {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 15px;
    width: 100%;
  }

  .summary.entry-summary .variations select,
  .summary.entry-summary .quantity,
  .summary.entry-summary .single_add_to_cart_button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .woocommerce-variation-description {
    display: none !important;
  }

  .summary.entry-summary .woocommerce-variation-price {
    text-align: left !important;
  }

  .woocommerce .local-product-grid__container {
    grid-template-columns: 1fr !important;
  }
}