:root {
    --header-height: 84px;
}

/* Main Layout Container */
.hh-desktop-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main, #0D1B2A);
    padding-top: var(--header-height);
}

/* Left Sidebar: Filters */
.hh-filters-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-card, #1B2838);
    border-right: 1px solid var(--border-color, #2A3F54);
    padding: 20px;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

/* Center: Listings */
.hh-listings-main {
    flex: 1;
    padding: 20px 24px;
    min-width: 0;
    background: var(--bg-main, #0D1B2A);
}

/* Right Sidebar: Map */
.hh-map-sidebar {
    width: 40% !important;
    flex-shrink: 0 !important;
    position: sticky !important;
    top: var(--header-height) !important;
    height: calc(100vh - var(--header-height)) !important;
    background: var(--bg-card, #1B2838) !important;
    padding: 24px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.sidemap-container,
#map-section,
#map,
.mapSidebar {
    border-radius: 12px !important;
    overflow: hidden !important;
    height: 100% !important;
    width: 100% !important;
    border: none !important;
    position: relative !important;
    top: 0 !important;
}

.sidemap-container {
    border: 1px solid var(--border-color, #2A3F54) !important;
    box-sizing: border-box !important;
}

.hh-map-container {
    width: 100%;
    height: 100%;
}

.hh-map-controls {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.hh-search-area-btn {
    background: rgba(27, 40, 56, 0.9);
    border: 1px solid var(--border-color, #2A3F54);
    border-radius: 20px;
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.hh-map-zoom {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
}

.hh-map-zoom button {
    width: 40px;
    height: 40px;
    background: rgba(27, 40, 56, 0.9);
    border: 1px solid var(--border-color, #2A3F54);
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

/* =========================================
   SIDEBAR FILTERS STYLES
   ========================================= */

.hh-sidebar-filters {
    color: var(--text-primary, #fff);
}

.hh-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color, #2A3F54);
}

.hh-filters-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary, #fff);
}

.hh-reset-all {
    background: transparent;
    border: none;
    color: var(--primary-color, #FF6B00);
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}

.hh-filter-section {
    margin-bottom: 24px;
}

.hh-filter-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted, #8B9BB4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

/* Time Range Slider */
.hh-time-range {
    padding: 0 4px;
}

.hh-time-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary, #fff);
    gap: 12px;
}

.hh-range-slider {
    position: relative;
    height: 20px;
}

.hh-range-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-card-elevated, #2A3F54);
    border-radius: 2px;
    transform: translateY(-50%);
}

.hh-range-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--primary-color, #FF6B00);
    border-radius: 2px;
}

.hh-range-input {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    z-index: 2;
}

.hh-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color, #FF6B00);
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.hh-range-input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary-color, #FF6B00);
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
}

/* Day Pills */
.hh-day-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.hh-day-pill {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-elevated, #2A3F54);
    border: 1px solid var(--border-color, #3A4F64);
    border-radius: 50%;
    color: var(--text-secondary, #B0BEC5);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hh-day-pill:hover {
    border-color: var(--primary-color, #FF6B00);
}

.hh-day-pill.active {
    background: var(--primary-color, #FF6B00);
    border-color: var(--primary-color, #FF6B00);
    color: #fff;
}

/* Deal Type Checkboxes */
.hh-deal-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hh-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary, #fff);
}

.hh-checkbox-label input {
    display: none;
}

.hh-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color, #3A4F64);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.hh-checkbox-label input:checked+.hh-checkbox-custom {
    background: var(--primary-color, #FF6B00);
    border-color: var(--primary-color, #FF6B00);
}

.hh-checkbox-label input:checked+.hh-checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

/* Feature Pills */
.hh-feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hh-feature-pill {
    padding: 6px 12px;
    background: var(--bg-card-elevated, #2A3F54);
    border: 1px solid var(--border-color, #3A4F64);
    border-radius: 16px;
    color: var(--text-secondary, #B0BEC5);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hh-feature-pill:hover {
    border-color: var(--primary-color, #FF6B00);
    color: var(--primary-color, #FF6B00);
}

.hh-feature-pill.active {
    background: rgba(255, 107, 0, 0.2);
    border-color: var(--primary-color, #FF6B00);
    color: var(--primary-color, #FF6B00);
}

/* =========================================
   LISTINGS HEADER
   ========================================= */

.hh-listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.hh-listings-title h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin: 0 0 4px 0;
}

.hh-results-count {
    font-size: 14px;
    color: var(--text-muted, #8B9BB4);
}

.hh-sort-dropdown select {
    background: var(--bg-card, #1B2838);
    border: 1px solid var(--border-color, #2A3F54);
    border-radius: 8px;
    color: var(--text-primary, #fff);
    padding: 10px 40px 10px 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    min-width: 160px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color 0.2s ease;
}

.hh-sort-dropdown select:focus {
    outline: none;
    border-color: var(--primary-color, #FF6B00);
}

/* =========================================
   LISTINGS GRID
   ========================================= */

.hh-listings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    transition: opacity 0.3s ease;
}

/* Override Bootstrap column styles for grid children */
.hh-listings-grid>.col-md-6,
.hh-listings-grid>.col-sm-6,
.hh-listings-grid>[class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    float: none !important;
}

/* Hide empty promoted listings */
.hh-listings-grid .promoted-listings:empty {
    display: none;
}

/* Promoted listings shouldn't take grid space unless filled */
.hh-listings-grid .promoted-listings {
    display: contents;
}

/* Ensure listing cards fill their container */
.hh-listings-grid .lp-grid-box-contianer {
    width: 100%;
}

.hh-listings-grid .classic-view-grid-container {
    width: 100%;
    height: 100%;
}

/* Make all listing cards uniform size */
.hh-listings-grid .lp-grid-box-contianer,
.hh-listings-grid>[class*="col-"] {
    display: flex;
    flex-direction: column;
}

.hh-listings-grid .lp-grid-box-contianer .lp-grid-box,
.hh-listings-grid .classic-view-grid-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Uniform card image heights */
.hh-listings-grid .lp-grid-box-thumb,
.hh-listings-grid .classic-view-grid-thumbnail {
    height: 180px;
    overflow: hidden;
}

.hh-listings-grid .lp-grid-box-thumb img,
.hh-listings-grid .classic-view-grid-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card content area fills remaining space */
.hh-listings-grid .lp-grid-box-description,
.hh-listings-grid .classic-view-grid-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Remove extra margins from listing cards for uniform spacing */
.hh-listings-grid .lp-grid-box-contianer,
.hh-listings-grid .classic-view-grid-container,
.hh-listings-grid .lp-grid-box {
    margin: 0 !important;
}

/* Ensure action icons at top of cards are visible (not clipped) */
.hh-listings-grid .lp-grid-box-thumb,
.hh-listings-grid .classic-view-grid-thumbnail {
    position: relative;
    overflow: visible;
}

/* The thumbnail container should clip the image but not the icons */
.hh-listings-grid .lp-grid-box-thumb .lp-thumb-img,
.hh-listings-grid .classic-view-grid-thumbnail .lp-thumb-img {
    height: 180px;
    overflow: hidden;
}

/* Action icons container styling */
.hh-listings-grid .lp-grid-box-thumb .lp-listing-top-option,
.hh-listings-grid .lp-listing-actions,
.hh-listings-grid .lp-grid-thumb-icons {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.hh-listings-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

.hh-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted, #8B9BB4);
}

.hh-no-results h2 {
    color: var(--text-primary, #fff);
    margin-bottom: 12px;
}

/* =========================================
   PAGINATION
   ========================================= */

.hh-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1400px) {
    .hh-map-sidebar {
        width: 30%;
        min-width: 280px;
    }
}

@media (max-width: 1200px) {
    .hh-filters-sidebar {
        display: none;
    }

    .hh-map-sidebar {
        width: 35%;
    }
}

@media (max-width: 992px) {
    .hh-desktop-layout {
        flex-direction: column;
    }

    .hh-map-sidebar {
        width: 100%;
        height: 300px;
        position: relative;
        order: -1;
    }

    .hh-listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hh-listings-grid {
        grid-template-columns: 1fr;
    }

    .hh-listings-main {
        padding: 16px;
    }
}

/* =========================================
   CUSTOM HAPPY HOUR LISTING CARDS
   ========================================= */

.hh-listing-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0 !important;
    /* Reset any inherited margins */
}

.hh-listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Card Image */
.hh-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.hh-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hh-listing-card:hover .hh-card-image img {
    transform: scale(1.05);
}

/* Status Badge */
.hh-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hh-status-now {
    background: #2ECC71;
    color: #fff;
}

.hh-status-later {
    background: rgba(27, 40, 56, 0.85);
    color: #fff;
}

/* Favorite Button */
.hh-favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(27, 40, 56, 0.6);
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.hh-favorite-btn:hover {
    background: rgba(27, 40, 56, 0.85);
}

.hh-favorite-btn.active {
    background: #E74C3C;
    color: #fff;
}

/* Card Content */
.hh-card-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-card, #1B2838);
}

/* Card Header - Row with Title and Rating */
.hh-listing-card .hh-card-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 4px !important;
    width: 100% !important;
}

.hh-card-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



.hh-card-title a {
    color: var(--text-primary, #fff);
    text-decoration: none;
}

.hh-card-title a:hover {
    color: var(--primary-color, #FF6B00);
}

.hh-card-meta {
    font-size: 13px;
    color: var(--text-muted, #8B9BB4);
}

.hh-card-location {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Rating */
.hh-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(46, 204, 113, 0.15);
    color: #2ECC71;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.hh-card-rating i {
    font-size: 10px;
}

/* Deals List */
.hh-card-deals {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #2A3F54);
}

.hh-deal-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-primary, #fff);
}

.hh-deal-item i {
    color: var(--primary-color, #FF6B00);
    width: 16px;
    text-align: center;
    font-size: 12px;
}

.hh-deal-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}