/**
 * JEA Cards Layout — Properties card grid with sidebar filters.
 *
 * @package     Joomla.Site
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2026 ReCreating Anew (by GinA), Sidney, Maine, USA. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

/* ============================================================
   PAGE WRAPPER
   ============================================================ */
.jea-cards-page {
    font-family: inherit;
}

/* ============================================================
   SORT BAR
   ============================================================ */
.jea-sortbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e9edf3;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 20px;
}

/* Left cluster: count + badge */
.jea-sortbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Right cluster: sort-by and per-page on the same row */
.jea-sortbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.jea-sortbar-count {
    font-size: .84rem;
    color: #64748b;
    white-space: nowrap;
    font-weight: 500;
}

.jea-sort-select-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
}

.jea-sort-label {
    font-size: .78rem;
    color: #94a3b8;
    white-space: nowrap;
    margin: 0;
    font-weight: 500;
}

.jea-sort-select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px 28px 5px 10px;
    font-size: .83rem;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px 9px;
    appearance: none;
    -webkit-appearance: none;
    color: #374151;
    cursor: pointer;
    min-width: 160px;
    height: auto;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: border-color .15s, box-shadow .15s;
}

.jea-sort-select:focus {
    border-color: #93c5fd;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.jea-perpage-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.jea-perpage-wrap > div select,
.jea-perpage-wrap > div .form-select {
    width: 72px !important;
    max-width: 72px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 5px 6px !important;
    font-size: .83rem !important;
    background: #fff !important;
    color: #374151 !important;
    height: auto !important;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0,0,0,.06) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

/* ============================================================
   TWO-COLUMN LAYOUT: SIDEBAR + CARDS
   Inline styles on the elements handle the actual flex display
   (to defeat template CSS); these classes provide CSS fallback.
   ============================================================ */
.jea-cards-layout {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 24px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.jea-sidebar {
    width: 280px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: block !important;
}

/* Collapsible sidebar toggle button (replaces old <h3> heading) */
.jea-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 18px;
    font-size: .85rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: .03em;
    cursor: pointer;
    box-shadow: 0 3px 16px rgba(0,0,0,.09);
    margin-bottom: 0;
    transition: border-radius .3s ease, box-shadow .2s ease;
}

.jea-sidebar-toggle:hover {
    background: #f8fafc;
}

.jea-sidebar-toggle[aria-expanded="true"] {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

.jea-toggle-icon {
    font-size: .7rem;
    color: #94a3b8;
    transition: transform .25s ease;
}

.jea-sidebar-inner {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 14px 14px;
    padding: 18px 18px 20px;
    position: sticky;
    top: 20px;
    box-shadow: 0 3px 16px rgba(0,0,0,.09);
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
}

/* Legacy h3 heading (for layouts that don't use the toggle button) */
.jea-sidebar-inner h3 {
    font-size: .85rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    letter-spacing: .03em;
}

/* Each filter group — generous bottom spacing + subtle divider */
.jea-filter-group {
    margin-bottom: 0;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.jea-filter-group:first-child {
    padding-top: 0;
}

.jea-filter-group:last-of-type {
    border-bottom: none;
    padding-bottom: 4px;
}

/* Field label */
.jea-filter-label {
    display: block;
    font-size: .67rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .09em;
    margin-bottom: 7px;
}

/* All inputs and selects inside sidebar */
.jea-sidebar-inner input[type="text"],
.jea-sidebar-inner input[type="number"],
.jea-sidebar-inner select,
.jea-sidebar-inner .form-select {
    width: 100% !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 7px 11px !important;
    font-size: .84rem !important;
    background: #f8fafc !important;
    color: #1e293b !important;
    transition: border-color .15s, box-shadow .15s, background .15s;
    box-sizing: border-box;
    height: auto !important;
    line-height: 1.5;
    appearance: auto;
}

.jea-sidebar-inner input[type="text"]:focus,
.jea-sidebar-inner input[type="number"]:focus,
.jea-sidebar-inner select:focus,
.jea-sidebar-inner .form-select:focus {
    border-color: #2563eb !important;
    background: #fff !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,.14) !important;
}

/* Budget range: two inputs side by side */
.jea-range {
    display: flex;
    align-items: center;
    gap: 6px;
}

.jea-range input {
    flex: 1;
    min-width: 0;
}

.jea-range-sep {
    color: #94a3b8;
    font-size: .85rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Scrollable checkbox lists */
.jea-filter-list-wrap ul,
.jea-filter-group ul {
    list-style: none !important;
    margin: 0;
    padding: 5px 8px !important;
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px;
    background: #f8fafc;
    transition: max-height .25s ease;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.jea-filter-group ul li,
.jea-filter-list-wrap ul li {
    list-style: none !important;
    padding: 3px 0 !important;
}

/* Expandable "Show all" toggle */
.jea-list-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 4px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    letter-spacing: .01em;
    line-height: 1.55;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.jea-list-toggle-btn:hover {
    background: #f5f8ff;
    border-color: #bfdbfe;
    color: #2563eb;
    box-shadow: 0 1px 6px rgba(37,99,235,.12);
}

/* Active filter group — label becomes blue, small dot indicator */
.jea-filter-active .jea-filter-label {
    color: #2563eb !important;
}
.jea-filter-active .jea-filter-label::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #2563eb;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
    margin-bottom: 1px;
}
.jea-filter-active select,
.jea-filter-active input[type="text"],
.jea-filter-active input[type="number"] {
    border-color: #93c5fd !important;
    background-color: #eff6ff !important;
}

/* Active-filters badge in sortbar */
.jea-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1d4ed8;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    padding: 3px 10px 3px 10px;
    white-space: nowrap;
    margin-left: 2px;
}
.jea-filter-badge-clear {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: .9rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-weight: 700;
    margin-left: 2px;
}
.jea-filter-badge-clear:hover { color: #dc2626; }

/* Standalone "exclude issues" checkbox */
.jea-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 9px;
    font-size: .84rem !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #374151 !important;
    cursor: pointer;
    line-height: 1.45;
    margin: 0;
}

.jea-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 14px !important;
    height: 14px;
    accent-color: #2563eb;
}

/* Apply / Reset buttons */
.jea-filter-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e9edf3;
}

.jea-btn-apply {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    background: #2563eb;
    color: #fff !important;
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: .81rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background .18s, box-shadow .18s, transform .12s;
    text-decoration: none !important;
    box-sizing: border-box;
    line-height: 1.45;
    letter-spacing: .01em;
    box-shadow: 0 1px 6px rgba(37,99,235,.25);
}

.jea-btn-apply:hover {
    background: #1d4ed8;
    color: #fff !important;
    box-shadow: 0 3px 12px rgba(37,99,235,.32);
    transform: translateY(-1px);
}

.jea-btn-apply:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(37,99,235,.18);
}

.jea-btn-reset {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    text-align: center;
    color: #6b7280 !important;
    font-size: .81rem;
    font-weight: 500;
    text-decoration: none !important;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1.45;
    letter-spacing: .01em;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: color .18s, background .18s, border-color .18s, box-shadow .18s, transform .12s;
}

.jea-btn-reset:hover {
    color: #b91c1c !important;
    background: #fff8f8;
    border-color: #fecaca;
    box-shadow: 0 1px 6px rgba(185,28,28,.12);
    transform: translateY(-1px);
}

.jea-btn-reset:active {
    transform: translateY(0);
    background: #fee2e2;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.jea-cards-main {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    display: block !important;
}

/* ============================================================
   CARD GRID — 2 columns by default (JS also sets inline style)
   ============================================================ */
.jea-card-grid {
    display: grid;
    grid-template-columns: repeat(var(--jea-cols, 3), 1fr);
    gap: 18px;
}

/* ============================================================
   INDIVIDUAL CARD
   ============================================================ */
.jea-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .2s ease, transform .2s ease;
}

.jea-card:hover {
    box-shadow: 0 6px 22px rgba(0,0,0,.11);
    transform: translateY(-3px);
}

/* Card image — fixed aspect ratio */
.jea-card-img-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #f1f5f9;
    overflow: hidden;
}

.jea-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.jea-card:hover .jea-card-img-wrap img {
    transform: scale(1.03);
}

.jea-card-img-wrap .jea-mini-map {
    height: 100%;
    width: 100%;
    pointer-events: none;
}

.jea-card-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    font-size: .8rem;
    text-decoration: none;
    background: #f8fafc;
}

/* Status badge */
.jea-status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    line-height: 1.4;
    pointer-events: none;
}

.jea-status-available-now  { background: #166534; color: #dcfce7; }
.jea-status-available-from { background: #92400e; color: #fef3c7; }
.jea-status-occupied       { background: #991b1b; color: #fee2e2; }

/* Condition badge */
.jea-condition-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: .64rem;
    font-weight: 600;
    background: rgba(0,0,0,.5);
    color: #fff;
    backdrop-filter: blur(4px);
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Card body */
.jea-card-body {
    padding: 13px 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.jea-card-title {
    font-size: .9rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
}

.jea-card-title a {
    color: #1e293b;
    text-decoration: none;
}

.jea-card-title a:hover {
    color: #2563eb;
}

.jea-card-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2563eb;
    line-height: 1.2;
}

.jea-card-price small {
    font-size: .72rem;
    font-weight: 400;
    color: #64748b;
}

.jea-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    font-size: .77rem;
    color: #64748b;
}

.jea-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.jea-meta-item svg {
    flex-shrink: 0;
    color: #94a3b8;
}

.jea-card-issues-warn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-radius: 7px;
    padding: 5px 9px;
    font-size: .75rem;
    font-weight: 600;
    color: #92400e;
}

.jea-card-issues-warn svg {
    flex-shrink: 0;
    color: #f59e0b;
}

.jea-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.jea-card-btn {
    display: inline-block;
    padding: 5px 15px;
    background: #2563eb;
    color: #fff !important;
    border-radius: 7px;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background .15s;
    line-height: 1.5;
}

.jea-card-btn:hover,
.jea-card-btn:focus {
    background: #1d4ed8;
    color: #fff !important;
}

.jea-card-date {
    font-size: .71rem;
    color: #94a3b8;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.jea-pagination {
    margin-top: 26px;
    text-align: center;
}

.jea-pagination .counter {
    font-size: .82rem;
    color: #64748b;
    margin-bottom: 8px;
}

/* ============================================================
   NO RESULTS
   ============================================================ */
.jea-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.jea-no-results p {
    font-size: 1rem;
    margin-bottom: 16px;
}

/* ============================================================
   #jFormCards SPECIFICITY OVERRIDES
   Use the form wrapper ID to win over Bootstrap / Atum template
   rules that would otherwise override the sidebar inputs and
   button colours.
   ============================================================ */

/* Sidebar inputs */
#jFormCards .jea-sidebar-inner input[type="text"],
#jFormCards .jea-sidebar-inner input[type="number"] {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: .84rem;
    background: #f8fafc;
    color: #1e293b;
    height: auto;
    line-height: 1.5;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

#jFormCards .jea-sidebar-inner select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    font-size: .84rem;
    background-color: #f8fafc;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px 11px;
    color: #1e293b;
    height: auto;
    line-height: 1.5;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

#jFormCards .jea-sidebar-inner input[type="text"]:focus,
#jFormCards .jea-sidebar-inner input[type="number"]:focus,
#jFormCards .jea-sidebar-inner select:focus {
    border-color: #2563eb;
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}

/* Active filter highlights */
#jFormCards .jea-filter-active .jea-filter-label {
    color: #2563eb;
}

#jFormCards .jea-filter-active select,
#jFormCards .jea-filter-active input[type="text"],
#jFormCards .jea-filter-active input[type="number"] {
    border-color: #93c5fd;
    background-color: #eff6ff;
}

/* Action buttons */
#jFormCards button.jea-btn-apply {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    background: #2563eb;
    color: #fff !important;
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: .81rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.45;
    letter-spacing: .01em;
    box-shadow: 0 1px 6px rgba(37,99,235,.25);
    transition: background .18s, box-shadow .18s, transform .12s;
    text-decoration: none !important;
}

#jFormCards button.jea-btn-apply:hover {
    background: #1d4ed8;
    color: #fff !important;
    box-shadow: 0 3px 12px rgba(37,99,235,.32);
    transform: translateY(-1px);
}

#jFormCards button.jea-btn-apply:active {
    transform: translateY(0);
}

#jFormCards button.jea-btn-reset {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    text-align: center;
    color: #6b7280 !important;
    font-size: .81rem;
    font-weight: 500;
    text-decoration: none !important;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    line-height: 1.45;
    letter-spacing: .01em;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: color .18s, background .18s, border-color .18s, box-shadow .18s, transform .12s;
}

#jFormCards button.jea-btn-reset:hover {
    color: #b91c1c !important;
    background: #fff8f8;
    border-color: #fecaca;
    box-shadow: 0 1px 6px rgba(185,28,28,.12);
    transform: translateY(-1px);
}

#jFormCards button.jea-btn-reset:active {
    transform: translateY(0);
    background: #fee2e2;
}

/* "Show all" list toggle */
#jFormCards button.jea-list-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 5px 15px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: .73rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    line-height: 1.55;
    letter-spacing: .01em;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
    text-decoration: none;
}

#jFormCards button.jea-list-toggle-btn:hover {
    background: #f5f8ff;
    border-color: #bfdbfe;
    color: #2563eb;
    box-shadow: 0 1px 6px rgba(37,99,235,.12);
}

/* Per-page dropdown in sort bar */
#jFormCards .jea-sortbar-count {
    font-size: .84rem;
    color: #64748b;
    white-space: nowrap;
    font-weight: 500;
}

#jFormCards .jea-perpage-wrap select,
#jFormCards .jea-perpage-wrap .form-select {
    width: 72px !important;
    max-width: 72px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 5px 6px !important;
    font-size: .83rem !important;
    background: #fff !important;
    color: #374151 !important;
    height: auto !important;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0,0,0,.06) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

#jFormCards .jea-sort-select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px 28px 5px 10px;
    font-size: .83rem;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px 9px;
    appearance: none;
    -webkit-appearance: none;
    color: #374151;
    cursor: pointer;
    min-width: 160px;
    height: auto;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Mid-range: sidebar narrows slightly, 2-col cards remain */
@media (max-width: 1059px) and (min-width: 769px) {
    .jea-sidebar {
        width: 240px !important;
        min-width: 240px !important;
    }
}

/* Small screens: sidebar stacks (JS handles inline style override too) */
@media (max-width: 768px) {
    .jea-cards-layout {
        flex-direction: column !important;
    }

    .jea-sidebar {
        width: 100% !important;
        min-width: 100% !important;
    }

    .jea-sidebar-inner {
        position: static;
    }

    .jea-card-grid {
        --jea-cols: 2;
        gap: 14px;
    }

    .jea-sortbar {
        flex-wrap: wrap;
    }
}

/* Extra small: 1-col card */
@media (max-width: 540px) {
    .jea-card-grid {
        --jea-cols: 1;
    }
}
