/**
 * AWA PLP — ui-ux-pro-max (2026-05-22)
 * Cascata: loader terminal pós awa-audit-bundle + awa-visual-polish-r2
 * Escopo: catalog-category-view + catalogsearch-result-index
 * colorize 2026-06-08: hex → tokens --awa-*
 */

/* ─── Category hero: eyebrow → title → count ─────────────────────────────── */
#html-body.catalog-category-view .page-wrapper .awa-category-hero__eyebrow,
#html-body.catalogsearch-result-index .page-wrapper .awa-category-hero__eyebrow {
  display: inline-block;
  margin: 0 0 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--awa-primary, #b73337) 72%, var(--awa-text-primary, #333333));
}

#html-body h1.awa-category-hero__title {
  margin: 0;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
  line-height: 1.15 !important;
  color: var(--awa-text-primary, #333333) !important;
}

#html-body.catalog-category-view .page-wrapper .awa-category-hero__count,
#html-body.catalogsearch-result-index .page-wrapper .awa-category-hero__count {
  margin: 8px 0 0;
  font-size: clamp(0.8125rem, 0.75rem + 0.25vw, 0.9375rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--awa-text-secondary, #666666);
}

#html-body.catalog-category-view .page-wrapper .breadcrumbs,
#html-body.catalogsearch-result-index .page-wrapper .breadcrumbs {
  font-size: 0.8125rem;
  line-height: 1.35;
}

#html-body.catalog-category-view .page-wrapper .breadcrumbs a,
#html-body.catalogsearch-result-index .page-wrapper .breadcrumbs a {
  color: var(--awa-text-secondary, #666666);
  text-decoration: none;
  transition: color var(--awa-dur-base, 200ms) ease;
}

#html-body.catalog-category-view .page-wrapper .breadcrumbs a:hover,
#html-body.catalogsearch-result-index .page-wrapper .breadcrumbs a:hover {
  color: var(--awa-primary, #b73337);
}

/* Search results: page title fallback */
#html-body.catalogsearch-result-index .page-wrapper .page-title-wrapper .page-title {
  font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
  line-height: 1.15 !important;
  color: var(--awa-text-primary, #333333) !important;
}

/* ─── Product cards: name → REF → price/login ───────────────────────────── */
#html-body.catalog-category-view .page-wrapper .wrapper.grid.products-grid .item-product :is(.product-name, .product-item-name),
#html-body.catalogsearch-result-index .page-wrapper .wrapper.grid.products-grid .item-product :is(.product-name, .product-item-name) {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  min-height: calc(1.35em * 2);
  font-size: clamp(0.8125rem, 0.75rem + 0.25vw, 0.9375rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--awa-text-primary, #333333);
}

#html-body.catalog-category-view .page-wrapper .wrapper.grid.products-grid .item-product :is(.product-name a, .product-item-name a),
#html-body.catalogsearch-result-index .page-wrapper .wrapper.grid.products-grid .item-product :is(.product-name a, .product-item-name a) {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

#html-body.catalog-category-view .page-wrapper .wrapper.grid.products-grid .item-product :is(.product-name a, .product-item-name a):hover,
#html-body.catalogsearch-result-index .page-wrapper .wrapper.grid.products-grid .item-product :is(.product-name a, .product-item-name a):hover {
  color: var(--awa-primary, #b73337);
}

#html-body.catalog-category-view .page-wrapper .wrapper.grid.products-grid .item-product :is(.awa-b2b-sku, .product-sku, .sku),
#html-body.catalogsearch-result-index .page-wrapper .wrapper.grid.products-grid .item-product :is(.awa-b2b-sku, .product-sku, .sku) {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--awa-text-primary, #333333) 55%, var(--awa-border, #e5e5e5));
}

/* B2B login chip — vence audit FIX 27 (PDP pill) + plp-final inline-flex column */
#html-body.catalog-category-view .page-wrapper .wrapper.grid.products-grid .item-product .info-price .b2b-login-to-see-price,
#html-body.catalogsearch-result-index .page-wrapper .wrapper.grid.products-grid .item-product .info-price .b2b-login-to-see-price {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.5rem !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 2.75rem !important;
  padding: 0.5rem 0.75rem !important;
  margin-top: 4px !important;
  border-radius: 6px !important;
  border: 1px solid var(--awa-border, #e5e5e5) !important;
  background: color-mix(in srgb, var(--awa-primary, #b73337) 4%, var(--awa-bg, #ffffff)) !important;
  color: var(--awa-text-secondary, #666666) !important;
  font-size: clamp(0.6875rem, 0.65rem + 0.2vw, 0.8125rem) !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
  text-align: left !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
}

#html-body.catalog-category-view .page-wrapper .wrapper.grid.products-grid .item-product .info-price .b2b-login-to-see-price::before,
#html-body.catalogsearch-result-index .page-wrapper .wrapper.grid.products-grid .item-product .info-price .b2b-login-to-see-price::before {
  content: none !important;
  display: none !important;
}

#html-body.catalog-category-view .page-wrapper .wrapper.grid.products-grid .item-product .info-price .b2b-login-to-see-price .price-label,
#html-body.catalogsearch-result-index .page-wrapper .wrapper.grid.products-grid .item-product .info-price .b2b-login-to-see-price .price-label {
  display: inline !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.25rem !important;
  margin: 0 !important;
  font-size: inherit !important;
  font-weight: 400 !important;
  line-height: inherit !important;
  color: color-mix(in srgb, var(--awa-text-primary, #333333) 62%, var(--awa-border, #e5e5e5)) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#html-body.catalog-category-view .page-wrapper .wrapper.grid.products-grid .item-product .info-price .b2b-login-to-see-price a,
#html-body.catalogsearch-result-index .page-wrapper .wrapper.grid.products-grid .item-product .info-price .b2b-login-to-see-price a {
  display: inline !important;
  min-height: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--awa-primary, #b73337) !important;
  font-size: inherit !important;
  font-weight: 700 !important;
  line-height: inherit !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

#html-body.catalog-category-view .page-wrapper .wrapper.grid.products-grid .item-product .info-price .b2b-login-to-see-price a:hover,
#html-body.catalogsearch-result-index .page-wrapper .wrapper.grid.products-grid .item-product .info-price .b2b-login-to-see-price a:hover {
  color: var(--awa-primary-hover, var(--awa-primary-dark, #8e2629)) !important;
  text-decoration: underline !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Toolbar / filtros — interação clara */
#html-body.catalog-category-view .page-wrapper .toolbar-products :is(a, button, select),
#html-body.catalogsearch-result-index .page-wrapper .toolbar-products :is(a, button, select),
#html-body.catalog-category-view .page-wrapper .grid-mode-show-type-products a,
#html-body.catalogsearch-result-index .page-wrapper .grid-mode-show-type-products a {
  cursor: pointer;
  transition: color var(--awa-dur-base, 200ms) ease, border-color var(--awa-dur-base, 200ms) ease, background-color var(--awa-dur-base, 200ms) ease;
}

#html-body.catalog-category-view .page-wrapper .item-product,
#html-body.catalogsearch-result-index .page-wrapper .item-product {
  cursor: pointer;
}

/* Hover estável — sem lift nos CTAs da PLP */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #html-body.catalog-category-view .page-wrapper .wrapper.grid.products-grid .item-product .btn-add-to-cart.action.tocart:hover,
  #html-body.catalogsearch-result-index .page-wrapper .wrapper.grid.products-grid .item-product .btn-add-to-cart.action.tocart:hover {
    transform: none !important;
  }
}

@media (max-width: 767px) {
  #html-body.catalog-category-view .page-wrapper .wrapper.grid.products-grid .item-product :is(.product-name, .product-item-name),
  #html-body.catalogsearch-result-index .page-wrapper .wrapper.grid.products-grid .item-product :is(.product-name, .product-item-name) {
    font-size: 0.75rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  #html-body.catalog-category-view .page-wrapper .toolbar.toolbar-products,
  #html-body.catalogsearch-result-index .page-wrapper .toolbar.toolbar-products {
    min-height: 0 !important;
    height: auto !important;
    padding: 8px 10px !important;
    margin: 6px 0 !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #html-body.catalog-category-view .page-wrapper .toolbar.toolbar-products::before,
  #html-body.catalog-category-view .page-wrapper .toolbar.toolbar-products::after,
  #html-body.catalogsearch-result-index .page-wrapper .toolbar.toolbar-products::before,
  #html-body.catalogsearch-result-index .page-wrapper .toolbar.toolbar-products::after {
    content: none !important;
    display: none !important;
  }

  #html-body.catalog-category-view .page-wrapper .toolbar.toolbar-products > .center,
  #html-body.catalogsearch-result-index .page-wrapper .toolbar.toolbar-products > .center {
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: stretch !important;
  }

  #html-body.catalog-category-view .page-wrapper .toolbar-products .toolbar-sorter.sorter,
  #html-body.catalogsearch-result-index .page-wrapper .toolbar-products .toolbar-sorter.sorter {
    width: 100% !important;
    min-height: 44px !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #html-body.catalog-category-view .page-wrapper .toolbar-products .sorter-label,
  #html-body.catalogsearch-result-index .page-wrapper .toolbar-products .sorter-label {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 8px 0 0 !important;
  }

  #html-body.catalog-category-view .page-wrapper .toolbar-products .sorter-options,
  #html-body.catalogsearch-result-index .page-wrapper .toolbar-products .sorter-options {
    min-height: 44px !important;
    height: 44px !important;
  }

  #html-body.catalog-category-view .page-wrapper .products.wrapper.grid.products-grid,
  #html-body.catalogsearch-result-index .page-wrapper .products.wrapper.grid.products-grid {
    padding-top: 12px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #html-body.catalog-category-view .page-wrapper .toolbar-products :is(a, button, select),
  #html-body.catalogsearch-result-index .page-wrapper .toolbar-products :is(a, button, select) {
    transition: none;
  }
}
