/* FooVsMarket - Jiji-inspired Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-yellow: #FFD700;
    --primary-green: #28A745;
    --dark-green: #1e7e34;
    --text-dark: #1a1a1a;
    --text-gray: #666;
    --text-light: #999;
    --bg-white: #ffffff;
    --bg-light: #f5f5f5;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

/* Header Styles */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--primary-green);
    padding: 8px 0;
    font-size: 13px;
    color: #fff;
    font-weight: 700;
}

/* ── Announcement Bar ── */
.announcement-bar {
    background: #0f5132;
    color: #fff;
    padding: 7px 0;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.announcement-inner {
    display: flex;
    align-items: center;
    gap: 0;
}
.announcement-badge {
    flex-shrink: 0;
    background: rgba(255,255,255,.2);
    padding: 2px 12px;
    border-radius: 0 20px 20px 0;
    font-size: .75rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-right: 16px;
    white-space: nowrap;
}
.announcement-scroll-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 22px;
    display: flex;
    align-items: center;
}
.announcement-scroll-text {
    display: inline-block;
    white-space: nowrap;
    animation: announcementScroll 25s linear infinite;
    padding-left: 100%;
}
.announcement-scroll-text:hover {
    animation-play-state: paused;
}
@keyframes announcementScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-main {
    padding: 16px 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-green);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--text-dark);
}

.search-bar {
    flex: 1;
    display: flex;
    max-width: 600px;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: var(--primary-yellow);
}

/* .location-select defined in Location Modal section below */

.search-btn {
    background: var(--text-dark);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #333;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    color: var(--text-dark);
}

.btn {
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary-green);
    color: white;
}

.btn-primary:hover {
    background: var(--dark-green);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.btn-yellow {
    background: var(--primary-yellow);
    color: var(--text-dark);
    font-weight: 700;
}

.btn-yellow:hover {
    background: #e6c200;
    transform: translateY(-1px);
    color: var(--text-dark);
}

/* Navigation */
.nav-categories {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 12px 0;
    overflow-x: auto;
}

.nav-list {
    display: flex;
    gap: 32px;
    list-style: none;
    white-space: nowrap;
    margin-bottom: 0;
    padding-left: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link:hover {
    color: var(--primary-green);
}

.nav-link.active {
    color: var(--primary-green);
    font-weight: 600;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #EAF8EF 0%, #FFFFFF 100%);
    padding: 60px 0;
    color: #0f172a;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #d1fae5;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%2386efac" stroke-width="1.5"/></svg>');
    background-size: 120px 120px;
    opacity: 0.18;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 16px;
    font-weight: 800;
    color: #0f172a;
    text-shadow: none;
}

.hero p {
    font-size: 18px;
    margin-bottom: 32px;
    color: #374151;
    opacity: 1;
}

.hero-search {
    background: #ffffff;
    padding: 6px;
    border-radius: 10px;
    display: flex;
    gap: 8px;
    box-shadow: 0 4px 24px rgba(34,197,94,0.12), 0 1px 4px rgba(0,0,0,0.06);
    border: 1.5px solid #d1fae5;
}

.hero-search input {
    flex: 1;
    padding: 16px;
    border: none;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.hero-search button {
    padding: 16px 32px;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.hero-search button:hover {
    background: var(--dark-green);
    transform: scale(1.02);
}

.hero-location-btn {
    padding: 16px 18px;
    background: #f0fdf4;
    color: #166534;
    border: 1.5px solid #a7f3d0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.hero-location-btn:hover { background: #dcfce7; border-color: #86efac; color: #14532d; }

/* Categories Grid */
.categories-section {
    padding: 48px 0;
    background: var(--bg-white);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.view-all {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-all:hover {
    text-decoration: underline;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 14px;
}

.category-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px 10px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.25s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card:hover {
    border-color: var(--primary-green);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    color: var(--text-dark);
}

.category-icon {
    font-size: 44px;
    margin-bottom: 10px;
    display: block;
    line-height: 1;
}

.category-name {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.category-count {
    font-size: 11px;
    color: var(--text-light);
}

/* Listings Section */
.listings-section {
    padding: 48px 0;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 32px rgba(0,0,0,0.14);
}

.product-image {
    width: 100%;
    height: 210px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e74c3c;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    z-index: 2;
}

.badge-hot    { background: #e74c3c; color: #fff; }
.badge-new-listing { background: #00b894; color: #fff; }

.badge-top {
    background: #f4b942;
    color: #1a1a1a;
}

.badge-vip {
    background: #7B2FBE;
    color: #fff;
}

.badge-premium {
    background: #FF6B00;
    color: #fff;
}

.seller-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.seller-badge.badge-verified       { background: #e8f5e9; color: #2e7d32; }
.seller-badge.badge-inspected      { background: #e3f2fd; color: #1565c0; }
.seller-badge.badge-pro            { background: #fff8e1; color: #f57f17; }
.seller-badge.badge-dealer         { background: #f3e5f5; color: #6a1b9a; }
.seller-badge.badge-verified-agent { background: #e0f2fe; color: #0369a1; }

.verified-seller-icon {
    font-size: 0.8rem;
    vertical-align: middle;
    margin-left: 2px;
}

/* Trending Categories */
.trending-section {
    padding: 24px 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #e8f5e9 100%);
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}
.trending-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.trending-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1.5px solid #c8e6c9;
    border-radius: 24px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}
.trending-card:hover { background: var(--primary-green); color: #fff; border-color: var(--primary-green); }
.trending-card:hover .trending-badge { background: rgba(255,255,255,0.25); color: #fff; }
.trending-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
}
.trending-label {
    font-weight: 400;
    opacity: 0.8;
}

.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 18px;
}

.wishlist-btn:hover {
    background: white;
    transform: scale(1.1);
}

.wishlist-btn.active {
    color: #e74c3c;
}

.product-info {
    padding: 12px 14px 14px;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 18px;
    font-weight: 800;
    color: #e74c3c;
    margin-bottom: 8px;
}

.product-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 11px;
    color: #888;
    margin-bottom: 10px;
}

.meta-sep {
    color: #ccc;
}

.product-location {
    display: flex;
    align-items: center;
    gap: 3px;
}

.seller-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.seller-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.seller-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.seller-name {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seller-rating {
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Features Section */
.features-section {
    background: var(--bg-white);
    padding: 48px 0;
    border-top: 1px solid var(--border-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.feature-card {
    text-align: center;
    padding: 24px;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-desc {
    color: var(--text-gray);
    font-size: 14px;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-column h4 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--primary-yellow);
}

.footer-links {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 24px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary-green);
    transform: translateY(-2px);
}

/* Tablet */
@media (max-width: 992px) {
    .logo {
        font-size: 26px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .listings-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .header-actions .btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: inline-flex;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 12px;
    }

    .search-bar {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 8px;
    }

    .header-actions {
        margin-left: auto;
        gap: 8px;
    }

    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 16px;
        margin-bottom: 24px;
    }

    .hero-search {
        flex-direction: column;
        padding: 10px;
        gap: 8px;
        border-radius: 12px;
    }

    .hero-search input {
        padding: 12px;
        width: 100%;
    }

    .hero-search button {
        width: 100%;
        padding: 14px;
    }

    .hero-location-btn {
        width: 100%;
        padding: 12px;
        text-align: left;
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .category-card {
        padding: 14px 8px 12px;
        border-radius: 10px;
    }

    .category-icon {
        font-size: 30px;
        margin-bottom: 6px;
    }

    .category-name {
        font-size: 11px;
    }

    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-image {
        height: 170px;
    }

    .product-image .no-img-icon {
        font-size: 56px;
    }

    .product-title {
        font-size: 13px;
    }

    .product-price {
        font-size: 15px;
    }

    .seller-info {
        margin-top: 8px;
        padding-top: 8px;
    }

    .seller-name,
    .seller-rating {
        font-size: 11px;
    }

    .nav-list {
        gap: 16px;
        padding: 0 4px;
    }

    .nav-link {
        font-size: 13px;
    }

    .section-title {
        font-size: 20px;
    }

    .post-carousel-img {
        height: 280px !important;
    }

    .post-image-placeholder {
        height: 280px !important;
    }

    .post-title-row {
        flex-direction: column !important;
        gap: 12px;
    }

    .post-title-row .text-end {
        text-align: left !important;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .header-top-content {
        flex-direction: column;
        gap: 2px;
        font-size: 11px;
        text-align: center;
    }

    .logo {
        font-size: 22px;
    }

    .header-actions {
        display: none;
    }

    .search-bar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .search-input {
        border-radius: 4px;
        min-width: 100%;
    }

    .location-select {
        max-width: 120px;
        font-size: 12px;
        padding: 8px 10px;
    }

    .search-btn {
        border-radius: 4px;
        width: 100%;
    }

    .hero {
        padding: 28px 0;
    }

    .hero h1 {
        font-size: 22px;
    }

    .hero p {
        font-size: 14px;
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .category-card {
        padding: 12px 6px 10px;
        border-radius: 8px;
    }

    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-image {
        height: 140px;
    }

    .product-badge {
        font-size: 9px;
        padding: 3px 8px;
        border-radius: 10px;
    }

    .product-image .no-img-icon {
        font-size: 44px;
    }

    .product-info {
        padding: 10px;
    }

    .product-title {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .product-price {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .product-condition {
        font-size: 10px;
    }

    .seller-info {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .feature-card {
        padding: 16px 8px;
    }

    .feature-icon {
        font-size: 36px;
    }

    .feature-title {
        font-size: 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .footer-column h4 {
        font-size: 14px;
    }

    .footer-links a {
        font-size: 12px;
    }

    .social-links a {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .post-carousel-img {
        height: 220px !important;
    }

    .post-image-placeholder {
        height: 220px !important;
    }

    .toast {
        right: 12px;
        left: 12px;
        max-width: none;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeIn 0.5s ease-out;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text-dark);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(400px); }
    to { transform: translateX(0); }
}

.toast.show {
    display: flex;
}

/* Loading State */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Form Styles */
.form-control, .form-select {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-yellow);
    box-shadow: none;
}

/* Alert Overrides */
.alert {
    border: 0;
    border-radius: 4px;
}

/* Account Layout Sidebar */
.account-sidebar .list-group-item {
    border: 0;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 18px;
    color: var(--text-gray);
    font-weight: 500;
    text-decoration: none;
}

.account-sidebar .list-group-item.active {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

.account-sidebar .list-group-item:hover:not(.active) {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* Admin Sidebar */
.admin-sidebar .nav-link {
    color: var(--text-gray);
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: var(--primary-green);
    color: white;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary-green);
    text-decoration: none;
}

/* Pagination */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: var(--primary-green);
    border-color: var(--border-color);
}

.page-link:hover {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--dark-green);
}

.page-item.active .page-link {
    background: var(--primary-green);
    border-color: var(--primary-green);
}

/* ══════════════════════════════════════════════
   SEARCH PAGE — STICKY SIDEBAR + SCROLLABLE BODY
══════════════════════════════════════════════ */

/* The row that holds sidebar + results */
.search-page-row {
    align-items: flex-start;   /* don't stretch children to full height */
}

/* Sidebar: sticks below the header as you scroll */
.search-sidebar-col {
    position: sticky;
    top: 16px;                 /* gap from viewport top */
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #d0d0d0 transparent;
}

.search-sidebar-col::-webkit-scrollbar {
    width: 4px;
}
.search-sidebar-col::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 4px;
}

/* Results column: normal document flow, scrolls with the page */
.search-results-col {
    min-height: 200px;
}

/* ══════════════════════════════════════════════
   LOCATION MODAL
══════════════════════════════════════════════ */

/* ── Dialog shell ── */
.loc-modal-dialog {
    max-width: 820px;
    margin: 1.75rem auto;
}

.loc-modal-content {
    border-radius: 12px;
    overflow: hidden;
    border: none;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
    max-height: 88vh;
    height: 88vh;
    display: flex;
    flex-direction: column;
}

/* Panes must be flex children so height propagates to the scrollable body */
#locStatesPane,
#locLgasPane {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

/* ── Top bar (search + close) ── */
.loc-modal-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    background: #fff;
    flex-shrink: 0;
}

/* ── "All Nigeria" pill button ── */
.loc-all-nigeria {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-light);
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    flex-shrink: 0;
}

.loc-all-nigeria:hover {
    background: var(--primary-yellow);
    border-color: var(--primary-yellow);
}

/* ── Count chip inside pill ── */
.loc-count-chip {
    background: var(--primary-green);
    color: #fff;
    border-radius: 10px;
    font-size: 10px;
    padding: 1px 7px;
    font-weight: 600;
    line-height: 1.5;
}

/* ── Search box ── */
.loc-search-box {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 0 10px;
    gap: 6px;
    transition: border-color .2s;
    min-width: 0;
}

.loc-search-box:focus-within {
    border-color: var(--primary-green);
}

.loc-search-icon {
    color: #aaa;
    font-size: 13px;
    flex-shrink: 0;
}

.loc-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    padding: 8px 0;
    width: 100%;
    color: var(--text-dark);
}

.loc-search-input::placeholder {
    color: #b0b0b0;
}

/* ── Back button ── */
.loc-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .2s, border-color .2s;
}

.loc-back-btn:hover {
    background: var(--bg-light);
    border-color: #aaa;
}

/* ── Scrollable body ── */
.loc-modal-body {
    overflow-y: auto;
    flex: 1 1 0;
    min-height: 0;
    padding: 8px 0 12px;
    -webkit-overflow-scrolling: touch;
}

/* ── Loading / empty states ── */
.loc-loading,
.loc-empty {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
    font-size: 14px;
}

/* ── Section (label + grid row) ── */
.loc-section {
    display: flex;
    align-items: flex-start;
    padding: 4px 18px;
    gap: 0;
}

/* ── Section label column (letter or POPULAR) ── */
.loc-section-label {
    width: 56px;
    flex-shrink: 0;
    padding-top: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #aaa;
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* ── POPULAR badge (vertical text replaced by block badge) ── */
.loc-popular-badge {
    display: inline-block;
    background: var(--primary-yellow);
    color: var(--text-dark);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    padding: 3px 6px;
    border-radius: 4px;
    line-height: 1.2;
    text-transform: uppercase;
}

/* ── Grid of items ── */
.loc-col-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-left: 2px solid var(--border-color);
    padding-left: 0;
}

/* ── Individual row item ── */
.loc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background .15s;
    gap: 4px;
    min-width: 0;
}

.loc-row:hover {
    background: var(--bg-light);
}

.loc-row-name {
    font-size: 13px;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

/* ── Sub-label (state name under LGA) ── */
.loc-row-sub {
    font-size: 10px;
    color: #aaa;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Right-aligned count + chevron ── */
.loc-row-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #bbb;
    white-space: nowrap;
    flex-shrink: 0;
}

.loc-chevron {
    font-size: 10px;
    color: #ccc;
}

/* ── LGA rows (no chevron) ── */
.loc-row-lga .loc-row-meta {
    gap: 0;
}

/* ── "All State" pinned row ── */
.loc-row-all-state {
    grid-column: 1 / -1;
    background: #f9fffe;
    border: 1px solid #d0ece7;
    border-radius: 8px;
    margin: 4px 8px 4px 0;
}

.loc-row-all-state:hover {
    background: #eef9f6;
}

/* ── Location button in header search bar ── */
.location-select {
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-left: none;
    background: var(--bg-white);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .2s;
}

.location-select:hover {
    background: var(--bg-light);
}

/* ── Responsive — tablet ── */
@media (max-width: 768px) {
    .loc-modal-dialog {
        max-width: 100%;
        margin: 0;
        height: 100%;
        align-items: flex-end;
    }

    .loc-modal-content {
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
        height: 92vh;
    }

    .loc-col-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .loc-section-label {
        width: 44px;
        font-size: 10px;
    }
}

/* ── Responsive — mobile ── */
@media (max-width: 480px) {
    .loc-modal-topbar {
        padding: 10px 12px;
        gap: 8px;
    }

    .loc-all-nigeria {
        padding: 5px 10px;
        font-size: 12px;
    }

    .loc-col-grid {
        grid-template-columns: 1fr;
    }

    .loc-section {
        padding: 2px 12px;
    }

    .loc-section-label {
        width: 36px;
    }

    .loc-row {
        padding: 8px 10px;
    }
}

/* ══════════════════════════════════════════════
   ACCOUNT REDESIGN — Settings & Followers
══════════════════════════════════════════════ */

/* Account layout two-column wrapper */
.account-layout {
    align-items: flex-start;
}

/* Account avatar circle */
.account-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

/* Left sidebar — white card, fixed ~280px */
.account-sidebar {
    width: 260px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    padding: 16px;
}

/* Orange alert banner */
.account-alert-banner {
    background: #f97316;
    color: #fff;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
}

.account-alert-banner a {
    color: #fff;
    text-decoration: underline;
}

/* Nav items */
.account-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
    transition: background .15s, color .15s;
    margin-bottom: 2px;
}

.account-nav-item:hover {
    background: var(--bg-light);
    color: var(--primary-green);
    text-decoration: none;
}

.account-nav-item.active {
    color: var(--primary-green);
    border-left: 3px solid var(--primary-green);
    padding-left: 9px;
    font-weight: 600;
    background: rgba(40,167,69,.06);
}

/* Settings layout */
.settings-layout {
    align-items: flex-start;
}

/* Settings sidebar — slightly narrower */
.settings-sidebar {
    width: 240px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    padding: 16px;
}

.settings-nav {
    display: flex;
    flex-direction: column;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 500;
    transition: background .15s, color .15s;
    margin-bottom: 1px;
}

.settings-nav-item:hover {
    background: var(--bg-light);
    color: var(--primary-green);
    text-decoration: none;
}

.settings-nav-item.active {
    color: var(--primary-green);
    border-left: 3px solid var(--primary-green);
    padding-left: 7px;
    font-weight: 600;
    background: rgba(40,167,69,.06);
}

/* Sub-item indent */
.settings-nav-sub {
    padding-left: 30px;
    font-size: 12px;
    color: var(--text-gray);
}

/* Toggle row — label + switch flex row */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.toggle-row:last-child {
    border-bottom: 0;
}

/* FAQ layout */
.faq-layout {
    align-items: flex-start;
}

.faq-sidebar {
    width: 280px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    padding: 16px;
}

.faq-category-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 8px 2px;
}

.faq-question-item {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--text-dark);
    font-size: 13px;
    text-decoration: none;
    transition: background .15s, color .15s;
    cursor: pointer;
    margin-bottom: 1px;
}

.faq-question-item:hover {
    background: var(--bg-light);
    color: var(--primary-green);
    text-decoration: none;
}

.faq-question-item.active {
    color: var(--primary-green);
    font-weight: 600;
    background: rgba(40,167,69,.06);
}

/* Performance metric card */
.perf-metric-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.perf-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.perf-label {
    font-size: 12px;
    color: var(--text-gray);
}

.perf-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Responsive: stack sidebar on small screens */
@media (max-width: 768px) {
    .account-layout,
    .settings-layout,
    .faq-layout {
        flex-direction: column;
    }

    .account-sidebar,
    .settings-sidebar,
    .faq-sidebar {
        width: 100%;
    }
}

/* ── Post Ad Wizard ──────────────────────────────────────────────────────── */
.wizard-step { display: none; }
.wizard-step.active { display: block; }

.step-indicator {
    display: flex;
    gap: 6px;
    align-items: center;
}
.step-dot {
    flex: 1;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    transition: background .3s;
}
.step-dot.done { background: var(--primary); }

/* Dynamic spec fields grid (2-column) */
.ad-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.ad-fields-grid .field-full { grid-column: 1 / -1; }
@media (max-width: 576px) {
    .ad-fields-grid { grid-template-columns: 1fr; }
    .ad-fields-grid .field-full { grid-column: 1; }
}

/* Photo upload grid (Step 1) */
.photo-upload-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.photo-tile {
    width: 90px; height: 90px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #fafafa;
    transition: border-color .2s;
}
.photo-tile:hover { border-color: var(--primary-green); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile .remove-btn {
    position: absolute; top: 3px; right: 3px;
    background: rgba(0,0,0,.55); color: #fff;
    border: none; border-radius: 50%;
    width: 20px; height: 20px;
    font-size: 11px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
.photo-tile.cover-tile { border-color: var(--primary-green); border-style: solid; }
.photo-tile.cover-tile::after {
    content: 'Cover';
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(40,167,69,.8); color: #fff;
    font-size: 10px; font-weight: 700;
    text-align: center; padding: 2px 0;
}
.photo-add-tile {
    width: 90px; height: 90px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    cursor: pointer; color: #888;
    font-size: 11px; gap: 4px;
    background: #f8f8f8;
    transition: border-color .2s, background .2s;
}
.photo-add-tile:hover { border-color: var(--primary-green); background: #f0fdf4; color: var(--primary-green); }
.photo-add-tile i { font-size: 1.4rem; }

/* Promo tiers in Step 3 */
.promo-tier { border: 1px solid #e0e0e0; border-radius: 10px; padding: 14px 16px; }
.promo-tier.border-success { border-color: var(--primary) !important; }

/* ── Phase A: Hero trust elements ── */
.hero-trust-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: #dcfce7; border: 1px solid #86efac;
    color: #166534; padding: 5px 14px; border-radius: 20px;
    font-size: .8rem; font-weight: 700; letter-spacing: .03em;
    margin-bottom: 14px;
}
.hero-trust-pills {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 18px; justify-content: center;
}
.hero-trust-pills span {
    display: inline-flex; align-items: center; gap: 5px;
    background: #f0fdf4; border: 1px solid #a7f3d0;
    color: #166534; padding: 4px 12px; border-radius: 16px;
    font-size: .75rem; font-weight: 600;
}

/* ── Trust Stats Strip ── */
.trust-stats-strip {
    background: #1a1a2e;
    padding: 20px 0;
}
.trust-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    text-align: center;
}
.trust-stat {
    padding: 10px 0;
    border-right: 1px solid rgba(255,255,255,.1);
}
.trust-stat:last-child { border-right: none; }
.trust-stat-number {
    font-size: 1.6rem; font-weight: 800;
    color: #4ade80; line-height: 1.1;
}
.trust-stat-label {
    font-size: .72rem; color: rgba(255,255,255,.65);
    margin-top: 3px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em;
}
@media (max-width: 576px) {
    .trust-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .trust-stat:nth-child(2) { border-right: none; }
    .trust-stat { border-bottom: 1px solid rgba(255,255,255,.1); padding: 12px 0; }
    .trust-stat:last-child, .trust-stat:nth-last-child(2) { border-bottom: none; }
}

/* ── Safety Promise Strip ── */
.safety-promise-strip {
    background: #f0fdf4;
    border-top: 1px solid #bbf7d0;
    border-bottom: 1px solid #bbf7d0;
    padding: 14px 0;
}
.safety-promise-inner {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.safety-promise-icon {
    font-size: 1.4rem; color: #16a34a; flex-shrink: 0;
}
@media (max-width: 576px) {
    .safety-promise-inner { gap: 8px; }
    .safety-promise-inner .ms-auto { margin-left: 0 !important; }
}

/* ── WhatsApp floating button ── */
.wa-float-btn {
    position: fixed; bottom: 24px; right: 24px; z-index: 999;
    display: inline-flex; align-items: center; gap: 6px;
    background: #25d366; color: #fff;
    padding: 10px 18px; border-radius: 50px;
    font-size: .88rem; font-weight: 700;
    text-decoration: none; box-shadow: 0 4px 16px rgba(37,211,102,.45);
    transition: transform .2s, box-shadow .2s;
}
.wa-float-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,211,102,.55); }
.wa-float-btn i { font-size: 1.2rem; }
@media (max-width: 576px) { .wa-float-label { display: none; } }

/* ── Phase F: Trusted Sellers Strip ── */
.trusted-sellers-section { background: #fff; padding: 40px 0; }
.trusted-sellers-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
@media (max-width: 992px) { .trusted-sellers-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 576px) { .trusted-sellers-grid { grid-template-columns: repeat(2, 1fr); } }

.trusted-seller-card {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; padding: 16px 10px;
    border: 1px solid #f0f0f0; border-radius: 14px;
    text-decoration: none; color: inherit;
    transition: box-shadow .18s, transform .18s;
    background: #fafafa;
}
.trusted-seller-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-2px); color: inherit; }
.trusted-seller-avatar { position: relative; margin-bottom: 10px; }
.trusted-seller-badge-dot {
    position: absolute; bottom: -2px; right: -2px;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .65rem; border: 2px solid #fff;
}
.badge-dot-gold { background: #eab308; color: #fff; }
.badge-dot-green { background: #22c55e; color: #fff; }
.trusted-seller-name {
    font-size: .82rem; font-weight: 700; color: #1a1a1a;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px;
}
.trusted-seller-meta { font-size: .7rem; margin-top: 2px; }
.trusted-seller-info { width: 100%; }

/* ── Phase F: Testimonials (slider) ── */
.testimonials-section { background: #f5f5f5; padding: 40px 0; }
.testimonials-slider {
    position: relative;
    display: flex; align-items: stretch; gap: 8px;
}
.testimonials-track {
    display: flex; gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1 1 auto;
    padding: 2px;
}
.testimonials-track::-webkit-scrollbar { display: none; }
.testimonial-slide {
    flex: 0 0 calc(25% - 12px);
    scroll-snap-align: start;
    display: flex; flex-direction: column;
}
.testimonial-slide .testimonial-text { flex: 1 1 auto; }
@media (max-width: 992px) { .testimonial-slide { flex-basis: calc(50% - 8px); } }
@media (max-width: 576px) { .testimonial-slide { flex-basis: 100%; } }

.testimonials-nav {
    flex: 0 0 auto; align-self: center;
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid #e0e0e0; background: #fff; color: #444;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .2s;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.testimonials-nav:hover { background: #28A745; border-color: #28A745; color: #fff; }
@media (max-width: 576px) { .testimonials-nav { display: none; } }

.testimonials-dots { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.testimonials-dot {
    width: 8px; height: 8px; border-radius: 50%;
    border: none; padding: 0; cursor: pointer;
    background: #cfcfcf; transition: all .25s;
}
.testimonials-dot.active { background: #28A745; width: 22px; border-radius: 6px; }

.testimonial-role {
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; padding: 2px 8px; border-radius: 10px;
    margin-left: auto;
}
.testimonial-role-buyer  { background: #dbeafe; color: #1e40af; }
.testimonial-role-seller { background: #fef3c7; color: #92400e; }

.testimonial-card {
    background: #fff; border-radius: 14px; padding: 20px;
    border: 1px solid #e8e8e8;
}
.testimonial-stars { color: #f4b942; font-size: 1rem; margin-bottom: 10px; }
.testimonial-text {
    font-size: .88rem; color: #444; line-height: 1.6;
    font-style: italic; margin-bottom: 12px;
}
.testimonial-author { display: flex; align-items: center; gap: 8px; }
.testimonial-name { font-size: .82rem; font-weight: 700; color: #1a1a1a; }
.testimonial-location {
    font-size: .76rem; color: #888;
    border-left: 1px solid #ddd; padding-left: 8px;
}

/* ── Footer support bar ── */
.footer-support-bar {
    background: rgba(255,255,255,.06);
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 20px;
    display: flex; align-items: center; gap: 8px;
    font-size: .83rem; color: rgba(255,255,255,.75); flex-wrap: wrap;
}
.footer-support-bar a { color: #4ade80; text-decoration: none; }
.footer-support-bar a:hover { text-decoration: underline; }

/* ── Verification tier badges (post show + cards) ── */
.badge-tier-1 { background:#dbeafe; color:#1e40af; }
.badge-tier-2 { background:#dcfce7; color:#166534; }
.badge-tier-3 { background:#fef9c3; color:#713f12; }

