/* Compact product grid. CSS stays scoped to the catalogue results. */
#results .product[data-tone="1"],.categories .category[data-tone="1"]{--tone:#1768df;--tint:#edf3ff;--edge:#a8c8fa}
#results .product[data-tone="2"],.categories .category[data-tone="2"]{--tone:#087e83;--tint:#e8f7f5;--edge:#9cd8d1}
#results .product[data-tone="3"],.categories .category[data-tone="3"]{--tone:#217797;--tint:#eaf6fb;--edge:#9bcedf}
#results .product[data-tone="4"],.categories .category[data-tone="4"]{--tone:#188467;--tint:#edf8ef;--edge:#a8d8bc}
#results .product[data-tone="5"],.categories .category[data-tone="5"]{--tone:#0b8077;--tint:#edf8f5;--edge:#b0d9cf}
body[data-view=catalogo] #results{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:start}
body[data-view=catalogo] #results .product{padding:10px;border:1px solid #e9eff3;border-radius:18px;background:white;gap:10px;justify-content:flex-start;overflow:hidden;box-shadow:0 4px 14px #173f5106;transition:transform 200ms,border-color 200ms}
body[data-view=catalogo] #results .product:hover{border-color:var(--edge);transform:translateY(-2px);box-shadow:0 6px 18px #173f5109}
#results .product-info{display:flex;flex-direction:column;align-items:stretch;gap:10px}
#results .product-visual{position:relative;width:100%;border-radius:13px;background:transparent;overflow:hidden;isolation:isolate}
#results .product .product-photo{position:relative;z-index:1;width:100%;height:185px;object-fit:contain;padding:40px 8px 8px;margin:0;border:0;border-radius:0;background:transparent;mix-blend-mode:normal;opacity:1;filter:none}
#results .product .product-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--tone);gap:8px}
#results .product-category-label{position:absolute;z-index:2;top:8px;left:8px;display:flex;align-items:center;gap:5px;max-width:calc(100% - 48px);padding:5px 7px;margin:0;border:0;border-radius:20px;background:var(--tint);color:var(--tone);font-size:9px;line-height:1.35;font-weight:650}
#results .product-category-label svg{width:15px;height:15px;flex-shrink:0}
#results .product .favorite-heart{position:absolute;top:18px;right:18px;width:29px;height:29px;background:white;border:0;border-radius:50%;box-shadow:0 2px 7px #163f5110;z-index:3;font-size:22px;color:#8296a7}
#results .product .favorite-heart[aria-pressed=true]{color:#b83f78;background:#fff0f6}
#results .product .product-description{min-width:0;padding:0 3px}
#results .product .meta{gap:6px;min-height:21px;align-items:center;font-size:8px;color:#6e8192}
#results .product .lab{background:var(--tint);color:var(--tone);border-radius:6px;padding:4px 6px;font-size:9px}
#results .product h3{font-size:12px;line-height:1.5;min-height:0;margin:8px 0;color:#112b49;overflow-wrap:anywhere}
#results .product-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:9px 0}
#results .product-fact:last-child:nth-child(odd){grid-column:1/-1}
#results .product-fact{display:flex;align-items:center;gap:5px;padding:8px 6px;border-radius:10px;min-width:0;min-height:53px;background:#f4f0ff;color:#7950ce}
#results .product-fact>span{display:grid;place-items:center;width:25px;height:25px;flex-shrink:0;border-radius:50%;background:#e9e1fd}
#results .product-fact svg{width:19px;height:19px;stroke-width:1.8}
#results .product-fact dt{font-size:8px;line-height:1.5;margin-bottom:2px}
#results .product-fact dd{font-size:10px;line-height:1.4;font-weight:650;color:#17334e;margin:0;overflow-wrap:anywhere}
#results .fact-measure{background:#eaf8f3;color:#0a8c76}#results .fact-measure>span{background:#d4f1e5}
#results .fact-content{background:#fff0f6;color:#c03b77}#results .fact-content>span{background:#fbe0ed}
#results .fact-pack{background:#fff7e8;color:#bf8717}#results .fact-pack>span{background:#ffedc8}
#results .product-catalog-description{padding:9px 10px;border-radius:11px;background:#edf5ff;margin-top:9px}
#results .description-label{display:flex;align-items:center;gap:6px;color:#1769db;font-size:10px;font-weight:650;margin-bottom:4px}
#results .description-label svg{width:23px;height:23px;color:#fff;background:#1769e9;border-radius:6px;padding:4px;flex-shrink:0}
#results .product .substance{font-size:10px;line-height:1.6;color:#61758c}
#results .product .detail{font-size:9px;color:#286a9a;padding:5px 0}
#results .product-order{margin:0 3px 2px;border-top:1px solid #e7eef1;padding-top:10px}
#results .product .price-row strong{font-size:22px;color:#137c70}
#results .product .price-login{font-size:10px;line-height:1.7}
#results .quantity-caption{font-size:9px;color:#6d8391;margin-top:9px;gap:5px;flex-wrap:wrap}
#results .product .product-actions{display:flex;gap:7px;margin-top:8px;align-items:stretch}
#results .product .product-order .qty{padding:3px;gap:0;border:1px solid #dae5ed;background:#f3f6f9;border-radius:10px;flex-shrink:0}
#results .product .product-order .qty input{width:27px;font-size:12px;padding:5px 0}
#results .product .product-order .qty button{width:26px;height:33px;border:0;background:white;color:#234662;font-size:19px;border-radius:7px}
#results .product .product-order .add{display:flex;align-items:center;justify-content:center;gap:5px;flex:1;max-width:none;min-width:0;padding:10px 6px;min-height:41px;background:var(--tone);color:white;font-size:10px;line-height:1.3;white-space:normal;border-radius:10px;box-shadow:none}
#results .product .add svg{width:17px;height:17px;flex-shrink:0}#results .product .add:hover{filter:brightness(.93)}
#results .product button:focus-visible{outline:2px solid var(--tone);outline-offset:2px}
@media(max-width:1099px) and (min-width:850px){body[data-view=catalogo] #results{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:849px) and (min-width:601px){body[data-view=catalogo] #results{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){body[data-view=catalogo] #results{grid-template-columns:1fr;gap:15px}body[data-view=catalogo] #results .product{padding:12px;gap:10px}#results .product .product-photo{height:195px;padding:40px 10px 8px}#results .product h3{font-size:14px;min-height:0}#results .product .lab{font-size:10px}#results .product-fact dt{font-size:9px}#results .product-fact dd{font-size:12px}#results .product-fact>span{width:30px;height:30px}#results .product-fact{padding:9px;gap:8px}#results .product .product-order .qty button{width:34px;height:37px}#results .product .product-order .qty input{width:35px}#results .product .product-order .add{font-size:12px;min-height:45px}#results .product .substance{font-size:11px}}
@media(prefers-reduced-motion:reduce){body[data-view=catalogo] #results .product{transition:none}body[data-view=catalogo] #results .product:hover{transform:none}}
.catalog-search-label{font-size:13px;font-weight:650;color:#204b5a;margin:5px 0 10px}
body[data-view=catalogo] .search{height:64px;border:1px solid #bdd9d7;border-radius:14px;background:#fff;box-shadow:0 4px 14px #153f5106;padding:0 18px;top:96px;scroll-margin-top:112px;z-index:20}
body[data-view=catalogo] .search:focus-within{border-color:#188c83;box-shadow:0 0 0 3px #22a99c16}
body[data-view=catalogo] .search input{font-size:15px;color:#173f51;min-width:0;padding:14px 12px}
body[data-view=catalogo] .search input::placeholder{color:#6f8791;opacity:1}
body[data-view=catalogo] .search input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
body[data-view=catalogo] .search>span{color:#19877e}
body[data-view=catalogo] .search button{width:34px;height:34px;flex-shrink:0;background:#edf5f3;border-radius:9px;color:#28746f;display:grid;place-items:center}
.catalog-search-help{font-size:11px;color:#6c838c;margin:9px 3px 0;line-height:1.7}
.categories .category{background:var(--tint,#fff);color:var(--tone,#456b7e);border-color:var(--edge,#dfe9ec)}
.categories .category.active{color:white;background:#183f52;border-color:#183f52}
@media(max-width:700px){body[data-view=catalogo] .search{top:78px;height:56px;padding:0 12px;border-radius:12px;scroll-margin-top:90px}body[data-view=catalogo] .search input{font-size:16px;padding:10px 8px}.catalog-search-label{font-size:12px;margin-bottom:9px}.catalog-search-help{font-size:10px;max-width:320px}.categories{padding-top:12px}.categories .category{font-size:10px}}
/* Fit the visible package instead of the source photo's empty margins. */
#results .product-image-frame{height:185px;padding:40px 8px 8px;display:flex;align-items:center;justify-content:center;position:relative;z-index:1}
#results .product-image-crop{width:min(100%,calc(137px * var(--image-ratio)));aspect-ratio:var(--image-ratio);position:relative;overflow:hidden}
#results .product-image-crop .product-photo{position:absolute;max-width:none;height:auto;padding:0;border:0;border-radius:0}
@media(max-width:600px){#results .product-image-frame{height:195px;padding:40px 10px 8px}#results .product-image-crop{width:min(100%,calc(147px * var(--image-ratio)))}}
/* Standard rows preserve a clear left-to-right catalogue order. */
@media(min-width:601px){
 body[data-view=catalogo] #results{align-items:stretch}
 #results .product-order{margin-top:auto}
 body[data-view=catalogo] #results .product-no-photo .product-placeholder{height:185px}
}
#results .product-no-photo .product-placeholder{height:96px;padding:42px 8px 12px;flex-direction:row;background:transparent}
#results .product-no-photo .product-placeholder svg{width:25px;height:25px}
/* iOS does not auto-zoom focused controls at 16px. Pinch zoom stays available. */
@media(max-width:1024px) and (pointer:coarse){
 body[data-view=catalogo] .search input,body[data-view=catalogo] .toolbar select,
 body[data-view=catalogo] #results .product .product-order .qty input,
 body[data-view=catalogo] #drawer-root :is(input,select,textarea){font-size:16px}
 body[data-view=catalogo] #results .product .product-order .qty input{width:35px}
}
