/* Desktop catalog layout. */
body.desktop-layout-columns {
  --desktop-shell-max-width: 1600px;
  --desktop-shell-gutter: 24px;
}

body.desktop-width-full {
  --desktop-shell-max-width: none;
  --desktop-shell-gutter: 24px;
}

.desktop-catalog-layout__sidebar {
  display: none;
}

@media (max-width: 1199.98px) {
  .header .container,
  .page-layout .container {
    max-width: none;
  }
}

@media (min-width: 1200px) {
  body.desktop-width-full .header .container,
  body.desktop-width-full .page-layout .container {
    max-width: var(--desktop-shell-max-width);
    padding-inline: var(--desktop-shell-gutter);
  }
}

@media (min-width: 1280px) {
  body.desktop-category-sidebar-enabled .desktop-compact-header__catalog,
  body.desktop-cart-sidebar-enabled .desktop-compact-header__cart {
    display: none;
  }

  body.desktop-layout-columns:not(.desktop-width-full) .header .container,
  body.desktop-layout-columns:not(.desktop-width-full) .page-layout .container {
    max-width: var(--desktop-shell-max-width);
    padding-inline: var(--desktop-shell-gutter);
  }

  .desktop-catalog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    box-sizing: border-box;
    width: 100%;
    max-width: var(--desktop-shell-max-width);
    margin-inline: auto;
    padding: 16px var(--desktop-shell-gutter) 24px;
  }

  .desktop-catalog-layout--categories {
    grid-template-columns: 246px minmax(0, 1fr);
  }

  .desktop-catalog-layout--cart {
    grid-template-columns: minmax(0, 1fr) 348px;
  }

  .desktop-catalog-layout--categories.desktop-catalog-layout--cart {
    grid-template-columns: 246px minmax(0, 1fr) 348px;
  }

  .desktop-catalog-layout__sidebar {
    position: sticky;
    top: var(--desktop-catalog-sticky-top, 96px);
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: calc(100dvh - var(--desktop-catalog-sticky-top, 96px) - 16px);
    max-height: calc(100dvh - var(--desktop-catalog-sticky-top, 96px) - 16px);
  }

  .desktop-catalog-layout__sidebar--categories {
    background-color: #fff;
    border-radius: var(--r-card);
    overflow: hidden;
  }

  .desktop-catalog-layout__sidebar--categories .catagory-sidebar.all-catagory-option > .catagory-submenu {
    min-width: 0;
  }

  .desktop-catalog-layout__sidebar--cart {
    overflow: hidden;
    background-color: #fff;
    border-radius: var(--r-card);
  }

  .desktop-catalog-layout__sidebar--cart .bottom-sheet__header {
    min-height: 56px;
    padding: 12px 16px;
  }

  .desktop-catalog-layout__sidebar--cart .desktop-catalog-layout__sidebar-products {
    overflow-y: auto;
  }

  .desktop-catalog-layout__sidebar--cart .shopping-cart-modal__footer {
    max-height: none;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
    background: #f7f7f7;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .desktop-catalog-layout__sidebar--cart .shopping-cart-modal__footer:has(#desktop-cart-sidebar-footer:empty) {
    display: none;
  }

  .desktop-catalog-layout__sidebar--cart .shopping-cart-modal__footer .cart-total {
    padding: 12px 16px;
  }

  .desktop-catalog-layout__main {
    min-width: 0;
    padding: 12px 0;
    background-color: #fff;
    border-radius: var(--r-card);
    container: desktop-catalog-main / inline-size;
  }

  .desktop-catalog-layout__main .product-list.row-cols-xl-5 > * {
    width: 33.33333333%;
  }

  .desktop-catalog-layout__main > .page-content.section-ptb-90 {
    padding-block: 0;
  }

  body.desktop-layout-columns .page-layout .desktop-catalog-layout__main .container {
    width: 100%;
    max-width: none;
    padding-inline: calc(var(--bs-gutter-x, 1.5rem) * .5);
  }

  .desktop-catalog-layout__sidebar-scroll,
  .desktop-catalog-layout__sidebar-products {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  .desktop-catalog-layout__sidebar-header,
  .desktop-catalog-layout__sidebar-footer {
    flex: 0 0 auto;
  }

  .desktop-catalog-layout__sidebar-header:empty,
  .desktop-catalog-layout__sidebar-footer:empty {
    display: none;
  }
}

@container desktop-catalog-main (min-width: 840px) {
  .desktop-catalog-layout__main .product-list.row-cols-xl-5 > * {
    width: 25%;
  }
}

@media (min-width: 1200px) {
  .checkout-order-column {
    position: sticky;
    top: var(--checkout-sticky-top, 96px);
    align-self: flex-start;
    min-width: 0;
  }

  .checkout-order-summary {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100dvh - var(--checkout-sticky-top, 96px) - 16px);
    overflow: hidden;
  }

  .checkout-order-products {
    flex: 0 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .checkout-order-products .row {
    margin-inline: 0;
  }

  .checkout-order-products .col {
    min-width: 0;
  }

  .checkout-order-products .product-title {
    overflow-wrap: anywhere;
  }

  .checkout-order-summary > h6,
  .checkout-order-summary > .checkout-desktop-submit {
    flex: none;
  }

  .checkout-order-summary > .cart-footer {
    flex: none;
    overflow: visible;
  }
}

@media (min-width: 1200px) and (max-height: 560px) {
  .checkout-order-column {
    position: static;
  }

  .checkout-order-summary {
    max-height: none;
    overflow: visible;
  }

  .checkout-order-products {
    overflow: visible;
  }

}
