/* Shared listing-page rail used by Latest and Special routes. */
#product-category.listing-category > .row {
  display: grid;
  grid-template-columns: 306px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-right: -10px;
  margin-left: -10px;
  margin-top: -41.4px;
}

#product-category.listing-category > .row > #column-left {
  grid-column: 1;
  width: 306px;
  min-width: 0;
  margin: 0;
  float: none;
}

#product-category.listing-category > .row > #content {
  grid-column: 2;
  width: auto;
  min-width: 0;
  padding: 0;
  margin: 0;
}

#product-category.listing-category > .row > #content {
  display: flex;
  flex-direction: column;
}

#product-category.listing-category > .row > #content > h1 {
  display: none;
}

#product-category.listing-category > .row > #content > .category-description {
  order: 1;
}

#product-category.listing-category > .row > #content > .category-filter {
  order: 2;
}

#product-category.listing-category > .row > #content > hr {
  display: none;
}

#product-category.listing-category > .row > #content > .category-controls {
  order: 3;
}

#product-category.listing-category > .row > #content > .category-product-grid {
  order: 4;
}

#product-category.listing-category > .row > #content > .row:last-of-type {
  order: 5;
}

#product-category.listing-category .category-brands-link {
  display: none;
}

#product-category.listing-category .category-filter {
  min-height: 48px;
  margin-bottom: 20px !important;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border: 1px solid #edf0f2;
  background: #fff;
}

#product-category.listing-category .category-filter__header {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#product-category.listing-category .category-filter__title {
  margin: 0;
  font-size: 14px;
  line-height: 26px;
}

#product-category.listing-category .category-price-filter {
  display: none;
}

#product-category.listing-category .category-description {
  min-height: 114px;
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid #edf0f2;
  border-radius: 3px;
  background: #fff;
}

#product-category.listing-category .category-description > * {
  margin-top: 0;
  margin-bottom: 0;
}

#product-category.listing-category > .row > #content > h1 {
  margin: 0 12px 16px;
  font-size: 24px;
  line-height: 1.25;
}

#product-category.listing-category .category-controls {
  height: 32px;
  margin: 0 0 16px;
  align-items: start;
}

#product-category.listing-category .category-controls > [class*='col-'] {
  width: auto;
  flex: 0 0 auto;
  padding: 0;
}

#product-category.listing-category .category-controls > .col-lg-3:first-child {
  margin-right: auto;
}

#product-category.listing-category .category-controls .mb-3 {
  margin-bottom: 0 !important;
}

#product-category.listing-category .category-controls .input-group-text,
#product-category.listing-category .category-controls .form-select {
  height: 32px;
  padding-top: 2px;
  padding-bottom: 2px;
  font-size: 12px;
}

#product-category.listing-category .category-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  width: calc(100% - 24px);
  margin: 0 12px;
}

#product-category.listing-category .category-product-grid::before,
#product-category.listing-category .category-product-grid::after {
  display: none;
  content: none;
}

#product-category.listing-category .category-product-grid > .col {
  min-width: 0;
  padding: 0;
  width: auto;
}

#product-category.listing-category .category-product-grid .product-thumb .image {
  width: 100%;
  margin-right: 0;
  margin-left: 0;
}

#product-category.listing-category .category-product-grid .product-thumb .image img {
  width: 100%;
  height: 100%;
}

#product-category.listing-category .category-product-grid .product-thumb .caption {
  margin-right: 0;
  margin-left: 0;
}

#product-category.listing-category .category-product-grid .product-thumb {
  width: calc(100% - 24.6px);
  margin-left: 26px;
  margin-top: 14px;
  height: auto !important;
  min-height: 0;
}

#product-category.listing-category .category-product-grid .product-thumb .product-description {
  display: none !important;
}

@media (max-width: 991.98px) {
  #product-category.listing-category {
    width: 100%;
    max-width: none;
    padding-right: 12px;
    padding-left: 12px;
  }

  #product-category.listing-category > .row {
    display: block;
    margin: 0;
    margin-top: 0;
  }

  #product-category.listing-category > .row > #column-left {
    display: none;
  }

  #product-category.listing-category > .row > #content {
    width: 100%;
  }

  #product-category.listing-category .category-product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  #product-category.listing-category .category-product-grid > .col {
    width: 100%;
  }

  #product-category.listing-category .category-product-grid .product-thumb {
    width: calc(100% - 52px);
    margin-left: 26px;
  }

  #product-category.listing-category .category-product-grid {
    margin-top: 26px;
  }
}

#product-special.listing-page .listing-shell {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (min-width: 992px) {
  #product-special.listing-page {
    padding-right: 0;
    padding-left: 0;
  }
}

#product-special.listing-page .listing-shell > #column-left,
#product-special.listing-page .listing-shell > #column-right {
  display: none;
}

#product-special.listing-page .listing-content {
  min-width: 0;
}

#product-special.listing-page .listing-sidebar {
  min-width: 0;
  color: #263238;
}

#product-special.listing-page .listing-sidebar-section {
  margin-bottom: 28px;
}

#product-special.listing-page .listing-sidebar-section h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

#product-special.listing-page .listing-sidebar-categories ul,
#product-special.listing-page .listing-sidebar-latest ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#product-special.listing-page .listing-sidebar-categories li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  border-bottom: 1px solid #edf0f2;
  font-size: 13px;
}

#product-special.listing-page .listing-sidebar-categories li a {
  min-width: 0;
  overflow: hidden;
  color: #263238;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#product-special.listing-page .listing-sidebar-categories li a span {
  color: #6b7280;
}

#product-special.listing-page .listing-sidebar-categories li i {
  color: #9ca3af;
  font-size: 10px;
}

#product-special.listing-page .listing-sidebar-latest li + li {
  margin-top: 6px;
}

#product-special.listing-page .listing-sidebar-latest li a {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.25;
}

#product-special.listing-page .listing-sidebar-latest img {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: contain;
  background: #f7f7f7;
}

#product-special.listing-page .listing-sidebar-latest span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#product-special.listing-page .listing-sidebar-latest strong {
  display: block;
  margin-top: 3px;
  color: #e3342f;
  font-size: 13px;
}

#product-special.listing-page #product-list {
  margin-right: -10px;
  margin-left: -10px;
}

#product-special.listing-page #product-list > .col {
  padding-right: 10px;
  padding-left: 10px;
}

#product-special.listing-page.listing-compact .listing-content {
  display: flex;
  flex-direction: column;
}

#product-special.listing-page.listing-compact .listing-content > h1 {
  display: none;
}

#product-special.listing-page.listing-compact #product-list {
	order: 2;
	display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
	margin: 0;
}

#product-special.listing-page.listing-compact #product-list::before,
#product-special.listing-page.listing-compact #product-list::after {
	display: none;
	content: none;
}

#product-special.listing-page.listing-compact #product-list > .col {
  min-width: 0;
  padding: 0;
  width: auto;
}

#product-special.listing-page.listing-compact #product-list .product-thumb .image {
  margin-right: 12px;
  margin-left: 12px;
  width: auto;
}

#product-special.listing-page.listing-compact #product-list .product-thumb .image img {
  width: 100%;
  height: 100%;
}

#product-special.listing-page.listing-compact #product-list .product-thumb .caption {
  margin-right: 12px;
  margin-left: 12px;
}

#product-special.listing-page.listing-compact #product-list .product-thumb .product-description {
  display: none !important;
}

#product-special.listing-page.listing-compact #display-control {
  order: 3;
  margin-top: 22px;
}

#product-special.listing-page.listing-compact .listing-content > .row:last-of-type {
  order: 4;
}

#product-special.listing-page.listing-latest .listing-shell {
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 0;
  margin-top: -17.4px;
}

#product-special.listing-page.listing-latest #product-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  width: auto;
  margin: 0 12px;
}

#product-special.listing-page.listing-latest #product-list::before,
#product-special.listing-page.listing-latest #product-list::after {
  display: none;
  content: none;
}

#product-special.listing-page.listing-latest #product-list > .col {
  width: auto;
  min-width: 0;
  padding: 0;
}

#product-special.listing-page.listing-latest #product-list .product-thumb {
  width: calc(100% - 24.6px);
  height: auto !important;
  min-height: 0;
  margin: 14px 0 20px 26px;
}

#product-special.listing-page.listing-latest #product-list .product-thumb .image {
  width: 100%;
  margin: 0;
}

#product-special.listing-page.listing-latest #product-list .product-thumb .image img {
  width: 100%;
  height: 100%;
}

#product-special.listing-page.listing-latest #product-list .product-thumb .caption {
  margin: 0;
}

#product-special.listing-page.listing-latest #product-list .product-thumb .product-description {
  display: none !important;
}

#product-special.listing-page.listing-latest .product-sales-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  padding: 1px 4px;
  border: 1px solid #75c96b;
  border-radius: 3px;
  background: rgba(255, 255, 255, .95);
  color: #47a83d;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  white-space: nowrap;
}

#product-special.listing-page.listing-latest .listing-sidebar-latest img {
  width: 68px;
  height: 68px;
}

#product-special.listing-page.listing-latest .listing-sidebar-latest a {
  grid-template-columns: 68px minmax(0, 1fr);
}

#product-special.listing-page.listing-latest #display-control {
  order: 3;
  margin-top: 22px;
}

#product-special.listing-page.listing-latest .listing-content > .row:last-of-type {
  order: 4;
}

#product-special.listing-page.listing-special .listing-content > h1 {
  display: none;
}

#product-special.listing-page.listing-special .listing-shell {
  grid-template-columns: 306px minmax(0, 1fr);
  margin-top: -17.4px;
}

#product-special.listing-page.listing-special #display-control {
  display: flex;
  align-items: flex-start;
  height: 28px;
  margin: 0 0 34px;
}

#product-special.listing-page.listing-special #display-control > [class*="col-"] {
  width: auto;
  flex: 0 0 auto;
  padding: 0;
}

#product-special.listing-page.listing-special #display-control > .col-md-3:first-child {
  margin-right: 18px;
}

#product-special.listing-page.listing-special #display-control > .col-md-1 {
  margin-right: auto;
}

#product-special.listing-page.listing-special #display-control > .col-md-4 {
  width: 246px;
  margin-right: 75px;
}

#product-special.listing-page.listing-special #display-control > .col-md-3:last-child {
  width: 173px;
}

#product-special.listing-page.listing-special #display-control .mb-3 {
  margin-bottom: 0 !important;
}

#product-special.listing-page.listing-special #display-control .input-group-text,
#product-special.listing-page.listing-special #display-control .form-select {
  height: 28px;
  padding-top: 2px;
  padding-bottom: 2px;
  font-size: 12px;
}

#product-special.listing-page.listing-special #product-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin: 0 0 0 26px;
}

#product-special.listing-page.listing-special #product-list::before,
#product-special.listing-page.listing-special #product-list::after {
  display: none;
  content: none;
}

#product-special.listing-page.listing-special #product-list > .col {
  min-width: 0;
  padding: 0;
  width: auto;
}

#product-special.listing-page.listing-special #product-list .product-thumb .image {
  margin-right: 12px;
  margin-left: 12px;
  width: auto;
}

#product-special.listing-page.listing-special #product-list .product-thumb .image img {
  width: 100%;
  height: 100%;
}

#product-special.listing-page.listing-special #product-list .product-thumb .caption {
  margin-right: 12px;
  margin-left: 12px;
}

#product-special.listing-page.listing-special #product-list .product-thumb .product-description {
  display: none !important;
}

#product-special.listing-page.listing-special .listing-sidebar-featured ul,
#product-special.listing-page.listing-special .listing-sidebar-latest ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#product-special.listing-page.listing-special .listing-sidebar-featured,
#product-special.listing-page.listing-special .listing-sidebar-latest {
  margin-right: 6px;
  margin-left: 15px;
}

#product-special.listing-page.listing-special .listing-sidebar-featured li + li,
#product-special.listing-page.listing-special .listing-sidebar-latest li + li {
  margin-top: 6px;
}

#product-special.listing-page.listing-special .listing-sidebar-featured li a,
#product-special.listing-page.listing-special .listing-sidebar-latest li a {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.25;
}

#product-special.listing-page.listing-special .listing-sidebar-featured img,
#product-special.listing-page.listing-special .listing-sidebar-latest img {
  display: block;
  width: 68px;
  height: 68px;
  object-fit: contain;
  background: #f7f7f7;
}

#product-special.listing-page.listing-special .listing-sidebar-featured span,
#product-special.listing-page.listing-special .listing-sidebar-latest span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#product-special.listing-page.listing-special .listing-sidebar-featured strong,
#product-special.listing-page.listing-special .listing-sidebar-latest strong {
  display: block;
  margin-top: 3px;
  color: #e3342f;
  font-size: 13px;
}

#product-special.listing-page.listing-special .listing-sidebar-featured li a,
#product-special.listing-page.listing-special .listing-sidebar-latest li a {
  grid-template-columns: 68px minmax(0, 1fr);
}

@media (max-width: 991.98px) {
  #product-special.listing-page .listing-shell {
    display: block;
  }

  #product-special.listing-page .listing-sidebar {
    display: none;
  }

  #product-special.listing-page.listing-latest {
    width: 100%;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
  }

  #product-special.listing-page.listing-latest .listing-shell {
    margin-top: 0;
  }

  #product-special.listing-page.listing-latest .listing-content {
    width: 100%;
    padding-right: 0;
    padding-left: 0;
  }

  #product-special.listing-page.listing-latest #product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: auto;
    margin: 0 10px;
  }

  #product-special.listing-page.listing-latest #product-list > .col {
    width: auto;
    min-width: 0;
  }

  #product-special.listing-page.listing-latest #product-list .product-thumb {
    width: 100%;
    margin: 0;
  }

  #product-special.listing-page.listing-latest #product-list .product-thumb .image {
    aspect-ratio: 1;
  }

  #product-special.listing-page.listing-latest #product-list .product-thumb .image img {
    object-fit: contain;
  }

  #product-special.listing-page.listing-latest.listing-compact #product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: auto;
    margin-right: 10px;
    margin-left: 10px;
  }

  #product-special.listing-page.listing-latest #display-control,
  #product-special.listing-page.listing-latest .listing-content > .row:last-of-type {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    padding-right: 12px;
    padding-left: 12px;
  }

  /* The reference Latest mobile shell keeps only the compact brand row; its
   * desktop utility strip and horizontal category nav are not rendered here.
   * The hamburger/account/cart controls inside the mobile row remain intact. */
  body:has(#product-special.listing-latest) .header-wrapper {
    height: 50px;
  }

  body:has(#product-special.listing-latest) .header-wrapper > #top {
    display: none !important;
  }

  body:has(#product-special.listing-latest) .header-wrapper .header-mobile {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
  }

  body:has(#product-special.listing-latest) .header-wrapper .reference-menu {
    display: none !important;
  }

  #product-special.listing-page.listing-latest .breadcrumb {
    margin-bottom: 6px;
  }

  #product-special.listing-page.listing-latest #product-list .product-thumb {
    margin-bottom: 10px;
  }

  #product-special.listing-page.listing-latest #product-list .product-thumb .image {
    margin-bottom: 0;
  }

  #product-special.listing-page.listing-latest #product-list .product-thumb .caption {
    margin-top: -10px;
  }

  #product-special.listing-page.listing-latest #product-list .product-thumb .price-tax {
    display: none;
  }

  #product-special.listing-page.listing-latest #product-list .product-thumb .product-name {
    margin-bottom: 4px;
  }

  #product-special.listing-page.listing-compact #product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  #product-special.listing-page.listing-compact #display-control {
    order: 3;
  }

  #product-special.listing-page.listing-special #product-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin: 0;
  }

  #product-special.listing-page.listing-special .listing-shell {
    margin-top: -17.4px;
  }

  #product-special.listing-page.listing-special .listing-content {
    padding-right: 16px;
    padding-left: 16px;
  }

  #product-special.listing-page.listing-special #display-control {
    height: 28px;
    margin-bottom: 70px;
  }

  #product-special.listing-page.listing-special #display-control > .col-md-4,
  #product-special.listing-page.listing-special #display-control > .col-md-3:last-child {
    width: auto;
    margin-right: 0;
  }
}
