/* =========================================================
   LINKPOSTNOW - MARKETPLACE PAGE
   File: assets/marketplace/marketplace.css
   ========================================================= */


/* =========================
   RESET
   ========================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f7f7f7;
    color: #171717;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select {
    font-family: inherit;
}


/* =========================
   MAIN CONTAINER
   ========================= */

.marketplace-container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
}


/* =========================
   HEADER
   ========================= */

.marketplace-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    font-size: 25px;
    font-weight: 800;
    color: #111111;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav a {
    font-size: 15px;
    color: #555555;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #111111;
    font-weight: 700;
}


/* =========================
   HERO
   ========================= */

.marketplace-hero {
    background: #ffffff;
    padding: 75px 0 65px;
    border-bottom: 1px solid #eeeeee;
}

.hero-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #555555;
    margin-bottom: 18px;
}

.marketplace-hero h1 {
    margin: 0;
    font-size: 48px;
    line-height: 1.12;
    letter-spacing: -1px;
    color: #111111;
}

.marketplace-hero p {
    margin: 20px 0 0;
    color: #666666;
    font-size: 18px;
    line-height: 1.6;
    max-width: 700px;
}


/* =========================
   MARKETPLACE SECTION
   ========================= */

.marketplace-section {
    padding: 50px 0 80px;
}


/* =========================
   SEARCH TOOLBAR
   ========================= */

.marketplace-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 35px;
}

.search-box {
    flex: 1;
}

.search-box input,
.filter-box select {
    width: 100%;
    height: 48px;
    border: 1px solid #dcdcdc;
    background: #ffffff;
    border-radius: 8px;
    padding: 0 15px;
    font-size: 15px;
    color: #222222;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-box input::placeholder {
    color: #999999;
}

.search-box input:focus,
.filter-box select:focus {
    border-color: #111111;
}

.filter-box {
    width: 190px;
    flex-shrink: 0;
}

.clear-btn {
    height: 48px;
    padding: 0 20px;
    border: 1px solid #111111;
    background: #111111;
    color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.clear-btn:hover {
    background: #333333;
}


/* =========================
   MARKETPLACE INFO
   ========================= */

.marketplace-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.marketplace-info h2 {
    margin: 0;
    font-size: 26px;
    color: #111111;
}

#resultCount {
    color: #666666;
    font-size: 14px;
}


/* =========================================================
   WEBSITE LIST
   ========================================================= */

/*
   IMPORTANT:
   Old grid/card layout removed.
   Websites now appear as horizontal list rows.
*/

.marketplace-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
    border-top: 1px solid #dddddd;
    border-bottom: 1px solid #dddddd;
    background: #ffffff;
}


/* =========================
   WEBSITE ROW
   ========================= */

.website-card {
    width: 100%;
    min-height: 105px;
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid #e5e5e5;
    border-radius: 0;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    transition: background 0.2s ease;
}

.website-card:last-child {
    border-bottom: 0;
}

.website-card:hover {
    background: #fafafa;
    transform: none;
}


/* =========================
   WEBSITE TOP
   ========================= */

.website-top {
    width: 30%;
    min-width: 220px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
}

.website-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    word-break: break-word;
}

.website-name a {
    color: #111111;
}

.website-name a:hover {
    text-decoration: underline;
}


/* =========================
   STATUS
   ========================= */

.status {
    display: inline-block;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 9px;
    border-radius: 20px;
    background: #eeeeee;
    color: #333333;
    white-space: nowrap;
}

.status.new {
    background: #e8f7e8;
    color: #267326;
}

.status.old {
    background: #f1f1f1;
    color: #555555;
}


/* =========================
   NICHE
   ========================= */

.website-niche {
    width: 15%;
    min-width: 120px;
    margin: 0;
    padding: 0 15px;
    display: flex;
    align-items: center;
    background: transparent;
    border-radius: 0;
    color: #555555;
    font-size: 13px;
}


/* =========================================================
   STATS
   ========================================================= */

.website-stats {
    width: 38%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 0;
    margin: 0;
}

.stat {
    padding: 0 12px;
    border-right: 1px solid #eeeeee;
}

.stat:last-child {
    border-right: 0;
}

.stat:nth-child(odd),
.stat:nth-child(1),
.stat:nth-child(2) {
    border-bottom: 0;
}

.stat-label {
    display: block;
    font-size: 10px;
    color: #888888;
    margin-bottom: 5px;
    white-space: nowrap;
}

.stat-value {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #222222;
    white-space: nowrap;
}


/* =========================================================
   BOTTOM
   ========================================================= */

.website-bottom {
    width: 17%;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-left: 18px;
}

.price {
    font-size: 18px;
    font-weight: 800;
    color: #111111;
    white-space: nowrap;
}

.tat {
    color: #666666;
    font-size: 12px;
    white-space: nowrap;
}


/* =========================================================
   LOADING / EMPTY / ERROR
   ========================================================= */

.loading,
.empty-message,
.error-message {
    width: 100%;
    padding: 45px 20px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    color: #666666;
}

.error-message {
    color: #a00000;
}

.empty-message {
    color: #666666;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.marketplace-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 30px;
    width: 100%;
}

.marketplace-pagination button {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #dddddd;
    background: #ffffff;
    color: #222222;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.marketplace-pagination button:hover {
    border-color: #111111;
    background: #111111;
    color: #ffffff;
}

.marketplace-pagination button.active {
    border-color: #111111;
    background: #111111;
    color: #ffffff;
}

.marketplace-pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.marketplace-pagination button:disabled:hover {
    border-color: #dddddd;
    background: #ffffff;
    color: #222222;
}


/* =========================================================
   FOOTER
   ========================================================= */

.marketplace-footer {
    background: #111111;
    color: #ffffff;
    padding: 25px 0;
}

.marketplace-footer p {
    margin: 0;
    font-size: 13px;
    color: #cccccc;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .marketplace-container {
        width: 94%;
    }

    .website-card {
        flex-wrap: wrap;
        gap: 15px;
        padding: 18px;
    }

    .website-top {
        width: 100%;
        min-width: 0;
    }

    .website-niche {
        width: 15%;
        min-width: 100px;
        padding-left: 0;
    }

    .website-stats {
        width: 60%;
    }

    .website-bottom {
        width: 25%;
        min-width: 150px;
        padding-left: 10px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .marketplace-container {
        width: 92%;
    }

    /* HEADER */

    .header-inner {
        flex-direction: column;
        padding: 18px 0;
        gap: 15px;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 18px;
    }


    /* HERO */

    .marketplace-hero {
        padding: 50px 0;
    }

    .marketplace-hero h1 {
        font-size: 36px;
        letter-spacing: -0.5px;
    }

    .marketplace-hero p {
        font-size: 16px;
    }


    /* SEARCH */

    .marketplace-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-box {
        width: 100%;
    }

    .clear-btn {
        width: 100%;
    }


    /* INFO */

    .marketplace-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .marketplace-info h2 {
        font-size: 23px;
    }


    /* LIST */

    .marketplace-grid {
        border-radius: 0;
    }

    .website-card {
        display: block;
        padding: 20px 16px;
    }

    .website-top {
        width: 100%;
        margin-bottom: 15px;
    }

    .website-name {
        font-size: 17px;
    }

    .website-niche {
        width: auto;
        min-width: 0;
        display: inline-block;
        padding: 0;
        margin-bottom: 15px;
    }

    .website-stats {
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
        border-top: 1px solid #eeeeee;
        border-bottom: 1px solid #eeeeee;
        margin-bottom: 15px;
    }

    .stat {
        padding: 12px 8px;
    }

    .stat:nth-child(odd) {
        border-right: 1px solid #eeeeee;
    }

    .stat:nth-child(1),
    .stat:nth-child(2) {
        border-bottom: 1px solid #eeeeee;
    }

    .stat:nth-child(3),
    .stat:nth-child(4) {
        border-bottom: 0;
    }

    .website-bottom {
        width: 100%;
        min-width: 0;
        padding-left: 0;
    }

    .price {
        font-size: 19px;
    }


    /* PAGINATION */

    .marketplace-pagination {
        gap: 5px;
        flex-wrap: wrap;
    }

    .marketplace-pagination button {
        min-width: 38px;
        height: 38px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 450px) {

    .marketplace-hero h1 {
        font-size: 31px;
    }

    .marketplace-section {
        padding-top: 35px;
    }

    .website-card {
        padding: 18px 14px;
    }

    .status {
        font-size: 9px;
        padding: 4px 7px;
    }

    .stat-label {
        font-size: 9px;
    }

    .stat-value {
        font-size: 13px;
    }

    .tat {
        font-size: 11px;
    }

}