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

.slider-section {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}


.modern-swiper {
    position: relative;

    width: 100%;
    height: 540px;

    overflow: hidden;

    border-radius: 28px;

    background: #f6f7f9;
}


/* =========================================
   SLIDE
========================================= */

.hero-slide {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: hidden;

    isolation: isolate;
}


/* =========================================
   BACKGROUND
========================================= */

.hero-slide::before {
    content: "";

    position: absolute;

    inset: 0;

    z-index: -3;

    background:
        radial-gradient(circle at 80% 40%,
            rgba(255, 255, 255, .8),
            transparent 35%);
}


/* =========================================
   SHAPE
========================================= */

.hero-shape {
    position: absolute;

    z-index: -2;

    right: 2%;
    top: 50%;

    width: 52%;
    height: 95%;

    transform: translateY(-50%);

    pointer-events: none;
}


.hero-shape svg {
    width: 100%;
    height: 100%;

    display: block;
}


.hero-shape path {
    fill: var(--color-primary-light);
}


/* Different slide colors */

.hero-shape-two path {
    fill: var(--color-primary-light);
}


.hero-shape-three path {
    fill: var(--color-primary-light);
}


/* =========================================
   IMAGE
========================================= */

.hero-image-wrap {
    position: absolute;

    z-index: -1;

    /* right: 0%; */
    left: 50%;
    top: 50%;

    width: auto;
    height: auto;

    transform: translateY(-50%);

    overflow: hidden;

    border-radius: 22px;


}


.hero-image {
    width: 90%;
    height: 90%;

    display: block;

    object-fit: cover;

    transition: transform 1.2s ease;
}


/* =========================================
   CONTENT
========================================= */

.hero-content {
    position: relative;

    z-index: 5;

    width: 52%;

    margin-left: 7%;

    padding-top: 10px;

    top: 50%;

    transform: translateY(-50%);
}


/* =========================================
   BADGE
========================================= */

.hero-badge {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 8px 13px;

    margin-bottom: 20px;

    border-radius: 50px;

    color: #222;

    background: rgba(255, 255, 255, .75);

    border: 1px solid rgba(0, 0, 0, .06);

    box-shadow: 0 5px 20px rgba(0, 0, 0, .06);

    backdrop-filter: blur(10px);

    font-size: 12px;

    font-weight: 700;

    letter-spacing: .2px;
}


.badge-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #c82128;
}


.hero-slide-two .badge-dot {
    background: #c82128;
}


.hero-slide-three .badge-dot {
    background: #c82128;
}


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

.hero-content h1 {
    max-width: 400px;

    margin: 0 0 18px;

    color: #111;

    font-size: clamp(38px, 5vw, 64px);

    line-height: 1.02;

    letter-spacing: -2.5px;

    font-weight: 800;
}


.hero-content h1 span {
    display: block;

    color: #c82128;
}


.hero-slide-two h1 span {
    color: #c82128;
}


.hero-slide-three h1 span {
    color: #c82128;
}


/* =========================================
   DESCRIPTION
========================================= */

.hero-content p {
    max-width: 300px;

    margin: 0 0 28px;

    color: #555;

    font-size: 16px;

    line-height: 1.3;
}


/* =========================================
   BUTTONS
========================================= */

.hero-actions {
    display: flex;

    align-items: center;

    gap: 12px;
}


.hero-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 13px 19px;

    border-radius: 10px;

    text-decoration: none;

    font-size: 14px;

    font-weight: 700;

    transition:
        transform .25s ease,
        background .25s ease,
        color .25s ease,
        box-shadow .25s ease;
}


.hero-btn-primary {
    color: #fff;

    background: #c82128;

    box-shadow:
        0 8px 25px rgba(200, 33, 40, .25);
}


.hero-slide-two .hero-btn-primary {
    background: #c82128;

    box-shadow:
        0 8px 25px rgba(3, 97, 50, .25);
}


.hero-slide-three .hero-btn-primary {
    background: #c82128;

    box-shadow:
        0 8px 25px rgba(124, 58, 237, .25);
}


.hero-btn-primary:hover {
    color: #fff;

    transform: translateY(-2px);

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


.hero-btn-secondary {
    color: #333;

    background: rgba(255, 255, 255, .7);

    border: 1px solid rgba(0, 0, 0, .08);
}


.hero-btn-secondary:hover {
    color: #111;

    background: #fff;

    transform: translateY(-2px);
}


/* =========================================
   PAGINATION
========================================= */

.modern-swiper .swiper-pagination {
    position: absolute;
    bottom: 32px;

    width: 100%;


    text-align: center;

    z-index: 10;
}


.modern-swiper .swiper-pagination-bullet {
    width: 25px;
    height: 4px;

    margin: 0 5px 0 0 !important;

    border-radius: 10px;

    background: #222;

    opacity: .2;

    transition: .3s ease;
}


.modern-swiper .swiper-pagination-bullet-active {
    width: 45px;

    opacity: 1;

    background: #c82128;
}


.hero-slide-two~* .swiper-pagination-bullet-active {
    background: #c82128;
}


/* =========================================
   NAVIGATION
========================================= */

.hero-navigation {
    position: absolute;

    right: 30px;
    bottom: 25px;

    display: flex;

    gap: 8px;

    z-index: 10;
}


.hero-nav {
    position: static !important;

    width: 44px !important;
    height: 44px !important;

    margin: 0 !important;

    border-radius: 50%;

    color: #222 !important;

    background: rgba(255, 255, 255, .8);

    border: 1px solid rgba(0, 0, 0, .07);

    box-shadow: 0 5px 20px rgba(0, 0, 0, .08);

    backdrop-filter: blur(10px);

    transition: .25s ease;
}


.hero-nav::after {
    display: none;
}


.hero-nav i {
    font-size: 16px;
}


.hero-nav:hover {
    color: #fff !important;

    background: #111;

    transform: translateY(-2px);
}


/* =========================================
   SWIPER ACTIVE SLIDE ANIMATION
========================================= */

.swiper-slide-active .hero-image {
    transform: scale(1.04);
}


.swiper-slide:not(.swiper-slide-active) .hero-image {
    transform: scale(1.12);
}


/* =========================================
   MOBILE
========================================= */
@media (max-width: 1024px) {

    .slider-section {
        width: 100%;
        height: 50px;
        padding: 10px;
        /* display: none; */
        margin-bottom: 330px;
    }

    .modern-swiper {
        height: 360px;
        border-radius: 20px;
    }


    /* =================================
       SLIDE
    ================================= */

    .hero-slide {
        display: flex;
        align-items: center;
    }


    /* =================================
       SHAPE
    ================================= */

    .hero-shape {
        right: -8%;
        top: 40%;

        width: 48%;
        height: 80%;

        transform: translateY(-50%);

        z-index: -2;
    }


    /* =================================
       IMAGE
    ================================= */

    .hero-image-wrap {
        position: absolute;

        right: 0;
        top: 40%;

        width: auto;
        height: auto;

        transform: translateY(-50%);

        border-radius: 14px;

        z-index: -1;
    }

    .hero-image {
        width: 100%;
        height: 100%;
    }


    /* =================================
       CONTENT
    ================================= */

    .hero-content {
        position: relative;

        width: 58%;

        margin-left: 20px;
        margin-right: 0;

        padding: 0;

        top: auto;

        transform: none;

        z-index: 5;
    }


    /* =================================
       BADGE
    ================================= */

    .hero-badge {
        margin-bottom: 10px;

        padding: 6px 9px;

        font-size: 9px;

        gap: 6px;
    }


    .badge-dot {
        width: 5px;
        height: 5px;
    }


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

    .hero-content {
        position: relative;
        top: 50%;
        left: 30%;
        transform: translate(-50%, -50%);

    }

    .hero-content h1 {
        max-width: 100%;

        margin-bottom: 10px;

        font-size: 25px;

        line-height: 1.05;

        letter-spacing: -1px;
    }


    .hero-content h1 span {
        display: block;
    }


    /* =================================
       DESCRIPTION
    ================================= */

    .hero-content p {
        max-width: 60%;

        margin-bottom: 14px;

        font-size: 11px;

        line-height: 1.45;
    }


    /* =================================
       BUTTON
    ================================= */

    .hero-actions {
        gap: 6px;
    }


    .hero-btn {
        padding: 9px 11px;

        border-radius: 7px;

        font-size: 10px;

        gap: 5px;
    }


    .hero-btn i {
        font-size: 11px;
    }


    /* =================================
       NAVIGATION
    ================================= */

    .hero-navigation {
        right: 12px;

        bottom: 12px;

        gap: 5px;
    }


    .hero-nav {
        width: 32px !important;
        height: 32px !important;
    }


    .hero-nav i {
        font-size: 12px;
    }


    /* =================================
       PAGINATION
    ================================= */

    .modern-swiper .swiper-pagination {
        left: 20px;

        bottom: 20px;
    }


    .modern-swiper .swiper-pagination-bullet {
        width: 14px;
        height: 3px;

        margin-right: 3px !important;
    }


    .modern-swiper .swiper-pagination-bullet-active {
        width: 28px;
    }

}

.sell-btn:hover {
    background: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-1px);
}

.account-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    text-decoration: none;
    transition: background var(--transition), color var(--transition), border var(--transition);
}

.account-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    font-size: 20px;
    cursor: pointer;
}

/* ==========================================================================
   MOBILE-ONLY NAVIGATION & MOBILE HEADER
   ========================================================================== */
.app-header {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-4);
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.app-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.logo-icon {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

.logo-text {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-black);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* MOBILE SEARCH BAR */
.search-section {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4) var(--space-2);
}

.search-input-container {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
}

.search-input-container input {
    width: 100%;
    height: 44px;
    background-color: #fafafa;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0 var(--space-3) 0 38px;
    font-size: var(--text-sm);
    outline: none;
    color: var(--color-black);
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--color-text-muted);
}

.search-section .btn {
    height: 44px;
    padding: 0 var(--space-5);
}

.location-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.location-selector {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-weight: var(--font-medium);
    cursor: pointer;
    color: var(--color-black);
}

.results-count {
    color: var(--color-text-muted);
}

.filters-container {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    overflow-x: auto;
    scrollbar-width: none;
}

.filters-container::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-black);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    white-space: nowrap;
    cursor: pointer;
}

.filter-count {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-full);
    font-size: 8px;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
    font-weight: var(--font-bold);
}

.sorting-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) var(--space-4) var(--space-3);
}

.sort-dropdown {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    cursor: pointer;
}

.sort-dropdown strong {
    color: var(--color-black);
}

.view-toggles {
    display: flex;
    gap: var(--space-2);
}

.toggle-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: var(--color-bg);
    color: var(--color-text-muted);
}

.toggle-btn.active {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.toggle-btn.list-green {
    background-color: #eafcf1;
    color: #27ae60;
}

/* =========================================
   PRODUCT LIST
========================================= */

.products-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
}


/* =========================================
   PRODUCT CARD
========================================= */

.product-card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;

    overflow: hidden;

    background: var(--color-white);

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

    border-radius: var(--radius-md);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}


.product-card:hover {
    transform: translateY(-3px);

    border-color: var(--color-primary);

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


/* =========================================
   FEATURED CARD
========================================= */

.product-card.featured {
    background-color: #fffdfd;

    border-color: rgba(200, 33, 40, .15);
}


/* =========================================
   IMAGE
========================================= */

.product-image-container {
    position: relative;

    width: 100%;
    height: 220px;

    overflow: hidden;

    background-color: var(--color-bg);

    border-radius: 0;
}


.product-image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition: transform .4s ease;
}


.product-card:hover .product-image {
    transform: scale(1.05);
}


/* =========================================
   FEATURED BADGE
========================================= */

.featured-badge {
    position: absolute;

    top: var(--space-2);
    left: var(--space-2);

    z-index: 5;

    display: inline-flex;
    align-items: center;

    padding: 3px 7px;

    background-color: var(--color-primary);

    color: var(--color-white);

    font-size: 8px;

    font-weight: var(--font-bold);

    border-radius: var(--radius-sm);

    text-transform: uppercase;

    letter-spacing: .3px;
}


/* =========================================
   PROMOTED BADGE
========================================= */

.promoted-badge {
    position: absolute;
    bottom: var(--space-2);
    left: var(--space-2);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    background-color: #263238;
    color: #fff;
    font-size: 8px;
    font-weight: var(--font-bold);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: .3px;
}


/* =========================================
   FAVORITE BUTTON
========================================= */

.fav-icon {
    position: absolute;

    top: var(--space-2);
    right: var(--space-2);

    z-index: 5;

    width: 32px;
    height: 32px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid rgba(0, 0, 0, .06);

    border-radius: 50%;

    background-color: rgba(255, 255, 255, .9);

    color: var(--color-text-muted);

    cursor: pointer;

    backdrop-filter: blur(8px);

    transition:
        color .2s ease,
        background-color .2s ease,
        transform .2s ease;
}


.fav-icon:hover {
    color: var(--color-primary);

    background-color: var(--color-white);

    transform: scale(1.05);
}


/* =========================================
   PRODUCT INFO
========================================= */

.product-info {
    display: flex;

    flex-direction: column;

    flex: 1;

    padding: var(--space-3);
}


/* =========================================
   TITLE
========================================= */

.title-row {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: var(--space-2);
}


.product-title {
    margin: 0;

    color: var(--color-black);

    font-size: var(--text-sm);

    font-weight: var(--font-semibold);

    line-height: 1.35;

    display: -webkit-box;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* =========================================
   PRICE
========================================= */

.product-price {
    margin-top: var(--space-2);

    color: var(--color-primary);

    font-size: var(--text-base);

    font-weight: var(--font-bold);
}


/* =========================================
   BADGE
========================================= */

.badge-row {
    margin-top: var(--space-2);
}


.status-badge {
    display: inline-block;
    width: fit-content;

    padding: 3px var(--space-2);

    font-size: 10px;

    font-weight: var(--font-medium);

    border-radius: var(--radius-sm);
    background-color: var(--color-primary-light);
}


/* =========================================
   META
========================================= */

.meta-row {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: var(--space-2);

    margin-top: var(--space-3);

    padding-top: var(--space-2);

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

    color: var(--color-text-muted);

    font-size: 10px;
}


.meta-item {
    display: flex;

    align-items: center;

    gap: 4px;

    min-width: 0;
}


.meta-item span {
    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


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

@media (max-width: 768px) {

    .products-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: var(--space-3);
        padding: 0 var(--space-4);
        margin-bottom: 60px;
    }


    .product-image-container {
        height: 160px;
    }


    .product-info {
        padding: var(--space-2);
    }


    .product-title {
        font-size: var(--text-xs);
    }


    .product-price {
        font-size: var(--text-sm);

        margin-top: var(--space-1);
    }


    .status-badge {
        font-size: 8px;

        padding: 2px 5px;
    }


    .meta-row {
        font-size: 8px;

        margin-top: var(--space-2);
    }


    .fav-icon {
        width: 28px;
        height: 28px;

        top: 7px;
        right: 7px;
    }


    .featured-badge {
        top: 7px;
        left: 7px;

        font-size: 7px;

        padding: 2px 5px;
    }


    .promoted-badge {
        bottom: 7px;
        left: 7px;

        font-size: 7px;

        padding: 2px 5px;
    }

}

.meta-row {
    display: flex;
    gap: var(--space-4);
    font-size: 10px;
    color: var(--color-text-muted);
    margin-top: var(--space-2);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-5) 0 100px;
    /* offset mobile nav height */
}

.page-link {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.page-link.active {
    background-color: var(--color-primary);
    color: var(--color-white);
    font-weight: var(--font-semibold);
}

.page-dots {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}

.next-btn {
    background-color: var(--color-bg);
    color: var(--color-black);
}

/* MOBILE BOTTOM NAVIGATION */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: var(--color-white);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    font-size: 9px;
    font-weight: var(--font-medium);
    color: var(--color-text-muted);
    flex: 1;
}

.nav-item.active {
    color: var(--color-primary);
}

.badge-nav {
    top: -2px;
    right: 14px;
}

.sell-btn-wrapper {
    position: relative;
    background: none;
    border: none;
    height: 100%;
}

.sell-btn {
    background-color: var(--color-primary);
    color: var(--color-white);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -24px;
    box-shadow: 0 4px 10px rgba(200, 33, 40, 0.25);
    border: 4px solid var(--color-white);
}

.sell-btn-wrapper span {
    position: absolute;
    bottom: 8px;
}



/* ==========================================================================
   4. RESPONSIVE MEDIA QUERIES (DESKTOP INTERACTION SWITCHES)
   ========================================================================== */

/* ===== MOBILE ONLY (Screens smaller than 768px) ===== */
@media (max-width: 1024px) {
    .site-nav {
        display: none !important;
        /* Hide Desktop Nav Include */
    }

    .site-footer {
        display: none !important;
        /* Hide Desktop Footer Include */
    }

    .mobile-menu-btn {
        display: block;
    }

    .sort-dropdown:has(.sort-select) {
        display: none;
    }
}

/* ===== DESKTOP ONLY (Screens 768px and up) ===== */
@media (min-width: 1024px) {
    .mobile-only {
        display: none !important;
        /* Hide mobile local app bar */
    }

    .desktop-only {
        display: block !important;
        /* Display Desktop specific widgets */
    }

    .site-nav {
        display: flex !important;
        /* Display PHP Navbar include */
    }

    .site-footer {
        display: block !important;
        /* Display PHP Footer include */
    }

    .app-container {
        width: 100%;
        max-width: var(--container-width);
        margin: 0 auto;
        background-color: var(--color-white);
        min-height: 100vh;
        box-shadow: var(--shadow-sm);
    }

    .app-layout {
        display: flex;
        gap: var(--space-6);
        padding: var(--space-5) var(--space-4);
    }

    .main-content {
        flex: 1;
    }

    /* SIDEBAR GRID FILTERS */
    .desktop-sidebar {
        width: 250px;
        flex-shrink: 0;
        align-self: flex-start;
        display: flex !important;
        flex-direction: column;
        gap: var(--space-6);
        padding-right: var(--space-4);
        border-right: 1px solid var(--color-border);
        position: sticky;
        top: calc(var(--header-height) + var(--space-5));
        max-height: calc(100vh - var(--header-height) - var(--space-5) - var(--space-5));
        overflow-y: auto;
    }

    .sidebar-section {
        display: flex;
        flex-direction: column;
        gap: var(--space-3);
    }

    .sidebar-title {
        font-size: var(--text-sm);
        font-weight: var(--font-bold);
        color: var(--color-black);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: var(--space-1);
    }

    .sidebar-menu {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: var(--space-2);
    }

    .sidebar-menu a {
        text-decoration: none;
        font-size: var(--text-sm);
        color: var(--color-text-muted);
        transition: var(--transition);
        display: block;
        padding: var(--space-1) 0;
    }

    .sidebar-menu a.active,
    .sidebar-menu a:hover {
        color: var(--color-primary);
        font-weight: var(--font-semibold);
    }

    .filter-option {
        font-size: var(--text-sm);
        color: var(--color-black);
        display: flex;
        align-items: center;
    }

    .filter-option label {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        cursor: pointer;
    }

    .price-inputs {
        display: flex;
        gap: var(--space-2);
    }

    .price-inputs input {
        width: 100%;
        height: 38px;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        padding: 0 var(--space-2);
        font-size: var(--text-xs);
        outline: none;
    }

    /* LIST GRID RESPONSIVENESS */
    .products-list {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-4);
        padding: 0;
        margin-bottom: 100px;
    }

    .product-card {
        transition: transform var(--transition), box-shadow var(--transition);
    }

    .product-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
        border-color: rgba(200, 33, 40, 0.25);
    }

    .pagination {
        padding-bottom: var(--space-8);
    }
}

/* =========================================
   MARKETPLACE (DYNAMIC) EXTRAS
========================================= */

/* Condition badge colors */
.status-badge.brand-new {
    background-color: #e8f6ef;
    color: #1a7f4b;
}

.status-badge.like-new {
    background-color: #eef3fe;
    color: #2b5fd9;
}

.status-badge.good {
    background-color: #fff4e0;
    color: #b07d1a;
}

.status-badge.fair {
    background-color: #fdeeee;
    color: #b03a2e;
}

.status-badge.negotiable {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    margin-left: var(--space-1);
}

/* Clickable title */
.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: var(--color-primary);
}

/* Whole image is a link now */
.product-image-container {
    display: block;
}

/* Placeholder when a listing has no image */
.product-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg);
    color: var(--color-text-muted);
    font-size: 40px;
}

/* Saved (favorite) button state */
.fav-icon.fav-active {
    color: var(--color-primary);
    border-color: rgba(200, 33, 40, .25);
}

/* Category counts */
.sidebar-menu a .cat-count {
    font-size: 10px;
    color: var(--color-text-muted);
}

/* Filter apply button */
.filter-apply {
    align-self: flex-start;
    padding: 8px 14px;
    font-size: var(--text-xs);
}

/* Sort select */
.sort-form {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.sort-dropdown {
    position: relative;
}

.sort-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    padding-right: var(--space-1);
    cursor: pointer;
}

.sort-select option {
    color: var(--color-black);
}

/* Location selector */
.location-form {
    display: inline-flex;
}

.location-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-black);
    cursor: pointer;
    padding-right: 2px;
}

.location-select option {
    color: var(--color-black);
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: var(--color-text-muted);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
}

.empty-state i {
    font-size: 42px;
}

.empty-state h3 {
    margin: 0;
    font-size: var(--text-base);
    color: var(--color-black);
}

.empty-state p {
    margin: 0 0 var(--space-2);
    font-size: var(--text-sm);
}

/* List view */
.products-list.list-view {
    grid-template-columns: 1fr;
}

.products-list.list-view .product-card {
    flex-direction: row;
}

.products-list.list-view .product-image-container {
    width: 220px;
    height: auto;
    min-height: 160px;
    flex-shrink: 0;
}

.products-list.list-view .product-info {
    padding: var(--space-3) var(--space-4);
    justify-content: center;
}

@media (max-width: 768px) {
    .products-list.list-view .product-image-container {
        width: 140px;
        min-height: 120px;
    }
}

/* Mobile bottom sheets */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 120;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.sheet-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: var(--color-white);
    z-index: 130;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.32,.72,0,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bottom-sheet.open {
    transform: translateY(0);
}

.sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    margin: 10px auto 0;
    flex-shrink: 0;
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.sheet-header strong {
    font-size: var(--text-sm);
    color: var(--color-black);
}

.sheet-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: var(--text-base);
    cursor: pointer;
    padding: var(--space-1);
    line-height: 1;
}

.sheet-body {
    overflow-y: auto;
    flex: 1;
    padding: var(--space-2) 0;
    -webkit-overflow-scrolling: touch;
}

.sheet-section {
    padding: 0 var(--space-4);
    margin-bottom: var(--space-4);
}

.sheet-section-title {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-2);
}

.sheet-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: 12px var(--space-4);
    border: none;
    background: none;
    text-align: left;
    font-family: inherit;
    font-size: var(--text-sm);
    color: var(--color-black);
    cursor: pointer;
    transition: background .15s ease;
    text-decoration: none;
}

.sheet-option:active {
    background: var(--color-primary-light);
}

.sheet-option.active {
    color: var(--color-primary);
    font-weight: var(--font-semibold);
}

.sheet-radio-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    flex-shrink: 0;
    position: relative;
    transition: border-color .15s ease;
}

.sheet-option.active .sheet-radio-dot {
    border-color: var(--color-primary);
}

.sheet-option.active .sheet-radio-dot::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
}

.sheet-check-box {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--color-border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--color-white);
    transition: all .15s ease;
}

.sheet-option.active .sheet-check-box {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.sheet-option-count {
    margin-left: auto;
    font-size: 11px;
    color: var(--color-text-muted);
    font-weight: var(--font-regular);
}

.sheet-price-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.sheet-price-row input {
    flex: 1;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0 var(--space-3);
    font-size: var(--text-sm);
    font-family: inherit;
    outline: none;
    transition: border-color .15s ease;
}

.sheet-price-row input:focus {
    border-color: var(--color-primary);
}

.sheet-price-sep {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.sheet-actions {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4) var(--space-4);
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}

.sheet-actions .btn {
    flex: 1;
}

body.drawer-open {
    overflow: hidden;
}

/* Drawer backdrop (tap outside to close) */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 120;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .28s ease, visibility .28s ease;
}

.drawer-backdrop.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Mobile navigation drawer */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 85vw);
    background: var(--color-white);
    z-index: 130;
    transform: translateX(-100%);
    transition: transform .28s ease;
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
    overflow-y: auto;
}

.mobile-menu-drawer.open {
    transform: translateX(0);
}

.mm-body {
    flex: 1 1 auto;
    overflow-y: auto;
}

.mm-group-title {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-text-muted);
    margin: var(--space-4) 0 var(--space-2);
}

.mm-group {
    display: flex;
    flex-direction: column;
}

.mm-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: 10px 8px;
    border: none;
    background: none;
    text-align: left;
    text-decoration: none;
    color: var(--color-black);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: var(--transition);
}

.mm-link i {
    width: 22px;
    text-align: center;
    font-size: 1rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.mm-link span {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.mm-link small {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}

.mm-link:hover {
    background: var(--color-primary-light);
}

.mm-link.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.mm-link.active i {
    color: var(--color-primary);
}

.mm-footer {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.mm-sell-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: var(--button-height);
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: var(--color-white);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-decoration: none;
    transition: var(--transition);
}

.mm-sell-btn:hover {
    background: var(--color-primary-dark);
    color: var(--color-white);
}

.mm-account {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: var(--transition);
}

.mm-account:hover {
    color: var(--color-primary);
}

.mm-socials {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
}

.mm-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
}

.mm-socials a:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.mm-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--space-3);
    row-gap: var(--space-1);
}

.mm-legal a {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.mm-legal a:hover {
    color: var(--color-primary);
}

/* =========================================
   LISTING DETAIL PAGE
========================================= */

.listing-detail-layout {
    display: block !important;
}

.listing-detail {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--space-3) var(--space-4) var(--space-8);
}

.detail-back {
    margin-bottom: var(--space-4);
}

.detail-back a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-decoration: none;
}

.detail-back a:hover {
    color: var(--color-primary);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: var(--space-6);
    align-items: start;
}

.detail-cover {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
}

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

.detail-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    color: var(--color-text-muted);
}

.detail-thumbs {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-3);
    overflow-x: auto;
    padding-bottom: 4px;
}

.detail-thumb {
    width: 76px;
    height: 60px;
    padding: 0;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: none;
    flex-shrink: 0;
}

.detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-thumb.active,
.detail-thumb:hover {
    border-color: var(--color-primary);
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.detail-category {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--color-primary);
    text-decoration: none;
}

.detail-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: var(--font-bold);
    color: var(--color-black);
    line-height: 1.3;
}

.detail-price {
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    color: var(--color-primary);
}

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}

.detail-badges .status-badge {
    margin-left: 0;
    font-size: 11px;
    padding: 4px 10px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin: var(--space-2) 0;
}

.detail-section {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

.detail-section h2 {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--color-black);
    margin: 0 0 var(--space-2);
}

.detail-description {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--color-text);
    line-height: 1.7;
    white-space: normal;
}

.seller-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-5);
    padding: var(--space-4);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.seller-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.seller-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.seller-meta strong {
    font-size: var(--text-sm);
    color: var(--color-black);
}

.seller-meta span {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.seller-actions .btn {
    font-size: var(--text-xs);
    padding: 8px 14px;
}

.similar-section {
    margin-top: var(--space-8);
}

.similar-title {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--color-black);
    margin-bottom: var(--space-4);
}

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-title {
        font-size: 1.2rem;
    }

    .detail-price {
        font-size: 1.25rem;
    }

    .seller-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== AJAX marketplace loading state ===== */
.products-list.is-loading {
    position: relative;
    opacity: 0.45;
    pointer-events: none;
    min-height: 240px;
}

.products-list.is-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 42px;
    transform: translate(-50%, -50%);
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: var(--radius-full);
    animation: mp-spin 0.7s linear infinite;
}

@keyframes mp-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .products-list.is-loading {
        min-height: 200px;
    }
}

/* =========================================
   FEATURED SECTION (homepage horizontal scroll)
   ========================================= */

.featured-section {
    margin-bottom: var(--space-5);
    background-color: var(--color-primary-light);
    border-radius: var(--radius-md);
    padding: 0 var(--space-1);
}

.featured-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.featured-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.featured-header h2 i {
    color: var(--color-primary);
    font-size: 1rem;
}

.featured-view-all {
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.featured-view-all:hover {
    text-decoration: underline;
}

.featured-scroll {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

/* Hide scrollbar (WebKit) */
.featured-scroll::-webkit-scrollbar {
    display: none;
}
.featured-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.featured-scroll .product-card {
    min-width: 260px;
    max-width: 260px;
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* Override grid for featured cards — force single-row flex */
.featured-scroll .product-card.featured {
    background-color: #fffdfd;
    border-color: rgba(200, 33, 40, .15);
}

@media (max-width: 768px) {
    .featured-scroll .product-card {
        min-width: 220px;
        max-width: 220px;
    }
}

/* =============================================
   FEATURED LISTINGS PAGE (/featured)
   ============================================= */

.featured-page-content {
    padding: 24px 20px;
}

.featured-page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--color-text, #1a1a1a);
}

.featured-page-header h1 i {
    color: #c82128;
    margin-right: 6px;
}

.featured-page-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.featured-page-meta .results-count {
    font-size: 0.9rem;
    color: var(--color-muted, #6c757d);
}

.featured-page-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.featured-page-sort label {
    font-size: 0.85rem;
    color: var(--color-muted, #6c757d);
    margin: 0;
    white-space: nowrap;
}

.featured-page-sort .form-select {
    width: auto;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .featured-page-content {
        padding: 16px 12px;
    }

    .featured-page-header h1 {
        font-size: 1.25rem;
    }

    .featured-page-sort .form-select {
        display: none;
    }

    .featured-page-sort::after {
        content: '\F285';
        font-family: 'bootstrap-icons';
        font-size: 0.9rem;
        color: var(--color-muted, #6c757d);
    }
}

/* =========================================
   REPORT MODAL
   ========================================= */

.report-form-status {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: var(--radius-md, 8px);
    font-size: 0.875rem;
    font-weight: 500;
}

.report-form-status.is-success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}

.report-form-status.is-error {
    background: #fbe8e9;
    color: var(--color-primary, #c82128);
    border: 1px solid #f5c6cb;
}

#reportModal .modal-content,
#reportSellerModal .modal-content {
    border-radius: var(--radius-lg, 16px);
    border: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

#reportModal .modal-header,
#reportSellerModal .modal-header {
    border-bottom: 1px solid var(--color-border, #e5e5e5);
    padding: 18px 24px;
}

#reportModal .modal-title,
#reportSellerModal .modal-title {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

#reportModal .modal-title i,
#reportSellerModal .modal-title i {
    color: var(--color-primary, #c82128);
}

#reportModal .modal-body,
#reportSellerModal .modal-body {
    padding: 20px 24px;
}

#reportModal .modal-footer,
#reportSellerModal .modal-footer {
    border-top: 1px solid var(--color-border, #e5e5e5);
    padding: 14px 24px;
}

#reportModal .form-field label,
#reportSellerModal .form-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-black, #111);
    margin-bottom: 6px;
    display: block;
}

#reportModal select,
#reportModal textarea,
#reportSellerModal select,
#reportSellerModal textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border, #e5e5e5);
    border-radius: var(--radius-md, 8px);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--color-white, #fff);
    color: var(--color-black, #111);
    transition: border-color 0.2s;
}

#reportModal select:focus,
#reportModal textarea:focus,
#reportSellerModal select:focus,
#reportSellerModal textarea:focus {
    outline: none;
    border-color: var(--color-primary, #c82128);
    box-shadow: 0 0 0 3px rgba(200, 33, 40, 0.1);
}

.btn.report-submitted {
    opacity: 0.6;
    pointer-events: none;
}

/* ============================================================
   SPONSORED AD CARDS (includes/ads.php)
   ============================================================ */
.os-ad {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 16px;
    border: 1px solid var(--color-border, #e5e5e5);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff 0%, var(--color-primary-light, #fbe8e9) 130%);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.os-ad:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary, #c82128);
    box-shadow: 0 10px 24px rgba(200, 33, 40, 0.12);
}

.os-ad-img {
    flex: 0 0 auto;
    width: min(300px, 30%);
    height: 96px;
    object-fit: cover;
    border-radius: 10px;
    background: #fff;
}

.os-ad-fallback {
    flex: 0 0 auto;
    width: min(300px, 30%);
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary, #c82128) 0%, var(--color-primary-dark, #a91b21) 100%);
    color: #fff;
    overflow: hidden;
}

.os-ad-fallback i {
    font-size: 2rem;
    opacity: 0.9;
}

.os-ad-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 auto;
    min-width: 0;
}

.os-ad-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    align-self: flex-start;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-primary, #c82128);
    background: var(--color-primary-light, #fbe8e9);
    border-radius: 999px;
    padding: 3px 9px;
}

.os-ad-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-black, #111);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.os-ad-adv {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--color-text-muted, #6b6b6b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.os-ad-cta {
    display: none;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary, #c82128);
}

.os-ad-go {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-primary, #c82128);
    color: #fff;
    font-size: 1.15rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.os-ad:hover .os-ad-go {
    transform: translateX(4px);
    background: var(--color-primary-dark, #a91b21);
}

.os-ad-cta i,
.os-ad-go i {
    transition: transform 0.2s ease;
}

/* Homepage banner strip */
.ad-banner-strip {
    margin: 18px 0 0;
}

/* Sidebar variant on listing page */
.os-ad--sidebar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 18px;
}

.os-ad--sidebar .os-ad-img,
.os-ad--sidebar .os-ad-fallback {
    width: 100%;
    height: 130px;
}

.os-ad--sidebar .os-ad-go {
    display: none;
}

.os-ad--sidebar .os-ad-cta {
    display: inline-flex;
}

/* Small screens: stack the banner like a product card */
@media (max-width: 575.98px) {
    .os-ad:not(.os-ad--sidebar) {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .os-ad:not(.os-ad--sidebar) .os-ad-img,
    .os-ad:not(.os-ad--sidebar) .os-ad-fallback {
        width: 100%;
        height: 120px;
    }

    .os-ad:not(.os-ad--sidebar) .os-ad-go {
        display: none;
    }

    .os-ad:not(.os-ad--sidebar) .os-ad-cta {
        display: inline-flex;
    }
}

/* ==========================================================================
   Categories page
   ========================================================================== */
.cats-page {
    padding: var(--space-8) 0 var(--space-10);
}

.cats-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.cats-header h1 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--color-black);
    margin: 0 0 var(--space-2);
}

.cats-header p {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    margin: 0;
}

.cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-4);
}

.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-6) var(--space-4);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg, 12px);
    text-decoration: none;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    border-color: var(--color-primary-light);
}

.cat-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 1.4rem;
    margin-bottom: var(--space-2);
}

.cat-card-name {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-black);
}

.cat-card-count {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

@media (max-width: 576px) {
    .cats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .cat-card {
        padding: var(--space-5) var(--space-2);
    }
}

/* ---------------- Navbar chat badge (site-wide) ---------------- */
.chat-nav-link {
    position: relative;
    color: inherit;
    text-decoration: none;
}

.chat-nav-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--color-primary, #c82128);
    color: #fff;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Mobile hamburger unread red dot (always in markup, hidden at 0) */
.hamburger-unread-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 9px;
    height: 9px;
    background: var(--color-primary, #c82128);
    border-radius: 50%;
    border: 2px solid #fff;
}

.hamburger-unread-dot[hidden] { display: none; }

/* Mobile drawer Inbox unread count (right-aligned pill, hidden at 0) */
.inbox-drawer-count {
    margin-left: auto;
    background: var(--color-primary, #c82128);
    color: #fff;
    border-radius: 20px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.inbox-drawer-count[hidden] { display: none; }
