/* MAIN CONTENT & GLOBAL STYLES */

:root {
    --primary: #25452c;
    --primary-dark: #5a943e;
    --secondary: #eef7e9;
    --text-main: #1a2b1f;
    --text-muted: #5c6e5e;
    --white: #f4f4f6;
    --bg-light: #f4f4f6;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.196);
    --shadow-md: 0 10px 30px rgba(109, 179, 77, 0.12);
    --shadow-lg: 0 20px 50px rgba(109, 179, 77, 0.16);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--white);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.hero__container,
.featured-ads__container,
.latest-ads__container,
.why-us__container,
.footer__container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 20px;
}

.categories-section__container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #6db34d 0%, #5a943e 100%);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(109, 179, 77, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a943e 0%, #4a7b32 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(109, 179, 77, 0.3);
}

.btn-outline {
    background: var(--white);
    color: var(--text-main);
    border: 1px solid #ddd;
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

/* Hero Section */
.hero-header {
    position: relative;
    padding: 140px 0 100px;
    text-align: center;
    background: linear-gradient(rgba(26, 43, 31, 0.151), rgba(26, 43, 31, 0.3)), url('../assets/hero_modern.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-header h1 {
    font-size: 60px;
    font-weight: 800;
    margin-bottom: 40px;
    color: #ffffff;
    line-height: 1.1;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.search-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 10px;
    border-radius: var(--radius-sm);
    display: flex;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
}

.search-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-right: 1px solid #eee;
}

.search-input-group:last-of-type {
    border-right: none;
}

.search-input-group i {
    color: #999;
    margin-right: 10px;
}

.search-input-group select,
.search-input-group input {
    width: 100%;
    border: none;
    outline: none;
    padding: 12px 0;
    font-size: 15px;
    color: var(--text-main);
    background: transparent;
}

.btn-search {
    padding: 0 40px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #6db34d 0%, #5a943e 100%);
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-search:hover {
    background: linear-gradient(135deg, #5a943e 0%, #4a7b32 100%);
    box-shadow: 0 4px 15px rgba(109, 179, 77, 0.25);
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Categories Bar */
.categories-section {
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

.categories-nav-wrapper {
    position: relative;
    width: 100%;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.slider-arrow:hover {
    background: var(--white);
    color: #6db34d;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.slider-arrow.prev {
    left: -15px;
}

.slider-arrow.next {
    right: -15px;
}

@media (max-width: 991px) {
    .slider-arrow {
        display: none !important;
    }
}

.categories-bar__grid {
    background: var(--white);
    padding: 20px 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding-bottom: 20px;
}

/* Custom Scrollbar for Premium Feel */
.categories-bar__grid::-webkit-scrollbar {
    height: 4px;
}

.categories-bar__grid::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.categories-bar__grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.category-item {
    flex: 0 0 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    scroll-snap-align: start;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-icon {
    width: 90px;
    height: 90px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    /* Ensure transparent/white bg blends perfectly */
}

.category-item span {
    font-size: 13px;
    font-weight: 700;
    color: #1b3120;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .categories-bar__grid {
        padding: 20px 15px;
        gap: 15px;
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
        /* Hide scrollbar on mobile for cleaner look */
        scrollbar-width: none; 
    }
    .categories-bar__grid::-webkit-scrollbar {
        display: none;
    }

    .categories-section {
        margin-top: -30px;
    }
}

/* Listings Sections */
.content-section {
    padding: 25px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #1b4d3e;
}

.pagination-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dde2e5;
    cursor: pointer;
}

.dot.active {
    background: var(--primary);
    width: 20px;
    border-radius: 10px;
}

.featured-ads__grid,
.latest-ads__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.ad-card {
    background: #ffffff;
    border-radius: var(--radius-sm);
    overflow: hidden;
    /* Clean, thin border like OLX */
    border: 1px solid #bebebe;
    transition: var(--transition);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.ad-card__img {
    height: 170px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.ad-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ad-card:hover .ad-card__img img {
    transform: scale(1.05);
}

.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 50;
    transition: var(--transition);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.favorite-btn:hover {
    background: #fb010141;
    transform: scale(1.1);
}

.favorite-btn i {
    color: var(--text-muted);
    font-size: 16px;
}

.favorite-btn.active svg {
    color: #ef4444 !important;
    fill: #ef4444 !important;
}

.ad-card__badge {
    position: absolute;
    top: 11px;
    left: 11px;
    background: linear-gradient(135deg, #6db34d 0%, #5a943e 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(109, 179, 77, 0.2);
}

.ad-card__content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ad-card__price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.ad-card__price {
    font-size: 20px;
    font-weight: 800;
    color: #1a2b1f;
    margin-bottom: 0;
}

.ad-card__contact-actions {
    display: flex;
    gap: 8px;
}

.ad-card__action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.ad-card__action-btn i {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
}

.ad-card__action-btn--call {
    color: var(--primary);
}

.ad-card__action-btn--call:hover {
    background: #f1fdf4;
    transform: translateY(-2px);
}

.ad-card__action-btn--whatsapp {
    color: #25D366;
}

.ad-card__action-btn--whatsapp:hover {
    background: #e8f9ed;
    transform: translateY(-2px);
}

.ad-card__title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: 40px;
    /* Fixed height for title to align footer */
}

.ad-card__footer {
    padding-top: 12px;
    border-top: 1px solid #f1f3f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.ad-card__location {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    margin-right: 10px;
}

.ad-card__date {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.ad-card__actions {
    margin-top: 15px;
}

.btn-details {
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, #6db34d 0%, #5a943e 100%);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    display: block;
    transition: var(--transition);
}

.btn-details:hover {
    background: linear-gradient(135deg, #5a943e 0%, #4a7b32 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Trust & Advantage Section — Unique Namespace */
.trust-hub-section {
    padding: 40px 0;
}

.trust-hub-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.trust-hub-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 30px;
}

.trust-hub-plate {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.205);
    display: flex;
    overflow: hidden;
}

.trust-hub-feature {
    flex: 1;
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-right: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.trust-hub-feature:last-child {
    border-right: none;
}

.trust-hub-feature:hover {
    background: #f1fdf4;
}

.trust-hub-icon-box {
    width: 64px;
    height: 64px;
    background: #f1fdf4;
    color: var(--primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.trust-hub-icon-box i {
    width: 32px;
    height: 32px;
    stroke-width: 2;
}

.trust-hub-feature:hover .trust-hub-icon-box {
    background: var(--primary);
    color: white;
    transform: rotate(10deg) scale(1.1);
}

.trust-hub-feature h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.trust-hub-feature p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .trust-hub-plate {
        flex-direction: column;
    }

    .trust-hub-feature {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        padding: 40px 20px;
    }
}

/* 1400px Mini-Banner Section */
.mini-banner-1400-section {
    padding: 30px 0 0px;
}

.mini-banner-1400__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.mini-banner-1400__content {
    position: relative;
    height: 400px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-image: url('../assets/promo_1400.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.mini-banner-1400__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 43, 31, 0.8) 0%, rgba(26, 43, 31, 0.3) 100%);
    z-index: 1;
}

.mini-banner-1400__text {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
    color: white;
}

.mini-banner-1400__badge {
    display: inline-block;
    padding: 6px 16px;
    background: #fbbf24;
    color: #1a2b1f;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.mini-banner-1400__text h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mini-banner-1400__text p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 35px;
    color: rgba(255, 255, 255, 0.9);
}

.mini-banner-1400__actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Consolidated Background Variants */
.banner-community .mini-banner-1400__content {
    background: url('../assets/promo_community_1400.png') center/cover no-repeat;
}

.banner-deals .mini-banner-1400__content {
    background: url('../assets/promo_deals_1400.png') center/cover no-repeat;
}

.banner-elec .mini-banner-1400__content {
    background: url('../assets/promo_elec_1400.png') center/cover no-repeat;
}

.btn-white-outline {
    padding: 12px 30px;
    border: 2px solid white;
    color: white;
    font-weight: 700;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-white-outline:hover {
    background: white;
    color: var(--primary);
}

/* Browse by Category Section */
.browse-categories-section {
    background: var(--bg-light);
    padding: 80px 0 40px;
}

.browse-categories__container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 20px;
}

.browse-categories-section .section-title {
    margin-bottom: 50px;
    text-align: left;
    font-size: 32px;
}

.categories-nav-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.category-nav-title {
    color: var(--primary);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
}

.category-nav-list {
    list-style: none;
    padding: 0;
}

.category-nav-list li {
    margin-bottom: 12px;
}

.category-nav-list li a {
    color: var(--primary);
    font-size: 14.5px;
    line-height: 1.5;
    transition: var(--transition);
    display: inline-block;
}

.category-nav-list li a:hover {
    color: var(--primary);
    transform: translateX(8px);
    font-weight: 600;
}

/* Location Links Section */
.location-links-section {
    padding: 0px 0 60px;
}

.location-links__container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 20px;
}

.location-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.location-col {
    background: #ffffff;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1.5px solid #bebebe;
    box-shadow: var(--shadow-sm);
}

.location-header {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    padding: 12px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 20px;
    border-radius: 6px;
    background: white;
    font-size: 15px;
}

.location-list {
    list-style: none;
    padding: 0;
}

.location-list li {
    margin-bottom: 8px;
}

.location-list li a {
    color: var(--primary);
    font-size: 14px;
    transition: var(--transition);
    display: block;
}

.location-list li a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* RESPONSIVE GLOBAL OVERRIDES */
@media (max-width: 1024px) {

    .featured-ads__grid,
    .latest-ads__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-header {
        padding: 60px 0 40px;
    }

    .hero-header h1 {
        font-size: 38px;
        margin-bottom: 30px;
    }

    .search-container {
        flex-direction: column;
        padding: 15px;
    }

    .search-input-group {
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .btn-search {
        width: 100%;
        padding: 15px;
    }

    .categories-section {
        margin-top: -20px;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .categories-bar__grid {
        justify-content: flex-start;
        gap: 30px;
        min-width: 1000px;
        padding: 30px;
    }

    .category-item {
        flex: 0 0 130px;
    }

    .featured-ads__grid,
    .latest-ads__grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        border-right: none;
        border-bottom: 1px solid #f1f3f5;
        padding: 40px 20px;
    }

    .feature-card:last-child {
        border-bottom: none;
    }

    .mini-banner-1400__content {
        min-height: 300px;
        height: auto;
        padding: 40px 20px;
        background-attachment: scroll;
    }

    .mini-banner-1400__text {
        max-width: 100%;
        padding: 0;
    }

    .mini-banner-1400__text h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .mini-banner-1400__text p {
        font-size: 15px;
        margin-bottom: 25px;
    }

    .mini-banner-1400__actions {
        flex-direction: column;
        gap: 12px;
    }

    .mini-banner-1400__actions .btn {
        width: 100%;
    }

    .categories-nav-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .category-nav-title {
        margin-bottom: 15px;
    }

    .location-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Browse Categories Hub — Unique Namespace */
.bh-browse-hub-section {
    padding: 60px 0 80px;
}

.bh-browse-hub-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.bh-browse-hub-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 40px;
}

.bh-browse-hub-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 30px;
}

.bh-browse-hub-col {
    display: flex;
    flex-direction: column;
}

.bh-browse-cat-header {
    margin-bottom: 15px;
}

.bh-browse-cat-link {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.bh-browse-cat-link:hover {
    color: var(--dark-green);
    text-decoration: underline;
}

.bh-subcategory-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bh-subcategory-link {
    font-size: 14px;
    color: #1b4d3e;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.bh-subcategory-link:hover {
    color: var(--primary);
    transform: translateX(3px);
}

@media (max-width: 1024px) {
    .bh-browse-hub-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .bh-browse-hub-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 20px;
    }
}

@media (max-width: 480px) {
    .bh-browse-hub-grid {
        grid-template-columns: 1fr;
    }
}