/* ===================================
   Filter Sidebar Layout (Off-Canvas)
   =================================== */
.listing-layout {
    display: block; /* Full width for results */
    position: relative;
    margin-top: 30px;
}

.listing-sidebar {
    position: fixed;
    top: 0;
    left: -400px; /* Hide off-canvas on the left */
    width: 380px;
    height: 100%;
    background: #fff;
    z-index: 9999;
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.listing-sidebar.open {
    left: 0;
}

/* Backdrop Overlay */
.bab-filters-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.bab-filters-overlay.active {
    opacity: 1;
    visibility: visible;
}

.listing-results {
    width: 100%;
}

/* Header */
.bab-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F0F0F0;
}

.bab-filters-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #222;
}

.bab-close-filters-mobile {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* Filter Groups */
.filter-group {
	margin-bottom: 30px;
    gap: 12px;
    display: flex;
    flex-direction: column;
}

.filter-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Checkboxes */
.checkbox-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bab-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 32px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #484848;
    user-select: none;
    transition: color 0.2s;
}

.bab-checkbox:hover {
    color: #000;
}

.bab-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #DDDDDD;
    border-radius: 4px;
    transition: all 0.2s;
}

.bab-checkbox input:checked ~ .checkmark {
    background-color: #007BFF;
    border-color: #007BFF;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.bab-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.bab-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Price Slider */
.price-slider-wrapper {
    padding: 0 10px;
}

#bab-price-slider {
    margin-bottom: 25px;
    height: 4px;
    border: none;
    background: #EAEAEA;
}

#bab-price-slider .noUi-connect {
    background: #007BFF;
}

#bab-price-slider .noUi-handle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #DDDDDD;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    top: -10px;
    right: -12px;
    cursor: pointer;
}

#bab-price-slider .noUi-handle:before,
#bab-price-slider .noUi-handle:after {
    display: none;
}

.price-inputs {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #717171;
}

/* Stepper */
.stepper-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stepper-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid #DDDDDD;
    background: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #717171;
    padding: 0;
}

.stepper-btn:hover {
    border-color: #222;
    color: #222;
}

#bab-filter-bathrooms {
    width: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #222;
    background: transparent;
}

/* Features Accordion */
.feature-category {
    border-bottom: 1px solid #F0F0F0;
    padding: 12px 0;
}

.feature-category summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    list-style: none;
}

.feature-category summary::-webkit-details-marker {
    display: none;
}

.feature-category summary .material-symbols-outlined {
    transition: transform 0.2s;
}

.feature-category[open] summary .material-symbols-outlined {
    transform: rotate(180deg);
}

.category-content {
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Footer Buttons */
.bab-filters-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.bab-apply-filters-btn {
    background: #007BFF;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.bab-apply-filters-btn:hover {
    background: #0056b3;
}

.bab-reset-filters-btn {
    background: transparent;
    color: #717171;
    border: none;
    padding: 10px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

/* Mobile Filter Bar (Desktop & Mobile) */
.mobile-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Responsive Overrides - Clean up */
@media (max-width: 991px) {
    .listing-sidebar {
        width: 100%;
        left: -100%;
    }
}

body.bab-filters-open {
    overflow: hidden;
}
aside.listing-sidebar.open {
    padding: 30px;
    min-height: 100vh;
    height: 100dvh;       /* dynamic viewport height (modern browsers) */
    overflow-y: auto;
}
/* ===================================
   Boat Card & Nested Carousel
   =================================== */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.boat-card { 
    cursor: pointer; 
    border-radius: 21px; 
    overflow: hidden; 
    transition: all 0.3s ease; 
    background: #fff;
}
.boat-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.08); }

.boat-card-img { 
    position: relative; 
    width: 100%; 
    aspect-ratio: 201/195; 
    border-radius: 21px; 
    overflow: hidden; 
    background: #f7f7f7; 
}
.nc-track {
    display: flex;
    width: auto;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}
.nc-track img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    flex-shrink: 0; 
}

.nc-nav { 
    position: absolute; 
    top: 50%; 
    width: 100%; 
    transform: translateY(-50%); 
    display: flex; 
    justify-content: space-between; 
    padding: 0 10px; 
    opacity: 0; 
    transition: opacity 0.3s; 
    pointer-events: none;
}
.boat-card:hover .nc-nav { opacity: 1; }
.nc-prev, .nc-next { 
    background: rgba(255,255,255,0.9); 
    border: none; 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 20px; 
    color: #000; 
    padding: 0; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    pointer-events: auto;
}

.boat-card-info { padding: 15px 12px; }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.card-title a { color: #222; text-decoration: none; }
.card-title a:hover { color: #007BFF; }

.card-meta { font-size: 13px; color: #717171; margin-bottom: 8px; line-height: 1.4; }
.card-price { }
.card-price .price-val { color: #222; font-weight: 800; font-size: 16px; }
.card-price .currency-display { font-weight: 600; color: #222; }

/* Responsive Grid */
@media (max-width: 1400px) {
    .listing-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
    .listing-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .listing-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .card-title { font-size: 14px; }
    .card-meta { font-size: 12px; }
    .card-price .price-val { font-size: 14px; }
}
@media (max-width: 480px) {
    .listing-grid { grid-template-columns: 1fr; }
}

/* Mobile Listing Navigation */
.mobile-listing-nav {
    display: none;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 40px;
}
.ml-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #007BFF;
    color: #fff;
    border-color: #007BFF;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}
.ml-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.ml-nav-btn svg {
    width: 10px;
    height: 18px;
}

@media (max-width: 768px) {
    .mobile-listing-nav {
        display: flex;
    }
    .listing-grid .boat-card {
        display: none; /* Controlled by JS visible-mobile class */
    }
    .listing-grid .boat-card.visible-mobile {
        display: block;
    }
}
