/* RelaxApp - Premium Styling */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #f73859;
    --secondary-color: #2b2d42;
    --bg-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.18);
    --text-primary: #1a1a1b;
    --text-secondary: #6c757d;
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-bg-scrolled: rgba(255, 255, 255, 0.95);
    --glass-blur: blur(10px);
    --side-padding: 5%;
    /* Dark Mode Tokens (Light defaults) */
    --dm-bg: #ffffff;
    --dm-card: #ffffff;
    --dm-surface: #f8fafc;
    --dm-surface2: #f1f5f9;
    --dm-border: #e2e8f0;
    --dm-text: #1a1a1b;
    --dm-text-sub: #64748b;
    --dm-text-muted: #94a3b8;
    --dm-input-bg: #ffffff;
    --dm-modal-bg: #ffffff;
    --dm-overlay: rgba(255,255,255,0.9);
    --dm-shadow: 0 8px 32px rgba(0,0,0,0.08);
    --dm-search-bg: #ffffff;
    --dm-filter-bg: #f8fafc;
}

/* ══════════════════════════════════════
   DARK MODE — ALL COMPONENT OVERRIDES
══════════════════════════════════════ */
body.dark-mode {
    --dm-bg: #0f172a;
    --dm-card: #1e293b;
    --dm-surface: #1e293b;
    --dm-surface2: #263548;
    --dm-border: #334155;
    --dm-text: #f1f5f9;
    --dm-text-sub: #94a3b8;
    --dm-text-muted: #64748b;
    --dm-input-bg: #1e293b;
    --dm-modal-bg: #1e293b;
    --dm-overlay: rgba(15,23,42,0.95);
    --dm-shadow: 0 8px 32px rgba(0,0,0,0.4);
    --dm-search-bg: #1e293b;
    --dm-filter-bg: #263548;
    background: var(--dm-bg) !important;
    color: var(--dm-text) !important;
}

/* Body & Core */
body.dark-mode .sticky-filters-wrapper,
body.dark-mode .nav-glass,
body.dark-mode .header,
body.dark-mode .sh-header { background: rgba(15,23,42,0.9) !important; border-color: var(--dm-border) !important; }
body.dark-mode .sticky-filters-wrapper { border-bottom-color: var(--dm-border) !important; }

/* Text Overrides */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4,
body.dark-mode .card-title, body.dark-mode .section-title, body.dark-mode .main-title {
    color: var(--dm-text) !important;
}
body.dark-mode p, body.dark-mode .card-location, body.dark-mode .card-location span {
    color: var(--dm-text-sub) !important;
}

/* Cards */
body.dark-mode .card {
    background: var(--dm-card) !important;
    border-color: var(--dm-border) !important;
    box-shadow: var(--dm-shadow) !important;
}
body.dark-mode .card-content { background: var(--dm-card) !important; }
body.dark-mode .card-basic-fee {
    background: var(--dm-surface2) !important;
    color: var(--dm-text) !important;
}

/* Search Bar */
body.dark-mode .search-bar {
    background: var(--dm-search-bg) !important;
    border-color: var(--dm-border) !important;
}
body.dark-mode .search-bar input {
    background-color: var(--dm-search-bg) !important;
    color: var(--dm-text) !important;
    background-image: url('../icons/search.svg');
}
body.dark-mode .search-bar input::placeholder { color: var(--dm-text-muted) !important; }
body.dark-mode .search-bar::after { background: var(--dm-border) !important; }

/* Filter Buttons */
body.dark-mode .filter-btn {
    background: var(--dm-surface) !important;
    border-color: var(--dm-border) !important;
    color: var(--dm-text-sub) !important;
}
body.dark-mode .filter-btn:hover:not(.active) { background: var(--dm-surface2) !important; }

/* Quick filters */
body.dark-mode .quick-filter-btn {
    background: var(--dm-surface) !important;
    border-color: var(--dm-border) !important;
    color: var(--dm-text-sub) !important;
}
body.dark-mode .quick-filter-btn.active {
    background: var(--primary-color) !important;
    color: #fff !important;
}

/* Icon Buttons */
body.dark-mode .icon-btn {
    border-color: rgba(255,255,255,0.15) !important;
    color: var(--dm-text) !important;
}
body.dark-mode .icon-btn:hover { background: var(--dm-surface) !important; }

body.dark-mode .location-display {
    border-color: rgba(255,255,255,0.15) !important;
    color: var(--dm-text) !important;
}
body.dark-mode .location-display:hover { background: var(--dm-surface) !important; }

/* Filter Modal */
body.dark-mode .filter-modal { background: var(--dm-modal-bg) !important; }
body.dark-mode .filter-modal-header {
    background: var(--dm-surface) !important;
    border-color: var(--dm-border) !important;
}
body.dark-mode .filter-sidebar { background: var(--dm-filter-bg) !important; border-color: var(--dm-border) !important; }
body.dark-mode .filter-sidebar .sidebar-tab:first-child { background: var(--dm-filter-bg) !important; border-color: var(--dm-border) !important; }
body.dark-mode .filter-sidebar .sidebar-tab:first-child.active,
body.dark-mode .filter-sidebar .sidebar-tab:first-child:hover { background: linear-gradient(var(--primary-light), var(--primary-light)), var(--dm-filter-bg) !important; }
body.dark-mode .filter-content { background: var(--dm-modal-bg) !important; }
body.dark-mode .filter-modal-footer {
    background: var(--dm-modal-bg) !important;
    border-color: var(--dm-border) !important;
}
body.dark-mode .filter-section h3 { color: var(--dm-text) !important; }
body.dark-mode .sidebar-tab { color: var(--dm-text-sub) !important; }
body.dark-mode .filter-pill, body.dark-mode .filter-pill-wide {
    background: var(--dm-surface2) !important;
    border-color: var(--dm-border) !important;
    color: var(--dm-text-sub) !important;
}
body.dark-mode .radio-option label { color: var(--dm-text-sub) !important; }
body.dark-mode .btn-close-bottom {
    background: var(--dm-surface) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

/* Status Badges */
body.dark-mode .status-open { background: #14532d !important; color: #86efac !important; }
body.dark-mode .status-closed { background: #450a0a !important; color: #fca5a5 !important; }
body.dark-mode .all-days { background: #14532d !important; color: #86efac !important; border-color: #166534 !important; }
body.dark-mode .day-dot { background: #450a0a !important; color: #fca5a5 !important; border-color: #7f1d1d !important; }

/* Side Panel */
body.dark-mode .side-panel { background: #0f172a !important; }
body.dark-mode .panel-header { background: #0f172a !important; border-color: var(--dm-border) !important; }
body.dark-mode .panel-header h3 { color: var(--dm-text) !important; }
body.dark-mode .panel-header > div { background: var(--dm-surface) !important; }
body.dark-mode .panel-header > div i { color: var(--dm-text-sub) !important; }
body.dark-mode .drawer-user-card { background: linear-gradient(180deg, #1e293b, #0f172a) !important; border-color: var(--dm-border) !important; }
body.dark-mode .drawer-user-card h4 { color: var(--dm-text) !important; }
body.dark-mode .drawer-user-card p { color: var(--dm-text-muted) !important; }
body.dark-mode .u-avatar-wrap { border-color: var(--dm-surface2) !important; }
body.dark-mode .menu-item { color: var(--dm-text) !important; }
body.dark-mode .menu-item svg { stroke: var(--dm-text-muted) !important; }
body.dark-mode .menu-item:hover { background: var(--dm-surface) !important; }
body.dark-mode .menu-section-label { color: var(--dm-text-muted) !important; }
body.dark-mode .menu-group-separator { background: var(--dm-border) !important; }
body.dark-mode .panel-footer-watermark { background: transparent !important; }
body.dark-mode .panel-footer-watermark span { color: var(--dm-text-sub) !important; }
body.dark-mode .panel-footer-watermark img { filter: grayscale(100%) invert(0.9) !important; opacity: 0.5 !important; }
body.dark-mode .sidebar-badge { background: var(--primary-color) !important; color: #fff !important; }

/* Location Modal */
body.dark-mode .location-modal-fullscreen { background: #0f172a !important; }
body.dark-mode .location-modal-header { background: #1e293b !important; border-color: var(--dm-border) !important; }
body.dark-mode .location-modal-header h2, body.dark-mode .location-modal-header i { color: var(--dm-text) !important; }
body.dark-mode .location-search-container { background: var(--dm-surface2) !important; border-color: var(--dm-border) !important; }
body.dark-mode #locationSearchInput { background: transparent !important; color: var(--dm-text) !important; }
body.dark-mode #locationSearchInput::placeholder { color: var(--dm-text-muted) !important; }
body.dark-mode .location-item { background: transparent !important; border-bottom-color: var(--dm-border) !important; color: var(--dm-text) !important; }
body.dark-mode .location-item:hover { background: var(--dm-surface) !important; }
body.dark-mode .location-item img { filter: invert(0.7) !important; }
body.dark-mode .location-modal-body h4 { color: var(--dm-text-muted) !important; }

/* Location Prompt Overlay */
body.dark-mode .location-prompt-modal { background: #1e293b !important; border-color: var(--dm-border) !important; }
body.dark-mode .location-prompt-modal h3, body.dark-mode .location-prompt-modal p { color: var(--dm-text) !important; }
body.dark-mode .btn-prompt-secondary { background: var(--dm-surface2) !important; color: var(--dm-text-sub) !important; }

/* Toast */
body.dark-mode .toast-notification { background: #1e293b !important; color: var(--dm-text) !important; }

/* Active filters pills row */
body.dark-mode .active-filters-container { background: var(--dm-bg) !important; }
body.dark-mode .active-filter-tag {
    background: var(--dm-surface2) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

/* Sidebar badge */
body.dark-mode .sidebar-badge-blue { background: #1d4ed8 !important; color: #fff !important; }

/* Add New Ribbon stays primary branded - inherits primary-color naturally */

/* Scrollbar styling in dark mode */
body.dark-mode ::-webkit-scrollbar-track { background: var(--dm-bg) !important; }
body.dark-mode ::-webkit-scrollbar-thumb { background: var(--dm-surface2) !important; }

/* SVG icons that are pure black need inversion in dark mode */
body.dark-mode .sidebar-tab img,
body.dark-mode .filter-btn img {
    filter: invert(1) !important;
}
body.dark-mode .sidebar-tab.active img,
body.dark-mode .filter-btn.active img {
    filter: invert(1) brightness(1.2) !important;
}

/* ── DARK MODE EXTENDED FIXES ─────────────────────────────────────────── */

/* Location SVG icons in the header chip and cards */
body.dark-mode .location-display img,
body.dark-mode .card-location img,
body.dark-mode .compact-location img,
body.dark-mode .sh-loc-chip img {
    filter: invert(0.7) !important;
}

/* Profile icon in header when not logged in */
body.dark-mode .sh-profile-btn img[alt="Profile"],
body.dark-mode .icon-btn img[alt="Profile"] {
    filter: invert(0.9) !important;
}

/* Search bar icon (search.svg in background-image) */
body.dark-mode .search-bar input {
    background-image: url('../icons/search.svg') !important;
    filter: none !important;
}
/* Invert the inline search icon wrapper */
body.dark-mode .search-bar {
    background: var(--dm-search-bg) !important;
}

/* Mic icon in dark mode */
body.dark-mode .search-mic {
    filter: invert(0.8) !important;
}
body.dark-mode .search-mic.recording {
    filter: invert(27%) sepia(91%) saturate(2352%) hue-rotate(338deg) brightness(94%) contrast(95%) !important;
}

/* Search clear icon */
body.dark-mode .search-clear,
body.dark-mode .loc-search-clear {
    filter: invert(0.8) !important;
}

/* Quick filter buttons – text was black */
body.dark-mode .quick-filter-btn {
    color: var(--dm-text) !important;
    background: var(--dm-surface) !important;
    border-color: var(--dm-border) !important;
}
body.dark-mode .quick-filter-btn:hover {
    background: var(--dm-surface2) !important;
}

/* ── SEARCH ICON FIX IN DARK MODE ───────────────── */
/* Swap to white SVG so it's visible on dark input bg */
body.dark-mode .search-bar input {
    background-image: url('../icons/search_white.svg') !important;
    color: var(--dm-text) !important;
    background-color: var(--dm-search-bg) !important;
    caret-color: var(--dm-text) !important;
}
body.dark-mode .search-bar input::placeholder {
    color: var(--dm-text-muted) !important;
}
/* ── END SEARCH ICON FIX ─────────────────────────── */

/* Location search input */
body.dark-mode .location-search-container input {
    background: var(--dm-surface) !important;
    border-color: var(--dm-border) !important;
    color: var(--dm-text) !important;
}
body.dark-mode .location-search-container input:focus {
    background: var(--dm-input-bg) !important;
}
body.dark-mode .location-item {
    border-bottom-color: var(--dm-border) !important;
    color: var(--dm-text) !important;
}
body.dark-mode .location-item img {
    filter: invert(0.6) !important;
}

/* ── FILTER MODAL DARK MODE FIXES ───────────────── */
body.dark-mode .filter-sort-modal {
    background: var(--dm-modal-bg) !important;
    color: var(--dm-text) !important;
}
body.dark-mode .filter-modal-header {
    border-bottom-color: var(--dm-border) !important;
    background: var(--dm-surface) !important;
}
body.dark-mode .filter-modal-header h2 {
    color: var(--dm-text) !important;
}
body.dark-mode .clear-all {
    color: var(--dm-text-muted) !important;
}
body.dark-mode .clear-all.active {
    color: var(--primary-color) !important;
}
body.dark-mode .filter-sidebar {
    background: var(--dm-filter-bg) !important;
    border-color: var(--dm-border) !important;
}
body.dark-mode .sidebar-tab {
    color: var(--dm-text-sub) !important;
    background: transparent !important;
}
body.dark-mode .sidebar-tab img {
    filter: invert(0.75) !important;
}
body.dark-mode .sidebar-tab.active img {
    filter: invert(1) !important;
}
body.dark-mode .filter-content {
    background: var(--dm-modal-bg) !important;
    scrollbar-color: var(--dm-border) var(--dm-modal-bg) !important;
}
body.dark-mode .filter-content::-webkit-scrollbar-track {
    background: var(--dm-modal-bg) !important;
}
body.dark-mode .filter-content::-webkit-scrollbar-thumb {
    background: var(--dm-border) !important;
}
body.dark-mode .filter-section h3 {
    color: var(--dm-text) !important;
}

/* Filter pills (subcategory, rating squares) */
body.dark-mode .filter-pill {
    background: var(--dm-surface2) !important;
    border-color: var(--dm-border) !important;
    color: var(--dm-text-sub) !important;
}
body.dark-mode .filter-pill:hover {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}
body.dark-mode .filter-pill.active {
    background: var(--primary-light) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

/* Wide fare pills */
body.dark-mode .filter-pill-wide {
    background: var(--dm-surface2) !important;
    border-color: var(--dm-border) !important;
    color: var(--dm-text-sub) !important;
}
body.dark-mode .filter-pill-wide.active {
    background: var(--primary-light) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

/* Sort radio options */
body.dark-mode .radio-option {
    border-bottom-color: var(--dm-border) !important;
    color: var(--dm-text-sub) !important;
}
body.dark-mode .radio-option label {
    color: var(--dm-text-sub) !important;
}
body.dark-mode .radio-option input[type="radio"] {
    accent-color: var(--primary-color) !important;
    background: var(--dm-surface) !important;
}

/* Filter modal footer */
body.dark-mode .filter-modal-footer {
    background: var(--dm-modal-bg) !important;
    border-top-color: var(--dm-border) !important;
}
body.dark-mode .btn-close-bottom {
    background: var(--dm-surface) !important;
    color: var(--dm-text-sub) !important;
    border-color: var(--dm-border) !important;
}
body.dark-mode .btn-close-bottom:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}
body.dark-mode .btn-apply-results:not(.active) {
    background: var(--dm-surface) !important;
    color: var(--dm-text-muted) !important;
    border-color: var(--dm-border) !important;
}
body.dark-mode .modal-close-floating {
    background: var(--dm-surface) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}
/* ── END FILTER MODAL FIXES ──────────────────────── */

/* Card content text */
body.dark-mode .card-title { color: var(--dm-text) !important; }
body.dark-mode .card-location { color: var(--dm-text-sub) !important; }
body.dark-mode .distance-text { color: var(--dm-text-muted) !important; }

/* Wishlist heart – ensure it's visible (stroke on dark bg) */
body.dark-mode .wishlist-icon path {
    stroke: rgba(255,255,255,0.85) !important;
}
body.dark-mode .wishlist-icon.active path {
    fill: var(--primary-color) !important;
    stroke: var(--primary-color) !important;
}

/* Card tags */
body.dark-mode .card-tag {
    background: rgba(0,0,0,0.7) !important;
    color: #fff !important;
}

/* Category icon images (SVGs used as img in filter buttons/tabs on index page) */
body.dark-mode .category-filters .filter-btn img {
    filter: invert(0.8) !important;
}
body.dark-mode .category-filters .filter-btn.active img {
    filter: invert(1) !important;
}

/* Add New ribbon icon */
body.dark-mode .add-new-ribbon img {
    filter: invert(1) !important;
}

/* Sidebar panel icons on index.php (inline SVG strokes) */
body.dark-mode .side-panel .menu-item svg {
    stroke: var(--dm-text-muted) !important;
}
body.dark-mode .side-panel .menu-item.active-page svg {
    stroke: var(--primary-color) !important;
}
body.dark-mode #sh-side-panel .menu-item svg {
    stroke: var(--dm-text-muted) !important;
}
body.dark-mode #sh-side-panel .menu-item.active-page svg {
    stroke: var(--primary-color) !important;
}

/* Section no-results / empty state text */
body.dark-mode .no-results-msg,
body.dark-mode #noResultsMsg { color: var(--dm-text-sub) !important; }

/* Active filter pill (pill tag in quick filter row) */
body.dark-mode .active-filter-pill {
    background: var(--primary-light) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

/* Filter modal overlay backdrop */
body.dark-mode .filter-modal-overlay { background: rgba(0,0,0,0.7) !important; }

/* Clear indicator line on closed days */
body.dark-mode .day-dot.inactive::after { background: #f87171 !important; }

/* Sidebar toggle close button in index.php side panel */
body.dark-mode #side-panel .panel-header { background: #0f172a !important; border-color: var(--dm-border) !important; }
body.dark-mode #side-panel .panel-header h3 { color: var(--dm-text) !important; }
body.dark-mode #side-panel .panel-header > div > div,
body.dark-mode #side-panel .panel-header > div > div i { background: var(--dm-surface) !important; color: var(--dm-text-sub) !important; }
body.dark-mode #side-panel .drawer-user-card,
body.dark-mode #side-panel .drawer-user-card h4 { color: var(--dm-text) !important; }
body.dark-mode #side-panel .drawer-user-card p { color: var(--dm-text-muted) !important; }
body.dark-mode #side-panel .panel-footer-watermark { background: #0f172a !important; }

/* Active Online indicator stays green */
body.dark-mode .online-dot { background: #22c55e !important; border-color: #0f172a !important; }



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Common Glass Effect */
.nav-glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: var(--transition);
    z-index: 1000;
}

.nav-glass.scrolled {
    background: var(--glass-bg-scrolled);
}

/* Header unique styles */
.header {
    padding: 0 var(--side-padding);
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    /* Stay above filter bar if needed */
    border-bottom: none !important;
    /* Borders removed for seamless look */
    align-content: center;
}

.logo-container a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header.scrolled {
    border-bottom: none;
}

/* Category Tabs unique styles */
/* Sticky Filters Wrapper */
.sticky-filters-wrapper {
    position: sticky;
    top: 70px;
    width: 100%;
    left: 0;
    z-index: 1000;
    background: var(--bg-color);
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1.5rem;
}

.sticky-filters-wrapper.scrolled {
    box-shadow: none;
    border-bottom: 1px solid #e0e0e0;
}

/* Category Tabs unique styles */
.category-filters {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    overflow-x: auto;
    padding: 8px var(--side-padding) 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.main-logo {
    height: 40px;
    width: auto;
}

.mobile-search-wrapper {
    display: contents;
}

.mobile-search-logo {
    display: none !important;
}

.search-bar {
    flex: 0 1 450px;
    background: #fff;
    border-radius: 12px;
    padding: 0;
    margin: 0 20px;
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    position: relative;
}

/* Symmetrical Separator - Attached to bar, not mic, to avoid color filter bleed */
.search-bar::after {
    content: '';
    position: absolute;
    right: 39px;
    /* Exactly midway with 4px gap on each side */
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: #f1f1f1;
    /* Thinner look with ultra-light color */
    z-index: 11;
}

.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    padding: 12px 85px 12px 40px;
    font-size: 0.95rem;
    font-weight: 500;
    background-color: #fff;

    /* Only Left Search icon remains in input bg */
    background-image: url('../icons/search.svg');
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 18px;
}

.search-clear {
    position: absolute;
    right: 43px;
    /* 4px gap from separator at 39px */
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: none;
    z-index: 12;
    background: url('../icons/clear.svg') no-repeat center;
    background-size: 20px;
    /* Adjusted for circular icon visibility */
}

.search-mic {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    /* Standardized width */
    height: 30px;
    cursor: pointer;
    z-index: 10;
    background: url('../icons/mic.svg') no-repeat center;
    background-size: 20px;
    transition: var(--transition);
}

.search-mic.recording {
    /* Premium Red Filter for Mic Icon only */
    filter: invert(27%) sepia(91%) saturate(2352%) hue-rotate(338deg) brightness(94%) contrast(95%);
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-btn {
    font-size: 1.1rem;
    color: var(--secondary-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;width: 34px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: transparent;
    border-radius: 50%;
    /* Default for profile/lone icons */
}

/* Specific logic for the profile button circle */
.header-icons .icon-btn:not(.location-display) {
    width: 34px;
}

.icon-btn:hover {
    color: var(--primary-color);
    background: #f1f3f5;
    border-color: #c8cdd5;
}

.icon-btn img {
    border-radius: 50%;
    object-fit: cover;
}

.location-display {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0 13px !important;
    height: 34px !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 20px !important;
    /* Forces pill shape over circle */
    transition: background 0.18s, border-color 0.18s;
    width: auto !important;
    /* Overrides fixed width */
    max-width: 150px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}

.location-display span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.location-display:hover {
    background: #f1f3f5;
    border-color: #c8cdd5;
}

.location-display i,
.location-display img {
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Hero Section with Parallax */
.hero {
    height: 100vh;
    margin-top: -70px;
    padding: 130px var(--side-padding) 40px;
    text-align: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    color: #fff;
    margin-bottom: 3rem;
    position: relative;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.hero-content {
    margin: auto;
}

.btn-explore {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(247, 56, 89, 0.4);
}

.btn-explore:hover {
    box-shadow: 0 8px 25px rgba(247, 56, 89, 0.6);
}

.btn-explore i {
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.hero p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
    opacity: 0.95;
}

/* Main Content Wrapper */
.container {
    padding: 0 var(--side-padding) 5rem;
}

/* Category Tabs */


.category-filters::-webkit-scrollbar {
    display: none;
    /* WebKit/Chrome/Safari */
}

.filter-btn {
    padding: 10px 17px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-align: left;
    scroll-snap-align: start;
    /* Snap items precisely as you scroll */
}

.filter-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.filter-btn:hover:not(.active) {
    background: #f0f0f0;
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    position: relative;
    backdrop-filter: blur(5px);
}



.card-img-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f1f3f5;
    /* Light grey */
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-container::after {
    content: "NO IMAGE";
    color: rgba(0, 0, 0, 0.2);
    /* Darker text for light background */
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 1px;
    z-index: 1;
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f1f3f5;
    transition: var(--transition);
    z-index: 2;
}

.card-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    overflow: hidden;
}

.card-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card-carousel-track .card-img {
    position: static;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f1f3f5;
}

.card-carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 10;
}

.card-carousel-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.card-carousel-dot.active {
    background: #fff;
    width: 12px;
    border-radius: 3px;
}



.wishlist-icon.active path {
    fill: var(--primary-color) !important;
}

.toast-notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #2b2d31;
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
    bottom: 30px;
}



.toast-notification img.tick-icon {
    width: 18px;
    height: 18px;
}



.card-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    backdrop-filter: blur(5px);
    z-index: 10;
}

.card-basic-fee {
    position: absolute;
    bottom: 0;
    left: 0;
    background: #fff;
    color: #1a1b1e;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px 0 10px;
    border-radius: 0 25px 0 0;
    z-index: 10;
}

/* --- Calendar Date Badge Styles (Synchronized with details.php) --- */
.card-date-badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    backdrop-filter: blur(8px);
    z-index: 20;
    position: absolute;
    top: 12px;
    right: 12px;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.card-date-badge::after {
    content: '';
    position: absolute;
    top: -50%;
    left: 0;
    width: 40%;
    height: 200%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(-45deg) translateX(-200%);
    animation: badgeShimmer 3.5s ease-in-out infinite;
    pointer-events: none;
}



.badge-upcoming {
    background: #fff;
    color: #1e293b;
    border: 1px solid #f1f5f9;
    animation: bellRing 3s ease-in-out infinite;
    transform-origin: top center;
}

.badge-upcoming .month {
    font-size: 0.6rem;
    color: #ef4444;
}

.badge-upcoming .day {
    font-size: 1.1rem;
    line-height: 1;
}

.badge-upcoming .year {
    font-size: 0.55rem;
    opacity: 0.7;
}

.badge-ends-today {
    background: #f59e0b; /* Amber/Orange */
    color: #fff;
    animation: vibrateVertical 3s ease-in-out infinite;
}

.badge-ending {
    background: #f59e0b;
    color: #fff;
    animation: shakeHorizontal 3s ease-in-out infinite;
}

.ends-label {
    font-size: 0.55rem;
    opacity: 0.9;
    font-weight: 700;
}

.ends-value {
    font-size: 0.75rem;
    font-weight: 800;
}

@keyframes vibrateVertical {

    0%,
    55%,
    100% {
        transform: translateY(0);
    }

    58% {
        transform: translateY(-5px);
    }

    63% {
        transform: translateY(5px);
    }

    68% {
        transform: translateY(-4px);
    }

    73% {
        transform: translateY(4px);
    }

    78% {
        transform: translateY(-2px);
    }

    83% {
        transform: translateY(2px);
    }

    88% {
        transform: translateY(0);
    }
}


@keyframes badgeShimmer {

    0%,
    35% {
        transform: rotate(-45deg) translateX(-200%);
    }

    65%,
    100% {
        transform: rotate(-45deg) translateX(400%);
    }
}

@keyframes shakeHorizontal {

    0%,
    55%,
    100% {
        transform: translateX(0);
    }

    58% {
        transform: translateX(-5px);
    }

    63% {
        transform: translateX(5px);
    }

    68% {
        transform: translateX(-4px);
    }

    73% {
        transform: translateX(4px);
    }

    78% {
        transform: translateX(-2px);
    }

    83% {
        transform: translateX(2px);
    }

    88% {
        transform: translateX(0);
    }
}

@keyframes bellRing {

    0%,
    35%,
    100% {
        transform: rotate(0deg);
    }

    40% {
        transform: rotate(15deg);
    }

    47% {
        transform: rotate(-11deg);
    }

    54% {
        transform: rotate(8deg);
    }

    61% {
        transform: rotate(-5deg);
    }

    68% {
        transform: rotate(3deg);
    }

    75% {
        transform: rotate(0deg);
    }
}

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    animation: fadeInCard 0.5s ease-out forwards;
    opacity: 0;
    /* Handled by animation */
}

.card-content {
    padding: 1rem 1.2rem 1rem;
}

.card-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.card-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-location span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    /* Removed bottom margin as it's the last element now */
}

.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-open {
    background: #d4edda;
    color: #155724;
}

.status-closed {
    background: #f8d7da;
    color: #721c24;
}

.days-display {
    display: flex;
    gap: 5px;
    align-items: center;
}

.all-days {
    font-size: 0.75rem;
    font-weight: 700;
    color: #155724;
    border: 1.5px solid #155724;
    /* Green border */
    background: #d4edda;
    /* Light green bg */
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.day-dot {
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 35px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #721c24;
    position: relative;
    border: 1.5px solid #f5c6cb;
    /* Reddish border */
    border-radius: 6px;
    background: #f8d7da;
    /* Light red bg */
    margin-left: 5px;
}

.day-dot.inactive {
    opacity: 1;
    /* Keep fully visible since we have a colored bg now */
}

.day-dot.inactive::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: #ff0000;
    transform: rotate(-30deg);
}

/* Removed card-footer entirely */

.rating {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.rating-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    border-radius: 35px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}

.rating-badge i {
    font-size: 0.75rem;
}

.rating-excellent {
    background: #15803d; /* Emerald 700 */
}

.rating-good {
    background: #22c55e; /* Green 500 */
}

.rating-avg {
    background: #ffc107;
    color: #1a1a1a;
}

.rating-poor {
    background: #dc3545; /* Red */
}

/* Removed btn-detail as the explore button was deleted */
/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        transform: rotate(-45deg) translateX(-100%);
    }

    25% {
        transform: rotate(-45deg) translateX(-100%);
    }

    75% {
        transform: rotate(-45deg) translateX(100%);
    }

    100% {
        transform: rotate(-45deg) translateX(100%);
    }
}

@keyframes bell-ring {
    0% {
        transform: rotate(0);
    }

    5% {
        transform: rotate(15deg);
    }

    10% {
        transform: rotate(-10deg);
    }

    15% {
        transform: rotate(5deg);
    }

    20% {
        transform: rotate(-5deg);
    }

    25% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(0);
    }
}

.card {
    animation: fadeIn 0.5s ease backwards;
}

/* Staggered load animation would be handled in JS */

/* Utility: Prevent background scroll when modals are open */
body.no-scroll {
    overflow: hidden;
}

/* Initial Location Prompt Modal */
.location-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease forwards;
}

.location-prompt-modal {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 20px 20px;
    width: 100%;
    max-width: 350px;
    text-align: center;
    color: var(--text-primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    animation: slideUp 0.3s ease forwards;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.location-prompt-icon {
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -60px auto 10px;
    /* Overlaps the top edge */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.location-prompt-icon i {
    font-size: 30px;
    color: var(--primary-color);
}

.location-prompt-modal h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.location-prompt-modal p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.btn-prompt-primary,
.btn-prompt-secondary {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-prompt-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(247, 56, 89, 0.2);
}

.btn-prompt-primary:hover {
    background: #e02f4d; /* Slightly darker than primary */
    transform: translateY(-2px);
}

.btn-prompt-secondary {
    background: #f1f5f9;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.btn-prompt-secondary:hover {
    background: #e2e8f0;
}

/* Full Screen Location Modal */
.location-modal-fullscreen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8fafc; /* Whitish background */
    z-index: 9999;
    flex-direction: column;
    animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.location-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px var(--side-padding);
    border-bottom: 1px solid #eee;
}

.location-modal-header i {
    position: absolute;
    left: var(--side-padding);
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
}

.location-modal-header i:hover {
    color: var(--primary-color);
}

.location-modal-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.location-modal-body {
    padding: 20px var(--side-padding);
    flex: 1;
    overflow-y: auto;
}

.location-search-container {
    position: relative;
    margin-bottom: 25px;
}

.location-search-container .current-loc-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
}

.location-search-container input {
    width: 100%;
    padding: 15px 45px 15px 45px;
    border: 1px solid #eee;
    border-radius: 12px;
    font-size: 1rem;
    background: #f8f9fa;
    outline: none;
    transition: var(--transition);
}

.location-search-container input:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(247, 56, 89, 0.1);
}

.loc-search-clear {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="10" fill="%23d3d3d3"/><path d="M8 8L16 16" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 8L8 16" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-size: cover;
    cursor: pointer;
    display: none;
    z-index: 10;
}

.location-list {
    display: flex;
    flex-direction: column;
}

.location-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    gap: 15px;
    color: var(--text-primary);
    transition: var(--transition);
}

.location-item:hover {
    color: var(--primary-color);
}

.location-item i {
    color: #ccc;
    font-size: 1.2rem;
    transition: var(--transition);
}

.location-item:hover i {
    color: var(--primary-color);
}

/* --- Quick Filters Row --- */
.quick-filters {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    padding: 4px var(--side-padding) 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.quick-filters::-webkit-scrollbar {
    display: none;
}

.quick-filter-btn {
    background: #f0f0f0;
    color: #000;
    border: 1px solid #e0e0e0;
    border-radius: 7px;
    padding: 8px 9.5px;
    font-size: 0.8rem;
    font-weight: 400;
    /* Slightly thicker text */
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    gap: 4px;
    transition: var(--transition);
}

.quick-filter-btn:hover {
    background: #e2e2e2;
}

.quick-filter-btn.active {
    background: var(--primary-light) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    font-weight: 500 !important;
}

.active-filter-pill {
    background: var(--primary-light) !important;
    border: 1px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    font-weight: 500 !important;
    padding-right: 8px !important;
}

.active-filter-pill i {
    font-size: 0.75rem;
    margin-left: 4px;
    opacity: 0.8;
}

.active-filter-pill:hover {
    background: var(--primary-light) !important;
    filter: brightness(0.95);
}

/* --- Filter Sort Modal --- */
.filter-sort-modal {
    background: #ffffff;
    width: 100%;
    max-width: 100%;
    height: 75vh;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    position: relative;
    animation: slideUp 0.3s ease forwards;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

.modal-close-floating {
    position: absolute;
    top: -55px;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.modal-close-floating:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 0.5px solid #2b2d31;
    border-radius: 20px 20px 0 0; /* Match parent's top curve */
}

.filter-modal-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.clear-all {
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
}

.clear-all:hover {
    color: var(--text-primary);
}

.clear-all.active {
    color: var(--primary-color) !important;
    font-weight: 700;
}

.filter-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.filter-sidebar {
    width: 110px;
    background: #f8fafc;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: none;
}

.filter-sidebar::-webkit-scrollbar {
    width: 0px;
}

/* "Sort By" tab always pinned at top of sidebar */
.filter-sidebar .sidebar-tab:first-child {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #f8fafc; /* Solid base */
    border-bottom: 1px solid var(--border-color);
}

.filter-sidebar .sidebar-tab:first-child.active,
.filter-sidebar .sidebar-tab:first-child:hover {
    background: linear-gradient(var(--primary-light), var(--primary-light)), #f8fafc !important;
}


.sidebar-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 20px 5px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.sidebar-tab.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

.sidebar-tab.active::after {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary-color);
}

.sidebar-tab i {
    font-size: 1.2rem;
}

.sidebar-tab img {
    opacity: 0.5;
    transition: var(--transition);
}

.sidebar-tab.active img {
    opacity: 1;
}

.tab-filter-count {
    position: absolute;
    top: 10px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    font-size: 0.65rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.tab-filter-count.show {
    display: flex;
}

.filter-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 #ffffff;
}

.filter-content::-webkit-scrollbar {
    width: 4px;
}

.filter-content::-webkit-scrollbar-track {
    background: #ffffff;
}

.filter-content::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.filter-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.filter-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.filter-section.active {
    display: block;
}

.filter-section h3 {
    font-size: 1.05rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.filter-pill {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 15px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.filter-pill.active {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-options-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-pill-wide {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 15px;
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.filter-pill-wide.active {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.radio-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 0.5px dotted var(--border-color);
    cursor: pointer;
    font-size: 0.95rem;
}

.radio-option:last-child {
    border-bottom: none;
}

.radio-option input {
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-modal-footer {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
}

.btn-close-bottom {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid #cbd5e1;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    flex: 1;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close-bottom:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-apply-results {
    background: #f1f5f9;
    color: var(--text-muted);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    flex: 2;
    cursor: pointer;
    transition: var(--transition);
}

.btn-apply-results:hover {
    background: #e2e8f0;
}

.btn-apply-results.active {
    background: var(--primary-color) !important;
    color: var(--primary-contrast) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-apply-results.active:hover {
    background: var(--primary-hover) !important;
}

@media (max-width: 768px) {
    :root {
        --side-padding: 15px;
    }

    .header {
        height: 110px;
        /* Reduced from 130px */
        padding: 0 var(--side-padding);
        /* Removed top padding to mathematically center flex elements */
        flex-wrap: wrap;
        align-items: center;
        align-content: center;
        /* Center both rows evenly within 110px */
        gap: 12px;
        /* Increased gap between 1st and 2nd row */
        top: -54px;
        /* Scrolls first row up, keeps second row sticky */
    }

    .logo-container {
        font-size: 1.25rem;
        transition: opacity 0.2s ease;
    }

    .header-icons {
        transition: opacity 0.2s ease;
    }

    .header.scrolled .logo-container,
    .header.scrolled .header-icons {
        opacity: 0;
        pointer-events: none;
    }

    .mobile-search-wrapper {
        order: 3;
        width: 100%;
        margin: 0;
        padding: 0;
        /* Reduced bottom padding completely to bring content slightly up */
        flex: 1 1 100%;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .mobile-search-logo {
        display: block !important;
        font-size: 1.5rem;
        color: var(--primary-color);
        max-width: 0;
        opacity: 0;
        margin-right: -15px;
        transition: max-width 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    }

    .header.scrolled .mobile-search-logo {
        max-width: 40px;
        opacity: 1;
        margin-right: 0;
    }

    .search-bar {
        order: initial;
        width: 100%;
        margin: 0;
        flex: 1;
    }

    .search-bar input {
        padding: 10px 85px 10px 40px;
        font-size: 0.9rem;
    }

    .hero {
        margin-top: -110px;
        padding: 140px var(--side-padding) 40px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .sticky-filters-wrapper {
        top: 56px;
        /* Flush under the shifted 110px header (110 - 54 = 56) */
    }

    .category-filters,
    .quick-filters {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        margin: 0 !important;
        padding-left: 12px !important;
        padding-right: 0 !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
        box-sizing: border-box !important;
        width: 100% !important;
        scroll-snap-type: none !important;
    }

    .category-filters::-webkit-scrollbar,
    .quick-filters::-webkit-scrollbar {
        display: none;
    }



    .category-filters {
        padding-top: 8px !important;
        padding-bottom: 4px !important;
        gap: 12px !important;
    }

    .quick-filters {
        padding-top: 4px !important;
        padding-bottom: 8px !important;
        gap: 8px !important;
    }

    .filter-btn,
    .quick-filter-btn {
        margin: 0 !important;
        flex-shrink: 0 !important;
        scroll-snap-align: none !important;
    }

    .container {
        padding: 0 12px 5rem !important;
    }
}

/* ── Sticky Sub-Header (Shared across details, wishlist, etc.) ─── */
.sub-header {
    position: sticky;
    top: 0;
    z-index: 1001; /* Above sh-header if necessary */
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--side-padding, 5%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 15px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.sub-header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    background: transparent;
    color: #1a1a1b;
    font-size: 1rem;
    transition: background 0.18s;
    flex-shrink: 0;
}

.sub-header-btn:hover {
    background: #f1f3f5;
}

.sub-header-btn img {
    display: block;
}

.sub-header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1b;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sub-header-title.visible {
    opacity: 1;
}

/* Global utility for pages using sub-header to hide main header border and sticky behavior */
.page-with-subheader .sh-header {
    position: relative !important;
    top: unset !important;
    border-bottom: none !important;
    height: 60px !important;
}

/* ── Add New Floating Ribbon ─────────────────────────────────────── */
.add-new-ribbon {
    position: fixed;
    top: 25%;
    right: 0;
    background: #f73859; /* App Primary Red */
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 4px 10px 4px 4px;
    border-radius: 15.5px 0 0 15.5px;
    border: 2px solid #fff;
    border-right: none;
    z-index: 2000;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), -2px 4px 15px rgba(247, 56, 89, 0.4);
    transition: transform 0.2s ease, background 0.2s ease, gap 0.3s ease;
    overflow: hidden;
    animation: vibrateRibbon 3s infinite;
}

.add-new-ribbon .text-add-new-lbl {
    max-width: 0;
    opacity: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.4s ease, opacity 0.3s ease;
}

.add-new-ribbon .lbl-add {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.add-new-ribbon .lbl-new {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    opacity: 0.85;
}

.add-new-ribbon::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shimmerRibbon 2.5s infinite;
}

.add-new-ribbon:hover {
    padding-right: 14px;
    background: #e62e4d;
    color: #fff;
    gap: 8px;
    animation: none;
}

.add-new-ribbon:hover .text-add-new-lbl {
    max-width: 100px;
    opacity: 1;
}

.add-new-ribbon img,
.add-new-ribbon svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .add-new-ribbon {
        padding: 4px 10px 4px 4px;
        font-size: 12px;
    }
}

@keyframes vibrateRibbon {
    0%, 80%, 100% { transform: translateY(0); }
    82% { transform: translateY(-4px); }
    84% { transform: translateY(4px); }
    86% { transform: translateY(-4px); }
    88% { transform: translateY(4px); }
    90% { transform: translateY(0); }
}

@keyframes shimmerRibbon {
    0%, 20% { left: -100%; }
    80%, 100% { left: 200%; }
}

/* Sidebar Badges */
.sidebar-badge {
    background: #ef4444; /* Default Red */
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-badge-blue {
    background: #3b82f6 !important; /* Blue for contributions */
}

/* Sub-Header Stats */
.sub-header-stats, .sub-header-stats-blue {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.sub-header-stats {
    background: var(--primary-color, #f73859);
}

.sub-header-stats-blue {
    background: #3b82f6;
}


.tel-input-group {
    display: flex;
    gap: 8px;
}
.tel-cc {
    width: 65px !important;
    text-align: center;
    padding-left: 8px !important;
    padding-right: 8px !important;
}
.tel-num {
    flex: 1;
}

/* ── PAGE-SPECIFIC DARK MODE OVERRIDES ────────────────────────── */

/* Sub Header (Used on all secondary pages) */
body.dark-mode .sub-header { background: rgba(15,23,42,0.9) !important; border-bottom-color: var(--dm-border) !important; }
body.dark-mode .sub-header-title { color: var(--dm-text) !important; }
body.dark-mode .sub-header-btn { background: var(--dm-surface) !important; border-color: var(--dm-border) !important; }
body.dark-mode .sub-header-btn img { filter: invert(0.8) !important; }
body.dark-mode .sub-header-stats, body.dark-mode .sub-header-stats-blue { border-color: transparent !important; }

/* details.php */
body.dark-mode .content-card, body.dark-mode .sidebar-card, body.dark-mode .review-card, body.dark-mode .modal-content { background: var(--dm-card) !important; border-color: var(--dm-border) !important; }
body.dark-mode .stat-box, body.dark-mode .glance-icon, body.dark-mode .contact-icon, body.dark-mode .social-link, body.dark-mode .user-avatar, body.dark-mode .add-review-btn { background: var(--dm-surface) !important; border-color: var(--dm-border) !important; color: var(--dm-text) !important; }
body.dark-mode .desktop-actions .btn-secondary, body.dark-mode .btn-secondary, body.dark-mode .actions-sticky .btn-secondary { background: var(--dm-surface) !important; border-color: var(--dm-border) !important; color: var(--dm-text) !important; }
body.dark-mode .desktop-actions .btn-secondary img, body.dark-mode .actions-sticky .btn-secondary img { filter: invert(0.8) !important; }
body.dark-mode .btn-primary { box-shadow: 0 10px 20px rgba(0,0,0,0.5) !important; }
body.dark-mode .status-badge-container { background: var(--dm-surface) !important; border-color: var(--dm-border) !important; color: var(--dm-text) !important; }
body.dark-mode .main-title, body.dark-mode .section-title, body.dark-mode .review-author, body.dark-mode .modal-title { color: var(--dm-text) !important; }
body.dark-mode .description-text, body.dark-mode .address-bar, body.dark-mode .stat-value, body.dark-mode .glance-value, body.dark-mode .contact-text, body.dark-mode .review-text { color: var(--dm-text-sub) !important; }
body.dark-mode .stat-label, body.dark-mode .glance-label, body.dark-mode .review-date { color: var(--dm-text-muted) !important; }
body.dark-mode .glance-separator, body.dark-mode .social-row, body.dark-mode .reviews-section { border-color: var(--dm-border) !important; }
body.dark-mode .glance-separator { background: var(--dm-border) !important; }
body.dark-mode .uploader-overlay { background: linear-gradient(to bottom, rgba(15,23,42,0.8), transparent) !important; }
body.dark-mode .actions-sticky { background: rgba(15,23,42,0.85) !important; border-top-color: var(--dm-border) !important; }
body.dark-mode .form-control { background: var(--dm-input-bg) !important; border-color: var(--dm-border) !important; color: var(--dm-text) !important; }
body.dark-mode .form-control:focus { border-color: var(--primary-color) !important; background: var(--dm-input-bg) !important; }
body.dark-mode .star-rating-input label { color: var(--dm-border) !important; }
body.dark-mode .star-rating-input input:checked ~ label, body.dark-mode .star-rating-input label:hover, body.dark-mode .star-rating-input label:hover ~ label { color: #f59e0b !important; }

/* mycontribution.php */
body.dark-mode .compact-card { background: var(--dm-card) !important; border-color: var(--dm-border) !important; }
body.dark-mode .compact-card:hover { background: var(--dm-surface) !important; border-color: var(--primary-color) !important; }
body.dark-mode .compact-img-container { background: var(--dm-surface2) !important; }
body.dark-mode .compact-title { color: var(--dm-text) !important; }
body.dark-mode .compact-location { color: var(--dm-text-sub) !important; }
body.dark-mode .meta-badge { background: var(--dm-surface) !important; color: var(--dm-text-sub) !important; }
body.dark-mode .action-btn { background: var(--dm-surface) !important; color: var(--dm-text-sub) !important; border-color: var(--dm-border) !important; }
body.dark-mode .action-btn:hover { color: var(--primary-color) !important; }

/* wishlist.php */
body.dark-mode .wishlist-empty i { color: var(--dm-border) !important; }
body.dark-mode .wishlist-page-title h1, body.dark-mode .wishlist-empty h2 { color: var(--dm-text) !important; }
body.dark-mode .wishlist-empty p { color: var(--dm-text-sub) !important; }

/* profilesetting.php */
body.dark-mode .settings-card { background: var(--dm-card) !important; border-color: var(--dm-border) !important; color: var(--dm-text) !important; }
body.dark-mode .settings-header p { color: var(--dm-text-muted) !important; }
body.dark-mode .card-title { color: var(--dm-text) !important; }
body.dark-mode .form-group label { color: var(--dm-text-muted) !important; }
body.dark-mode .form-control:disabled { background: var(--dm-surface2) !important; color: var(--dm-text-muted) !important; border-color: transparent !important; }
body.dark-mode .profile-pic-section { border-bottom-color: var(--dm-border) !important; }
body.dark-mode .current-pic-wrap { background: var(--dm-surface2) !important; border-color: var(--dm-card) !important; }
body.dark-mode .upload-hint p { color: var(--dm-text-muted) !important; }
body.dark-mode button[name="change_password"] { background: var(--dm-text) !important; color: var(--dm-bg) !important; }

/* addnew.php & edit.php */
body.dark-mode .add-container { background: transparent !important; }
body.dark-mode .form-card { background: var(--dm-card) !important; border-color: var(--dm-border) !important; box-shadow: var(--dm-shadow) !important; }
body.dark-mode .form-header h1, body.dark-mode .form-header h2 { color: var(--dm-text) !important; }
body.dark-mode .form-header p { color: var(--dm-text-sub) !important; }
body.dark-mode .input-group label { color: var(--dm-text-muted) !important; }
body.dark-mode .input-group input, body.dark-mode .input-group select, body.dark-mode .input-group textarea { background: var(--dm-input-bg) !important; border-color: var(--dm-border) !important; color: var(--dm-text) !important; }
body.dark-mode .input-group input:focus, body.dark-mode .input-group select:focus, body.dark-mode .input-group textarea:focus { border-color: var(--primary-color) !important; }
body.dark-mode .suggestion-list { background: var(--dm-card) !important; border-color: var(--dm-border) !important; box-shadow: var(--dm-shadow) !important; }
body.dark-mode .suggestion-item { color: var(--dm-text-sub) !important; }
body.dark-mode .suggestion-item:hover { background: var(--dm-surface) !important; color: var(--dm-text) !important; }
body.dark-mode .suggestion-item.active { background: var(--dm-surface2) !important; color: var(--primary-color) !important; }
body.dark-mode .char-count { color: var(--dm-text-muted) !important; }
body.dark-mode .day-check { background: var(--dm-surface2) !important; border-color: var(--dm-border) !important; color: var(--dm-text-sub) !important; }
body.dark-mode .day-check:hover:not(:has(input:checked)) { border-color: var(--primary-color) !important; background: var(--dm-surface) !important; color: var(--primary-color) !important; }
body.dark-mode .day-check:has(input:checked) { background: var(--primary-color) !important; color: #fff !important; border-color: var(--primary-color) !important; }
body.dark-mode .day-presets { background: var(--dm-surface2) !important; border-color: var(--dm-border) !important; }
body.dark-mode .day-presets span { color: var(--dm-text-muted) !important; }
body.dark-mode .day-presets span:hover { color: var(--dm-text) !important; background: var(--dm-surface) !important; }
body.dark-mode .day-presets span.active { background: var(--dm-surface) !important; color: var(--primary-color) !important; }
body.dark-mode .image-upload-zone { border-color: var(--dm-border) !important; }
body.dark-mode .image-upload-zone:hover { border-color: var(--primary-color) !important; background: var(--dm-surface) !important; }
body.dark-mode .form-footer { background: var(--dm-card) !important; border-top-color: var(--dm-border) !important; }
body.dark-mode .btn-submit:disabled { background: var(--dm-surface2) !important; color: var(--dm-text-muted) !important; }

/* delete modal */
body.dark-mode .delete-modal { background: var(--dm-card) !important; box-shadow: var(--dm-shadow) !important; }
body.dark-mode .delete-modal h3 { color: var(--dm-text) !important; }
body.dark-mode .delete-modal p { color: var(--dm-text-sub) !important; }
body.dark-mode .btn-cancel { background: var(--dm-surface2) !important; color: var(--dm-text) !important; }
body.dark-mode .btn-cancel:hover { background: var(--dm-surface) !important; }

/* Alerts */
body.dark-mode .alert-success { background: rgba(22, 101, 52, 0.4) !important; color: #4ade80 !important; border-color: #14532d !important; }
body.dark-mode .alert-error { background: rgba(153, 27, 27, 0.4) !important; color: #f87171 !important; border-color: #7f1d1d !important; }