﻿.haraz-web-home {
    width: min(100%, 1100px);
    margin: 0 auto;
    padding: 0 0 18px;
}

/* =========================================================
   CATEGORIES
========================================================= */

.haraz-category-area {
    padding: 8px 10px 2px;
    background: var(--haraz-background);
}

.haraz-category-track {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 3px 1px 6px;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

    .haraz-category-track::-webkit-scrollbar {
        display: none;
    }

.haraz-category-chip {
    flex: 0 0 auto;
    min-width: 60px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    color: #111111;
    background: #F1F3F5;
    border-radius: 50px;
    white-space: nowrap;
    font-size: .78rem;
    font-weight: 500;
}

    .haraz-category-chip.selected {
        color: #FFFFFF;
        background: var(--haraz-green);
    }

/* =========================================================
   ADS
========================================================= */

.haraz-ad-section {
    padding: 3px 10px 5px;
}

.haraz-ad-card {
    min-height: 98px;
    display: grid;
    grid-template-columns: 60px minmax(0,1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 15px;
    color: #FFFFFF;
    background: var(--ad-bg, #6A9A47);
    border-radius: 18px;
    overflow: hidden;
}

.haraz-ad-image {
    width: 60px;
    height: 60px;
    overflow: hidden;
    background: #FFFFFF;
    border-radius: 50%;
}

    .haraz-ad-image img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }

.haraz-ad-content {
    min-width: 0;
}

.haraz-ad-line1 {
    overflow: hidden;
    color: #FFFFFF;
    font-size: 1.05rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.haraz-ad-line2 {
    margin-top: 2px;
    overflow: hidden;
    color: #EAF5E1;
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.haraz-ad-line3 {
    margin-top: 3px;
    color: #DDEFD2;
    font-size: .78rem;
}

.haraz-ad-contact-row {
    min-height: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    overflow-x: auto;
    color: #DDEFD2;
    scrollbar-width: none;
    font-size: .78rem;
}

    .haraz-ad-contact-row::-webkit-scrollbar {
        display: none;
    }

    .haraz-ad-contact-row a {
        flex: 0 0 auto;
        color: #FFFFFF;
        font-size: 1rem;
    }

/* =========================================================
   POSTS HEADING
========================================================= */

.haraz-posts-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 10px 7px;
}

    .haraz-posts-heading strong {
        font-size: .76rem;
    }

    .haraz-posts-heading span {
        color: #808080;
        font-size: .68rem;
    }

/* =========================================================
   POSTS
========================================================= */

.haraz-post-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}

.haraz-mobile-post-card {
    position: relative;
    min-height: 104px;
    display: grid;
    grid-template-columns: minmax(0,1fr) 100px;
    gap: 8px;
    padding: 6px 10px;
    background: #FFFFFF;
    border-bottom: 1px solid #EEF0ED;
}

.haraz-post-click-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.haraz-mobile-post-content,
.haraz-mobile-image-box {
    position: relative;
    z-index: 1;
}

.haraz-mobile-post-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.haraz-mobile-post-title {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #004F70;
    font-size: .92rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.haraz-mobile-info-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
    color: #111111;
    font-size: .78rem;
}

.haraz-mobile-address {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.haraz-mobile-time {
    white-space: nowrap;
}

.haraz-mobile-seller-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
    align-items: center;
}

.haraz-mobile-seller {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #111111;
    font-size: .78rem;
}

    .haraz-mobile-seller span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .haraz-mobile-seller i {
        flex: 0 0 auto;
        color: var(--haraz-green);
        font-size: .68rem;
    }

.haraz-mobile-contact {
    display: flex;
    align-items: center;
    gap: 6px;
}

.haraz-contact-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: .92rem;
}

    .haraz-contact-icon.whatsapp {
        color: #25D366;
    }

    .haraz-contact-icon.messenger {
        color: #0084FF;
    }

.haraz-mobile-price {
    margin-top: auto;
    color: #444444;
    font-size: .65rem;
    font-weight: 700;
}

.haraz-mobile-image-box {
    width: 100px;
    height: 90px;
    align-self: center;
    overflow: hidden;
    background: #EEEEEE;
}

    .haraz-mobile-image-box img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }

/* =========================================================
   EMPTY / ERROR
========================================================= */

.haraz-home-error {
    margin: 7px 10px;
    padding: 10px 12px;
    color: #B91C1C;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 12px;
    font-size: .74rem;
}

.haraz-no-posts {
    margin: 8px 10px;
    padding: 35px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #64748B;
    background: #FFFFFF;
    border-radius: 15px;
    text-align: center;
}

    .haraz-no-posts i {
        color: var(--haraz-green);
        font-size: 1.6rem;
    }

    .haraz-no-posts strong {
        color: #334155;
    }

/* =========================================================
   DESKTOP ENHANCEMENT
========================================================= */

@media (min-width: 768px) {

    .haraz-web-home {
        padding-top: 6px;
    }

    .haraz-category-area,
    .haraz-ad-section {
        padding-right: 0;
        padding-left: 0;
    }

    .haraz-post-list {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 8px;
    }

    .haraz-mobile-post-card {
        min-height: 116px;
        border: 1px solid #E7EAE5;
        border-radius: 12px;
        transition: transform .18s ease, box-shadow .18s ease;
    }

        .haraz-mobile-post-card:hover {
            box-shadow: 0 7px 20px rgba(15,23,42,.07);
            transform: translateY(-2px);
        }
}

@media (min-width: 1200px) {

    .haraz-post-list {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

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

@media (max-width: 480px) {

    .haraz-category-chip {
        height: 36px;
        padding-right: 16px;
        padding-left: 16px;
        font-size: .73rem;
    }

    .haraz-ad-card {
        min-height: 94px;
        grid-template-columns: 56px minmax(0,1fr);
        padding: 8px 12px;
    }

    .haraz-ad-image {
        width: 56px;
        height: 56px;
    }

    .haraz-ad-line1 {
        font-size: .96rem;
    }

    .haraz-ad-line2,
    .haraz-ad-line3,
    .haraz-ad-contact-row {
        font-size: .72rem;
    }
}

/* =========================================
   DOWNLOAD APP
========================================= */

.haraz-download-app {
    padding: 4px 10px 8px;
}

    .haraz-download-app a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 42px;
        background: #ffffff;
        border: 1px solid #E6ECE2;
        border-radius: 14px;
        color: #456D2D;
        font-size: .78rem;
        font-weight: 700;
        transition: .2s;
    }

        .haraz-download-app a:hover {
            background: #F7FAF5;
            color: #5B8C3B;
            text-decoration: none;
        }

    .haraz-download-app img {
        width: 20px;
        height: 20px;
        object-fit: contain;
    }

    .haraz-download-app i {
        font-size: .72rem;
        color: #94A3B8;
    }

