* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f7f7f7;
    color: #222;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: auto;
}


/* HEADER */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    width: 92%;
    max-width: 1300px;
    margin: auto;

    min-height: 70px;

    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    white-space: nowrap;
}

.logo span {
    font-weight: 400;
}

.header-search {
    flex: 1;
}

.header-search form {
    display: flex;
}

.header-search input {
    width: 100%;
    height: 44px;
    border: 1px solid #ccc;
    border-radius: 6px 0 0 6px;
    padding: 0 15px;
    font-size: 15px;
}

.header-search button {
    border: none;
    padding: 0 20px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.post-ad-button,
.primary-button {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 700;
}


/* HERO */

.hero {
    padding: 70px 0;
    background: #eeeeee;
}

.hero h1 {
    font-size: 42px;
    margin: 0 0 15px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.hero-search {
    display: flex;
    max-width: 900px;
}

.hero-search input,
.hero-search select {
    height: 52px;
    border: 1px solid #ccc;
    padding: 0 15px;
    font-size: 15px;
}

.hero-search input {
    flex: 1;
    border-radius: 6px 0 0 6px;
}

.hero-search select {
    width: 180px;
}

.hero-search button {
    border: none;
    padding: 0 25px;
    cursor: pointer;
    font-weight: bold;
}


/* SECTIONS */

.categories-section,
.latest-ads,
.subcategory-section {
    padding: 55px 0;
}

.section-title {
    margin-bottom: 30px;
}

.section-title h2,
.page-heading h1 {
    margin-bottom: 8px;
}

.section-title p {
    color: #777;
}


/* CATEGORY */

.category-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
}

.category-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 25px 10px;
    text-align: center;
    transition: 0.2s;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.category-icon {
    width: 55px;
    height: 55px;

    margin: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 22px;
    font-weight: bold;

    background: #eeeeee;
}

.category-card h3 {
    font-size: 15px;
    margin-top: 15px;
}


/* SUBCATEGORY */

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.subcategory-card {
    background: #fff;
    padding: 25px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.subcategory-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
}

.subcategory-card h3 {
    margin-bottom: 0;
}


/* EMPTY ADS */

.empty-ads {
    background: #fff;
    padding: 50px;
    text-align: center;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}


/* FOOTER */

.site-footer {
    margin-top: 50px;
    padding: 50px 0 20px;
    background: #222;
    color: #fff;
}

.footer-content {
    display: flex;
    justify-content: space-between;
}

.footer-content a {
    display: block;
    margin: 10px 0;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #444;
    text-align: center;
    color: #aaa;
}


/* MOBILE */

@media (max-width: 900px) {

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .subcategory-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media (max-width: 600px) {

    .header-container {
        flex-wrap: wrap;
        padding: 12px 0;
        gap: 12px;
    }

    .logo {
        font-size: 24px;
    }

    .header-search {
        order: 3;
        width: 100%;
    }

    .header-actions {
        margin-left: auto;
    }

    .hero {
        padding: 45px 0;
    }

    .hero h1 {
        font-size: 30px;
    }

    .hero-search {
        flex-direction: column;
        gap: 10px;
    }

    .hero-search input,
    .hero-search select,
    .hero-search button {
        width: 100%;
        height: 48px;
        border-radius: 6px;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .category-card {
        padding: 15px 5px;
    }

    .subcategory-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

}
/* =========================================================
   POST AD
========================================================= */

.post-ad-page {
    padding: 50px 0;
}

.page-heading {
    margin-bottom: 30px;
}

.page-heading h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.page-heading p {
    color: #777;
}


.post-ad-form {
    max-width: 850px;
    margin: auto;
}


.form-section {
    background: #fff;
    padding: 30px;
    margin-bottom: 25px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
}


.form-section h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 21px;
}


.form-group {
    margin-bottom: 20px;
}


.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}


.form-group label span {
    font-weight: bold;
}


.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
}


.form-group textarea {
    resize: vertical;
}


.form-group small {
    display: block;
    margin-top: 6px;
    color: #777;
}


.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}


.radio-group {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}


.radio-group label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: normal;
}


.radio-group input {
    width: auto;
}


.form-submit {
    margin-bottom: 50px;
}


.form-submit button {
    border: none;
    cursor: pointer;
    font-size: 16px;
}


.image-preview {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 15px;
}


.image-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}


@media (max-width: 600px) {

    .post-ad-page {
        padding: 30px 0;
    }

    .form-section {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .image-preview {
        grid-template-columns: repeat(3, 1fr);
    }

}
/* =========================================================
   AUTH
========================================================= */

.auth-page {
    padding: 60px 20px;
    min-height: 70vh;
}


.auth-container {
    max-width: 450px;
    margin: 0 auto;
}


.auth-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 35px;
}


.auth-card h1 {
    margin: 0 0 8px;
    text-align: center;
}


.auth-subtitle {
    text-align: center;
    color: #777;
    margin-bottom: 30px;
}


.auth-button {
    width: 100%;
    border: 0;
    cursor: pointer;
}


.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: #666;
}


.auth-footer a {
    font-weight: 600;
    text-decoration: none;
}


.alert {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}


.alert-error {
    background: #ffe8e8;
    color: #b00020;
}


.alert-success {
    background: #e8f7ed;
    color: #18753c;
}
/* =========================================================
   DASHBOARD
========================================================= */

.dashboard-page {
    padding: 40px 0 60px;
}


.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}


.dashboard-header h1 {
    margin: 0 0 8px;
}


.dashboard-header p {
    margin: 0;
    color: #777;
}


.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}


.dashboard-stat {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 25px;
}


.dashboard-stat strong {
    display: block;
    font-size: 30px;
    margin-bottom: 5px;
}


.dashboard-stat span {
    color: #777;
}


.dashboard-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
}


.dashboard-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}


.dashboard-section-header h2 {
    margin: 0;
}


.profile-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}


.profile-info div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}


.profile-info span {
    color: #666;
}


.empty-ads {
    text-align: center;
    padding: 40px 20px;
}


.empty-ads h3 {
    margin-bottom: 8px;
}


.empty-ads p {
    color: #777;
    margin-bottom: 20px;
}


.ads-table-wrapper {
    overflow-x: auto;
}


.ads-table {
    width: 100%;
    border-collapse: collapse;
}


.ads-table th,
.ads-table td {
    padding: 14px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
}


.ads-table th {
    font-size: 14px;
}


.ad-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}


.status-active {
    background: #e8f7ed;
}


.status-pending {
    background: #fff4d6;
}


.status-rejected {
    background: #ffe8e8;
}


.dashboard-links {
    display: flex;
    gap: 20px;
}


@media (max-width: 700px) {

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }


    .dashboard-stats {
        grid-template-columns: 1fr;
    }


    .profile-info {
        grid-template-columns: 1fr;
    }

}