* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background: #f7f8fa;
    color: #222;
    line-height: 1.5;
}

header {
    background: #2563eb;
    color: #fff;
    padding: 14px 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}

header .container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

header a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.header-search {
    flex: 1;
    max-width: 420px;
    position: relative;
}

.header-search form {
    width: 100%;
}

.header-search input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
}

.search-results-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 360px;
    overflow-y: auto;
    z-index: 20;
}

.search-results-dropdown.is-open {
    display: block;
}

.search-dropdown-results {
    display: flex;
    flex-direction: column;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: #222;
    border-bottom: 1px solid #f3f4f6;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f9fafb;
}

.search-dropdown-section {
    padding: 8px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #9ca3af;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}

.search-result-item img,
.search-result-avatar {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    flex-shrink: 0;
    background: #f3f4f6;
}

.search-result-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #2563eb;
}

.search-result-info {
    min-width: 0;
}

.search-result-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-footer,
.search-result-loading,
.search-result-empty {
    padding: 12px 14px;
    font-size: 0.85rem;
    text-align: center;
    color: #6b7280;
}

.search-result-footer {
    display: block;
    text-decoration: none;
    color: #2563eb;
    font-weight: 600;
}

.search-result-footer:hover {
    background: #f9fafb;
}

header .btn-header {
    background: #fff;
    color: #2563eb;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
}

@media (min-width: 1024px) {
    .container {
        max-width: 1280px;
        padding: 16px 24px;
    }
}

h1, h2, h3 {
    margin-top: 0;
}

.hero {
    background: #fff;
    border-radius: 12px;
    padding: 24px 18px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.hero h1 {
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.hero p {
    color: #6b7280;
    margin: 0;
}

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.category-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    color: #222;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: transform 0.15s, box-shadow 0.15s;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.category-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: #2563eb;
}

.category-card p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-card-see-all {
    background: #eff6ff;
    border: 1px dashed #2563eb;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.category-card-see-all h3 {
    color: #2563eb;
    margin: 0 0 6px;
}

.category-card-see-all p {
    color: #3b82f6;
}

.section-title {
    font-size: 1.15rem;
    margin-bottom: 14px;
}

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

.listing-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    text-decoration: none;
    color: #222;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.listing-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f3f4f6;
}

.listing-card .info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.listing-card .name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-card .price {
    color: #2563eb;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.listing-card .location {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: auto;
}

.empty-state {
    text-align: center;
    padding: 40px 16px;
    color: #6b7280;
}

.detail-page {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.detail-page img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 10px;
    background: #f3f4f6;
}

.detail-page .meta {
    margin-top: 16px;
}

.detail-page .price {
    font-size: 1.25rem;
    color: #2563eb;
    font-weight: 700;
    margin-bottom: 8px;
}

.detail-page .location {
    color: #6b7280;
    margin-bottom: 16px;
}

.detail-page .description {
    color: #374151;
    margin-bottom: 24px;
    white-space: pre-line;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: #25d366;
    color: #fff;
}

.btn-secondary {
    background: #2563eb;
    color: #fff;
}

.btn-outline {
    background: #fff;
    color: #2563eb;
    border: 1px solid #2563eb;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.form-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-group small {
    color: #6b7280;
    font-size: 0.8rem;
}

.form-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.auth-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 0.9rem;
    color: #4b5563;
}

.auth-footer a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.breadcrumb {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 14px;
}

.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.businesses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.business-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    text-decoration: none;
    color: #222;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: transform 0.15s, box-shadow 0.15s;
}

.business-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.business-card .business-name {
    font-weight: 700;
    font-size: 1rem;
    color: #2563eb;
    margin-bottom: 4px;
}

.business-card .business-location {
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.business-card .business-description {
    font-size: 0.85rem;
    color: #374151;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.business-detail {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.business-detail h1 {
    margin-bottom: 6px;
}

.business-detail-location {
    color: #6b7280;
    margin-bottom: 14px;
}

.business-detail p {
    color: #374151;
    margin-bottom: 20px;
}

.business-mini-card {
    display: block;
    margin-top: 24px;
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    color: #222;
    transition: background 0.15s, border-color 0.15s;
}

.business-mini-card:hover {
    background: #fff;
    border-color: #2563eb;
}

.business-mini-name {
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 2px;
}

.business-mini-location {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 6px;
}

.business-mini-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
}

footer {
    text-align: center;
    padding: 24px 16px;
    color: #9ca3af;
    font-size: 0.85rem;
}

@media (max-width: 520px) {
    header .container {
        flex-wrap: wrap;
    }

    .header-search {
        order: 3;
        max-width: 100%;
        width: 100%;
    }

    .categories {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .category-card {
        padding: 10px;
    }

    .category-card h3 {
        font-size: 0.85rem;
    }

    .category-card p {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .listings-grid,
    .businesses-grid {
        grid-template-columns: 1fr;
    }
}
