/* 1.18.2: explicit grid vs slider; loaded last to override old mobile carousel defaults */
.storefront [data-home-section="bestsellers"] .neo-rank-grid.cms-bestseller-grid{display:grid!important;grid-template-columns:repeat(var(--widget-desktop-cards,4),minmax(0,1fr))!important;overflow:visible!important;gap:12px}
.storefront [data-home-section="bestsellers"] .neo-rank-grid.cms-bestseller-slider{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;scroll-snap-type:x proximity;gap:12px;scrollbar-width:thin}
.storefront [data-home-section="bestsellers"] .neo-rank-grid.cms-bestseller-slider>.neo-rank-item{flex:0 0 calc((100% - (var(--widget-desktop-cards,4) - 1)*12px)/var(--widget-desktop-cards,4));min-width:0;scroll-snap-align:start}
.storefront [data-home-section="catalog"] .neo-grid-products:not(.cms-catalog-slider){display:grid!important;grid-template-columns:repeat(var(--widget-desktop-cards,4),minmax(0,1fr))!important;overflow:visible!important;gap:12px}
.storefront [data-home-section="catalog"] .neo-grid-products:not(.cms-catalog-slider)>.neo-grid-card{width:auto!important;flex-basis:auto!important;max-width:none!important;min-width:0!important}
.storefront [data-home-section="catalog"] .neo-grid-products.cms-catalog-slider{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important}
.storefront [data-home-section="categories"] .cms-builder-category-list.cms-categories-grid{display:grid!important;grid-template-columns:repeat(var(--widget-desktop-cards,4),minmax(0,1fr));overflow:visible!important;gap:12px}
.storefront [data-home-section="categories"] .cms-builder-category-list.cms-categories-grid>a{width:auto!important;max-width:none!important;flex-basis:auto!important}
.storefront [data-home-section="categories"] .cms-builder-category-list.cms-categories-slider{display:flex!important;overflow-x:auto!important;gap:12px}
.storefront .cms-builder-product-track.cms-product-grid{display:grid!important;grid-template-columns:repeat(var(--widget-desktop-cards,4),minmax(0,1fr))!important;overflow:visible!important;gap:12px}
.storefront .cms-builder-product-track.cms-product-grid>.cms-builder-product{width:auto!important;flex-basis:auto!important;min-width:0!important;max-width:none!important}
.storefront .cms-builder-product-track.cms-product-slider{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:12px}
.storefront .cms-builder-product-track.cms-product-slider>.cms-builder-product{flex:0 0 calc((100% - (var(--widget-desktop-cards,4) - 1)*12px)/var(--widget-desktop-cards,4));min-width:0!important;max-width:none!important}
@media(min-width:701px) and (max-width:1000px){
 .storefront [data-home-section="bestsellers"] .neo-rank-grid.cms-bestseller-grid,.storefront [data-home-section="catalog"] .neo-grid-products:not(.cms-catalog-slider),.storefront [data-home-section="categories"] .cms-builder-category-list.cms-categories-grid,.storefront .cms-builder-product-track.cms-product-grid{grid-template-columns:repeat(var(--widget-tablet-cards,3),minmax(0,1fr))!important}
 .storefront [data-home-section="bestsellers"] .neo-rank-grid.cms-bestseller-slider>.neo-rank-item,.storefront .cms-builder-product-track.cms-product-slider>.cms-builder-product{flex-basis:calc((100% - (var(--widget-tablet-cards,3) - 1)*12px)/var(--widget-tablet-cards,3))}
}
@media(max-width:700px){
 .storefront [data-home-section="bestsellers"] .neo-rank-grid.cms-bestseller-grid,.storefront [data-home-section="catalog"] .neo-grid-products:not(.cms-catalog-slider),.storefront [data-home-section="categories"] .cms-builder-category-list.cms-categories-grid,.storefront .cms-builder-product-track.cms-product-grid{grid-template-columns:repeat(var(--widget-mobile-cards,2),minmax(0,1fr))!important;gap:8px!important}
 .storefront [data-home-section="bestsellers"] .neo-rank-grid.cms-bestseller-slider>.neo-rank-item,.storefront .cms-builder-product-track.cms-product-slider>.cms-builder-product{flex-basis:calc((100% - (var(--widget-mobile-cards,2) - 1)*8px)/var(--widget-mobile-cards,2))!important}
 .storefront [data-home-section="catalog"] .neo-grid-products.cms-catalog-slider>.neo-grid-card{flex:0 0 calc((100% - (var(--widget-mobile-cards,2) - 1)*8px)/var(--widget-mobile-cards,2))!important;width:auto!important;max-width:none!important}
 .storefront [data-home-section="bestsellers"] .neo-rank-grid.cms-bestseller-grid>.neo-rank-item{grid-template-columns:25px minmax(0,48px) minmax(0,1fr);min-width:0;gap:6px;padding:7px 4px;overflow-wrap:anywhere}
 .storefront [data-home-section="bestsellers"] .neo-rank-grid.cms-bestseller-grid>.neo-rank-item>strong{font-size:18px}
 .storefront [data-home-section="bestsellers"] .neo-rank-grid.cms-bestseller-grid>.neo-rank-item>span{width:45px;height:50px}
 .storefront [data-home-section="bestsellers"] .neo-rank-grid.cms-bestseller-grid>.neo-rank-item b{font-size:10px;line-height:1.6}
 .storefront .cms-builder-product-track.cms-product-grid>.cms-builder-product{flex-basis:auto!important;width:auto!important}
}
.storefront .cms-image-banner-widget{margin-top:var(--widget-spacing,20px);min-width:0}
.storefront .cms-image-banner-carousel{position:relative;border-radius:var(--widget-radius,18px);overflow:hidden;isolation:isolate}
.storefront .cms-image-banner-track{width:100%;position:relative}
.storefront .cms-image-banner-slide[hidden]{display:none!important}
.storefront .cms-image-banner-slide,.storefront .cms-image-banner-slide a,.storefront .cms-image-banner-slide picture{display:block;width:100%;min-width:0}
.storefront .cms-image-banner-slide img{display:block;width:100%;height:auto;max-height:680px;object-fit:contain;border-radius:inherit}
.storefront .cms-image-banner-prev,.storefront .cms-image-banner-next{position:absolute;top:50%;transform:translateY(-50%);z-index:2;border:1px solid #e0e5eb;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.92);color:#172033;cursor:pointer;font-size:26px;display:grid;place-items:center}
.storefront .cms-image-banner-prev{right:12px}.storefront .cms-image-banner-next{left:12px}
.storefront .cms-image-banner-dots{position:absolute;bottom:10px;right:50%;transform:translateX(50%);display:flex;gap:7px;z-index:2}
.storefront .cms-image-banner-dots button{width:9px;height:9px;border-radius:99px;border:0;padding:0;background:rgba(255,255,255,.65);cursor:pointer}
.storefront .cms-image-banner-dots button[aria-current="true"]{width:27px;background:#fff}
.cms-banner-slides{display:grid;gap:12px;border:1px solid #dfe5f1;padding:12px;border-radius:16px}
.cms-banner-slides>small{color:#64748b}
.cms-banner-slide-row{border:1px solid #e5eaf3;border-radius:12px;padding:12px;min-width:0}
.cms-banner-slide-row[hidden]{display:none!important}
.cms-category-delete-form{margin:8px 14px 12px;text-align:left}
.cms-category-delete-form .cms-danger{color:#c32c45!important;border-color:#fad4da!important;font-size:12px}
@media(max-width:700px){.storefront .cms-image-banner-widget{width:calc(100% - 20px)}.storefront .cms-image-banner-prev,.storefront .cms-image-banner-next{width:32px;height:32px;font-size:20px}.cms-banner-slide-row{padding:9px}}

/* Legacy promoted product rails also honor grid/slider mode. */
.storefront [data-home-section="deals"] .neo-product-rail.cms-promos-product-grid,.storefront [data-home-section="dark"] .neo-product-rail.cms-promos-product-grid{display:grid!important;grid-template-columns:repeat(var(--widget-desktop-cards,4),minmax(0,1fr))!important;overflow:visible!important;gap:12px}
.storefront [data-home-section="deals"] .neo-product-rail.cms-promos-product-grid>.neo-product-card,.storefront [data-home-section="dark"] .neo-product-rail.cms-promos-product-grid>.neo-product-card{width:auto!important;max-width:none!important;min-width:0!important;flex-basis:auto!important}
@media(min-width:701px) and (max-width:1000px){.storefront [data-home-section="deals"] .neo-product-rail.cms-promos-product-grid,.storefront [data-home-section="dark"] .neo-product-rail.cms-promos-product-grid{grid-template-columns:repeat(var(--widget-tablet-cards,3),minmax(0,1fr))!important}}
@media(max-width:700px){.storefront [data-home-section="deals"] .neo-product-rail.cms-promos-product-grid,.storefront [data-home-section="dark"] .neo-product-rail.cms-promos-product-grid{grid-template-columns:repeat(var(--widget-mobile-cards,2),minmax(0,1fr))!important;gap:8px!important;padding-inline:0!important}}

/* v1.18.4: fixed aspect ratio independently of uploaded banner dimensions; crossfade */
.storefront .cms-image-banner-carousel{--cms-banner-ratio:3 / 1; aspect-ratio:var(--cms-banner-ratio); max-height:680px; background:#edf2f8}
.storefront .cms-image-banner-track{position:relative;width:100%;height:100%;min-height:0}
.storefront .cms-image-banner-slide{position:absolute!important;inset:0;display:block!important;opacity:0;visibility:hidden;transform:translateX(-2.5%);transition:opacity .42s ease,transform .42s ease,visibility .42s!important;height:100%;z-index:0}
.storefront .cms-image-banner-slide.is-active{opacity:1;visibility:visible;transform:translateX(0);z-index:1}
.storefront .cms-image-banner-slide,.storefront .cms-image-banner-slide a,.storefront .cms-image-banner-slide picture{height:100%}
.storefront .cms-image-banner-slide img{height:100%!important;max-height:none!important;object-fit:contain!important;width:100%}
@media(max-width:700px){.storefront .cms-image-banner-carousel{--cms-banner-ratio:4 / 5;max-height:none}}
@media(prefers-reduced-motion:reduce){.storefront .cms-image-banner-slide{transition:none!important;transform:none!important}}
/* ranked block: text stays within cards and pictures are lightly rounded */
.storefront .neo-rank-item{min-width:0!important;overflow:hidden}
.storefront .neo-rank-item>div{min-width:0!important;overflow:hidden}
.storefront .neo-rank-item b{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;overflow-wrap:anywhere;word-break:normal;line-height:1.65}
.storefront .neo-rank-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.storefront .neo-rank-item img{border-radius:10px!important;object-fit:contain}
