/* ===== EPOKA GLOBAL - LISTING PAGE STYLESHEET ===== */
/* Depends on css/style.css for: CSS variables, navbar, footer, CTA,
   .section-title, .section-subtitle, .btn-primary-honey, .hero-trust-bar,
   .reveal-on-scroll, back-to-top, .page-wrapper */

/* ============================================================
   LISTING HERO / PAGE BANNER SECTION START
   ============================================================ */
.listing-hero-section {
    position: relative;
    min-height: 380px;
    overflow: hidden;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.listing-hero-section .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0.65;
    z-index: 0;
}

.listing-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.4) 55%,
        rgba(0, 0, 0, 0.14) 100%
    );
    z-index: 1;
}

/* Green tint variant — applied via JS for kiwi */
.listing-hero-section.listing-hero--kiwi .listing-hero-overlay {
    background: linear-gradient(
        90deg,
        rgba(15, 45, 20, 0.72) 0%,
        rgba(33, 56, 38, 0.48) 55%,
        rgba(10, 30, 15, 0.18) 100%
    );
}

.listing-hero-container {
    position: relative;
    z-index: 3;
    padding-top: 60px;
    padding-bottom: 80px;
}

.listing-hero-content {
    color: #fff;
    max-width: 680px;
}

.listing-hero-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 10px;
}

.listing-hero-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 14px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.listing-hero-content h1 span {
    color: var(--primary);
}

/* Kiwi span color — applied via JS */
.listing-hero-section.listing-hero--kiwi .listing-hero-content h1 span {
    color: #6fcf97;
}

.listing-hero-content p {
    font-family: var(--font-subheading);
    font-size: 17px;
    opacity: 0.82;
    margin-bottom: 20px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* Breadcrumb */
.listing-breadcrumb {
    background: transparent;
    padding: 0;
}

.listing-breadcrumb .breadcrumb-item a {
    color: var(--primary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
}

.listing-breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--font-body);
    font-size: 13px;
}

.listing-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.45);
}

/* Responsive — listing hero */
@media (max-width: 991px) {
    .listing-hero-section {
        min-height: 320px;
    }

    .listing-hero-content h1 {
        font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    }

    .listing-hero-content p {
        font-size: 15px;
    }
}

@media (max-width: 575px) {
    .listing-hero-section {
        min-height: 280px;
    }

    .listing-hero-container {
        padding-top: 0px;
        padding-bottom: 68px;
    }

    .listing-hero-content h1 {
        font-size: 1.85rem;
        letter-spacing: 0.5px;
    }

    .listing-hero-content p {
        font-size: 14px;
        margin-bottom: 16px;
    }
}

/* ============================================================
   LISTING HERO / PAGE BANNER SECTION END
   ============================================================ */

/* ============================================================
   LISTING MAIN SECTION START
   ============================================================ */
.listing-main-section {
    padding: 48px 0 72px;
    /* background: var(--bg-light); */
    background: white;
}

/* Two-column layout: sidebar left, product grid right */
.listing-layout {
    display: grid;
    grid-template-columns: 272px 1fr;
    gap: 32px;
    align-items: start;
}

/* ============================================================
   LISTING MAIN SECTION END
   ============================================================ */

/* ============================================================
   SIDEBAR FILTERS SECTION START
   ============================================================ */
.listing-sidebar {
    background: var(--white);
    padding: 4px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    position: sticky;
    top: 110px;
    max-height: calc(100vh - 110px);
    align-self: start; /* ✅ yeh add karo — sidebar khud start se chipke */

    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.listing-sidebar {
    scrollbar-width: none; /* Firefox */
}

.listing-sidebar::-webkit-scrollbar {
    width: 0px; /* Chrome/Safari */
}

.listing-sidebar::-webkit-scrollbar {
    width: 4px;
}

.listing-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.listing-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* Mobile-only header row inside sidebar */
.sidebar-mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1.5px solid var(--border);
    background: var(--bg-cream);
}

.sidebar-mobile-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-close-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--text-mid);
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.sidebar-close-btn:hover {
    background: #f0e8d8;
}

/* ===== INDIVIDUAL FILTER BLOCK START ===== */
.filter-block {
    border-bottom: 1.5px solid var(--border);
    padding: 0;
}

.filter-block:last-of-type {
    border-bottom: none;
}

/* Block header — title + optional chevron toggle */
.filter-block-head {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-block-head--toggle {
    cursor: pointer;
    user-select: none;
    transition: background 0.18s;
}

.filter-block-head--toggle:hover {
    background: var(--bg-cream);
}

.filter-block-title {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-dark);
}

.filter-chevron {
    color: var(--text-light);
    font-size: 13px;
    transition: transform 0.25s ease;
}

.filter-block-head--toggle.collapsed .filter-chevron {
    transform: rotate(-90deg);
}

/* Collapsible block body */
.filter-block-body {
    padding: 4px 20px 18px;
    overflow: hidden;
    transition:
        max-height 0.3s ease,
        opacity 0.3s ease;
}

.filter-block-body.is-collapsed {
    max-height: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

/* ===== INDIVIDUAL FILTER BLOCK END ===== */

/* ===== SEARCH INPUT START ===== */
.filter-search-wrap {
    position: relative;
    padding-bottom: 10px;
}

.filter-search-icon {
    position: absolute;
    left: 12px;
    top: 40%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 13px;
    pointer-events: none;
}

.filter-search-input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 25px;
    padding: 9px 14px 9px 34px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-dark);
    background: var(--bg-cream);
    outline: none;
    transition:
        border-color 0.22s,
        box-shadow 0.22s;
}

.filter-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.14);
    background: #fff;
}

.filter-search-input::placeholder {
    color: #bfac88;
}

/* ===== SEARCH INPUT END ===== */

/* ===== RADIO FILTERS START ===== */
.filter-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-mid);
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 8px;
    transition: background 0.18s;
}

.filter-radio-label:hover {
    background: var(--bg-cream);
}

.filter-radio-label input[type="radio"] {
    accent-color: var(--primary);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}

/* ===== RADIO FILTERS END ===== */

/* ===== CHECKBOX FILTERS START ===== */
.filter-check-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-mid);
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 8px;
    transition: background 0.18s;
}

.filter-check-label:hover {
    background: var(--bg-cream);
}

.filter-check-label input[type="checkbox"] {
    accent-color: var(--primary);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}

.filter-check-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    background: var(--bg-cream);
    border-radius: 10px;
    padding: 1px 7px;
}

/* ===== CHECKBOX FILTERS END ===== */

/* ===== PRICE RANGE SLIDER START ===== */
.filter-price-display {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.filter-range {
    position: absolute;
    width: 100%;
    height: 4px;
    background: transparent; /* dono transparent rakho */
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.filter-range::-webkit-slider-thumb {
    pointer-events: all;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    border: 2.5px solid #fff;
    box-shadow: 0 1px 6px rgba(200, 140, 0, 0.35);
    cursor: pointer;
}

.filter-range-track {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
    background: var(--border); /* yahan track color */
    border-radius: 4px;
    height: 4px;
    margin: 8px 0;
}

.filter-range::-webkit-slider-thumb:hover {
    box-shadow: 0 2px 10px rgba(200, 140, 0, 0.55);
}

.filter-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    border: 2.5px solid #fff;
    box-shadow: 0 1px 6px rgba(200, 140, 0, 0.35);
    cursor: pointer;
    pointer-events: all;
}

/* ===== PRICE RANGE SLIDER END ===== */

/* ===== CLEAR FILTERS BUTTON START ===== */
.filter-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 40px);
    margin: 16px 20px 20px;
    padding: 10px 0;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 25px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-mid);
    cursor: pointer;
    transition: all 0.22s;
}

.filter-clear-btn:hover {
    background: #fff2f2;
    border-color: #e55;
    color: #c0392b;
}

/* ===== CLEAR FILTERS BUTTON END ===== */
/* ============================================================
   SIDEBAR FILTERS SECTION END
   ============================================================ */

/* ============================================================
   PRODUCT GRID SECTION START
   ============================================================ */
.listing-content {
    min-width: 0;
    /* prevent overflow in grid */
}

/* ===== TOP BAR START ===== */
.listing-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}

.listing-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Mobile filter open button — hidden on desktop */
.listing-filter-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 25px;
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.22s;
}

.listing-filter-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.listing-result-count {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-light);
}

.listing-result-count strong {
    color: var(--text-dark);
    font-weight: 700;
}

/* View toggle buttons */
.listing-view-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 4px;
}

.view-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 15px;
    cursor: pointer;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
}

.view-btn:hover {
    background: var(--bg-cream);
    color: var(--text-dark);
}

.view-btn--active {
    background: var(--primary) !important;
    color: #fff !important;
}

/* ===== TOP BAR END ===== */

/* ===== ACTIVE FILTER TAGS START ===== */
.listing-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    min-height: 0;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-warm);
    border: 1.2px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
}

.active-filter-tag .tag-remove {
    cursor: pointer;
    color: var(--text-light);
    font-size: 13px;
    line-height: 1;
    padding: 1px;
    border-radius: 50%;
    transition:
        color 0.18s,
        background 0.18s;
}

.active-filter-tag .tag-remove:hover {
    color: #c0392b;
}

/* ===== ACTIVE FILTER TAGS END ===== */

/* ===== PRODUCT GRID START ===== */
.listing-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* List view — single column */
.listing-products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 16px;
}

/* ===== PRODUCT CARD — GRID VIEW START ===== */
.listing-product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease;
    position: relative;
}

.listing-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 32px rgba(200, 140, 0, 0.15);
    border-color: var(--primary);
}

/* Badge — New / Bestseller etc. */
.lp-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    pointer-events: none;
}

.lp-badge--new {
    background: var(--secondary);
    color: #fff;
}

.lp-badge--bestseller {
    background: var(--primary);
    color: var(--text-dark);
}

.lp-badge--sale {
    background: #e74c3c;
    color: #fff;
}

/* Image area */
.lp-img-wrap {
    width: 100%;
    height: 200px;
    background: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.lp-img-wrap img {
    max-height: 150px;
    width: auto;
    object-fit: contain;
    transition: transform 0.32s ease;
}

.listing-product-card:hover .lp-img-wrap img {
    transform: scale(1.08);
}

/* Card body */
.lp-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Type tag above product name */
.lp-type-tag {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 5px;
}

.lp-name {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1.35;
}

/* Weight badge */
.lp-weight {
    font-family: var(--font-subheading);
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* Star rating */
.lp-stars {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 12px;
}

.lp-stars i {
    font-size: 12px;
    color: var(--primary);
}

.lp-stars span {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-light);
    margin-left: 4px;
}

/* Price + cart row */
.lp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 8px;
}

.lp-price {
    font-family: var(--font-subheading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.lp-price-old {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: line-through;
    font-weight: 400;
    display: block;
    line-height: 1;
}

.lp-cart-btn {
    background: var(--secondary);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s;
    white-space: nowrap;
}

.lp-cart-btn:hover {
    background: var(--secondary-hover);
    transform: translateY(-1px);
}

/* ===== PRODUCT CARD — GRID VIEW END ===== */

/* ===== PRODUCT CARD — LIST VIEW START ===== */
.listing-products-grid.list-view .listing-product-card {
    flex-direction: row;
    min-height: 140px;
}

.listing-products-grid.list-view .lp-img-wrap {
    width: 160px;
    height: auto;
    min-height: 140px;
    flex-shrink: 0;
    border-radius: 0;
}

.listing-products-grid.list-view .lp-body {
    flex-direction: row;
    align-items: center;
    padding: 18px 22px;
    flex-wrap: wrap;
    gap: 12px;
}

.listing-products-grid.list-view .lp-info {
    flex: 1;
    min-width: 0;
}

.listing-products-grid.list-view .lp-footer {
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-top: 0;
}

/* ===== PRODUCT CARD — LIST VIEW END ===== */

/* ===== NO RESULTS STATE START ===== */
.listing-no-results {
    text-align: center;
    padding: 64px 24px;
}

.listing-no-results-icon {
    font-size: 48px;
    color: var(--border);
    display: block;
    margin-bottom: 18px;
}

.listing-no-results h4 {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.listing-no-results p {
    font-family: var(--font-subheading);
    font-size: 15px;
    color: var(--text-light);
}

.listing-no-results-reset {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    padding: 0;
    text-decoration: underline;
}

/* ===== NO RESULTS STATE END ===== */

/* ===== PAGINATION START ===== */
.listing-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.page-btn--active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ===== PAGINATION END ===== */
/* ============================================================
   PRODUCT GRID SECTION END
   ============================================================ */

/* ============================================================
   MOBILE SIDEBAR OVERLAY START
   ============================================================ */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.is-open {
    display: block;
    opacity: 1;
}

/* ============================================================
   MOBILE SIDEBAR OVERLAY END
   ============================================================ */

/* ============================================================
   RESPONSIVE — TABLET START (≤ 991px)
   ============================================================ */
@media (max-width: 991px) {
    /* Collapse grid to single column — sidebar becomes drawer */
    .listing-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Sidebar becomes a fixed drawer from the left */
    .listing-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-height: 100vh;
        z-index: 1045;
        border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
        transform: translateX(-100%);
        transition: transform 0.32s ease;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }

    .listing-sidebar.is-open {
        transform: translateX(0);
    }

    /* Show mobile-only header inside sidebar */
    .sidebar-mobile-header {
        display: flex;
    }

    /* Show filter toggle button in topbar */
    .listing-filter-toggle {
        display: flex;
    }

    /* Product grid: 2 columns on tablet */
    .listing-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* List view on tablet */
    .listing-products-grid.list-view .lp-img-wrap {
        width: 130px;
    }
}

/* ============================================================
   RESPONSIVE — TABLET END
   ============================================================ */

/* ============================================================
   RESPONSIVE — MOBILE START (≤ 575px)
   ============================================================ */
@media (max-width: 575px) {
    .listing-main-section {
        padding: 32px 0 52px;
    }

    /* Product grid: 1 column on mobile by default */
    .listing-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    /* Tighter cards on small screens */
    .lp-img-wrap {
        height: 160px;
    }

    .lp-img-wrap img {
        max-height: 120px;
    }

    .lp-body {
        padding: 12px 14px 14px;
    }

    .lp-name {
        font-size: 13px;
    }

    .lp-price {
        font-size: 14px;
    }

    .lp-cart-btn {
        padding: 7px 12px;
        font-size: 11px;
    }

    /* List view on mobile — tighter */
    .listing-products-grid.list-view {
        grid-template-columns: 1fr;
    }

    .listing-products-grid.list-view .lp-img-wrap {
        width: 110px;
        min-height: 120px;
    }

    .listing-products-grid.list-view .lp-body {
        padding: 14px 16px;
        gap: 8px;
    }

    /* Sidebar drawer slightly narrower */
    .listing-sidebar {
        width: 280px;
    }

    /* Topbar wrap */
    .listing-topbar {
        gap: 8px;
    }

    .listing-result-count {
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .listing-products-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE END
   ============================================================ */

/* ===== LISTING PAGE FINAL FIXES ===== */

.listing-main-section {
    background: #fff;
    padding: 42px 0 80px;
}

.listing-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.listing-content {
    min-width: 0;
    width: 100%;
}

.listing-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.front-product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1.5px solid rgba(201, 162, 39, 0.22);
    box-shadow: 0 6px 22px rgba(200, 140, 0, 0.1);
}

.front-product-image-wrap {
    height: 230px;
    background: #fff8e7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.front-product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
}

.front-product-body {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.front-product-title {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.front-product-desc {
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 14px;
    color: #6d6254;
}

.front-product-meta {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.front-product-actions {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.front-product-btn {
    flex: 1;
    justify-content: center;
    min-height: 42px;
}

.front-product-view {
    white-space: nowrap;
}

/* List view fix */
.listing-products-grid.list-view {
    grid-template-columns: 1fr;
}

.listing-products-grid.list-view .front-product-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 220px;
}

.listing-products-grid.list-view .front-product-image-wrap {
    height: 100%;
    min-height: 220px;
}

.listing-products-grid.list-view .front-product-body {
    padding: 22px 24px;
}

/* Laravel Bootstrap pagination fix */
.front-pagination-wrap {
    margin-top: 34px;
    display: flex;
    justify-content: center;
}

.front-pagination-wrap nav {
    width: 100%;
}

.front-pagination-wrap .pagination {
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.front-pagination-wrap .page-item {
    margin: 0;
}

.front-pagination-wrap .page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px !important;
    border: 1.5px solid rgba(201, 162, 39, 0.28);
    color: #3c2c00;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.front-pagination-wrap .page-link:hover {
    background: #fff8e1;
    border-color: #d9a90f;
    color: #3c2c00;
}

.front-pagination-wrap .page-item.active .page-link {
    background: #d9a90f;
    border-color: #d9a90f;
    color: #fff;
}

.front-pagination-wrap .page-item.disabled .page-link {
    opacity: 0.45;
    background: #fff;
    color: #9c9283;
}

/* Important: stop giant SVG arrows */
.front-pagination-wrap svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
}

/* Sidebar better alignment */
.listing-sidebar {
    top: 96px;
    max-height: calc(100vh - 112px);
}

/* Mobile / tablet */
@media (max-width: 1199px) {
    .listing-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .listing-layout {
        grid-template-columns: 1fr;
    }

    .listing-sidebar {
        top: 0;
        max-height: 100vh;
    }
}

@media (max-width: 767px) {
    .listing-products-grid,
    .listing-products-grid.list-view {
        grid-template-columns: 1fr;
    }

    .listing-products-grid.list-view .front-product-card {
        display: flex;
    }

    .front-product-image-wrap {
        height: 220px;
    }

    .front-product-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .front-product-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .front-product-view {
        text-align: center;
    }
}
