/* ===== Manon Parts — layout fixes ===== */

/* ---------- Subcategories grid (fix text overflow / merging) ---------- */
#subcategories {
  margin-bottom: 1.5rem;
}
#subcategories .subcategory-heading {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: left;
}
#subcategories .subcategories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  list-style: none;
}
#subcategories .subcategories-list > li {
  flex: 0 0 calc(16.666% - 1rem);
  min-width: 130px;
  max-width: calc(16.666% - 1rem);
  text-align: center;
}
#subcategories .subcategory-image {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}
#subcategories .subcategory-image img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
#subcategories h5 {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  min-height: 2.7em;
  overflow: hidden;
  text-align: center;
}
#subcategories .subcategory-name {
  display: block;
  color: #232323;
  text-transform: capitalize;
}
#subcategories .cat_desc {
  display: none;
}
@media (max-width: 1199px) {
  #subcategories .subcategories-list > li {
    flex: 0 0 calc(20% - 1rem);
    max-width: calc(20% - 1rem);
  }
}
@media (max-width: 991px) {
  #subcategories .subcategories-list > li {
    flex: 0 0 calc(25% - 1rem);
    max-width: calc(25% - 1rem);
  }
}
@media (max-width: 767px) {
  #subcategories .subcategories-list > li {
    flex: 0 0 calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
  }
}
@media (max-width: 575px) {
  #subcategories .subcategories-list > li {
    flex: 0 0 calc(50% - 0.75rem);
    max-width: calc(50% - 0.75rem);
  }
}

/* ---------- Left sidebar (compact, readable) ---------- */
#left-column {
  font-size: 0.9rem;
}
#left-column .facet,
#left-column .block-categories {
  margin-bottom: 1.25rem;
}
#left-column .facet-title,
#left-column .block-categories .category-top-menu,
#left-column .h6,
#left-column .title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: none;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
#left-column .facet .collapse,
#left-column .category-tree ul {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}
#left-column .facet-label,
#left-column .category-tree a {
  font-size: 0.85rem;
  line-height: 1.4;
  text-transform: none;
}
#left-column .facet-label small {
  color: #888;
}
#left-column .facet .custom-checkbox,
#left-column .facet li {
  margin-bottom: 0.35rem;
}
#left-column .category-tree li {
  padding: 0.15rem 0;
}

/* ---------- Product grid cards (4-col larger cards) ---------- */
#products .products .product-miniature {
  margin-bottom: 1.25rem;
}
#products .products .thumbnail-container {
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
#products .products .product-thumbnail {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: #fff;
}
#products .products .product-thumbnail img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
#products .products .product-description {
  padding: 0.6rem 0.75rem 0.75rem;
}
#products .products .product-title {
  font-size: 0.72rem;
  line-height: 1.3;
  min-height: 2.5em;
  overflow: hidden;
  margin-bottom: 0.2rem;
}
#products .products .product-title a {
  color: #232323;
}
#products .products .product-oem {
  font-size: 0.68rem !important;
  color: #777 !important;
  margin-top: -0.15em;
  margin-bottom: 0.35em;
}
#products .products .product-price-and-shipping {
  font-size: 0.82rem;
  font-weight: 700;
}
#products .products .product-price-and-shipping .regular-price {
  font-size: 0.72rem;
}
#products .products .product-price-and-shipping .discount-percentage,
#products .products .product-price-and-shipping .discount-amount {
  font-size: 0.7rem;
}
@media (max-width: 767px) {
  #products .products .product-thumbnail {
    height: 140px;
    padding: 0.5rem;
  }
}
#products .products .product-flag.out_of_stock {
  display: none !important;
}

/* ---------- Hide reassurance block on product detail pages ---------- */
.page-product .blockreassurance_product,
.page-product #block-reassurance {
  display: none !important;
}

/* ---------- Homepage brand banner (balance sizing) ---------- */
.catbanners-brand {
  display: block;
  width: 100%;
  max-width: 1400px;
  height: auto;
  margin: 0 auto;
  padding: 20px;
  object-fit: contain;
  background: #fff;
  box-sizing: border-box;
}

/* ---------- Homepage brand grid (balanced logos) ---------- */
.manon-brand-grid {
  background: #fff;
  padding: 2rem 0;
}
.manon-brand-grid-title {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #232323;
  margin-bottom: 1.25rem;
}
.manon-brand-grid-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}
.manon-brand-grid-item {
  flex: 0 0 calc(16.666% - 1rem);
  min-width: 140px;
  max-width: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
  transition: all 0.15s ease;
}
.manon-brand-grid-item:hover {
  border-color: #1f6feb;
  box-shadow: 0 2px 12px rgba(31,111,235,0.1);
}
.manon-brand-grid-item img {
  max-width: 100%;
  max-height: 76px;
  width: auto;
  height: auto;
  object-fit: contain;
}
@media (max-width: 1199px) {
  .manon-brand-grid-item {
    flex: 0 0 calc(20% - 1rem);
  }
}
@media (max-width: 991px) {
  .manon-brand-grid-item {
    flex: 0 0 calc(25% - 1rem);
  }
}
@media (max-width: 767px) {
  .manon-brand-grid-item {
    flex: 0 0 calc(33.333% - 1rem);
    min-width: 100px;
    height: 85px;
  }
  .manon-brand-grid-item img {
    max-height: 60px;
  }
}

/* ---------- Newsletter alignment ---------- */
.block_newsletter {
  padding: 2rem 0;
}
.block_newsletter .row {
  align-items: center;
}
.block_newsletter p {
  margin: 0;
  line-height: 1.4;
}
.block_newsletter form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.block_newsletter input[type="email"] {
  flex: 1 1 auto;
}

/* ---------- Reassurance block (tidy spacing) ---------- */
#block-reassurance ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-around;
  padding: 0;
  list-style: none;
}
#block-reassurance li {
  flex: 1 1 30%;
  min-width: 200px;
}
#block-reassurance .block-reassurance-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
#block-reassurance img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
#block-reassurance .h6 {
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.3;
}

/* ===== Homepage top category navigation ===== */
.manon-cat-topnav {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 12px 0;
}
.manon-cat-topnav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}
.manon-cat-topnav-title {
  color: #232323;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.manon-cat-topnav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.manon-cat-topnav-list a {
  flex: 0 0 auto;
  display: block;
  padding: 8px 14px;
  background: #f8f9fa;
  border: 1px solid #e0e4e9;
  border-radius: 6px;
  color: #1f3a5f;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.manon-cat-topnav-list a:hover,
.manon-cat-topnav-list a:focus {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #fff;
}

/* ===== Category page brand bar (top directory) ===== */
.manon-brandbar {
  margin-bottom: 1.5rem;
}
.manon-brandbar-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #1f3a5f;
}
.manon-brandbar-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.manon-brandbar-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: #fff;
  color: #1f3a5f;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
}
.manon-brandbar-item:hover {
  border-color: #1f6feb;
  color: #1f6feb;
  box-shadow: 0 2px 8px rgba(31,111,235,0.12);
}
.manon-brandbar-count {
  margin-left: 6px;
  font-size: 0.75rem;
  color: #6b7a90;
  font-weight: 400;
}

/* ===== Advanced search bar (multi-field) ===== */
.search-widgets {
  width: 100%;
}
#search_widget {
  float: none !important;
  width: 100% !important;
  min-width: auto !important;
  max-width: none !important;
  margin-bottom: 0 !important;
  overflow: visible !important;
}
.header-top-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.manon-adv-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}
.manon-adv-search-fields {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 1 auto;
  flex-wrap: nowrap;
}
.manon-adv-field {
  flex: 0 0 auto;
  width: 125px;
  display: flex;
  flex-direction: column;
  margin: 0;
}
.manon-adv-field.manon-adv-field-wide {
  flex: 0 0 auto;
  width: 155px;
}
.manon-adv-field input[type="text"] {
  width: 100%;
  height: 32px;
  padding: 5px 8px;
  border: 1px solid #d8e0ea;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.2;
  background: #fff;
  color: #232323;
  box-sizing: border-box;
}
.manon-adv-field input[type="text"]::placeholder {
  color: #6b7a90;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.manon-adv-field input[type="text"]:focus {
  outline: none;
  border-color: #1f6feb;
  box-shadow: 0 0 0 2px rgba(31,111,235,0.08);
}
.manon-adv-search-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: 5px;
  background: #1f6feb;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.manon-adv-search-btn:hover {
  background: #0d5bd5;
}
.manon-adv-search-btn .material-icons {
  font-size: 16px;
}
@media (max-width: 1199px) {
  .manon-adv-search {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .manon-adv-search-fields {
    flex-wrap: wrap;
    width: 100%;
  }
  .manon-adv-field {
    flex: 1 1 calc(25% - 5px);
    min-width: 120px;
  }
  .manon-adv-field.manon-adv-field-wide {
    flex: 2 1 calc(35% - 5px);
    max-width: none;
  }
}
@media (max-width: 767px) {
  .manon-adv-search {
    flex-direction: column;
    align-items: stretch;
  }
  .manon-adv-search-fields {
    flex-wrap: wrap;
  }
  .manon-adv-field,
  .manon-adv-field.manon-adv-field-wide {
    flex: 1 1 100%;
    min-width: auto;
    max-width: none;
  }
  .manon-adv-search-btn {
    width: 100%;
  }
}

/* ===== Category page left subcategory directory ===== */
#left-column .category-tree-sidebar {
  margin-bottom: 1.25rem;
}
#left-column .category-tree-sidebar-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #232323;
}
#left-column .category-tree-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: none;
  overflow-y: visible;
}
#left-column .category-tree-sidebar li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #f0f0f0;
}
#left-column .category-tree-sidebar li:last-child {
  border-bottom: none;
}
#left-column .category-tree-sidebar a {
  display: block;
  padding: 0.5rem 0;
  color: #333;
  font-size: 0.85rem;
  line-height: 1.4;
  text-decoration: none;
}
#left-column .category-tree-sidebar a:hover {
  color: #1f6feb;
}
