/* =========================================================================
   MEMBERS DIRECTORY — pt-dir-*
   ========================================================================= */

/* Override GP .site-content flex that squashes the page into a narrow column */
body.pt-members-page .site-content,
body.pt-members-page .site-content > * {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Page wrapper */
.pt-members-dir-wrapper {
    padding: 48px 0 64px;
    width: 100%;
    box-sizing: border-box;
}

/* Header */
.pt-dir-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.pt-dir-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 4px;
    color: #111;
}

.pt-dir-subtitle {
    font-size: 0.9rem;
    color: #888;
    margin: 0;
}

/* Private notice */
.pt-dir-private-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 24px;
}

/* Search bar */
.pt-dir-controls {
    margin-bottom: 20px;
}

.pt-dir-search-form {
    display: flex;
    gap: 8px;
    max-width: 480px;
    position: relative;
}

.pt-dir-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.pt-dir-search-input:focus {
    border-color: #c00;
}

.pt-dir-search-btn {
    padding: 10px 20px;
    background: #c00;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.pt-dir-search-btn:hover {
    background: #a00;
}

.pt-dir-clear {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: #888;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    white-space: nowrap;
}

.pt-dir-clear:hover { color: #c00; border-color: #c00; }

/* Autocomplete dropdown */
.pt-dir-autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
    list-style: none;
    margin: 0;
    padding: 4px 0;
    z-index: 200;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.pt-dir-autocomplete.is-open {
    display: block;
}

.pt-dir-autocomplete li {
    padding: 9px 14px;
    font-size: 0.875rem;
    color: #333;
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pt-dir-autocomplete li:hover,
.pt-dir-autocomplete li.is-active {
    background: #f5f5f5;
}

.pt-dir-autocomplete li mark {
    background: none;
    color: #c00;
    font-weight: 700;
}

/* Follow button loading state */
.pt-follow-btn.small.loading {
    opacity: 0.6;
    cursor: wait;
    pointer-events: none;
}

/* A-Z filter row */
.pt-dir-az-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 28px;
}

.pt-dir-az-btn {
    display: inline-block;
    min-width: 30px;
    height: 30px;
    line-height: 30px;
    padding: 0 6px;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid #eee;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

.pt-dir-az-btn:hover,
.pt-dir-az-btn.active {
    background: #c00;
    border-color: #c00;
    color: #fff;
}

/* Member grid */
.pt-dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

.pt-dir-card {
    position: relative;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 24px 16px 20px;
    text-align: center;
    background: #fff;
}

.pt-dir-card:hover {
    border-color: #ccc;
}

/* Invisible full-card link overlay */
.pt-dir-card-link {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    z-index: 1;
}

/* Avatar */
.pt-dir-card-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

.pt-dir-card-avatar img,
.pt-dir-card-avatar .avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
    display: block;
}

.pt-dir-trusted-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: #f59e0b;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 900;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Card info */
.pt-dir-card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 14px;
}

.pt-dir-card-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.pt-dir-card-rank {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
}

.pt-dir-rank--trusted {
    background: #fff3cd;
    color: #8a6d00;
    border: 1px solid #ffe082;
}

.pt-dir-rank--member {
    background: #f3f4f6;
    color: #666;
    border: 1px solid #e5e7eb;
}

.pt-dir-card-since {
    font-size: 0.73rem;
    color: #aaa;
}

/* Follow button (inside card — sits above the card-link overlay) */
.pt-dir-card-actions {
    position: relative;
    z-index: 2;
}

.pt-dir-card-actions .pt-follow-btn {
    display: inline-block !important;
    padding: 6px 14px !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    border-radius: 20px !important;
    border: 1px solid #ddd !important;
    background: #fff !important;
    color: #333 !important;
    cursor: pointer;
    margin-left: 0 !important;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.pt-dir-card-actions .pt-follow-btn:hover {
    border-color: #c00 !important;
    color: #c00 !important;
    background: #fff !important;
}

.pt-dir-card-actions .pt-follow-btn.following {
    background: #c00 !important;
    border-color: #c00 !important;
    color: #fff !important;
}

.pt-dir-card-actions .pt-follow-btn.following:hover {
    background: #a00 !important;
    border-color: #a00 !important;
    color: #fff !important;
}

/* No results */
.pt-dir-empty {
    padding: 64px 0;
    text-align: center;
    color: #aaa;
    font-size: 0.95rem;
}

.pt-dir-empty a { color: #c00; }

/* Pagination */
.pt-dir-pagination {
    margin-top: 48px;
    text-align: center;
}

.pt-dir-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin: 0 2px;
    font-size: 0.85rem;
    color: #333;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

.pt-dir-pagination .page-numbers.current,
.pt-dir-pagination .page-numbers:hover {
    border-color: #c00;
    color: #c00;
}

.pt-dir-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}


/* =========================================================================
   HOMEPAGE MEMBERS HERO — pt-mh-*
   ========================================================================= */

.pt-members-hero {
    background: #f8f8f8;
    padding: 56px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    overflow: hidden;
}

.pt-mh-head {
    text-align: center;
    margin-bottom: 40px;
}

.pt-mh-headline {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: #111;
}

.pt-mh-count {
    color: #c00;
}

.pt-mh-tagline {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

/* Carousel header row — label left, "View all members" right */
.pt-mh-carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 28px 0 12px;
}

.pt-mh-carousel-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
}

.pt-mh-view-all {
    font-size: 0.8rem;
    color: #888;
    text-decoration: none;
    transition: color 0.15s;
}

.pt-mh-view-all:hover {
    color: #c00;
}

/* CTA row below carousel */
.pt-mh-cta-row {
    text-align: center;
    margin-top: 28px;
}

.pt-btn-red-pill {
    display: inline-block;
    padding: 10px 24px;
    background: #c00;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 0;
    text-decoration: none;
    transition: background 0.2s;
}

.pt-btn-red-pill:hover {
    background: #a00;
    color: #fff;
}

/* Carousel */
.pt-mh-carousel-wrap {
    overflow: hidden;
    position: relative;
}

.pt-mh-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.pt-mh-carousel::-webkit-scrollbar {
    display: none;
}

.pt-mh-item {
    flex: 0 0 auto;
    width: 130px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
    transition: opacity 0.15s;
}

.pt-mh-item:hover {
    opacity: 0.8;
}

.pt-mh-avatar img,
.pt-mh-avatar .avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 2px solid #eee;
    object-fit: cover;
    display: block;
    margin: 0 auto 10px;
}

.pt-mh-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}


/* =========================================================================
   LISTING CARD EMBED — pt-lce-* (inline in forum posts)
   ========================================================================= */

.pt-listing-card-embed {
    display: flex;
    gap: 16px;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    background: #fff;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: border-color 0.2s;
    max-width: 480px;
}

.pt-listing-card-embed:hover {
    border-color: #ccc;
}

.pt-lce-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

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

.pt-lce-body {
    flex: 1;
    min-width: 0;
}

.pt-lce-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pt-lce-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pt-lce-price {
    font-size: 1rem;
    font-weight: 800;
    color: #c00;
}

.pt-lce-location {
    font-size: 0.78rem;
    color: #999;
}

.pt-lce-badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 10px;
}

.pt-lce-badge--store {
    background: #e8f4fd;
    color: #1565c0;
}

.pt-lce-badge--listing {
    background: #fde8e8;
    color: #c00;
}

/* Sold ribbon */
.pt-lce-sold-ribbon {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #111;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
}


/* =========================================================================
   LINK MY LISTING MODAL — pt-llm-*
   ========================================================================= */

.pt-llm-box {
    max-width: 560px;
    width: 92vw;
}

.pt-llm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px 2px;
}

.pt-llm-card {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.15s;
    background: #fff;
}

.pt-llm-card:hover {
    border-color: #c00;
}

.pt-llm-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
    display: block;
}

.pt-llm-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pt-llm-card-price {
    font-size: 0.88rem;
    font-weight: 800;
    color: #c00;
}

.pt-llm-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #aaa;
    padding: 32px 0;
    font-size: 0.9rem;
}

/* Search results badge labels (in product selector) */
.pt-sr-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 8px;
}

.pt-sr-badge--store {
    background: #e8f4fd;
    color: #1565c0;
}

.pt-sr-badge--listing {
    background: #fde8e8;
    color: #c00;
}

.pt-sr-badge--sold {
    background: #f3f4f6;
    color: #555;
    text-decoration: line-through;
}

.pt-sr-sold {
    display: inline-block;
    background: #111;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

.pt-sr-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pt-sr-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #111;
}

.pt-sr-meta {
    font-size: 0.78rem;
    color: #888;
}


/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 768px) {
    .pt-dir-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .pt-mh-headline {
        font-size: 1.5rem;
    }

    .pt-dir-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .pt-dir-search-form {
        min-width: unset;
    }

    .pt-llm-grid {
        grid-template-columns: 1fr;
    }
}
