/**
 * WooCommerce-specific overrides — notice styling, list padding, generic
 * tweaks that should apply on every WC page (single product, archive, cart,
 * checkout, account). Conditionally enqueued whenever WooCommerce is active.
 */

/* WC notices wrapper used inside our templates (e.g. product page). */
.ts-product-notices { margin-bottom: 16px; }
.ts-product-notices .woocommerce-notices-wrapper,
.ts-product-notices .woocommerce-message,
.ts-product-notices .woocommerce-error,
.ts-product-notices .woocommerce-info {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 8px;
  background: var(--ivory);
  border-left: 3px solid var(--terra);
}

/* List items inside WC notices need extra left padding so the bullet/icon
 * doesn't clip into the surrounding border. Applies to every notice flavor. */
.woocommerce-error li,
.woocommerce-info li,
.woocommerce-message li {
  padding-left: 1.7em;
}

/* WC's wc-add-to-cart.js auto-appends an `<a class="added_to_cart wc-forward">`
 * after every successful AJAX add. Our cart drawer pops open with the same
 * intent, so the inline "View cart" link is redundant — hide it everywhere. */
.added_to_cart.wc-forward,
.added_to_cart {
  display: none !important;
}

/* Dokan store listing — constrain the three root elements to the theme's
 * container width so they don't bleed to full viewport or cause a scrollbar. */
#dokan-store-listing-filter-wrap,
#dokan-store-listing-filter-form-wrap,
#dokan-seller-listing-wrap {
  max-width: 1100px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 40px;
  padding-right: 40px;
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  #dokan-store-listing-filter-wrap,
  #dokan-store-listing-filter-form-wrap,
  #dokan-seller-listing-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
}
