/* ============================================================= */
/*  style.css – Closeby (Buy & Sell Nearby)                      */
/*  Fully Responsive | Mobile‑First | Poppins + Bootstrap 5     */
/*  Author: Enhanced from your original upload                   */
/* ============================================================= */

/* ===== 1. GLOBAL RESET & FONTS ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif !important;
    background: linear-gradient(135deg, #e9fff5, #ffffff);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
    line-height: 1.6;
}

/* Font Awesome fallback */
i, .fa, .fas, .far, .fab {
    font-family: "Font Awesome 6 Free", 'Poppins', sans-serif !important;
}

/* Font weights */
.text-light   { font-weight: 300; }
.text-normal  { font-weight: 400; }
.text-medium  { font-weight: 500; }
.text-bold    { font-weight: 600; }
.text-heavy   { font-weight: 700; }

/* ============================================================= */
/* 2. COLOR PALETTE (Mint Green Theme)                           */
/* ============================================================= */
:root {
    /* Core Mint Palette */
    --mint-light:   #e9fff5;
    --mint-medium:  #b8f3db;
    --mint-dark:    #7ddbbd;
    --mint-deep:    #49c9a5;
    --mint-accent:  #2f9e84;

    /* Gradients */
    --bg-body:      linear-gradient(135deg, var(--mint-light), #ffffff);
    --bg-card:      linear-gradient(135deg, #ffffff, var(--mint-light));
    --btn-grad:     linear-gradient(135deg, var(--mint-dark), var(--mint-deep));
    --btn-grad-hover: linear-gradient(135deg, var(--mint-deep), var(--mint-accent));
    --hero-grad:    linear-gradient(135deg, var(--mint-medium), var(--mint-light));

    /* Shadows */
    --shadow-sm:    0 2px 8px rgba(0,0,0,.08);
    --shadow-md:    0 4px 16px rgba(73,201,165,.15);
    --shadow-lg:    0 8px 25px rgba(73,201,165,.2);
}

/* Backgrounds */
.bg-mint-light   { background-color: var(--mint-light); }
.bg-mint-medium  { background-color: var(--mint-medium); }
.bg-mint-dark    { background-color: var(--mint-dark); }
.bg-mint-deep    { background-color: var(--mint-deep); }

/* Text */
.text-mint       { color: #10B981 !important; }
.text-mint-deep  { color: var(--mint-deep) !important; }

/* ============================================================= */
/* 3. TYPOGRAPHY & SPACING                                      */
/* ============================================================= */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--mint-deep);
}

.display-4 {
    font-size: 2.8rem;
    font-weight: 700;
}

.lead {
    font-size: 1.15rem;
    color: #555;
}

/* Container padding */
.container, .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 576px) {
    .container { max-width: 540px; }
}
@media (min-width: 768px) {
    .container { max-width: 720px; }
}
@media (min-width: 992px) {
    .container { max-width: 960px; }
}
@media (min-width: 1200px) {
    .container { max-width: 1140px; }
}

/* ============================================================= */
/* 4. HEADER & NAVIGATION                                        */
/* ============================================================= */
header .navbar {
    background: linear-gradient(135deg, var(--mint-light), var(--mint-medium)) !important;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
}

.navbar-brand img {
    transition: transform .3s ease;
}
.navbar-brand:hover img {
    transform: scale(1.08);
}

.search-form {
    max-width: 500px;
    width: 100%;
}
.search-form .input-group {
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.search-form .form-control {
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}
.search-form .btn-mint {
    border-radius: 0 50px 50px 0;
    padding: 0.75rem 1.2rem;
}

/* Mobile Offcanvas */
.offcanvas {
    width: 280px !important;
}
.offcanvas-header {
    background: var(--mint-light);
}
.offcanvas-body a {
    font-weight: 500;
    transition: all .2s;
}
.offcanvas-body a:hover {
    background: var(--mint-light);
    border-radius: 8px;
    padding-left: 1.2rem !important;
}

/* ============================================================= */
/* 5. BUTTONS                                                    */
/* ============================================================= */
.btn-mint {
    background: var(--btn-grad);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 50px;
    padding: 0.65rem 1.5rem;
    transition: all .3s ease;
    box-shadow: 0 4px 12px rgba(47,158,132,.25);
}
.btn-mint:hover {
    background: var(--btn-grad-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(47,158,132,.35);
}

.btn-outline-mint {
    color: var(--mint-deep);
    border: 2px solid var(--mint-deep);
    border-radius: 50px;
    font-weight: 600;
    transition: all .3s;
}
.btn-outline-mint:hover {
    background: var(--mint-medium);
    color: white;
    border-color: transparent;
}

/* Badge Tiny */
.badge-tiny {
    font-size: 0.65rem !important;
    padding: 0.25em 0.45em;
    border-radius: 50px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================= */
/* 6. CARDS & ITEM GRID                                          */
/* ============================================================= */
.card {
    background: var(--bg-card);
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all .3s ease;
    box-shadow: var(--shadow-md);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform .4s;
}
.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-body {
    padding: 1.25rem;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Wishlist Heart Button */
.btn-wishlist {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    transition: all .2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-wishlist:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.btn-wishlist i {
    font-size: 1.1rem;
    transition: color .2s;
}

/* New Badge */
.badge.bg-danger {
    font-size: 0.7rem;
    padding: 0.35em 0.6em;
    border-radius: 50px;
    font-weight: 600;
}

/* ============================================================= */
/* 7. HERO BANNER (INDEX)                                        */
/* ============================================================= */
.hero-banner {
    background: var(--hero-grad);
    padding: 3.5rem 1.5rem;
    text-align: center;
    border-radius: 24px;
    margin: 1.5rem 0 2.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,.3), transparent);
    animation: pulse 8s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.hero-banner h1 {
    font-size: 2.4rem;
    margin-bottom: 0.75rem;
}
.hero-banner .btn {
    font-size: 1.1rem;
    padding: 0.85rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
}

/* ============================================================= */
/* 8. ALERT POPUP (Profile Incomplete)                           */
/* ============================================================= */
.alert-container {
    position: relative;
    z-index: 1000;
    margin-top: -10px;
}
.alert-popup {
    display: inline-block;
    animation: fadeInDown 0.6s ease-out;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    font-size: 0.95rem;
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.alert .btn-close {
    opacity: 0.6;
    transition: opacity .2s;
}
.alert .btn-close:hover { opacity: 1; }

/* Mobile alert */
@media (max-width: 576px) {
    .alert-popup {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
    }
    .alert-popup .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* ============================================================= */
/* 9. CATEGORY FILTERS                                           */
/* ============================================================= */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}
.category-filters .btn {
    border-radius: 50px;
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    transition: all .2s;
}
.category-filters .btn.active,
.category-filters .btn:hover {
    background: var(--mint-deep);
    color: white;
    transform: translateY(-1px);
}

/* ============================================================= */
/* 10. AVATARS                                                   */
/* ============================================================= */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(16,185,129,.3);
}

.avatar-sm {
    width: 36px !important;
    height: 36px !important;
    object-fit: cover;
    border-radius: 50% !important;
    border: 2px solid var(--mint-light);
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

/* ============================================================= */
/* 11. FOOTER                                                    */
/* ============================================================= */
footer {
    margin-top: auto;
    padding: 2rem 0;
    background: var(--mint-light);
    font-size: 0.9rem;
    color: #666;
}

/* ============================================================= */
/* 12. RESPONSIVE TWEAKS                                         */
/* ============================================================= */
@media (max-width: 992px) {
    .search-form {
        order: 3;
        margin-top: 1rem;
        max-width: 100%;
    }
    .hero-banner h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-banner {
        padding: 2.5rem 1rem;
        border-radius: 18px;
    }
    .hero-banner h1 {
        font-size: 1.8rem;
    }
    .card-img-top {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2.2rem;
    }
    .btn-mint,
    .btn-outline-mint {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
    .navbar-brand img {
        height: 32px;
    }
}

/* ============================================================= */
/* 13. UTILITIES                                                 */
/* ============================================================= */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-hover {
    transition: box-shadow .3s;
}
.shadow-hover:hover {
    box-shadow: var(--shadow-lg) !important;
}

.rounded-16 {
    border-radius: 16px !important;
}

.rounded-50 {
    border-radius: 50px !important;
}

/* ============================================================= */
/* END OF style.css                                              */
/* ============================================================= */