/*----------------------------------------
    Vendor Directory (/directory-listing)
        - Header hero band (breadcrumb + title + count)
        - Map card
        - Left sidebar (search + category filter)
        - Vendor card grid
    Layout matches the sibling /category page.
-----------------------------------------*/

/* ---------- Header hero ---------- */

.q2u-vdir-header {
    position: relative;
    overflow: hidden;
    padding: 4.5rem 0 4rem;
    background-color: #faf7f0;
    font-family: Poppins, sans-serif;
}

.q2u-vdir-header__glow {
    position: absolute;
    top: -220px;
    right: -140px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background-color: #f4eedd;
    opacity: 0.75;
    pointer-events: none;
}

.q2u-vdir-header .container {
    position: relative;
}

.q2u-vdir-header .breadcrumb {
    margin-bottom: 1.4rem;
}

.q2u-vdir-header__title {
    margin: 0 0 1rem;
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.25px;
    color: #333;
}

.q2u-vdir-header__text {
    max-width: 560px;
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.7;
    color: #666;
    text-wrap: pretty;
}

.q2u-vdir-header__count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.8rem;
    padding: 0.6rem 1.5rem;
    border-radius: 999px;
    background-color: #fff;
    border: 1px solid #ecdfb4;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--q2u-primary-dark, #c09c35);
}

.q2u-vdir-header__count::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--q2u-primary, #cfad3c);
}

/* ---------- Body ---------- */

.q2u-vdir {
    padding: 4rem 0 6rem;
    background-color: #fff;
    font-family: Poppins, sans-serif;
}

/* ---------- Map ---------- */

.q2u-vdir-map {
    overflow: hidden;
    margin-bottom: 3.5rem;
    border: 1px solid #eee;
    border-radius: 1rem;
    box-shadow: 0 16px 40px rgba(51, 51, 51, 0.08);
}

.q2u-vdir-map #map {
    display: block;
    width: 100%;
    height: 460px;
}

/* Let the marker popup grow to its natural height instead of scrolling
   inside a tiny box (Google caps it to the map viewport otherwise). */
.q2u-vdir-map .gm-style-iw-c {
    max-height: none !important;
}

.q2u-vdir-map .gm-style-iw-d {
    max-height: none !important;
    overflow: visible !important;
}

/* Google InfoWindow (marker popup) */

.q2u-vdir-iw {
    width: 244px;
    padding: 2px 2px 8px;
    font-family: Poppins, Arial, sans-serif;
    color: #333;
}

.q2u-vdir-iw__head {
    display: flex;
    align-items: center;
    gap: 11px;
}

.q2u-vdir-iw__logo {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #f4eedd;
    box-shadow: 0 2px 10px rgba(51, 51, 51, 0.16);
}

.q2u-vdir-iw__logo--initial {
    background-image: linear-gradient(135deg, #f7f0dd, #e7d29c);
    font-size: 18px;
    font-weight: 800;
    color: var(--q2u-primary-dark, #c09c35);
}

.q2u-vdir-iw__title {
    min-width: 0;
}

.q2u-vdir-iw__name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: #333;
}

.q2u-vdir-iw__cat {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--q2u-primary-dark, #c09c35);
}

.q2u-vdir-iw__crypto {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding: 3px 9px;
    border-radius: 999px;
    background-color: #fff6e3;
    border: 1px solid #f4e2b8;
    font-size: 11.5px;
    font-weight: 600;
    color: #9a6a12;
}

.q2u-vdir-iw__meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 11px 0 0;
    padding: 11px 0 0;
    border-top: 1px solid #ececec;
    list-style: none;
}

.q2u-vdir-iw__meta li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #555;
}

.q2u-vdir-iw__meta li svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--q2u-primary-dark, #c09c35);
}

.q2u-vdir-iw__meta li a {
    color: #1a73e8;
    text-decoration: none;
    word-break: break-word;
}

.q2u-vdir-iw__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 12px 0 6px;
    padding: 8px 16px;
    border-radius: 8px;
    background-color: var(--q2u-primary, #cfad3c);
    font-size: 12.5px;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none;
    transition: background-color 0.2s;
}

.q2u-vdir-iw__btn:hover {
    background-color: var(--q2u-primary-active, #ba992e);
}

/* ---------- Sidebar ---------- */

.q2u-vdir-search .form-control {
    height: 46px;
    padding-left: 18px;
    border-radius: 999px;
}

.q2u-vdir-search .form-control:focus {
    border-color: var(--q2u-primary, #cfad3c);
    box-shadow: 0 0 0 3px rgba(207, 173, 60, 0.15);
}

.q2u-vdir-search .btn-search {
    color: var(--q2u-primary-dark, #c09c35);
}

.q2u-vdir-filter {
    padding: 1.8rem 2rem 2rem;
    border: 1px solid #eee;
    border-radius: 0.8rem;
    background-color: #fff;
}

.q2u-vdir-filter .widget-title {
    margin-bottom: 1rem;
    font-family: Poppins, sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
}

.q2u-vdir-filter .filter-items li a {
    font-size: 1.4rem;
    transition: color 0.2s;
}

.q2u-vdir-filter .filter-items li a:hover,
.q2u-vdir-filter .filter-items li.active > a {
    color: var(--q2u-primary-dark, #c09c35);
    font-weight: 600;
}

.q2u-vdir-filter .filter-actions {
    margin-top: 1.6rem;
}

.q2u-vdir-filter .filter-actions .btn {
    border-radius: 999px;
}

/* ---------- Grid ---------- */

.q2u-vdir__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

/* ---------- Vendor card ---------- */

.q2u-vdir-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #eee;
    border-radius: 1rem;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.q2u-vdir-card:hover {
    transform: translateY(-4px);
    border-color: #e3d9bb;
    box-shadow: 0 20px 44px rgba(51, 51, 51, 0.13);
}

.q2u-vdir-card__banner {
    position: relative;
    height: 132px;
    overflow: hidden;
    background-color: #40475e;
}

.q2u-vdir-card__banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.q2u-vdir-card__banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to bottom, transparent 42%, rgba(0, 0, 0, 0.3));
}

/* Branded fallback when a vendor has no banner image */
.q2u-vdir-card__banner--empty {
    background-color: #c09c35;
    background-image: linear-gradient(135deg, #dcc063 0%, #c09c35 44%, #6d5b2c 100%);
}

.q2u-vdir-card__banner--empty::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 16%, rgba(255, 255, 255, 0.4), transparent 46%);
}

.q2u-vdir-card__banner--empty::after {
    background-image: none;
}

.q2u-vdir-card__tag {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    max-width: calc(100% - 24px);
    padding: 5px 12px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.94);
    font-size: 1.15rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.q2u-vdir-card__body {
    position: relative;
    flex: 1 1 auto;
    padding: 0 22px 20px;
}

.q2u-vdir-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: -36px 0 12px;
    padding: 0;
    overflow: hidden;
    border: 4px solid #fff;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 6px 18px rgba(51, 51, 51, 0.16);
}

.q2u-vdir-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.q2u-vdir-card__logo--initial {
    background-image: linear-gradient(135deg, #f7f0dd, #e7d29c);
}

.q2u-vdir-card__logo--initial span {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--q2u-primary-dark, #c09c35);
}

.q2u-vdir-card__name {
    margin: 0 0 3px;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    color: #333;
    text-wrap: pretty;
}

.q2u-vdir-card__name a {
    color: inherit;
}

.q2u-vdir-card__name a:hover {
    color: var(--q2u-primary-dark, #c09c35);
}

.q2u-vdir-card__cat {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--q2u-primary-dark, #c09c35);
}

.q2u-vdir-card__meta {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.q2u-vdir-card__meta li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 1.3rem;
    line-height: 1.5;
    color: #666;
}

.q2u-vdir-card__meta li i,
.q2u-vdir-card__meta li svg {
    flex-shrink: 0;
    margin-top: 3px;
    width: 14px;
    font-size: 1.3rem;
    color: var(--q2u-primary-dark, #c09c35);
}

.q2u-vdir-card__meta li a {
    color: inherit;
    word-break: break-word;
}

.q2u-vdir-card__meta li a:hover {
    color: var(--q2u-primary-dark, #c09c35);
}

.q2u-vdir-card__crypto {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    background-color: #fff6e3;
    border: 1px solid #f4e2b8;
    font-size: 1.2rem;
    font-weight: 600;
    color: #9a6a12;
}

.q2u-vdir-card__foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    padding: 13px 22px;
    border-top: 1px solid #eee;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--q2u-primary-dark, #c09c35);
    transition: background-color 0.25s, color 0.25s;
}

.q2u-vdir-card__foot svg {
    flex-shrink: 0;
    stroke: currentColor;
    transition: transform 0.3s;
}

.q2u-vdir-card:hover .q2u-vdir-card__foot {
    background-color: #faf7f0;
}

.q2u-vdir-card:hover .q2u-vdir-card__foot svg {
    transform: translateX(4px);
}

/* ---------- Empty state ---------- */

.q2u-vdir-empty {
    grid-column: 1 / -1;
    padding: 5rem 2rem;
    text-align: center;
    border: 1px dashed #e0e0e0;
    border-radius: 1rem;
    background-color: #fcfcfc;
}

.q2u-vdir-empty__title {
    margin: 0 0 0.6rem;
    font-size: 1.9rem;
    font-weight: 700;
    color: #333;
}

.q2u-vdir-empty__text {
    margin: 0;
    font-size: 1.4rem;
    color: #777;
}

.q2u-vdir__pagination {
    margin-top: 3.5rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
    .q2u-vdir-header {
        padding: 3.4rem 0 3rem;
    }

    .q2u-vdir-header__title {
        font-size: 3rem;
    }

    .q2u-vdir {
        padding: 3rem 0 4.5rem;
    }

    .q2u-vdir-map #map {
        height: 440px;
    }

    .q2u-vdir__grid {
        gap: 18px;
    }
}

@media (max-width: 767px) {
    .q2u-vdir-header__title {
        font-size: 2.6rem;
    }

    .q2u-vdir-header__text {
        font-size: 1.5rem;
    }

    .q2u-vdir-map #map {
        height: 430px;
    }

    .q2u-vdir__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    /* Compact the popup so all its rows fit without an inner scrollbar */
    .q2u-vdir-iw {
        width: 230px;
    }

    .q2u-vdir-iw__head {
        gap: 9px;
    }

    .q2u-vdir-iw__logo {
        width: 40px;
        height: 40px;
    }

    .q2u-vdir-iw__crypto {
        margin-top: 8px;
    }

    .q2u-vdir-iw__meta {
        gap: 6px;
        margin-top: 9px;
        padding-top: 9px;
    }

    .q2u-vdir-iw__btn {
        margin: 10px 0 6px;
        padding: 7px 16px;
    }
}
