/**
 * Flatlanders product listing (shop pages)
 */

body.flatlanders-shop-page,
body#indexBody.flatlanders-shop-page,
body#indexProductListBody,
body#productsAllBody,
body#advancedSearchResultBody,
body#featuredProductsBody,
body#productsNewBody,
body#specialsBody {
  background: #fff;
}

body.flatlanders-shop-page #mainWrapper {
  background: #fff;
}

body.flatlanders-shop-page #contentMainWrapper.flatlanders-shop-layout {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  box-sizing: border-box;
  background: #fff;
}

body.flatlanders-shop-page #navBreadCrumb,
body.flatlanders-shop-page #navCatTabsWrapper,
body.flatlanders-shop-page #navEZPagesTop {
  display: none;
}

body.flatlanders-shop-page #navBreadCrumb.flatlanders-breadcrumb {
  display: block !important;
  margin: 0 0 18px;
  padding: 0;
  font-size: 0.9rem;
  color: #000;
  text-align: left;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body.flatlanders-shop-page #navBreadCrumb.flatlanders-breadcrumb a {
  color: #000;
  text-decoration: none;
  font-weight: 400;
}

body.flatlanders-shop-page #navBreadCrumb.flatlanders-breadcrumb a:hover {
  color: #333;
  text-decoration: none;
}

body.flatlanders-shop-page #navBreadCrumb.flatlanders-breadcrumb .flatlanders-breadcrumb-current {
  font-weight: 700;
  color: #000;
}

#indexProductList,
#productListing {
  padding: 0 4px 8px;
  margin: 0;
  overflow: visible;
}

#indexProductList #cat-top {
  margin: 0 0 22px;
  display: block;
  overflow: visible;
}

#indexProductList #cat-left {
  float: none;
  width: 100%;
  text-align: left;
}

#indexProductList #productListHeading {
  font-size: 2.15rem;
  font-weight: 700;
  color: #333;
  margin: 0;
  padding: 0;
  text-align: left;
  display: block;
  line-height: 1.2;
  font-family: Arial, Helvetica, sans-serif;
}

#indexProductList #indexProductListCatDescription,
#indexProductList #categoryImgListing,
#indexProductList #filter-wrapper {
  display: none !important;
}

#productListing .prod-list-wrap {
  margin: 20px 0 0;
  padding: 14px 20px;
  height: auto !important;
  min-height: 40px;
  background: #666 !important;
  color: #fff !important;
  text-align: center;
  clear: both;
  box-sizing: border-box;
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

#productListing .prod-list-wrap .navSplitPagesLinks,
#productListing .prod-list-wrap .navSplitPagesResult {
  font-size: 0.85rem;
  color: #fff !important;
  display: inline-block !important;
  float: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  white-space: nowrap;
  line-height: 1.4;
}

#productListing .prod-list-wrap .navSplitPagesLinks:empty {
  display: none !important;
}

#productListing .prod-list-wrap .pagination {
  display: inline-block;
  margin: 0;
  white-space: nowrap;
}

#productListing .prod-list-wrap .pagination ul {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

#productListing .prod-list-wrap .pagination li {
  display: inline-block;
  white-space: nowrap;
}

body.flatlanders-shop-page #productListing .prod-list-wrap .back,
body.flatlanders-shop-page #productListing .prod-list-wrap .forward {
  float: none !important;
  width: auto !important;
  max-width: none !important;
}

#productListing .prod-list-wrap .navSplitPagesLinks a,
#productListing .prod-list-wrap .navSplitPagesResult strong {
  color: #fff !important;
}

#productListing .prod-list-wrap .navSplitPagesLinks a {
  text-decoration: underline;
  font-weight: bold;
  padding: 4px 8px;
}

#productListing .prod-list-wrap .navSplitPagesLinks a:hover {
  color: #f0f0f0 !important;
}

#productListing .prod-list-wrap .pagination li a,
#productListing .prod-list-wrap .pagination .current {
  color: #fff !important;
}

#productListing .prod-list-wrap .button-top,
#productListing .prod-list-wrap input[type="submit"][id^="submit"],
#productListing form[name="multiple_products_cart_quantity"] {
  display: none !important;
}

/* ----- Product grid ----- */
.flatlanders-product-grid {
  padding: 0;
}

.flatlanders-product-grid > div,
.flatlanders-product-grid > div > div {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 28px;
  margin: 0;
  width: 100%;
  justify-content: flex-start;
}

.flatlanders-product-grid .flatlanders-product-item,
.flatlanders-product-grid .centerBoxContentsProducts,
body.flatlanders-shop-page .flatlanders-product-grid div.centerBoxContentsProducts.centeredContent.flatlanders-product-item {
  float: none !important;
  flex: 0 0 calc(33.333% - 19px) !important;
  max-width: calc(33.333% - 19px) !important;
  width: calc(33.333% - 19px) !important;
  box-sizing: border-box;
  padding: 0 4px 8px !important;
  margin: 0 !important;
  text-align: left;
  background: transparent !important;
  clear: none !important;
  height: auto !important;
  overflow: visible !important;
}

body.flatlanders-shop-page .flatlanders-product-grid div.centerBoxContentsProducts.centeredContent.flatlanders-product-item:hover {
  background: transparent !important;
}

.flatlanders-product-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 6px 4px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.flatlanders-product-card:hover {
  box-shadow: none;
}

.flatlanders-product-image {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  margin: 0 0 14px;
  background: #f5f5f5;
}

.flatlanders-product-image img,
.flatlanders-product-card .listingProductImage {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  display: block;
  object-fit: cover;
}

.flatlanders-product-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  min-height: 2.7em;
}

.flatlanders-product-title a {
  color: #000 !important;
  text-decoration: none !important;
}

.flatlanders-product-title a:hover {
  color: #000 !important;
}

.flatlanders-product-desc {
  margin: 0 0 14px;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #888 !important;
  text-align: left;
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.5em * 3);
  max-height: calc(1.5em * 3);
}

.flatlanders-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding: 4px 0 0;
}

.flatlanders-product-price {
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  text-align: left;
  line-height: 1.2;
}

.flatlanders-product-price .normalprice,
.flatlanders-product-price .productSpecialPrice,
.flatlanders-product-price .productSalePrice,
.flatlanders-product-price .productBasePrice {
  display: inline;
  font-weight: 700;
  color: #000;
}

.flatlanders-product-price .productPriceDiscount,
.flatlanders-product-price br {
  display: none;
}

.flatlanders-cart-form {
  display: inline-block;
  margin: 0;
  flex-shrink: 0;
}

.flatlanders-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  max-width: 34px;
  padding: 0;
  border: none;
  background: #8b1a1a !important;
  color: #fff !important;
  cursor: pointer;
  text-decoration: none !important;
  border-radius: 0;
  transition: background 0.2s ease;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0 !important;
}

/* Override legacy centerBoxContentsAlsoPurch link styles from stylesheet.css */
body.flatlanders-shop-page a.flatlanders-cart-btn,
body.flatlanders-product-info-page a.flatlanders-cart-btn,
.centerBoxContentsAlsoPurch .flatlanders-cart-btn,
.centerBoxContentsProducts .flatlanders-cart-btn,
.flatlanders-product-card .flatlanders-cart-btn,
.flatlanders-also-purchased-grid .flatlanders-cart-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.95rem !important;
  text-decoration: none !important;
  overflow: hidden;
}

body.flatlanders-shop-page button.flatlanders-cart-btn,
body.flatlanders-product-info-page button.flatlanders-cart-btn,
.flatlanders-product-card button.flatlanders-cart-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.95rem !important;
  line-height: 1 !important;
  overflow: hidden;
  vertical-align: top;
}

.flatlanders-cart-btn:hover {
  background: #6d1414 !important;
  color: #fff !important;
}

.flatlanders-cart-btn i {
  font-size: 0.95rem;
  line-height: 1;
  display: block;
}

.flatlanders-cart-btn--view {
  background: #8b1a1a !important;
}

.flatlanders-cart-btn--view:hover {
  background: #6d1414 !important;
}

/* Hide legacy listing controls inside cards */
.flatlanders-product-card .individual-add-to-cart,
.flatlanders-product-card .quantity-controls,
.flatlanders-product-card .add-to-cart-btn,
.flatlanders-product-card .list-more,
.flatlanders-product-card .moreinfoLink {
  display: none !important;
}

@media (max-width: 991px) {
  .flatlanders-product-grid .flatlanders-product-item,
  .flatlanders-product-grid .centerBoxContentsProducts,
  body.flatlanders-shop-page .flatlanders-product-grid div.centerBoxContentsProducts.centeredContent.flatlanders-product-item {
    flex: 0 0 calc(50% - 14px) !important;
    max-width: calc(50% - 14px) !important;
    width: calc(50% - 14px) !important;
  }
}

@media (max-width: 767px) {
  body.flatlanders-shop-page #contentMainWrapper.flatlanders-shop-layout {
    flex-direction: column;
    flex-wrap: wrap;
    padding: 20px 15px 30px;
  }

  .flatlanders-product-grid .flatlanders-product-item,
  .flatlanders-product-grid .centerBoxContentsProducts,
  body.flatlanders-shop-page .flatlanders-product-grid div.centerBoxContentsProducts.centeredContent.flatlanders-product-item {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}
