.ml-loop, .ml-loop * { box-sizing: border-box; }
.ml-loop { --ml-active-cols:var(--ml-cols); --ml-active-pad:var(--ml-pad); --ml-active-title:var(--ml-title); --ml-active-font:var(--ml-font); width:100%; min-width:0; color:var(--ml-text); }
.ml-loop .ml-items { display:grid; grid-template-columns:repeat(var(--ml-active-cols),minmax(0,1fr)); gap:var(--ml-gap); align-items:stretch; }
.ml-loop .ml-item { display:flex; min-width:0; margin:0; padding:0; }
.ml-loop .ml-card { display:flex; flex-direction:column; flex:1; width:100%; min-width:0; background:var(--ml-bg); border:1px solid var(--ml-line); }
/* All cells keep identical geometry. Border overlays do not change image widths. */
.ml-loop.ml-connected:not(.ml-layout-masonry):not(.ml-layout-carousel) .ml-items { position:relative; gap:0; padding:0; background:var(--ml-bg); }
.ml-loop.ml-connected:not(.ml-layout-masonry):not(.ml-layout-carousel) .ml-items::before { content:""; position:absolute; inset:0; border:1px solid var(--ml-line); pointer-events:none; z-index:3; }
.ml-loop.ml-connected:not(.ml-layout-masonry):not(.ml-layout-carousel) .ml-item { position:relative; }
.ml-loop.ml-connected:not(.ml-layout-masonry):not(.ml-layout-carousel) .ml-item::after { content:""; position:absolute; inset:0; border-right:1px solid var(--ml-line); border-bottom:1px solid var(--ml-line); pointer-events:none; z-index:2; }
.ml-loop.ml-connected .ml-items:empty::before { display:none; }
.ml-loop.ml-connected:not(.ml-layout-masonry):not(.ml-layout-carousel) .ml-card { border:0; }
.ml-loop.ml-connected .ml-item { background:var(--ml-bg); }
.ml-loop .ml-image { flex-shrink:0; width:100%; aspect-ratio:var(--ml-ratio); overflow:hidden; background:var(--ml-bg); }
.ml-loop .ml-image > a { display:flex; align-items:center; justify-content:center; width:100%; height:100%; padding:0; margin:0; }
.ml-loop .ml-image img { display:block; width:100%; height:100%; max-width:100%; object-fit:var(--ml-fit); margin:0; transition:transform .25s ease; }
.ml-loop .ml-placeholder { display:block; width:100%; height:100%; background:linear-gradient(135deg,#fafafa,#f1f1f1); }
.ml-loop .ml-content { display:flex; flex-direction:column; flex:1; gap:6px; width:100%; min-width:0; padding:var(--ml-active-pad); border-top:1px solid var(--ml-line); }
.ml-loop .ml-title { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:var(--ml-lines); overflow:hidden; overflow-wrap:anywhere; flex-shrink:0; width:100%; height:calc(var(--ml-lines) * 1.4em); min-height:calc(var(--ml-lines) * 1.4em); margin:0!important; padding:0; font-size:var(--ml-active-title); font-weight:400; line-height:1.4; text-transform:uppercase; }
.ml-loop .ml-title a { font:inherit; color:inherit; text-decoration:none; }
.ml-loop .ml-description { font-size:var(--ml-active-font); line-height:1.5; overflow-wrap:anywhere; }
.ml-loop .ml-description p { margin:0; }
.ml-loop .ml-footer { display:flex; justify-content:space-between; align-items:flex-end; gap:12px; min-height:18px; margin-top:auto; }
.ml-loop .ml-price { flex:1; min-width:0; font-size:var(--ml-active-font); line-height:1.4; text-align:start; }
.ml-loop .ml-price .price { display:block; margin:0; font:inherit; color:inherit; text-align:start; }
.ml-loop .ml-price del { opacity:.5; font-size:.85em; margin-inline-end:4px; }
.ml-loop .ml-price ins { text-decoration:none; background:transparent; }
.ml-loop .ml-bag { position:static; display:inline-flex; align-items:center; justify-content:center; flex:0 0 18px; width:18px; height:20px; margin:0; padding:0; color:inherit; text-decoration:none; }
.ml-loop .ml-bag svg { display:block; width:14px; height:18px; }
.ml-loop .ml-title a:hover,.ml-loop .ml-bag:hover { color:var(--ml-accent); }
.ml-loop a:focus-visible,.ml-loop button:focus-visible,.ml-loop input:focus-visible { outline:2px solid var(--ml-accent); outline-offset:3px; }
.ml-loop .ml-filters,.ml-loop .ml-pagination,.ml-loop .ml-carousel-controls { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:8px; margin:16px 0; }
.ml-loop .ml-filters a,.ml-loop .ml-pagination a,.ml-loop .ml-pagination span,.ml-loop .ml-carousel-controls button,.ml-loop .ml-search button { display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:6px 12px; border:1px solid var(--ml-line); background:var(--ml-bg); color:var(--ml-text); font:inherit; font-size:13px; line-height:1.4; text-decoration:none; border-radius:0; }
.ml-loop .ml-filters [aria-current],.ml-loop .ml-pagination .current { border-color:var(--ml-accent); box-shadow:inset 0 -2px var(--ml-accent); }
.ml-loop button { cursor:pointer; }
.ml-loop button:disabled { opacity:.4; cursor:default; }
.ml-loop .ml-search { display:flex; justify-content:flex-end; gap:8px; margin:0 0 16px; }
.ml-loop .ml-search input { width:100%; max-width:260px; min-height:36px; padding:6px 10px; border:1px solid var(--ml-line); border-radius:0; }
.ml-loop .ml-empty { padding:24px; text-align:center; }
.ml-loop .screen-reader-text { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.ml-loop.ml-layout-list .ml-items { grid-template-columns:1fr; }
.ml-loop.ml-layout-list .ml-card { flex-direction:row; }
.ml-loop.ml-layout-list .ml-image { width:28%; max-width:260px; }
.ml-loop.ml-layout-list .ml-content { border-top:0; border-inline-start:1px solid var(--ml-line); }
.ml-loop.ml-layout-masonry .ml-items { display:block; columns:var(--ml-active-cols); column-gap:max(1px,var(--ml-gap)); }
.ml-loop.ml-layout-masonry .ml-item { break-inside:avoid; margin-bottom:max(1px,var(--ml-gap)); }
.ml-loop.ml-layout-masonry .ml-image { aspect-ratio:auto; }
.ml-loop.ml-layout-masonry .ml-image img { height:auto; }
.ml-loop.ml-layout-masonry .ml-title { height:auto; }
.ml-loop.ml-layout-carousel .ml-items { display:grid; grid-auto-flow:column; grid-template-columns:none; grid-auto-columns:calc((100% - (var(--ml-active-cols) - 1) * max(1px,var(--ml-gap))) / var(--ml-active-cols)); gap:max(1px,var(--ml-gap)); overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory; scrollbar-width:thin; }
.ml-loop.ml-layout-carousel .ml-item { scroll-snap-align:start; }
.ml-loop [aria-busy="true"] { opacity:.65; pointer-events:none; }
.ml-gallery { display:grid; grid-template-columns:repeat(auto-fit,minmax(90px,1fr)); gap:8px; }
.ml-gallery img { width:100%; height:auto; }
@media (hover:hover) { .ml-loop .ml-card:hover .ml-image img { transform:scale(1.035); } }
@media (max-width:1024px) { .ml-loop { --ml-active-cols:var(--ml-cols-md); --ml-active-pad:var(--ml-pad-md); --ml-active-title:var(--ml-title-md); --ml-active-font:var(--ml-font-md); } }
@media (max-width:767px) { .ml-loop { --ml-active-cols:var(--ml-cols-sm); --ml-active-pad:var(--ml-pad-sm); --ml-active-title:var(--ml-title-sm); --ml-active-font:var(--ml-font-sm); } .ml-loop .ml-filters { justify-content:flex-start; } }
@media (prefers-reduced-motion:reduce) { .ml-loop .ml-image img { transition:none; } }
