/* ==================== */
/* GOOGLE FONT IMPORT */
/* ==================== */
@import url(https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap);

/* ==================== */
/* BASE STYLES */
/* ==================== */
body,
header {
    background: var(--color-bg)
}

.highlight {
    border: 1px dashed var(--color-blue)
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    font-family: Inter, sans-serif;
    color: var(--color-text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

/* ==================== */
/* UTILITY CLASSES */
/* ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border-width: 0
}

.desktop-only {
    display: inline
}

.filters.collapsed .filter-header h3,
.filters.collapsed .filter-option label,
.filters.collapsed .filter-options,
.filters.collapsed .filter-section,
.filters.collapsed .location-select,
.mobile-only {
    display: none
}

/* ==================== */
/* VARIABLES */
/* ==================== */
:root {
    --color-bg: #ffffff;
    --color-text-primary: #1a1a1a;
    --color-text-secondary: #4b5563;
    --color-border: #e5e7eb;
    --color-gray-light: #f3f4f6;
    --color-gray-medium: #d1d5db;
    --color-gray-dark: #6b7280;
    --color-primary: #111827;
    --color-accent: #374151;
    --color-blue: #3b82f6;
    --color-blue-hover: #2563eb;
    --color-red: #ff4757;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.2s;
    --sidebar-width: 280px
}

/* ==================== */
/* HEADER & NAVIGATION */
/* ==================== */
header {
    position: sticky;
    top: 0;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.logo,
.logo-icon {
    color: var(--color-primary)
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
    transition: opacity var(--transition-speed);
    text-decoration: none
}

.logo:hover {
    opacity: .9
}

.logo-icon {
    width: 24px;
    height: 24px
}

/* ==================== */
/* SEARCH COMPONENT */
/* ==================== */
.search-container {
    flex-grow: 1;
    max-width: 600px;
    margin: 0 2rem;
    position: relative
}

.search-bar {
    width: 100%;
    padding: .75rem 1rem .75rem 3rem;
    border-radius: var(--radius-md);
    border: 1px solid #1a1a1a;
    background-color: var(--color-bg);
    font-size: .95rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed)
}

.search-bar:focus {
    outline: 0;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .2)
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray-dark)
}

/* ==================== */
/* HEADER ACTIONS */
/* ==================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0
}

.add-button {
    border: 1px solid var(--color-blue);
    color: var(--color-blue);
    border-radius: var(--radius-md);
    padding: .75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    gap: .5rem;
    display: flex;
    align-items: center;
    font-size: .95rem;
    transition: all var(--transition-speed);
    white-space: nowrap;
    background-color: white;
}

.add-button:hover {
    transform: translateY(-2px)
}

.add-button svg {
    width: 16px;
    height: 16px;
    stroke-width: 3
}

.filter-btn {
    background: 0 0;
    border: none;
    font-size: 1rem;
    color: var(--color-text-secondary);
    display: none;
    gap: .5rem;
    padding: .5rem 1rem;
    border-radius: var(--radius-md);
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.filter-btn:hover {
    color: var(--color-blue-hover);
    transform: translateY(-1px)
}

.filter-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5
}

/* ==================== */
/* MAIN LAYOUT */
/* ==================== */
.main-container {
    display: flex;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    position: relative
}

.content {
    flex: 1;
    padding: 2rem;
    overflow-x: hidden;
    transition: all var(--transition-speed) ease
}

/* ==================== */
/* FILTER SIDEBAR */
/* ==================== */
.filters {
    width: var(--sidebar-width);
    padding: 1.5rem;
    border-right: 1px solid var(--color-border);
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    transition: all var(--transition-speed) ease;
    z-index: 90;
    flex-shrink: 0;
    background: var(--color-bg)
}

.filters.collapsed {
    padding: 1.5rem .5rem;
    width: 60px;
    overflow: hidden
}

.filters.collapsed .filter-header {
    padding: 0;
    justify-content: center;
    margin-bottom: 2rem
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    transition: all var(--transition-speed)
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary)
}

.toggle-sidebar {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow-sm);
    background: var(--color-bg)
}

.toggle-sidebar svg {
    width: 12px;
    height: 12px;
    stroke-width: 3;
    transition: transform var(--transition-speed)
}

.filters.collapsed .toggle-sidebar svg {
    transform: rotate(180deg)
}

/* ==================== */
/* FILTER SECTIONS */
/* ==================== */
.filter-section {
    margin-bottom: 1.5rem;
    transition: border var(--transition-speed);
    padding: 10px
}

.filter-section h3 {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .75rem;
    font-size: .875rem;
    color: var(--color-primary)
}

.filter-section h3 svg {
    width: 14px;
    height: 14px;
    stroke-width: 2
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: .75rem
}

.filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-speed)
}

.filter-option:hover {
    background-color: var(--color-gray-light)
}

.filter-option input {
    accent-color: var(--color-blue);
    min-width: 16px;
    min-height: 16px;
    order: 2;
    cursor: pointer
}

.filter-option label {
    font-size: .875rem;
    cursor: pointer;
    color: var(--color-text-secondary);
    order: 1;
    flex-grow: 1
}

.location-select {
    width: 100%;
    border: 1px solid var(--color-border);
    padding: .5rem;
    border-radius: var(--radius-sm);
    background-color: var(--color-bg);
    margin-bottom: .75rem;
    font-size: .875rem;
    cursor: pointer;
    transition: all var(--transition-speed)
}

.location-select:focus {
    outline: 0;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .2)
}

/* ==================== */
/* COLLAPSED FILTER ICONS */
/* ==================== */
.collapsed-filter-icon {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: .75rem 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-speed);
    margin-bottom: .5rem;
    color: var(--color-text-secondary)
}

.collapsed-filter-icon:hover {
    background-color: var(--color-gray-light);
    color: var(--color-primary)
}

.collapsed-filter-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    margin-bottom: .25rem
}

.collapsed-filter-icon span {
    font-size: .65rem;
    text-align: center;
    line-height: 1.2
}

.filters.collapsed .collapsed-filter-icon {
    display: flex
}

/* ==================== */
/* CONTENT AREA */
/* ==================== */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.4rem
}

.results-count {
    font-size: .875rem;
    color: var(--color-text-secondary)
}

.sort-container {
    display: flex;
    align-items: center;
    gap: .75rem
}

.sort-label {
    font-size: .875rem;
    color: var(--color-text-secondary)
}

.sort-select {
    padding: .5rem .75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    font-size: .875rem;
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    cursor: pointer;
    transition: all var(--transition-speed)
}

.sort-select:focus {
    outline: 0;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .2)
}

/* ==================== */
/* CARD GRID */
/* ==================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem
}

.card {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    transition: all var(--transition-speed);
    cursor: pointer
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-gray-medium)
}

/* ==================== */
/* CARD IMAGE */
/* ==================== */
.card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: var(--color-gray-light)
}

.card-save {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, .05);
    display: flex;
    cursor: pointer;
    transition: all var(--transition-speed);
    background-color: rgba(255, 255, 255, .95)
}


.card-saved {
    background-color: var(--color-red);
    color: #fff
}


.card-save svg {
    width: 16px;
    height: 16px;
    stroke-width: 2
}

/* ==================== */
/* CARD CONTENT */
/* ==================== */
.card-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: .5rem;
    color: var(--color-primary)
}

.card-location {
    font-size: .875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--color-text-secondary)
}

.card-location svg {
    width: 14px;
    height: 14px;
    stroke-width: 2
}

.card-features {
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
    display: flex
}

.card-feature {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem .75rem;
    border-radius: 50px;
    background-color: var(--color-gray-light);
    font-size: .8125rem;
    color: var(--color-text-secondary)
}

.card-feature svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.5
}

/* ==================== */
/* CARD FOOTER */
/* ==================== */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    margin-top: auto;
    border-top: 1px solid var(--color-border)
}

.card-price {
    font-weight: 700;
    color: var(--color-primary)
}

.card-price span {
    font-weight: 400;
    font-size: .875rem;
    color: var(--color-text-secondary)
}

.card-rating {
    align-items: center;
    gap: .25rem;
    font-weight: 600;
    color: var(--color-primary);
    display: flex;
    font-size: .8125rem
}

.card-rating svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
    fill: var(--color-primary);
    color: var(--color-primary)
}

/* ==================== */
/* FOOTER */
/* ==================== */
footer {
    padding: 1.5rem 2rem;
    margin-top: auto
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 1rem
}

.footer-links a {
    color: var(--color-text-primary);
    font-size: .875rem;
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition-speed)
}

.footer-links a:hover {
    color: var(--color-blue)
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem
}

.footer-copyright {
    font-size: .75rem;
    color: var(--color-text-secondary);
    text-align: center
}

.footer-social {
    display: flex;
    gap: 1rem
}

.footer-social a {
    color: var(--color-text-secondary);
    transition: color var(--transition-speed)
}

.footer-social a:hover {
    color: var(--color-text-primary)
}

.footer-social svg {
    width: 16px;
    height: 16px;
    stroke-width: 2
}

/* ==================== */
/* MOBILE FILTERS */
/* ==================== */
.mobile-filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, .5);
    z-index: 200
}

.mobile-filters {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-bg);
    padding: 1.5rem;
    overflow-y: auto;
    transition: left .3s;
    z-index: 300
}

.mobile-filters.active {
    left: 0
}

.close-filters {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: 0 0;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    padding: .5rem;
    transition: background-color var(--transition-speed)
}

.close-filters:hover {
    background-color: var(--color-gray-light)
}

.close-filters svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5
}

/* ==================== */
/* MOBILE NAVIGATION */
/* ==================== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg);
    padding: .5rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .06);
    z-index: 100;
    border-top: 1px solid var(--color-border)
}

.mobile-nav ul {
    display: flex;
    justify-content: space-around;
    list-style: none
}

.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: .75rem;
    color: var(--color-text-secondary);
    padding: .5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-speed);
    text-decoration: none
}

.mobile-nav a:hover {
    color: var(--color-blue)
}

.mobile-nav a.active {
    color: var(--color-blue);
    background-color: rgba(59, 130, 246, .1)
}

.mobile-nav svg {
    width: 20px;
    height: 20px;
    margin-bottom: .25rem;
    stroke-width: 2
}

/* ==================== */
/* RESPONSIVE BREAKPOINTS */
/* ==================== */
@media (min-width:768px) {
    .toggle-sidebar {
        display: flex
    }
}

@media (max-width:1200px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr))
    }
}

@media (max-width:992px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr))
    }
}

@media (max-width:768px) {

    .content,
    header {
        padding: 1rem
    }

    .main-container {
        flex-direction: column
    }

    .footer-container {
        padding-bottom: 60px
    }

    .filters {
        position: fixed;
        top: 80px;
        left: -280px;
        z-index: 90;
        transition: left .3s;
        padding: 1.5rem
    }

    .filters.active {
        left: 0
    }

    .filter-btn {
        display: flex
    }

    .mobile-nav {
        display: block
    }

    .search-container {
        margin: 0 .5rem
    }

    .add-button span,
    .desktop-only {
        display: none
    }

    .add-button {
        padding: .5rem;
        border-radius: 50%
    }

    .mobile-only {
        display: inline
    }

    .footer-links {
        gap: 1rem
    }
}

@media (max-width:576px) {
    .cards-grid {
        grid-template-columns: 1fr
    }

    .logo span {
        display: none
    }

    .search-container {
        margin-left: .5rem;
        margin-right: 0
    }

    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: .75rem 1.5rem
    }

    .footer-links a {
        font-size: .8125rem
    }

    .card-image {
        height: 160px
    }
}

@media (min-width:1600px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr)
    }
}