/* ==========================================
   UEABAY v2
   Modern Marketplace Design
========================================== */

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

:root{

    --primary:#0057A3;
    --primary-dark:#00427d;
    --background:#f5f7fa;
    --card:#ffffff;
    --text:#222;
    --muted:#777;
    --border:#e6e9ef;

    --radius:16px;

    --shadow:
        0 10px 30px rgba(0,0,0,.08);

}

body{

    font-family:"Inter",sans-serif;

    background:var(--background);

    color:var(--text);
}

a{

    text-decoration:none;

    color:inherit;
}

/* ==========================================
   NAVBAR
========================================== */

.navbar{

    background:white;

    padding:18px 50px;

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:25px;

    position:sticky;

    top:0;

    z-index:1000;

    box-shadow:0 2px 15px rgba(0,0,0,.05);
}

.logo{

    font-size:30px;

    font-weight:700;

    color:var(--primary);
}

.logo a{

    color:inherit;
}

.search-form{

    flex:1;

    display:flex;

    max-width:600px;

    margin:0 40px;
}

.search-form input{

    flex:1;

    padding:14px 18px;

    border:1px solid var(--border);

    border-radius:12px 0 0 12px;

    font-size:15px;

    outline:none;
}

.search-form button{

    border:none;

    background:var(--primary);

    color:white;

    width:60px;

    border-radius:0 12px 12px 0;

    cursor:pointer;

    transition:.25s;
}

.search-form button:hover{

    background:var(--primary-dark);
}

.nav-links{

    display:flex;

    gap:22px;

    font-weight:600;
}

.nav-links a{

    transition:.2s;
}

.nav-links a:hover{

    color:var(--primary);
}
main{
    max-width:1400px;
    margin:auto;
}

/* ==========================================
   HERO
========================================== */

.hero{

    padding:90px 20px;

    text-align:center;

    background:
        linear-gradient(
            180deg,
            white,
            #eef5ff
        );
}

.hero h1{

    font-size:58px;

    margin-bottom:15px;
}

.hero p{

    font-size:20px;

    color:var(--muted);

    margin-bottom:40px;
}

.hero-search{

    display:flex;

    justify-content:center;

    max-width:700px;

    margin:auto;
}

.hero-search input{

    flex:1;

    padding:18px;

    border:none;

    border-radius:14px 0 0 14px;

    font-size:17px;

    box-shadow:var(--shadow);
}

.hero-search button{

    border:none;

    background:var(--primary);

    color:white;

    width:170px;

    font-size:17px;

    border-radius:0 14px 14px 0;

    cursor:pointer;
}

/* ==========================================
   CATEGORY GRID
========================================== */

.categories{

    padding:60px 40px;
}

.categories h2{

    margin-bottom:30px;

    text-align:center;
}

.category-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(170px,1fr));

    gap:20px;
}

.category-card{

    background:white;

    border-radius:var(--radius);

    padding:35px;

    text-align:center;

    box-shadow:var(--shadow);

    transition:.25s;
}

.category-card:hover{

    transform:translateY(-6px);
}

.category-card{

    font-size:46px;
}

.category-card span{

    display:block;

    margin-top:18px;

    font-size:17px;

    font-weight:600;
}

/* ==========================================
   LISTINGS
========================================== */

.featured{

    padding:20px 40px 70px;
}

.section-header{

    display:flex;

    justify-content:space-between;

    margin-bottom:30px;
}

.cards{

    display:grid;

    grid-template-columns:
        repeat(auto-fill,minmax(300px,1fr));

    gap:30px;
}

.card{

    background:white;

    border-radius:var(--radius);

    overflow:hidden;

    box-shadow:var(--shadow);

    transition:.25s;
}

.card:hover{

    transform:translateY(-8px);
}

.card img{

    width:100%;

    height:240px;

    object-fit:cover;
}

.card-body{

    padding:22px;
}

.card-body h3{

    margin-bottom:15px;

    font-size:22px;
}

.price{

    font-size:28px;

    font-weight:700;

    color:var(--primary);

    margin-bottom:12px;
}

.category{

    color:var(--muted);

    margin-bottom:10px;
}

.seller{

    font-size:15px;

    color:var(--muted);
}

/* ==========================================
   FORMS
========================================== */

.form-container{

    max-width:700px;

    margin:60px auto;

    background:white;

    padding:40px;

    border-radius:var(--radius);

    box-shadow:var(--shadow);
}

.form-container label{

    display:block;

    margin-top:20px;

    margin-bottom:8px;

    font-weight:600;
}

.form-container input,
.form-container textarea,
.form-container select{

    width:100%;

    padding:14px;

    border:1px solid var(--border);

    border-radius:12px;

    font-size:16px;
}

.form-container button{

    width:100%;

    margin-top:25px;

    padding:16px;

    background:var(--primary);

    color:white;

    border:none;

    border-radius:12px;

    cursor:pointer;

    font-size:16px;

    transition:.2s;
}

.form-container button:hover{

    background:var(--primary-dark);
}

/* ==========================================
   FOOTER
========================================== */

footer{

    margin-top:80px;

    background:#1b1f24;

    color:white;

    text-align:center;

    padding:50px 20px;
}

/* ==========================================
   MOBILE
========================================== */

@media(max-width:900px){

.navbar{

    flex-direction:column;

    padding:25px;
}

.search-form{

    width:100%;

    margin:20px 0;
}

.nav-links{

    flex-wrap:wrap;

    justify-content:center;
}

.hero h1{

    font-size:42px;
}

.hero-search{

    flex-direction:column;
}

.hero-search input{

    border-radius:12px;

    margin-bottom:12px;
}

.hero-search button{

    width:100%;

    border-radius:12px;
}

.cards{

    grid-template-columns:1fr;
}

.category-grid{

    grid-template-columns:repeat(2,1fr);
}

.form-container{

    margin:30px 15px;
}

}

@media(max-width:600px){

.hero{

    padding:60px 20px;
}

.hero h1{

    font-size:34px;
}

.logo{

    font-size:24px;
}

.category-grid{

    grid-template-columns:1fr;
}

}
/* ==========================================
   LISTING PAGE
========================================== */

.listing-page{

    display:grid;

    grid-template-columns:1.2fr 1fr;

    gap:50px;

    max-width:1300px;

    margin:60px auto;

    padding:20px;

    align-items:start;

}

.listing-image-section img{

    width:100%;

    border-radius:20px;

    box-shadow:0 10px 30px rgba(0,0,0,.12);

    object-fit:cover;

}

.listing-details{

    background:white;

    padding:35px;

    border-radius:20px;

    box-shadow:0 10px 30px rgba(0,0,0,.08);

}

.listing-category{

    display:inline-block;

    background:#eef5ff;

    color:#0057A3;

    padding:8px 16px;

    border-radius:20px;

    font-weight:600;

    margin-bottom:20px;

}

.listing-price{

    color:#0057A3;

    font-size:42px;

    margin:20px 0;

}

.listing-meta{

    margin:25px 0;

    color:#666;

}

.listing-description{

    line-height:1.8;

    margin-top:15px;

    margin-bottom:35px;

}

.seller-card{

    background:#f7f9fc;

    border:1px solid #e5e7eb;

    padding:20px;

    border-radius:15px;

    margin:25px 0;

}

.listing-buttons{

    display:flex;

    gap:15px;

    flex-wrap:wrap;

}

.listing-buttons a{

    flex:1;

    text-align:center;

}

@media(max-width:900px){

.listing-page{

    grid-template-columns:1fr;

}

.listing-details{

    padding:25px;

}

.listing-price{

    font-size:34px;

}

}
/* ==========================================
   Browse Toolbar
========================================== */

.browse-toolbar{

    display:flex;

    justify-content:flex-end;

    align-items:center;

    margin-bottom:30px;

}

.browse-toolbar form{

    display:flex;

    align-items:center;

    gap:12px;

}

.browse-toolbar select{

    padding:10px 16px;

    border-radius:10px;

    border:1px solid #ddd;

    background:white;

    font-size:15px;

    cursor:pointer;

}
/* ==========================================
   Dashboard
========================================== */

.dashboard-header{

    text-align:center;

    margin:40px 0;

}

.dashboard-header h1{

    font-size:42px;

    margin-bottom:10px;

}

.dashboard-header p{

    color:#666;

}

.stats-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));

    gap:25px;

    margin-bottom:50px;

}

.stat-card{

    background:white;

    border-radius:18px;

    padding:30px;

    text-align:center;

    box-shadow:0 8px 25px rgba(0,0,0,.08);

}

.stat-card h3{

    font-size:42px;

    color:#0057A3;

    margin-bottom:10px;

}

.stat-card p{

    color:#666;

}

.listing-buttons{

    display:flex;

    gap:10px;

    flex-wrap:wrap;

    margin-top:20px;

}

.listing-buttons a{

    flex:1;

    text-align:center;

}
/* ==========================================
   Sold Badge
========================================== */

.sold-badge{

    display:inline-block;

    background:#28a745;

    color:white;

    padding:8px 16px;

    border-radius:20px;

    font-weight:600;

    margin-top:15px;

}

/* ---------- HEADER ---------- */

header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px 60px;
    background:#ffffff;
    box-shadow:0 2px 12px rgba(0,0,0,.08);
    position:sticky;
    top:0;
    z-index:100;
}

.logo a{
    font-size:32px;
    font-weight:700;
    color:#0057b8;
    text-decoration:none;
}

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

nav a{
    text-decoration:none;
    color:#333;
    font-weight:600;
    transition:.2s;
}

nav a:hover{
    color:#0057b8;
}
/* ---------- LISTING CARDS ---------- */

.cards{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
    gap:30px;
}

.listing-link{
    text-decoration:none;
    color:inherit;
}

.card{
    background:white;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 8px 25px rgba(0,0,0,.08);
    transition:.25s;
    height:100%;
}

.card:hover{
    transform:translateY(-6px);
    box-shadow:0 15px 35px rgba(0,0,0,.15);
}

.card img{
    width:100%;
    height:220px;
    object-fit:cover;
}

.card-body{
    padding:20px;
}

.card-body h3{
    font-size:22px;
    margin-bottom:10px;
}

.price{
    color:#0057b8;
    font-size:24px;
    font-weight:bold;
    margin-bottom:12px;
}

.category{
    color:#666;
    margin-bottom:10px;
}

.seller{
    color:#888;
    font-size:14px;
}

/* ---------------------------------
   Pagination
--------------------------------- */

.pagination {

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 20px;

    margin: 50px 0;

    flex-wrap: wrap;

}

.pagination span {

    font-weight: bold;

}

.pagination a {

    text-decoration: none;

}
.error-message{
    background:#ffe5e5;
    color:#b00020;
    border:1px solid #f5b5b5;
    padding:12px;
    border-radius:10px;
    margin-bottom:20px;
    font-weight:600;
}