/* Only structural behavior; component values come from block controls/theme presets. */
.ybc { min-width:0; max-width:100%; box-sizing:border-box; color:inherit; font:inherit; }
.ybc *, .ybc *::before, .ybc *::after { box-sizing:border-box; }
.ybc [hidden] { display:none !important; }
.ybc .ybc-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,max(var(--ybc-card-min),calc((100% - (var(--ybc-max-columns) - 1)*var(--ybc-gap))/var(--ybc-max-columns)))),1fr)); gap:var(--ybc-gap); }
.ybc button, .ybc select { font:inherit; max-width:100%; }
.ybc .ybc-card { display:flex; align-items:center; gap:var(--ybc-gap); width:100%; padding:var(--ybc-card-padding); border:1px solid currentColor; border-radius:var(--ybc-radius); background:var(--ybc-card-bg,var(--wp--preset--color--crema,transparent)); color:inherit; text-align:start; cursor:pointer; overflow-wrap:anywhere; }
.ybc .ybc-card img { width:var(--ybc-card-padding); min-width:2em; height:2em; object-fit:contain; }
.ybc .ybc-card[aria-pressed="true"] { outline:2px solid var(--ybc-accent,currentColor); outline-offset:-2px; }
.ybc :is(button,select):focus-visible { outline:3px solid var(--ybc-accent,currentColor); outline-offset:3px; }
.ybc .ybc-subsection, .ybc .ybc-form, .ybc .ybc-results { margin-block-start:var(--wp--preset--spacing--medium,1.5em); }
.ybc .ybc-controls { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,var(--ybc-control-min)),1fr)); gap:var(--ybc-gap); }
.ybc .ybc-controls label { display:flex; flex-direction:column; gap:.4em; min-width:0; }
.ybc select { width:100%; padding:.6em; border:1px solid currentColor; color:inherit; background:var(--ybc-card-bg,var(--wp--preset--color--crema,transparent)); border-radius:var(--ybc-radius); }
.ybc .ybc-actions { display:flex; flex-wrap:wrap; gap:var(--ybc-gap); margin-block-start:var(--ybc-gap); }
.ybc .ybc-actions button { padding:.6em 1em; border:1px solid currentColor; border-radius:var(--ybc-radius); cursor:pointer; }
.ybc .ybc-submit { background:var(--ybc-accent,var(--wp--preset--color--tinta,transparent)); color:var(--wp--preset--color--crema,inherit); }
.ybc .ybc-reset { background:transparent; color:inherit; }
.ybc .ybc-status:empty, .ybc .ybc-results:empty { display:none; }
.ybc .ybc-results { display:grid; gap:var(--ybc-gap); }
.ybc .ybc-result { border:1px solid currentColor; border-radius:var(--ybc-radius); padding:var(--ybc-card-padding); overflow-wrap:anywhere; }
.ybc .ybc-result h3 { margin-block-start:0; }

/* Shared result presentation; taxonomy cards and query controls keep their own settings. */
.ybc .ybc-results { container: ybc-results / inline-size; }
.ybc .ybc-result-set { min-width:0; font-size:var(--ybc-result-type-size,16px); font-family:var(--ybc-result-family,inherit); font-weight:var(--ybc-result-weight,inherit); text-align:var(--ybc-result-align,start); color:var(--ybc-result-text,inherit); }
.ybc .ybc-microcards { display:grid; grid-template-columns:minmax(0,1fr); gap:var(--ybc-result-card-gap,12px); }
.ybc .ybc-microcard { display:grid; grid-template-columns:minmax(0,1fr); gap:var(--ybc-result-content-gap,12px); padding:var(--ybc-result-padding,16px); margin-block:var(--ybc-result-card-margin,0px); border:var(--ybc-result-border-width,1px) var(--ybc-result-border-style,solid) var(--ybc-result-border,currentColor); border-radius:var(--ybc-result-radius,8px); background:var(--ybc-result-bg,transparent); }
.ybc .ybc-result-photo { display:flex; align-items:center; justify-content:center; min-width:0; min-height:0; width:min(100%,var(--ybc-result-photo-width,128px)); align-self:start; aspect-ratio:var(--ybc-result-photo-ratio,1 / 1); padding:4px; border:1px dashed currentColor; text-align:center; font-size:.8em; overflow-wrap:anywhere; }
.ybc .ybc-result-photo img { width:100%; height:100%; object-fit:contain; }
.ybc .ybc-result-info { min-width:0; container: ybc-info / inline-size; }
.ybc .ybc-result-actions { min-width:0; container:ybc-action-area / inline-size; align-self:var(--ybc-result-actions-vertical-align,start); }
.ybc .ybc-result-info h3 { margin:0 0 .5em; font-size:1.15em; line-height:1.35; }
.ybc .ybc-result-info p { margin:0 0 .65em; }
.ybc .ybc-result-state { font-size:.875em; }
.ybc .ybc-result-summary { display:inline-block; margin-top:.75em; margin-bottom:0; text-decoration:none !important; color:var(--ybc-result-summary-color,inherit); font-weight:var(--ybc-result-summary-weight,600); }
.ybc .ybc-result-links { display:grid; grid-template-columns:minmax(0,1fr); width:min(100%,var(--ybc-result-button-width,184px)); gap:var(--ybc-result-button-gap,8px); margin-top:var(--ybc-result-button-margin,8px); }
.ybc .ybc-result-link-disabled { display:flex; flex-direction:column; justify-content:center; min-height:44px; min-height:max(44px,var(--ybc-result-button-height,44px)); padding:var(--ybc-result-button-padding,8px); border:var(--ybc-result-button-border-width,1px) var(--ybc-result-button-border-style,dashed) var(--ybc-result-button-border,currentColor); border-radius:var(--ybc-result-button-radius,8px); background:var(--ybc-result-button-bg,transparent); color:var(--ybc-result-button-text,inherit); text-align:var(--ybc-result-button-align,center); font-family:var(--ybc-result-button-family,inherit); font-size:var(--ybc-result-button-type-size,16px); font-weight:var(--ybc-result-button-weight,inherit); overflow-wrap:anywhere; }
.ybc .ybc-result-link-disabled small { display:block; font-size:.8em; font-weight:400; }
.ybc .ybc-summary-title { margin-block:1.25em .5em; }
.ybc .ybc-table-hint { font-size:.875em; }
.ybc .ybc-table-scroll { width:100%; max-width:100%; min-width:0; overflow-x:auto; border:var(--ybc-result-table-border-width,1px) var(--ybc-result-table-border-style,solid) var(--ybc-result-table-border,currentColor); border-radius:var(--ybc-result-radius,8px); background:var(--ybc-result-table-bg,var(--ybc-result-bg,transparent)); }
.ybc .ybc-summary-table { border-collapse:separate; border-spacing:var(--ybc-result-table-spacing,0px); width:100%; table-layout:fixed; margin:0; color:var(--ybc-result-table-text,inherit); font-family:var(--ybc-result-table-family,inherit); font-size:var(--ybc-result-table-type-size,16px); font-weight:var(--ybc-result-table-weight,inherit); }
.ybc .ybc-summary-table caption { text-align:var(--ybc-result-table-align,start); padding:var(--ybc-result-table-padding,12px); }
.ybc .ybc-summary-table th, .ybc .ybc-summary-table td { width:200px; padding:var(--ybc-result-table-padding,12px); border:var(--ybc-result-table-border-width,1px) var(--ybc-result-table-border-style,solid) var(--ybc-result-table-border,currentColor); vertical-align:top; text-align:var(--ybc-result-table-align,start); overflow-wrap:anywhere; }
.ybc .ybc-summary-table th { background:var(--ybc-result-table-head-bg,transparent); color:var(--ybc-result-table-head-text,inherit); font-weight:var(--ybc-result-table-head-weight,700); }
.ybc .ybc-summary-table tr > :first-child { width:160px; }
.ybc .ybc-summary-table ul { padding-inline-start:1.2em; margin:0; }
.ybc .ybc-summary-table li + li { margin-top:.5em; }
.ybc .ybc-result-set :focus-visible { outline:3px solid currentColor; outline-offset:2px; }
/* Stack on small containers; retain readable information before adding columns. */
@container ybc-results (min-width:600px) {
 .ybc .ybc-microcard { grid-template-columns:min(var(--ybc-result-photo-width,128px),35%) minmax(0,1fr); column-gap:var(--ybc-result-photo-info-gap,50px); }
 .ybc .ybc-result-photo { grid-column:1; grid-row:1 / span 2; width:100%; }
 .ybc .ybc-result-info { grid-column:2; grid-row:1; }
 .ybc .ybc-result-actions { grid-column:2; grid-row:2; }
}
@container ybc-results (min-width:900px) {
 .ybc .ybc-microcard { grid-template-columns:min(var(--ybc-result-photo-width,128px),max(72px,calc(100% - var(--ybc-result-photo-info-gap,50px) - var(--ybc-result-info-actions-gap,50px) - min(var(--ybc-result-button-width,184px),24%) - 240px))) var(--ybc-result-photo-info-gap,50px) minmax(0,1fr) var(--ybc-result-info-actions-gap,50px) min(var(--ybc-result-button-width,184px),24%); column-gap:0; }
 .ybc .ybc-result-photo { grid-column:1; grid-row:1; }
 .ybc .ybc-result-info { grid-column:3; grid-row:1; }
 .ybc .ybc-result-actions { grid-column:5; grid-row:1; }
}
@container ybc-action-area (min-width:260px) {
 .ybc .ybc-result-links { grid-template-columns:repeat(2,minmax(0,1fr)); width:min(100%,calc(2 * var(--ybc-result-button-width,184px) + var(--ybc-result-button-gap,8px))); }
}

/* Card typography is independent of filter labels, buttons and results. */
.ybc .ybc-card { font-family:var(--ybc-card-font-family,inherit); font-weight:var(--ybc-card-font-weight,inherit); text-align:var(--ybc-card-text-align,start); }
.ybc .ybc-card > span { flex:1; min-width:0; text-align:inherit; color:var(--ybc-card-text-color,inherit); }

/* Action overrides are opt-in, retaining the existing defaults and keyboard focus. */
.ybc .ybc-actions { gap:var(--ybc-action-gap,var(--ybc-gap)); justify-content:var(--ybc-action-justify,flex-start); margin-block-start:var(--ybc-action-margin-top,var(--ybc-gap)); }
.ybc .ybc-actions button { font-family:var(--ybc-action-font-family,inherit); font-weight:var(--ybc-action-font-weight,inherit); text-align:var(--ybc-action-text-align,inherit); padding:var(--ybc-action-padding,.6em) var(--ybc-action-padding,1em); border-radius:var(--ybc-action-radius,var(--ybc-radius)); min-width:min(100%,var(--ybc-action-min,0px)); overflow-wrap:anywhere; flex-basis:var(--ybc-action-basis,auto); }
.ybc .ybc-submit { background:var(--ybc-action-bg,var(--ybc-accent,var(--wp--preset--color--tinta,transparent))); color:var(--ybc-action-text,var(--wp--preset--color--crema,inherit)); }
.ybc .ybc-reset { background:var(--ybc-action-bg,transparent); color:var(--ybc-action-text,inherit); }

/* Plain price-position link, separate from the two existing actions. */
.ybc .ybc-result-price-check { font:inherit; color:inherit; background:none; border:0; padding:0; text-decoration:underline; }
.ybc .ybc-result-links a.ybc-result-link-disabled { text-decoration:none; }

.ybc .ybc-result-price-check[aria-disabled="true"] { text-decoration:none; }

/* Approved product presentation; reuse all existing 51 visual custom properties. */
.ybc .ybc-product-short-description { line-height:1.4; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
.ybc .ybc-product-advantages ul,.ybc .ybc-product-disadvantages ul { margin:.25em 0 .65em; padding-inline-start:1.2em; }
.ybc .ybc-product-price { display:grid; grid-template-columns:auto minmax(0,1fr); gap:.5em; align-items:baseline; margin-block:.65em; }
.ybc .ybc-product-price .ybc-result-price-check { text-align:right; overflow-wrap:anywhere; }
.ybc .ybc-result-summary.ybc-result-link-disabled { background:transparent; color:var(--ybc-result-summary-color,inherit); font-weight:var(--ybc-result-summary-weight,600); width:min(100%,var(--ybc-result-button-width,184px)); text-decoration:none; }
.ybc .ybc-result-photo { padding:0; border-style:solid; }
.ybc .ybc-result-photo img { display:block; }
@container ybc-action-area (min-width:260px) {
 .ybc .ybc-result-summary.ybc-result-link-disabled { width:min(var(--ybc-result-button-width,184px),calc((100% - var(--ybc-result-button-gap,8px))/2)); }
}
.ybc .ybc-product-short-description { max-width:65ch; }

/* Each supplier is a normal inline label/link pair inside the information area. */
.ybc .ybc-product-price { display:block; }
.ybc .ybc-provider-line { display:block; margin:0 0 .25em; text-align:start; overflow-wrap:anywhere; }
.ybc .ybc-provider-line .ybc-provider-label,.ybc .ybc-provider-line .ybc-provider-query { display:inline; float:none; position:static; }
.ybc .ybc-provider-query { font:inherit; text-align:start; color:inherit; }
.ybc .ybc-provider-line { white-space:nowrap; max-width:100%; overflow-x:auto; }

/* Public catalogue-pending presentation: readable without JavaScript. */
.ybc .ybc-notice { padding:1em 0; border:0; background:transparent; text-align:center; font-weight:700; line-height:1.5; }
.ybc .ybc-submit:disabled { cursor:not-allowed; opacity:.7; }
