/* Idoscero adapter over Packaging's shared catalog and card styles. */
body.woocommerce-shop #content { padding-top: 20px; }
#tienda-layout.wfa-idoscero-shop { width: 100%; max-width: 1800px; margin: 0 auto 60px; padding: 0 20px; box-sizing: border-box; }
#tienda-layout .wca-shop-hero { --wca-hero-accent: #970018; grid-template-columns: minmax(0,1.3fr) minmax(340px,.85fr); border: 1px solid #e0dfdc; box-shadow: none; background: #f8f7f5; border-radius: 18px; }
#tienda-layout .wca-category-title__mark { flex-basis: 20px; width: 20px; height: 3px; }
#tienda-layout .wca-category-title__mark::before, #tienda-layout .wca-category-title__mark::after { display: none; }
#tienda-layout .wca-shop-hero h1 { font-size: clamp(27px,2.5vw,39px); }
#tienda-layout .wca-category-hero__content { padding: 20px 28px 22px; }
/* The text establishes the desktop hero height; the demo fits that space. */
#tienda-layout .wfa-shop-form-demo { display: grid; grid-template-rows: minmax(0,1fr) 18px; gap: 6px; contain: size; width: 100%; min-width: 0; min-height: 0; max-height: 248px; box-sizing: border-box; align-self: stretch; margin: 0; padding: 8px 12px; }
/* A slightly smaller, translucent illustration leaves air around the demo. */
#tienda-layout .wfa-shop-form-demo__window { position: relative; overflow: hidden; width: 100%; height: 100%; min-height: 0; border: 1px solid #d9d2cd; border-radius: 12px; background: #fffdfc; transform: scale(.94); transform-origin: center; opacity: .72; }
#tienda-layout .wfa-shop-form-demo iframe { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
#tienda-layout .wfa-shop-form-demo figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 0 3px; font-size: 11px; line-height: 18px; color: #716b66; white-space: nowrap; }
#tienda-layout .wfa-shop-form-demo [data-demo-toggle] { padding: 3px 0 3px 8px; border: 0; background: transparent; color: #970018; font: inherit; font-weight: 600; cursor: pointer; }
#tienda-layout .wfa-shop-form-demo [data-demo-toggle]:focus-visible { outline: 2px solid #970018; outline-offset: 3px; }
#tienda-layout .wca-shop-search { margin-top: 18px; }
#tienda-layout .wca-shop-search input { box-sizing: border-box; min-width: 0; padding-right: 45px; }
#tienda-layout [hidden] { display: none !important; }
#tienda-layout #fila-superior-filtros { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin: 24px 0; padding: 16px 0; background: transparent; border: 0; border-bottom: 1px solid #e7e4e2; }
#tienda-layout .wca-shop-tag-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#tienda-layout .wca-filtros-etiquetas__titulo { color: #555; }
#tienda-layout .etiqueta-filtro { width: auto; margin: 0; padding: 8px 13px; border: 1px solid #d5d1ce; border-radius: 7px; background: white; color: #555; font-size: 14px; font-weight: 500; cursor: pointer; }
#tienda-layout .etiqueta-filtro.activa { background: #970018; color: white; border-color: #970018; }
#tienda-layout #contenedor-ordenamiento { display: flex; align-items: center; gap: 8px; padding: 0; font-size: 13px; }
#tienda-layout #orden-productos { max-width: 210px; min-height: 38px; margin: 0; border: 1px solid #d5d1ce; border-radius: 7px; background: #fff; color: #444; }
#tienda-layout #contenedor-principal { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 30px; align-items: start; }
#tienda-layout #barra-lateral { display: block; width: auto; min-height: 0; padding: 0; position: static; background: transparent; }
#tienda-layout .shop-industries-filter__header { padding: 0; margin: 0 0 18px; }
#tienda-layout .shop-industries-filter__eyebrow { font-size: 11px; letter-spacing: .12em; color: #970018; text-transform: uppercase; margin: 0 0 7px; }
#tienda-layout .titulo-industrias-tienda { margin: 0 0 8px; color: #333; font-size: 23px; text-align: left; }
#tienda-layout .descripcion-filtros-industrias { margin: 0; color: #777; font-size: 14px; line-height: 1.5; }
#tienda-layout .lista-categorias-estatica { list-style: none; margin: 0; padding: 0; }
#tienda-layout .lista-categorias-estatica li { padding: 0; margin: 0; border: 0; }
#tienda-layout .lista-categorias-estatica button { display: flex; justify-content: space-between; width: 100%; gap: 10px; padding: 12px 10px; border: 0; border-bottom: 1px solid #e7e4e2; border-radius: 0; background: transparent; text-align: left; color: #555; font-weight: 500; font-size: 14px; }
#tienda-layout .lista-categorias-estatica button[aria-pressed="true"] { color: #970018; font-weight: 700; }
#tienda-layout #contenedor-principal-dinamico { width: 100%; min-width: 0; margin: 0; padding: 0; }
#tienda-layout .wfa-results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin: 0 0 16px; }
#tienda-layout .wfa-results-heading h2 { margin: 0; font-size: 23px; color: #333; }
#tienda-layout #wfa-result-count { margin: 0; font-size: 13px; color: #777; }
#tienda-layout #productos-tienda { min-width: 0; }
#tienda-layout ul.products { display: grid !important; grid-template-columns: repeat(auto-fill,minmax(min(100%,270px),320px)); align-items: stretch; gap: 22px; margin: 0; padding: 0; list-style: none; }
#tienda-layout ul.products::before, #tienda-layout ul.products::after { display: none; }
#tienda-layout ul.products[aria-busy="true"] { opacity: .55; pointer-events: none; }
/* Compact product cards share the approved editorial hierarchy across profiles. */
#tienda-layout ul.products { grid-template-columns: repeat(auto-fill,minmax(min(100%,260px),320px)); gap: 24px; }
#tienda-layout ul.products li.wfa-folleto-card { max-width: none; border: 1px solid #dbd6d1; border-radius: 10px; background: #fff; text-align: left; box-shadow: none; overflow: hidden; transition: border-color .15s ease; }
#tienda-layout ul.products li.wfa-folleto-card:hover { border-color: #948b83; box-shadow: none; }
#tienda-layout .wfa-folleto-card .producto-wrapper { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; height: 100%; padding: 0; }
#tienda-layout .wfa-folleto-card .wca-product-card-link--image { display: block; width: 100%; flex-shrink: 0; }
#tienda-layout .wfa-folleto-card .imagen-producto { position: relative; aspect-ratio: 1; border-radius: 0; background: #d3d3d3; overflow: hidden; border-bottom: 1px solid #e1ddd9; }
#tienda-layout .wfa-folleto-card .imagen-producto img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 0; transform: none; }
#tienda-layout .wfa-card-content { display: flex; flex: 1; flex-direction: column; width: 100%; min-width: 0; padding: 18px 20px 20px; box-sizing: border-box; }
#tienda-layout .wfa-folleto-card .wca-product-card-link--title { margin: 0 0 16px; text-decoration: none; }
#tienda-layout .wfa-folleto-card .wca-product-card-title { min-height: 0; margin: 0; text-align: left; line-height: 1.18; }
#tienda-layout .wca-product-card-title__model { font-size: 22px; font-weight: 700; letter-spacing: -.025em; white-space: normal; color: #272724; }
#tienda-layout .wfa-folleto-card .wca-product-card-link--title:hover .wca-product-card-title__model { color: #970018; }
#tienda-layout .wfa-card-view-product { display: flex; align-items: center; justify-content: space-between; align-self: flex-start; gap: 18px; width: auto; min-height: 44px; box-sizing: border-box; margin: auto 0 0; padding: 8px 12px; border: 1px solid #970018; border-radius: 5px; background: #970018; color: #fff; font-size: 14px; font-weight: 700; line-height: 1.5; text-decoration: none; }
#tienda-layout .wfa-card-view-product:hover { border-color: #740013; background: #740013; color: #fff; text-decoration: none; }
#tienda-layout .wfa-card-view-product > span:last-child { font-size: 18px; font-weight: 400; line-height: 1; }
/* Preserve the existing production badge over the image. */
#tienda-layout .wfa-card-production { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 24px); box-sizing: border-box; margin: 0; padding: 7px 10px; border-radius: 6px; background: #fff; color: #484440; box-shadow: 0 1px 4px #0000000d; text-align: left; font-size: 11px; font-weight: 500; line-height: 1.4; pointer-events: none; }
#tienda-layout .wfa-card-production svg { flex: 0 0 14px; }
@media (prefers-reduced-motion: reduce) { #tienda-layout ul.products li.wfa-folleto-card { transition: none; } }
#tienda-layout .wfa-shop-empty-state { grid-column: 1 / -1; padding: 36px 20px; border-radius: 10px; background: #f8f7f5; text-align: center; }
#tienda-layout .wfa-catalog-note, #tienda-layout .wfa-catalog-status { font-size: 12px; color: #777; margin-top: 22px; }
#tienda-layout .wfa-catalog-status:empty { display: none; }
#tienda-layout #paginacion:not([hidden]) { display: flex !important; align-items: center; justify-content: center; gap: 15px; }
#tienda-layout #paginacion a { padding: 8px 12px; border-radius: 7px; font-size: 13px; }
#tienda-layout button:focus-visible, #tienda-layout a:focus-visible { outline: 2px solid #970018; outline-offset: 3px; }
@media (max-width: 1000px) {
  #tienda-layout .wca-shop-hero { grid-template-columns: 1fr; }
  #tienda-layout .wfa-shop-form-demo { contain: none; height: 228px; align-self: center; }
  #tienda-layout #contenedor-principal { grid-template-columns: 175px minmax(0,1fr); gap: 20px; }
}
@media (max-width: 700px) {
  #tienda-layout.wfa-idoscero-shop { padding: 0 14px; }
  #tienda-layout .wca-category-hero__content { padding: 22px 18px; }
  #tienda-layout .wca-category-title__mark { display: none; }
  #tienda-layout .wca-category-hero h1 { font-size: 29px; }
  #tienda-layout #contenedor-principal { display: block; }
  #tienda-layout #barra-lateral { margin-bottom: 24px; }
  #tienda-layout .shop-industries-filter__header { display: none; }
  #tienda-layout .lista-categorias-estatica { display: flex; gap: 14px; flex-wrap: wrap; }
  #tienda-layout .lista-categorias-estatica button { padding: 8px 0; }
  #tienda-layout .lista-categorias-estatica button span { display: none; }
  #tienda-layout #fila-superior-filtros { margin: 18px 0; gap: 15px; }
  #tienda-layout .wca-filtros-etiquetas__titulo { flex-basis: 100%; }
  #tienda-layout #contenedor-ordenamiento { width: 100%; justify-content: space-between; }
  #tienda-layout ul.products { grid-template-columns: repeat(auto-fill,minmax(min(100%,260px),320px)); justify-content: center; }
  #tienda-layout .wfa-results-heading h2 { font-size: 21px; }
  #tienda-layout ul.products li.wfa-folleto-card { max-width: none; }
}

@media (max-width: 700px) {
  #tienda-layout .wfa-card-content { padding: 20px 18px; }
  #tienda-layout .wfa-folleto-card .imagen-producto { aspect-ratio: 1; }
}

#tienda-layout .wfa-load-more { margin-top: 24px; text-align: center; }
#tienda-layout [data-load-sentinel] { height: 1px; }
#tienda-layout [data-loaded-count] { margin: 0 0 12px; color: #625e5b; font-size: 13px; }
#tienda-layout [data-load-more] { min-height: 44px; padding: 9px 18px; border: 1px solid #970018; border-radius: 5px; background: #fff; color: #970018; font-size: 14px; font-weight: 700; }
#tienda-layout [data-load-more]:disabled { opacity: .65; cursor: wait; }
#tienda-layout #paginacion a { display: inline-flex; align-items: center; min-height: 44px; color: #970018; border: 1px solid #970018; text-decoration: none; }
#tienda-layout #paginacion a[aria-disabled="true"] { opacity: .6; pointer-events: none; }

/* Appending a batch must not anchor the viewport to the moving footer. */
@media (max-width: 700px) {
  #tienda-layout, body.woocommerce-shop .custom-footer { overflow-anchor: none; }
}
