:root {
    --primary: #1a5f7a;
    --primary-dark: #134b61;
    --secondary: #57c5b6;
    --accent: #159895;
    --dark: #002b5b;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    font-size: 28px;
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    padding: 10px 16px;
    border-radius: var(--radius);
    transition: all 0.3s;
}

.nav-link:hover {
    background: var(--gray-light);
    color: var(--primary);
}

.nav-link-cta {
    background: var(--primary);
    color: var(--white) !important;
}

.nav-link-cta:hover {
    background: var(--primary-dark) !important;
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 32px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.search-input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.categories {
    padding: 60px 0;
}

.categories h2, .recent-listings h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--dark);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.category-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-count {
    color: var(--gray);
    font-size: 14px;
}

.recent-listings {
    padding: 60px 0;
    background: var(--gray-light);
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.listing-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.listing-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gray-light);
}

.listing-image-placeholder {
    width: 100%;
    height: 200px;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 48px;
}

.listing-info {
    padding: 20px;
}

.listing-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.listing-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.listing-meta {
    display: flex;
    gap: 16px;
    color: var(--gray);
    font-size: 14px;
}

.footer {
    background: var(--dark);
    color: var(--white);
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--gray-light);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--white);
}

.catalog-page {
    padding: 40px 0;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.catalog-title {
    font-size: 28px;
}

.catalog-count {
    color: var(--gray);
}

.filters {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.filter-group label {
    display: block;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: var(--primary);
}

.filter-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 1px solid var(--gray-light);
}

.btn-secondary:hover {
    background: var(--gray-light);
}

.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.sort-options {
    display: flex;
    gap: 8px;
}

.sort-options a {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--gray);
    font-size: 14px;
}

.sort-options a.active {
    background: var(--primary);
    color: var(--white);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    background: var(--white);
    box-shadow: var(--shadow);
}

.pagination a.active {
    background: var(--primary);
    color: var(--white);
}

.listing-detail {
    padding: 40px 0;
}

.listing-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.gallery {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.gallery-main {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
}

.listing-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.price-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.price-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.contact-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-card h3 {
    margin-bottom: 16px;
}

.specs-table {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-top: 24px;
}

.specs-table h3 {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-light);
}

.specs-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-light);
}

.specs-row:last-child {
    border-bottom: none;
}

.specs-label {
    color: var(--gray);
}

.specs-value {
    font-weight: 500;
}

.description-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-top: 24px;
}

.description-card h3 {
    margin-bottom: 16px;
}

.description-text {
    color: var(--gray);
    line-height: 1.8;
}

.similar-listings {
    margin-top: 60px;
}

.similar-listings h3 {
    font-size: 24px;
    margin-bottom: 24px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        height: auto;
        padding: 16px;
        gap: 16px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .listing-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
