/* ============================================================
   Collection Filter & Sort Bar  — v1.0.1
   ============================================================ */

/* --- Bar: heading | dropdowns | count | sort --- */
.collection-filter-bar {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 30px;
    font-family: 'Helvetica-Neue', Helvetica, Arial, sans-serif;
    background: none;
    width: 100%;
    box-sizing: border-box;
}

/* LEFT — heading */
.collection-filter-bar .filter-heading {
    font-family: 'Helvetica-Neue-Bold', Helvetica, Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #222;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline;
}

/* CENTER — dropdowns */
.collection-filter-bar .collection-filter-dropdowns {
    display: flex !important;
    align-items: center !important;
    justify-content: center;
    gap: 8px;
    flex: 1 1 auto;
    flex-wrap: wrap;
    position: static;
    margin: 0;
    padding: 0;
}

/* Count badge */
.collection-filter-bar .filter-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #c8c8c8;
    padding: 4px 14px;
    font-size: 13px;
    color: #222;
    background: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}

.collection-filter-bar .filter-count .reset-filters {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 15px;
    color: #555;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.collection-filter-bar .filter-count .reset-filters:hover { color: #CE1D10; }

/* RIGHT — sort */
.collection-filter-bar .filter-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    white-space: nowrap;
    flex-shrink: 0;
}

.collection-filter-bar .filter-sort label {
    color: #222;
    margin: 0;
    font-weight: normal;
    letter-spacing: 0.5px;
}

.collection-filter-bar .filter-sort select {
    border: 1px solid #c8c8c8;
    background: #fff url('../images/arrow_select.jpg') no-repeat right 10px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 7px 32px 7px 12px;
    font-size: 13px;
    font-family: 'Helvetica-Neue', Helvetica, Arial, sans-serif;
    color: #222;
    cursor: pointer;
    outline: none;
    border-radius: 0;
    min-width: 140px;
    height: auto;
}

.collection-filter-bar .filter-sort select:focus { border-color: #888; }

/* ---- Each dropdown ---- */
.collection-filter-bar .cf-dropdown {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

/* Trigger button */
.collection-filter-bar .cf-dropdown .cf-dropdown-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    border: 1px solid #c8c8c8;
    background: #fff;
    padding: 8px 14px;
    font-size: 13px;
    font-family: 'Helvetica-Neue', Helvetica, Arial, sans-serif;
    color: #222;
    cursor: pointer;
    white-space: nowrap;
    outline: none;
    border-radius: 0;
    box-shadow: none;
    transition: border-color 0.2s;
    line-height: 1.4;
}

.collection-filter-bar .cf-dropdown .cf-dropdown-toggle:hover,
.collection-filter-bar .cf-dropdown.open .cf-dropdown-toggle {
    border-color: #555;
    background: #f7f7f7;
}

/* Active dot */
.collection-filter-bar .cf-dropdown .cf-dropdown-toggle.has-active::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #CE1D10;
    margin-left: 4px;
    vertical-align: middle;
}

/* Arrow */
.collection-filter-bar .cf-dropdown .cf-dropdown-toggle .cf-arrow {
    font-size: 9px;
    transition: transform 0.2s;
    color: #777;
    display: inline-block;
}

.collection-filter-bar .cf-dropdown.open .cf-dropdown-toggle .cf-arrow {
    transform: rotate(180deg);
}

/* Panel — hidden by default, shown when .open */
.collection-filter-bar .cf-dropdown .cf-dropdown-panel {
    display: none !important;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    z-index: 99999;
    background: #fff;
    border: 1px solid #c8c8c8;
    min-width: 210px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    padding: 6px 0;
}

.collection-filter-bar .cf-dropdown.open .cf-dropdown-panel {
    display: block !important;
}

/* Panel label rows */
.collection-filter-bar .cf-dropdown .cf-dropdown-panel label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
    white-space: nowrap;
    background: none;
    border: none;
    width: 100%;
    box-sizing: border-box;
    float: none;
}

.collection-filter-bar .cf-dropdown .cf-dropdown-panel label:hover {
    background: #f5f5f5 !important;
}

.collection-filter-bar .cf-dropdown .cf-dropdown-panel input[type="checkbox"] {
    margin: 0 !important;
    padding: 0 !important;
    accent-color: #CE1D10;
    width: 14px !important;
    height: 14px !important;
    cursor: pointer;
    flex-shrink: 0;
    float: none;
    display: inline-block;
    vertical-align: middle;
}

/* ---- Active filter chips (below bar) ---- */
.collection-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    font-family: 'Helvetica-Neue', Helvetica, Arial, sans-serif;
}

.collection-active-filters .active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f0f0;
    border: 1px solid #d0d0d0;
    padding: 5px 12px;
    font-size: 12px;
    color: #333;
}

.collection-active-filters .active-filter-chip button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    color: #777;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    box-shadow: none;
}

.collection-active-filters .active-filter-chip button:hover { color: #CE1D10; }

/* ---- No results ---- */
.collection-no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #777;
    width: 100%;
}

/* ---- Loading state ---- */
.wd-products-wrapper.is-loading {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.25s;
}

/* ============================================================
   Product Grid Cards
   ============================================================ */

/* Card wrapper */
#primary .content_blog .small_image > div.content_item_default {
    background: none !important;
    padding: 0 10px !important;
    margin: 0 0 36px 0 !important;
}

/* Gray image box */
#primary .content_blog .small_image > div.content_item_default .item_header {
    background: #f0f0f0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px !important;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

#primary .content_blog .small_image > div.content_item_default .item_header img {
    object-fit: contain;
    display: block;
    margin: auto;
    transition: transform 0.3s ease;
    transform: scale(1.3);
}

#primary .content_blog .small_image > div.content_item_default:hover .item_header img {
    transform: scale(1.5);
}

/* Text area */
#primary .content_blog .small_image > div.content_item_default .item_content {
    text-align: center !important;
    padding: 0 !important;
}

/* Brand name — "TUDOR" */
#primary .content_blog .small_image > div.content_item_default .item_content .content_title h3 {
    font-family: 'Helvetica-Neue', Helvetica, Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: bold !important;
    letter-spacing: 0px;
    text-transform: uppercase;
    margin: 0 0 5px !important;
}

#primary .content_blog .small_image > div.content_item_default .item_content .content_title h3 a {
    color: #000 !important;
    text-decoration: none;
    font-weight: bold;
}

/* Model name — taxonomy term */
#primary .content_blog .small_image > div.content_item_default .item_content .content_title h4 {
    font-family: 'Helvetica-Neue-Bold', Helvetica, Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: bolder !important;
    letter-spacing: 0px !important;
    text-transform: uppercase;
    color: #111 !important;
    margin: 0 0 8px !important;
}

#primary .content_blog .small_image > div.content_item_default .item_content .content_title h4 a {
    color: #111 !important;
    text-decoration: none;
}

/* Price */
#primary .content_blog .small_image > div.content_item_default .item_content .content_title span {
    font-family: 'Helvetica-Neue', Helvetica, Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: normal !important;
    color: #444 !important;
    display: block;
}

/* ---- Responsive ---- */
@media only screen and (max-width: 991px) {
    .collection-filter-bar {
        flex-wrap: wrap;
        gap: 10px;
    }
    .collection-filter-bar .filter-heading {
        width: 100%;
        margin-bottom: 4px;
    }
    .collection-filter-bar .collection-filter-dropdowns {
        justify-content: flex-start;
        flex: 0 0 100%;
    }
    .collection-filter-bar .filter-count,
    .collection-filter-bar .filter-sort {
        flex-shrink: 0;
    }
}

@media only screen and (max-width: 499px) {
    .collection-filter-bar .cf-dropdown {
        width: calc(50% - 4px);
    }
    .collection-filter-bar .cf-dropdown .cf-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }
    .collection-filter-bar .cf-dropdown .cf-dropdown-panel {
        min-width: 100%;
    }
}
