/* BMS desktop rails and static catalog grids. Mobile and carousel geometry stay native. */
@media (min-width: 1024px) {
  :root {
    --d-page: 85vw;
    --d-center: calc(85vw - 267px);
    --bms-catalog-gap: 20px;
    --bms-catalog-track: max(190px, calc((100% - 100px) / 6));
  }

  .main-width,
  .main-width2 {
    width: 85% !important;
    max-width: none;
  }

  #contentMainWrapper {
    width: 100%;
    table-layout: fixed;
  }

  #contentMainWrapper > tbody > tr > #column-left {
    box-sizing: border-box;
    width: 249px !important;
  }

  #contentMainWrapper > tbody > tr > #column-center {
    width: auto !important;
    min-width: 0;
  }

  #header .right-head {
    width: 505px;
    margin-right: 13px;
  }

  #header .left-head {
    max-width: calc(100% - 518px);
  }

  #header .logo img {
    max-width: 100%;
    height: auto;
  }

  #header .right-head .search,
  #header .right-head .cart,
  #header .right-head .navigation {
    margin-right: 0;
  }

  #header .main-width2 .right-head .search {
    left: 0;
  }

  #column-center .navSplitPagesResult {
    margin-left: 0;
    margin-right: 0;
  }

  /* Pagination, filters and headings span all tracks; only native tiles occupy cells. */
  #column-center :is(#productListing, #newProductsDefault, #allProductsDefault,
    #featuredProducts, #specialsDefault, #artist_other_products):has(> :is(
    .centerBoxContentsProducts, .centerBoxContentsNew, .centerBoxContentsFeatured,
    .centerBoxContentsSpecials, .newgrid)) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--bms-catalog-track), 1fr));
    gap: 0 var(--bms-catalog-gap);
    align-items: stretch;
  }

  #column-center :is(#productListing, #newProductsDefault, #allProductsDefault,
    #featuredProducts, #specialsDefault, #artist_other_products) > * {
    grid-column: 1 / -1;
    min-width: 0;
  }

  #column-center :is(#productListing, #newProductsDefault, #allProductsDefault,
    #featuredProducts, #specialsDefault, #artist_other_products) > :is(
    .centerBoxContentsProducts, .centerBoxContentsNew, .centerBoxContentsFeatured,
    .centerBoxContentsSpecials, .newgrid) {
    grid-column: auto;
    float: none;
    width: auto !important; /* native listing templates print inline percentages */
    max-width: 270px;
    height: auto !important; /* the legacy row equalizer writes fixed heights */
    min-height: 350px;
    margin: 0 0 20px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 8px;
  }

  #column-center :is(#productListing, #newProductsDefault, #allProductsDefault,
    #featuredProducts, #specialsDefault, #artist_other_products) > br.clearBoth {
    display: none;
  }

  #column-center :is(.centerBoxContentsProducts, .centerBoxContentsNew,
    .centerBoxContentsFeatured, .centerBoxContentsSpecials, .newgrid) > :is(.ng200, h3.itemTitle, .plart) {
    width: 100%;
    max-width: 100%;
  }

  #column-center :is(.centerBoxContentsProducts, .centerBoxContentsNew,
    .centerBoxContentsFeatured, .centerBoxContentsSpecials, .newgrid) > a.ns-btn {
    min-width: 0;
    padding-left: 6px;
    padding-right: 6px;
  }

  #pageBody #ezPageDefault #artistGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--bms-catalog-track), 1fr));
    gap: 30px var(--bms-catalog-gap);
    max-width: none;
  }

  #pageBody #ezPageDefault #artistGrid .artistwrap {
    width: auto;
    min-width: 0;
    float: none;
    margin: 0;
  }

  #pageBody #artistGrid .artistwrap img {
    max-width: 100%;
    height: auto;
  }
}

@media (min-width: 1024px) {
  /* Core All/Featured pages use row modules rather than the category tile module. */
  #column-center :is(#allProductsDefault, #featuredDefault) > .wrapper:has(> .tie) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--bms-catalog-track), 1fr));
    gap: 20px;
    overflow: visible;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) > .wrapper > .tie {
    min-width: 0;
    margin: 0;
    max-width: 270px;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) > .wrapper > .tie > .tie-indent {
    padding: 0;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie-indent > .wrapper > .fleft {
    float: none;
    width: auto !important;
    min-width: 0;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie .image {
    display: flex;
    align-items: center;
    min-height: 200px;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie .image img {
    max-width: 100%;
    height: auto;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie .description {
    overflow-wrap: anywhere;
  }
}

@media (min-width: 1140px) {
  /* The home artwork and carousel retain their native size, centred in the wider rails. */
  #indexBody .main-width > .banners {
    width: 1050px;
    margin-left: auto;
    margin-right: auto;
  }

  #indexBody .main-width > .popular {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 1024px) {
  .main-width {
    background: #fff;
  }

  #column-center .jquery-slider-wrapper:has(> .slidec) {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 785 / 215;
  }

  #column-center .slidec {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 785 / 215;
  }

  #column-center .slidec .jquery-slider-slide {
    width: 100%;
    height: 100%;
  }

  #column-center .slidec img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) > .wrapper > .tie {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0 0 20px;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie-indent > .wrapper {
    overflow: visible;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie .image {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    min-height: 0;
    margin-bottom: 16px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie .image a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie .image img {
    display: block;
    width: 200px;
    max-width: 100%;
    height: 200px;
    object-fit: contain;
    border: 0;
    border-radius: 6px;
    box-shadow: none;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie .fleft > :is(br, hr) {
    display: none;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie .fleft > a.name {
    display: block;
    min-height: 42px;
    margin: 0 0 8px;
    font: 700 15px/1.4 var(--d-font);
    color: var(--d-ink);
    text-decoration: none;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie .fleft > a.name:hover {
    color: var(--d-brand);
    text-decoration: underline;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie .price-text {
    display: none;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie .price {
    display: block;
    margin: 0 0 10px;
    color: var(--d-brand);
    font: 700 15px/1.4 var(--d-font);
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie .fleft > a:not(.name):not(.ns-btn) {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin: 0 0 12px;
    padding: 0 12px;
    border: 1px solid var(--d-brand);
    border-radius: var(--d-radius);
    font: 600 12px/1.3 var(--d-font);
    color: var(--d-brand);
    text-decoration: none;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie .description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    margin-top: 4px;
    color: var(--d-ink-2);
    font: 400 13px/1.5 var(--d-font);
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie .description > strong:first-child {
    display: none;
  }

  #column-center :is(#allProductsDefault, #featuredDefault) .tie-indent > .wrapper:has(> .description) > br {
    display: none;
  }
}

@media (min-width: 1024px) {
  #indexProductList #artist_holder .artist-image {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
  }

  #indexBody .main-width > .banners {
    width: min(1050px, 100%);
    margin-left: auto;
    margin-right: auto;
  }

  #indexBody .banners #cont {
    margin-left: calc(100% * 35 / 1050) !important;
    margin-right: calc(100% * 35 / 1050);
  }

  #indexBody .banners .jquery-slider-wrapper:has(> .slidez),
  #indexBody .banners .slidez {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 980 / 300;
  }

  #indexBody .banners .slidez .jquery-slider-slide img,
  #indexBody .banners > center img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  #indexBody .banners > .top,
  #indexBody .banners > .right {
    box-sizing: border-box;
    zoom: 1;
  }

  #indexBody .banners > .top {
    width: 65.5238%;
    padding-left: 1.2381%;
    padding-right: 4.5714%;
  }

  #indexBody .banners > .top > :is(.banner, .banner1, .banner2, .banner3) {
    width: 50%;
    box-sizing: border-box;
    padding-right: 10px;
  }

  #indexBody .banners > .top img,
  #indexBody .banners > .right img {
    max-width: 100%;
    height: auto;
  }

  #indexBody .banners > .right {
    width: 34.4762%;
  }

  #indexBody .main-width > .popular {
    box-sizing: border-box;
    width: min(1050px, 100%);
    padding-left: 4%;
    padding-right: 4.4762%;
  }

  #indexBody .popular .carousel-box {
    width: 100%;
  }
}

@media (min-width: 1024px) {
  #indexBody .banners > .top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 10px;
  }

  #indexBody .banners > .top > :is(.banner, .banner1, .banner2, .banner3) {
    width: auto;
    height: auto;
    aspect-ratio: 310 / 222;
    float: none;
    margin: 0;
    padding: 0;
  }

  #indexBody .banners > .top :is(#bannerOne, #bannerTwo, #bannerThree, #bannerFour) {
    float: none;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  #indexBody .banners > .top img {
    width: 100%;
  }
}
