/**
 * Shared reset for Pro widgets.
 * Theme heading sizes and content-box widths were overflowing cards
 * and collapsing gutters. Do not cap the page/widget canvas here —
 * card tracks and padding live on each widget.
 */

.rwa-product-grid,
.rwa-pro-leaf,
.rwa-smart-filters,
.rwa-live-search,
.rwa-ajax-product-search,
.rwa-dynamic-mega-menu,
.rwa-related-products,
.rwa-cart-drawer,
.rwa-quick-view,
.rwa-sticky-add-to-cart,
.rwa-ai-concierge,
.rwa-wishlist,
.rwa-shipping-progress,
.rwa-variation-swatches,
.rwa-product-compare,
.rwa-bought-together,
.rwa-data-template,
.rwa-product-grid *,
.rwa-product-grid *::before,
.rwa-product-grid *::after,
.rwa-pro-leaf *,
.rwa-pro-leaf *::before,
.rwa-pro-leaf *::after,
.rwa-smart-filters *,
.rwa-live-search *,
.rwa-ajax-product-search *,
.rwa-dynamic-mega-menu *,
.rwa-dynamic-mega-menu *::before,
.rwa-dynamic-mega-menu *::after,
.rwa-related-products *,
.rwa-cart-drawer *,
.rwa-cart-drawer *::before,
.rwa-cart-drawer *::after,
.rwa-quick-view *,
.rwa-quick-view *::before,
.rwa-quick-view *::after,
.rwa-sticky-add-to-cart *,
.rwa-ai-concierge *,
.rwa-wishlist *,
.rwa-shipping-progress *,
.rwa-variation-swatches *,
.rwa-variation-swatches *::before,
.rwa-product-compare *,
.rwa-bought-together *,
.rwa-data-template * {
  box-sizing: border-box;
}

.rwa-product-grid :is(h1, h2, h3, h4, h5, h6),
.rwa-pro-leaf :is(h1, h2, h3, h4, h5, h6),
.rwa-smart-filters :is(h1, h2, h3, h4, h5, h6),
.rwa-live-search :is(h1, h2, h3, h4, h5, h6),
.rwa-ajax-product-search :is(h1, h2, h3, h4, h5, h6),
.rwa-dynamic-mega-menu :is(h1, h2, h3, h4, h5, h6),
.rwa-related-products :is(h1, h2, h3, h4, h5, h6),
.rwa-cart-drawer :is(h1, h2, h3, h4, h5, h6),
.rwa-quick-view :is(h1, h2, h3, h4, h5, h6),
.rwa-sticky-add-to-cart :is(h1, h2, h3, h4, h5, h6),
.rwa-ai-concierge :is(h1, h2, h3, h4, h5, h6),
.rwa-wishlist :is(h1, h2, h3, h4, h5, h6),
.rwa-shipping-progress :is(h1, h2, h3, h4, h5, h6),
.rwa-variation-swatches :is(h1, h2, h3, h4, h5, h6),
.rwa-product-compare :is(h1, h2, h3, h4, h5, h6),
.rwa-bought-together :is(h1, h2, h3, h4, h5, h6),
.rwa-data-template :is(h1, h2, h3, h4, h5, h6) {
  margin: 0;
  padding: 0;
  width: auto;
  max-width: 100%;
  font-family: inherit;
  font-size: 1em;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: normal;
  color: inherit;
}

.rwa-product-grid,
.rwa-pro-leaf,
.rwa-smart-filters,
.rwa-live-search,
.rwa-ajax-product-search,
.rwa-dynamic-mega-menu,
.rwa-related-products,
.rwa-sticky-add-to-cart,
.rwa-ai-concierge,
.rwa-wishlist,
.rwa-shipping-progress,
.rwa-variation-swatches,
.rwa-product-compare,
.rwa-bought-together,
.rwa-data-template {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  font-size: 1rem;
  line-height: 1.3;
}

/* Elementor often resets display; adjacent margins still keep blocks apart. */
.rwa-pro-leaf > * + *,
.rwa-smart-filters > * + *,
.rwa-live-search > * + *,
.rwa-ajax-product-search > * + *,
.rwa-ai-concierge > * + *,
.rwa-ai-concierge__panel > * + *,
.rwa-ai-concierge__messages > * + *,
.rwa-wishlist > * + *,
.rwa-shipping-progress > * + *,
.rwa-bought-together > * + *,
.rwa-data-template:not(.rwa-product-grid) > * + * {
  margin-block-start: 0.75rem;
}

.rwa-smart-filters__applied {
  gap: 0.5rem;
}

.rwa-smart-filters__layout,
.rwa-smart-filters__results,
.rwa-smart-filters__sidebar {
  gap: 0.75rem;
  overflow: visible;
  max-height: none;
}

.rwa-live-search__results,
.rwa-ajax-product-search__results {
  margin-block-start: 0.75rem;
  overflow: visible;
}

.rwa-ai-concierge__actions {
  gap: 0.75rem;
}

.rwa-ai-concierge__confirm-btn {
  margin-inline-end: 0.75rem;
}

/* Collection cards: Figma 19:7 / 20:32 — compact 166px tracks, 12px gutters, no inner scroll. */
.rwa-data-template__fallback {
  width: 100%;
}

/* Product Grid owns its tracks in product-grid.css (per-device --rwa-pg-cols-* vars +
   media queries). Forcing --rwa-pg-cols here with !important pinned tablet/mobile to the
   desktop count, and made the nestable list shell a grid that took the first cell. */

.rwa-data-template__card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: auto;
  min-width: 0;
  height: auto;
  max-height: none;
  padding: 0.625rem;
  overflow: hidden;
}

.rwa-data-template__thumb {
  display: block;
  width: 100%;
  height: 4.75rem;
  max-height: 4.75rem;
  aspect-ratio: auto;
  overflow: hidden;
  object-fit: cover;
}

/* V4 priority: former !important declarations at V4 specificity (0,2,0), in original specificity order.
   Elementor V4 classes and local styles print after this file, so they override these defaults. */
.rwa-data-template__fallback.rwa-data-template__fallback {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10.375rem, 1fr));
	grid-auto-flow: row;
	gap: 0.75rem;
	overflow: visible;
}
.rwa-data-template__title.rwa-data-template__title {
	font-size: 0.8125rem;
	line-height: 1.25;
	font-weight: 600;
}
.rwa-data-template--table .rwa-data-template__fallback,
.rwa-data-template--table .rwa-data-template__grid,
.rwa-data-template--table .rwa-data-template__live {
	display: block;
	grid-template-columns: none;
}
.rwa-product-grid .rwa-data-template__fallback {
	grid-template-columns: repeat(var(--rwa-pg-cols, 4), minmax(0, 1fr));
}
