/* ==================================================
   INVENTORY SEARCH (GENERAL)
================================================== */

.tot-inventory-search {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    box-sizing: border-box;
}

/* ==================================================
   INVENTORY SEARCH — HORIZONTAL (CONTROLLED)
================================================== */

.tot-inventory-search.tot-horizontal {
    display: flex !important;
    flex-wrap: nowrap;
    gap: var(--tot-search-gap, 16px);
    align-items: center;
    width: 100%;
}

/* ==============================
   Fields (select + input)
============================== */

.tot-inventory-search.tot-horizontal .tot-field,
.tot-inventory-search.tot-horizontal select,
.tot-inventory-search.tot-horizontal input {
    min-width: var(--tot-field-min-width, 180px);
    flex: var(--tot-field-flex, 1 1 0);
    box-sizing: border-box;

    /* 🔑 Elementor-driven visuals */
    background: var(--tot-field-bg);
    color: var(--tot-field-color);
    border-radius: var(--tot-field-radius);
    padding: var(--tot-field-padding);
    border-color: var(--tot-field-border-color);

    /* 🔧 HEIGHT NORMALIZATION */
    height: auto;
    line-height: 1.2;
}

/* Normalize vertical rhythm across browsers */
.tot-inventory-search.tot-horizontal select,
.tot-inventory-search.tot-horizontal input {
    padding-top: calc(var(--tot-field-padding-top, 0.65em));
    padding-bottom: calc(var(--tot-field-padding-bottom, 0.65em));
}

/* Remove native select inconsistencies (Safari / Chrome) */
.tot-inventory-search.tot-horizontal select {
    appearance: none;
    -webkit-appearance: none;
}

/* ==============================
   Button
============================== */

.tot-inventory-search.tot-horizontal .tot-search-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: var(--tot-btn-bg);
    color: var(--tot-btn-color);
    border-radius: var(--tot-btn-radius);
    padding: var(--tot-btn-padding);

    /* Match field height */
    line-height: 1.2;
}

/* ==============================
   Mobile fallback
============================== */
@media (max-width: 767px) {
    .tot-inventory-search.tot-horizontal {
        flex-direction: column;
        align-items: stretch;
    }

    .tot-inventory-search.tot-horizontal .tot-field,
    .tot-inventory-search.tot-horizontal select,
    .tot-inventory-search.tot-horizontal input,
    .tot-inventory-search.tot-horizontal .tot-search-btn {
        width: 100%;
    }
}

/* ==================================================
   INVENTORY SEARCH — STACKED (FORCED MODE)
================================================== */

.tot-inventory-search.tot-stacked {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.tot-inventory-search.tot-stacked .tot-field,
.tot-inventory-search.tot-stacked select,
.tot-inventory-search.tot-stacked input {
    width: 100%;
    box-sizing: border-box;
}

.tot-inventory-search.tot-stacked .tot-search-btn {
    width: 100%;
    min-height: 44px;
    cursor: pointer;
}
/* ======================================
   SEARCH FILTER — ISOLATED BEHAVIOR
====================================== */

.tot-filter-search-col .tot-filter-trigger {
    cursor: text;
}

/* Disable dropdown visuals */
.tot-filter-search-col .tot-filter-arrow {
    display: none;
}

.tot-filter-search-col .tot-filter-dropdown {
    display: none !important;
}

/* Prevent hover/active bleed */
.tot-filter-search-col:hover .tot-filter-trigger,
.tot-filter-search-col.is-active .tot-filter-trigger {
    background: inherit;
}
/* ==================================================
   FILTER BAR (MAIN LAYOUT)
================================================== */
:root {
  --tot-filter-width: 174px;
  --tot-filter-gap: 6px;
}

.tot-inventory-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tot-filter-gap, 16px);
    align-items: flex-start;
}

/* ==================================================
   FILTER COLUMN
================================================== */

.tot-filter-col {
    position: relative;
    display: flex;
    flex-direction: column;
    width: var(--tot-filter-width, 220px);
    flex: 0 0 var(--tot-filter-width, 220px);
}

/* ==================================================
   FILTER TRIGGER (BUTTON / BOX)
================================================== */

.tot-filter-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    height: 44px;
    padding: 0 14px;

    background: #fff;
border: 1px solid #DADADA;
border-radius: 8px;
color: #000;

    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
}

/* Center label visually */
.tot-filter-label {
    flex: 1 1 auto;
    text-align: center;

    white-space: normal;          /* ✅ allow wrapping */
    overflow-wrap: anywhere;      /* ✅ break long words */
    word-break: break-word;       /* ✅ fallback */
    line-height: 1.25;

    max-width: 100%;
}

/* Dropdown arrow */
.tot-filter-arrow {
    flex: 0 0 auto;
    font-size: 12px;
    transition: transform 0.2s ease;
}

/* Open state */
.tot-filter-col.is-open .tot-filter-arrow {
    transform: rotate(180deg);
}

/* Hover */
.tot-filter-trigger:hover {
  background: #003178;
  color: #ffffff;
  border-color: #003178;
}

.tot-filter-trigger:hover .tot-filter-label,
.tot-filter-trigger:hover .tot-filter-arrow {
  color: #ffffff;
}

.tot-filter-col.is-active .tot-filter-trigger {
  background: #DC0000;
  border-color: #DC0000;
  color: #ffffff;
}
.tot-filter-col.is-active .tot-filter-label,
.tot-filter-col.is-active .tot-filter-arrow {
  color: #ffffff;
}
/* ==================================================
   DROPDOWN PANEL
================================================== */

.tot-filter-dropdown {
    display: none;
    position: absolute;
    top: calc(44px + 6px);
    left: 0;
    width: 100%;
    max-height: 280px;
    overflow-y: auto;

    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 8px 0;
    z-index: 999;
}

.tot-filter-col.is-open .tot-filter-dropdown {
    display: block;
}

/* ==================================================
   DROPDOWN OPTIONS
================================================== */

.tot-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
}

.tot-filter-option:hover {
  background: #003178;
  color: #ffffff;
}

/* ==================================================
   SELECTED PILLS
================================================== */

.tot-filter-pills-wrap {
    margin-top: 8px;
}

.tot-selected-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tot-selected-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;

    border-radius: 999px;
    font-size: 13px;
    line-height: 1;

    background: #eef3ff;
    border: 1px solid #cdd8ff;
}

.tot-pill-remove {
    cursor: pointer;
    font-weight: 600;
}

/* ==================================================
   CLEAR ALL
================================================== */

.tot-clear-all-wrap {
    display: flex;
    align-items: center;
}

/* ======================================
   CLEAR ALL — PLAIN TEXT
====================================== */

.tot-clear-all-wrap {
    display: flex;
    align-items: center;
    height: 44px; /* aligns with filters */
}

.tot-clear-all {
    font-size: 13px;
    color: #777;
    cursor: pointer;
    text-decoration: underline;
    user-select: none;

    /* 👇 reserve space */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;

    transition: opacity 0.15s ease;
}

/* JS-controlled visible state */
.tot-clear-all.is-visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.tot-clear-all:hover {
    color: #000;
}
/* ==================================================
   SEARCH FILTER — STRUCTURE SAME, STYLING ISOLATED
================================================== */

.tot-filter-search-col {
    position: relative;
    width: 292px;
  flex: 0 0 292px;
}

/* Search trigger behaves like a filter box */
.tot-filter-search-trigger {
    display: flex;
    align-items: center;

    width: 100%;
    height: 44px;
    padding: 0 14px;

    box-sizing: border-box;
    cursor: text;
}

/* Disable dropdown visuals */
.tot-filter-search-trigger:hover,
.tot-filter-search-col.is-active .tot-filter-search-trigger {
    background: inherit;
    border-color: inherit;
}

/* No arrow for search */
.tot-filter-search-trigger .tot-filter-arrow {
    display: none;
}

/* No dropdown ever for search */
.tot-filter-search-col .tot-filter-dropdown {
    display: none !important;
}

/* Search input fills the container */
.tot-filter-search-wrap {
    height: 44px;
}

.tot-filter-search-input {
    width: 100%;
    height: 100%;

    border: none;
    outline: none;
    background: transparent;

    padding: 0;
    margin: 0;
    font: inherit;
}
/* ==================================================
   SEARCH FILTER — ISOLATE FROM DROPDOWN BEHAVIOR
================================================== */

.tot-filter-search-col .tot-filter-search-dropdown {
    position: static;
    display: block;
    margin-top: 6px;
    padding: 0;
    border: none;
    background: transparent;
}

/* Disable dropdown visuals on search trigger */
.tot-filter-search-col .tot-filter-trigger {
    cursor: text;
}

.tot-filter-search-col .tot-filter-trigger:hover,
.tot-filter-search-col.is-active .tot-filter-trigger {
    background: #ffffff;
    color: inherit;
    border-color: inherit;
}

/* Hide arrow for search */
.tot-filter-search-col .tot-filter-arrow {
    display: none;
}

/* Search input sizing */
.tot-filter-search-input {
    width: 100%;
    height: 44px;
    box-sizing: border-box;
}

/* SAFETY: prevent dropdown CSS from affecting search */
.tot-filter-search-col .tot-filter-dropdown {
    display: none !important;
}
/* ==================================================
   SEARCH INPUT — ISOLATE FROM GLOBAL INPUT STYLES
================================================== */

.tot-filter-search-col .tot-filter-search-input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
    padding: 0;
}
.category-manufacturers {
  margin: 30px 0;
}

.manufacturer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

/* Card */
.manufacturer-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;

  /* FLEX MATH — USER CONTROLLED */
  flex: 0 0 calc(100% / var(--tot-logos-per-row));
  max-width: calc(100% / var(--tot-logos-per-row));

  box-sizing: border-box;
  background: #fff;
  border-radius: 10px;
  text-decoration: none;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

/* Target BOTH possible outputs:
   - your class .manufacturer-logo
   - plain img inside manufacturer-card
*/
.manufacturer-card img,
.manufacturer-logo {
  width: auto;
  display: block;

  /* ✅ initial state (so hover has something to change) */
  opacity: 0.85;

  /* ✅ smooth */
  transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

/* Hover effect */
.manufacturer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.manufacturer-card:hover img,
.manufacturer-card:hover .manufacturer-logo {
  filter: grayscale(0%);
  opacity: 1;
}

/* Name fallback */
.manufacturer-name {
  font-weight: 600;
  color: #111;
}
/* =====================================
   EMPTY RESULTS STATE
===================================== */

.tot-empty-results {
  display: none;
  text-align: center;
  padding: 48px 20px;
  margin-top: 28px;
  border-top: 1px solid #e5e5e5;
  color: #444;
}

.tot-empty-results h3 {
  margin-bottom: 12px;
  font-weight: 600;
}

.tot-empty-results ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.tot-empty-results li {
  margin: 6px 0;
}
/* =====================================
   EMPTY INVENTORY DEFAULT ALIGNMENT
===================================== */

.tot-empty-results {
    display: none; /* JS controls visibility */

    margin: 40px auto;          /* horizontal centering */
    text-align: center;         /* center text */

    max-width: 80%;           /* readable width */
    width: 100%;

    padding: 40px 20px;
}

/* Center suggestions list neatly */
.tot-empty-results ul {
    list-style-position: inside;
    padding-left: 0;
    margin-top: 10px;
}
/* =====================================
   EMPTY RESULTS BUTTON
===================================== */

.tot-empty-clear-btn {
    margin-top: 20px;
    padding: 12px 26px;

    border: none;
    border-radius: 6px;

    background: #111;
    color: #fff;

    font-size: 14px;
    cursor: pointer;
    transition: all .25s ease;
}

.tot-empty-clear-btn:hover {
    background: #333;
}
.tot-empty-results button.tot-empty-clear-btn,
.tot-empty-results .tot-empty-clear-btn[type="button"],
.tot-empty-results .tot-empty-clear-btn[type="submit"] {
    border: none !important;
    background-color: #003178;
    color: #fff;
}
.tot-search-empty-results {
    max-width: 720px;
    margin: 60px auto;
}

.tot-search-empty-results ul {
    margin-top: 10px;
    padding-left: 18px;
}

.tot-empty-clear-btn {
    margin-top: 20px;
    background: #003178;
    color: #fff;
    border: none;
    padding: 12px 22px;
    cursor: pointer;
    transition: opacity .2s ease;
}

.tot-empty-clear-btn:hover {
    opacity: .85;
}
.no-stock {
  display: none;
}
/* ==================================================
   MOBILE FILTER BAR
================================================== */

@media (max-width: 767px) {

  /* FILTER BAR */
  .tot-inventory-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* 🔑 equal spacing everywhere */
    align-items: flex-start;
  }

  /* SEARCH — FULL WIDTH */
  .tot-filter-search-col {
    width: 100%;
    flex: 0 0 100%;
  }

  /* DROPDOWNS — MULTI PER ROW */
  .tot-filter-col:not(.tot-filter-search-col) {
    width: calc(50% - 5px); /* 2 per row */
    flex: 0 0 calc(50% - 5px);
  }
  /* DROPDOWN PANEL */
  .tot-filter-dropdown {
    position: absolute;
    max-height: 240px;
  }
   .tot-filter-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center; /* or inherit from Elementor */
  }
}