/**
 * Additional Shop Page Styles
 * Complements the existing product grid block styles
 */

/* Shop page specific overrides */
.woocommerce.archive .gingerup-product-grid .product-item {
  background-color: #edf4f3;
}

/* Ensure proper spacing for shop products */
.gingerup-shop-products .product-grid-container {
  justify-content: flex-start;
}

/* Hide default WooCommerce elements we're replacing */
.woocommerce ul.products li.product {
  display: none !important;
}

.woocommerce ul.products {
  margin: 0;
  padding: 0;
}

/* Shop pagination styling */
.woocommerce nav.woocommerce-pagination {
  text-align: center;
  margin-top: 40px;
}

.woocommerce nav.woocommerce-pagination ul {
  display: inline-flex;
  justify-content: center;
  border: none;
}

.woocommerce nav.woocommerce-pagination ul li {
  margin: 0 5px;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  background: #fff;
  transition: all 0.3s ease;
}

.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: #333;
  color: #fff;
  border-color: #333;
}

/* Shop toolbar styling */
.woocommerce .woocommerce-result-count {
  font-size: 14px;
  color: #666;
}

.woocommerce .woocommerce-ordering select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
}

/* Responsive adjustments for shop */
@media (max-width: 1024px) {
  .gingerup-shop-products .product-item {
    width: calc(50% - 20px) !important;
  }
}

@media (max-width: 768px) {
  .gingerup-shop-products .product-item {
    width: calc(50% - 20px) !important;
  }

  .woocommerce .woocommerce-result-count,
  .woocommerce .woocommerce-ordering {
    text-align: center;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .gingerup-shop-products .product-item {
    width: calc(100% - 20px) !important;
  }
}

/* Fallback image styling */
.gingerup-product-grid .fallback-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 250px;
}

/* Error display for debugging */
.product-item-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  margin: 10px;
  text-align: center;
  font-size: 14px;
}

/* Debug info styling */
.debug-info {
  background-color: #d1ecf1;
  color: #0c5460;
  padding: 15px;
  border: 1px solid #bee5eb;
  border-radius: 4px;
  margin: 10px;
  font-size: 12px;
  white-space: pre-wrap;
}
