/* WooYoo Product Filter — Frontend Styles
   wooyoo.net | v2.1.1 */

.wooyoo-filters {
    margin-bottom: 28px;
    padding: 0 0 20px;
}

.wooyoo-filters-title {
    font-size: 20px;
    font-weight: 700;
    color: #1b2a4a;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}

.wooyoo-filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* ── Dropdown wrapper ── */
.wooyoo-filter-dropdown {
    position: relative;
}

/* ── Toggle button ── */
.wooyoo-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1.5px solid #1b2a4a;
    border-radius: 6px;
    background: transparent;
    color: #1b2a4a;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1.4;
}

.wooyoo-filter-toggle:hover {
    border-color: #e8792b;
    color: #e8792b;
}

.wooyoo-toggle-active {
    border-color: #e8792b;
    background: #e8792b;
    color: #fff;
}

.wooyoo-toggle-active:hover {
    background: #d06a22;
    border-color: #d06a22;
    color: #fff;
}

/* ── Chevron ── */
.wooyoo-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.wooyoo-filter-dropdown.wooyoo-open .wooyoo-chevron {
    transform: rotate(180deg);
}

/* ── Dropdown panel ── */
.wooyoo-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    max-height: 320px;
    overflow-y: auto;
    background: #1b2a4a;
    border: 1.5px solid #253a5e;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    padding: 6px 0;
}

.wooyoo-filter-dropdown.wooyoo-open .wooyoo-dropdown-panel {
    display: block;
}

/* Scrollbar */
.wooyoo-dropdown-panel::-webkit-scrollbar          { width: 6px; }
.wooyoo-dropdown-panel::-webkit-scrollbar-track    { background: transparent; }
.wooyoo-dropdown-panel::-webkit-scrollbar-thumb    { background: rgba(255,255,255,0.2); border-radius: 3px; }

/* ── Options ── */
.wooyoo-dropdown-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none !important;
    font-size: 13px;
    transition: background 0.15s ease, color 0.15s ease;
    gap: 12px;
}

.wooyoo-dropdown-option:hover {
    background: rgba(232, 121, 43, 0.2);
    color: #e8792b;
}

.wooyoo-option-selected {
    background: rgba(232, 121, 43, 0.25);
    color: #e8792b;
    font-weight: 600;
}

/* "All" option */
.wooyoo-all-option {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
    font-style: italic;
    opacity: 0.8;
}

.wooyoo-all-option.wooyoo-option-selected {
    font-style: normal;
    font-weight: 600;
    opacity: 1;
}

.wooyoo-option-name {
    flex: 1;
}

.wooyoo-option-count {
    font-size: 11px;
    opacity: 0.5;
    flex-shrink: 0;
}

/* ── Clear all ── */
.wooyoo-clear-filters {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    font-size: 13px;
    color: #e8792b;
    text-decoration: none !important;
    border: 1.5px solid #e8792b;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
}

.wooyoo-clear-filters:hover {
    background: #e8792b;
    color: #fff;
}

/* ── Hide native WooCommerce pagination ── */
.woocommerce-pagination,
nav.woocommerce-pagination {
    display: none !important;
}

/* ── Infinite scroll sentinel & loader ── */
#wooyoo-sentinel {
    height: 1px;
}

#wooyoo-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    width: 100%;
}

.wooyoo-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(27, 42, 74, 0.12);
    border-top-color: #e8792b;
    border-radius: 50%;
    animation: wooyoo-spin 0.75s linear infinite;
}

@keyframes wooyoo-spin {
    to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .wooyoo-filters-title   { font-size: 18px; }
    .wooyoo-filter-toggle   { padding: 8px 14px; font-size: 13px; }
    .wooyoo-dropdown-panel  { min-width: 200px; max-height: 260px; }
    .wooyoo-clear-filters   { padding: 8px 14px; font-size: 12px; }
}
