/* ================= VERIFIED DASHBOARD ================= */

.flip-wrap{
    display:block;
    width:100%;
    border:1px solid #e5e7eb;
    border-radius:16px;
    padding:24px;
    background:#fff;
    margin:20px 0;
}

.flip-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.flip-title-big{
    font-size:20px;
    font-weight:700;
}

.flip-rank-badge{
    background:linear-gradient(135deg,#16a34a,#22c55e);
    color:#fff;
    padding:6px 12px;
    border-radius:999px;
    font-size:13px;
}

.flip-kpi-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
    margin-bottom:20px;
}

.flip-kpi-box{
    background:#f9fafb;
    border-radius:12px;
    padding:16px;
    text-align:center;
}

.flip-kpi-value{
    font-size:26px;
    font-weight:700;
}

.flip-kpi-label{
    font-size:12px;
    color:#6b7280;
}

.flip-trend-up{
    color:#16a34a;
}

.flip-trend-down{
    color:#dc2626;
}

.flip-section{
    display:block;
    width:100%;
    clear:both;
    margin-top:20px;
    margin-bottom:28px;
}

.flip-bar{
    height:8px;
    background:#e5e7eb;
    border-radius:6px;
    overflow:hidden;
}

.flip-bar-fill{
    height:100%;
    background:#3b82f6;
}

.flip-row{
    margin-bottom:10px;
}

.flip-keyword{
    display:flex;
    justify-content:space-between;
    font-size:14px;
    gap:14px;
    flex-wrap:wrap;
}

.flip-top-keyword{
    color:#16a34a;
    font-weight:600;
}



/* ================= LISTINGS GRID ================= */

.flip-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
    gap:28px;
}

.flip-card-listing{
    border-radius:18px;
    padding:20px;
    background:#ffffff;
    border:1px solid #e5e7eb;
    box-shadow:0 6px 20px rgba(0,0,0,0.06);
    transition:0.3s ease;
    position:relative;
}

.flip-card-listing:hover{
    transform:translateY(-6px);
    box-shadow:0 14px 35px rgba(0,0,0,0.12);
}

.flip-listing-image{
    width:100%;
    margin:0 0 16px;
    border-radius:12px;
    overflow:hidden;
    background:#f9fafb;
}

.flip-listing-image a{
    display:block;
    line-height:0;
}

.flip-listing-thumbnail{
    display:block;
    width:100%;
    height:180px;
    object-fit:contain;
    background:#f9fafb;
}

.flip-rank{
    position:absolute;
    top:-12px;
    left:-12px;
    padding:8px 14px;
    border-radius:999px;
    color:#fff;
    font-size:13px;
    font-weight:700;
}

.flip-rank.top-1{
    background:linear-gradient(135deg,#facc15,#eab308);
}

.flip-rank.top-2{
    background:linear-gradient(135deg,#9ca3af,#6b7280);
}

.flip-rank.top-3{
    background:linear-gradient(135deg,#fb923c,#ea580c);
}


/* ================= TOP 3 DYNAMIC COMPARISON ================= */

.flip-top3-comparison{
    margin:34px 0;
    padding:24px;
    border:1px solid #e5e7eb;
    border-radius:18px;
    background:#ffffff;
    box-shadow:0 8px 28px rgba(0,0,0,0.06);
}

.flip-top3-comparison-header h3{
    margin:0 0 6px;
}

.flip-top3-comparison-header .flip-sub{
    margin:0;
    line-height:1.55;
}

.flip-top3-table-wrap{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    margin-top:18px;
}

.flip-top3-table{
    width:100%;
    min-width:620px;
    border-collapse:collapse;
}

.flip-top3-table th,
.flip-top3-table td{
    padding:11px 12px;
    border-bottom:1px solid #e5e7eb;
    text-align:left;
    vertical-align:middle;
}

.flip-top3-table thead th{
    font-size:14px;
    background:#f8fafc;
}

.flip-top3-table thead th:not(:first-child){
    min-width:150px;
}

.flip-top3-table tbody th{
    width:180px;
    font-weight:600;
    white-space:nowrap;
}

.flip-top3-highlight th,
.flip-top3-highlight td{
    background:#f8fafc;
}

.flip-top3-highlight td{
    font-size:18px;
}

.flip-top3-table a{
    text-decoration:none;
}

@media(max-width:767px){
    .flip-top3-comparison{
        margin:26px 0;
        padding:18px 14px;
        border-radius:16px;
    }

    .flip-top3-table{
        min-width:570px;
    }

    .flip-top3-table th,
    .flip-top3-table td{
        padding:10px 9px;
        font-size:13px;
    }

    .flip-top3-table tbody th{
        width:155px;
    }

    .flip-top3-highlight td{
        font-size:16px;
    }

    .flip-top3-table-wrap:after{
        content:'Swipe horizontally to compare all 3 →';
        display:block;
        margin-top:8px;
        font-size:12px;
        opacity:.65;
    }
}

.flip-users{
    font-size:30px;
    font-weight:700;
    margin-top:10px;
}

.flip-sub{
    font-size:13px;
    color:#6b7280;
}

.flip-trending{
    font-size:11px;
    background:#ecfdf5;
    color:#16a34a;
    padding:5px 10px;
    border-radius:8px;
    display:inline-block;
    margin-top:6px;
}


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

@media (max-width: 768px){

    .flip-kpi-grid{
        grid-template-columns:1fr;
    }

    .flip-header{
        flex-direction:column;
        align-items:flex-start;
        gap:10px;
    }

}
/* ================= AI ANALYTICS INSIGHTS ================= */
.flip-ai-insights { margin-top: 20px; }
.flip-ai-insights .flip-ai-block { margin: 12px 0; }
.flip-ai-insights .flip-ai-block strong { display: block; margin-bottom: 6px; }
.flip-ai-insights ul, .flip-ai-insights ol { margin: 6px 0 0 20px; }
.flip-ai-insights li { margin: 5px 0; }
.flip-ai-insights .flip-ai-status { margin-left: 8px; }


/* ================= AI HISTORICAL DATA / MOBILE ================= */
.flip-ai-history-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.flip-ai-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.flip-ai-history-table th,
.flip-ai-history-table td {
    padding: 8px 7px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.flip-ai-history-table th {
    text-align: center;
    font-weight: 600;
}

.flip-ai-history-table th:first-child,
.flip-ai-history-table td:first-child {
    text-align: left;
}

@media (max-width: 768px) {
    .flip-ai-insights {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .flip-ai-insights .flip-sub {
        line-height: 1.55;
        overflow-wrap: anywhere;
    }

    .flip-ai-insights .flip-ai-block {
        margin: 18px 0;
    }

    .flip-ai-history-wrap {
        overflow: visible;
    }

    .flip-ai-history-table,
    .flip-ai-history-table tbody {
        display: block;
        width: 100%;
    }

    .flip-ai-history-table thead {
        display: none;
    }

    .flip-ai-history-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 12px;
        margin: 0 0 12px;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        background: #fff;
        box-sizing: border-box;
    }

    .flip-ai-history-table td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        min-width: 0;
        padding: 8px 9px;
        border: 1px solid #eef0f2;
        border-radius: 8px;
        white-space: normal;
        text-align: left !important;
        font-size: 15px;
        line-height: 1.25;
        box-sizing: border-box;
    }

    .flip-ai-history-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        font-size: 11px;
        line-height: 1.2;
        font-weight: 600;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: .02em;
    }

    .flip-ai-history-table td.flip-ai-history-period {
        grid-column: 1 / -1;
        background: #f8fafc;
        font-size: 17px;
        font-weight: 700;
    }

    .flip-ai-history-table td.flip-ai-history-period::before {
        display: none;
    }

    .flip-ai-insights .flip-ai-generate {
        width: 100%;
        min-height: 44px;
        margin-top: 6px;
    }

    .flip-ai-insights .flip-ai-status {
        display: block;
        margin: 8px 0 0;
        line-height: 1.45;
        overflow-wrap: anywhere;
    }
}


/* ================= AI MONETIZATION INSIGHTS ================= */

.flip-ai-report{
    width:100%;
    box-sizing:border-box;
}

.flip-ai-block{
    margin:0 0 20px;
    padding:18px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#fff;
}

.flip-ai-block > strong{
    display:block;
    margin-bottom:8px;
    font-size:16px;
}

.flip-ai-highlight{
    background:#f8fafc;
}

.flip-ai-opportunity-list li{
    margin-bottom:14px;
}

.flip-ai-fit{
    display:inline-block;
    margin-left:8px;
    padding:3px 8px;
    border-radius:999px;
    background:#eef2ff;
    font-size:11px;
    font-weight:600;
}

.flip-ai-history-wrap{
    width:100%;
    overflow-x:auto;
}

.flip-ai-history-table{
    width:100%;
    border-collapse:collapse;
    min-width:650px;
}

.flip-ai-history-table th,
.flip-ai-history-table td{
    border-bottom:1px solid #e5e7eb;
    padding:8px;
    vertical-align:top;
}

.flip-ai-monetization .button,
.flip-ai-portfolio .button{
    margin-top:4px;
}

.flip-portfolio-classification-admin{margin:0 0 14px;display:flex;align-items:center;gap:10px}.flip-portfolio-classify-status{opacity:.75;font-size:.9em}

/* ================= PORTFOLIO RANKING SCORE BREAKDOWN ================= */
.flip-ranking-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.flip-ranking-table{width:100%;min-width:1180px;border-collapse:collapse;table-layout:auto}
.flip-ranking-table th,.flip-ranking-table td{padding:10px 9px;border-bottom:1px solid rgba(0,0,0,.12);text-align:left;vertical-align:top}
.flip-ranking-table th{white-space:nowrap;font-size:.82em;line-height:1.25}
.flip-ranking-table td{white-space:nowrap}
.flip-ranking-table th:first-child,.flip-ranking-table td:first-child{width:44px}
.flip-ranking-table th:nth-child(2),.flip-ranking-table td:nth-child(2){min-width:145px}
.flip-ranking-table th:nth-child(3),.flip-ranking-table td:nth-child(3){min-width:82px}
.flip-ranking-table th:nth-child(4),.flip-ranking-table td:nth-child(4){min-width:92px}
.flip-ranking-table th:nth-child(5),.flip-ranking-table td:nth-child(5){min-width:82px}
.flip-ranking-table th:nth-child(6),.flip-ranking-table td:nth-child(6){min-width:78px}
.flip-ranking-table th:nth-child(7),.flip-ranking-table td:nth-child(7){min-width:86px}
.flip-ranking-table th:nth-child(8),.flip-ranking-table td:nth-child(8){min-width:88px}
.flip-ranking-table th:nth-child(9),.flip-ranking-table td:nth-child(9){min-width:92px}
.flip-ranking-table th:nth-child(10),.flip-ranking-table td:nth-child(10){min-width:86px}
.flip-ranking-table th:nth-child(11),.flip-ranking-table td:nth-child(11){min-width:92px}
.flip-ranking-table th:nth-child(12),.flip-ranking-table td:nth-child(12){min-width:86px}
.flip-ranking-table th:nth-child(13),.flip-ranking-table td:nth-child(13){min-width:82px}
.flip-ranking-table th:nth-child(14),.flip-ranking-table td:nth-child(14){min-width:82px}
.flip-ranking-table th:nth-child(15),.flip-ranking-table td:nth-child(15){min-width:210px}
@media(min-width:768px){.flip-ranking-table-wrap:before{content:'Scroll horizontally to view all ranking metrics →';display:block;font-size:12px;opacity:.65;margin:0 0 7px}}
.flip-ranking-breakdown summary{cursor:pointer;font-weight:600}
.flip-ranking-breakdown-grid{display:grid;grid-template-columns:minmax(150px,1.5fr) minmax(70px,.7fr) minmax(70px,.7fr) minmax(120px,1fr);gap:7px 12px;margin-top:12px;align-items:center}
.flip-ranking-factor{display:contents}
.flip-ranking-factor-label{font-size:13px}
.flip-ranking-factor-score{font-size:13px;font-weight:600}
.flip-ranking-factor-weight{font-size:11px;opacity:.7}
.flip-ranking-factor-bar{display:block;height:6px;background:#e5e7eb;border-radius:999px;overflow:hidden}
.flip-ranking-factor-bar span{display:block;height:100%;background:#3b82f6;border-radius:999px}
.flip-ranking-availability{margin:12px 0 0}
@media(max-width:767px){
 .flip-ranking-table{display:block;width:100%}
 .flip-ranking-table thead{display:none}
 .flip-ranking-table tbody,.flip-ranking-table tr,.flip-ranking-table td{display:block;width:100%;box-sizing:border-box}
 .flip-ranking-table tr{padding:14px 0;border-bottom:1px solid rgba(0,0,0,.12)}
 .flip-ranking-table td{border:0;padding:6px 0}
 .flip-ranking-table td:before{content:attr(data-label);display:block;font-size:.76em;font-weight:700;text-transform:uppercase;opacity:.65;margin-bottom:3px}
 .flip-ranking-breakdown-grid{grid-template-columns:minmax(0,1fr) auto;gap:8px 10px}
 .flip-ranking-factor-weight{grid-column:1 / 2;font-size:11px}
 .flip-ranking-factor-bar{grid-column:1 / -1}
 .flip-ranking-factor-score{grid-column:2}
}


/* ================= UNIFIED PORTFOLIO ANALYTICS OVERVIEW ================= */

.flip-analytics-overview{
    width:100%;
    max-width:100%;
    box-sizing:border-box;
    margin:0 auto;
    color:#111827;
}

.flip-analytics-hero{
    margin:0 0 24px;
    padding:28px 30px;
    border:1px solid #e5e7eb;
    border-radius:18px;
    background:linear-gradient(135deg,#f8fafc,#ffffff);
    box-sizing:border-box;
}

.flip-analytics-hero h2{
    margin:4px 0 10px;
    font-size:clamp(28px,4vw,40px);
    line-height:1.15;
}

.flip-analytics-hero p{
    max-width:820px;
    margin:0;
    color:#4b5563;
    line-height:1.65;
}

.flip-analytics-eyebrow{
    font-size:11px;
    line-height:1.2;
    font-weight:700;
    letter-spacing:.09em;
    text-transform:uppercase;
    color:#6b7280;
}

.flip-analytics-toc{
    margin:0 0 34px;
    padding:18px 20px;
    border:1px solid #e5e7eb;
    border-radius:14px;
    background:#fff;
    box-sizing:border-box;
}

.flip-analytics-toc > strong{
    display:block;
    margin-bottom:10px;
    font-size:14px;
}

.flip-analytics-toc-links{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.flip-analytics-toc-links a{
    display:inline-block;
    padding:7px 11px;
    border:1px solid #e5e7eb;
    border-radius:999px;
    text-decoration:none;
    font-size:13px;
    line-height:1.3;
}

.flip-analytics-section{
    width:100%;
    margin:0 0 42px;
    padding:0 0 34px;
    border-bottom:1px solid #e5e7eb;
    box-sizing:border-box;
    scroll-margin-top:30px;
}

.flip-analytics-section:last-child{
    border-bottom:0;
    margin-bottom:0;
}

.flip-analytics-section-heading{
    margin:0 0 18px;
}

.flip-analytics-section-heading h2{
    margin:4px 0 7px;
    font-size:clamp(23px,3vw,31px);
    line-height:1.2;
}

.flip-analytics-section-heading p{
    margin:0;
    color:#6b7280;
    line-height:1.55;
    max-width:850px;
}

.flip-analytics-section-body{
    width:100%;
    min-width:0;
    box-sizing:border-box;
}

.flip-analytics-section-body > :first-child{
    margin-top:0;
}

.flip-analytics-section-body > :last-child{
    margin-bottom:0;
}

@media(max-width:767px){
    .flip-analytics-hero{
        padding:22px 18px;
        border-radius:14px;
    }

    .flip-analytics-toc{
        padding:15px;
        border-radius:12px;
    }

    .flip-analytics-toc-links{
        display:grid;
        grid-template-columns:1fr;
    }

    .flip-analytics-toc-links a{
        width:100%;
        box-sizing:border-box;
    }

    .flip-analytics-section{
        margin-bottom:34px;
        padding-bottom:28px;
    }

    .flip-analytics-section-heading h2{
        font-size:24px;
    }
}


/* ================= AI RANK MOVEMENT ================= */
.flip-card-rank-movement{display:flex;align-items:center;gap:6px;margin:7px 0 2px;font-size:11px;color:#6b7280;}
.flip-rank-movement{display:inline-flex;align-items:center;justify-content:center;min-width:28px;padding:3px 7px;border-radius:999px;font-size:12px;font-weight:700;line-height:1.1;}
.flip-rank-up{background:#ecfdf5;color:#15803d;}
.flip-rank-down{background:#fef2f2;color:#b91c1c;}
.flip-rank-same,.flip-rank-none{background:#f3f4f6;color:#6b7280;}
.flip-rank-new{background:#eff6ff;color:#2563eb;}
.flip-top3-table .flip-rank-movement{vertical-align:middle;}

/* ================= ACCOUNT WATCHLIST ================= */

.flip-watchlist-button{
    display:inline-flex;
    align-items:center;
    gap:7px;
    margin:10px 0;
    padding:7px 11px;
    border:1px solid #d1d5db;
    border-radius:999px;
    background:#fff;
    cursor:pointer;
    font:inherit;
    font-size:13px;
    line-height:1.2;
    text-decoration:none;
}

.flip-watchlist-button.is-watched{
    background:#fef2f2;
    border-color:#fecaca;
}

.flip-watchlist-icon{
    font-size:17px;
    line-height:1;
}

.flip-watchlist-page{
    margin:20px 0;
}

.flip-watchlist-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:18px;
}

.flip-watchlist-heading h2{
    margin:0;
}

.flip-watchlist-count{
    font-size:13px;
    opacity:.7;
}

.flip-watchlist-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:18px;
}

.flip-watchlist-card{
    border:1px solid #e5e7eb;
    border-radius:14px;
    padding:15px;
    background:#fff;
}

.flip-watchlist-thumb{
    display:block;
    margin:-15px -15px 12px;
}

.flip-watchlist-thumb img{
    display:block;
    width:100%;
    height:auto;
    border-radius:14px 14px 0 0;
}

.flip-watchlist-card h3{
    margin:0 0 10px;
}

.flip-watchlist-card h3 a{
    text-decoration:none;
}

.flip-watchlist-card-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:8px;
}

.flip-watchlist-view{
    text-decoration:none;
    font-size:13px;
}

.flip-watchlist-card .flip-watchlist-button{
    margin:0;
}

.flip-watchlist-empty{
    text-align:center;
    padding:45px 20px;
    border:1px dashed #d1d5db;
    border-radius:16px;
}

.flip-watchlist-empty-icon{
    font-size:38px;
    margin-bottom:8px;
}

.flip-watchlist-empty h3{
    margin:0 0 5px;
}

.flip-watchlist-empty p{
    margin:0;
    opacity:.7;
}

.flip-watchlist-auth-actions{
    display:flex;
    justify-content:center;
    gap:10px;
    flex-wrap:wrap;
    margin-top:18px;
}

.flip-watchlist-auth-primary,
.flip-watchlist-auth-secondary{
    display:inline-block;
    padding:9px 16px;
    border-radius:8px;
    text-decoration:none;
    font-size:14px;
}

.flip-watchlist-auth-primary{
    background:#111827;
    color:#fff;
}

.flip-watchlist-auth-secondary{
    border:1px solid #d1d5db;
    color:inherit;
    background:#fff;
}

@media(max-width:767px){
    .flip-watchlist-grid{
        grid-template-columns:1fr;
    }

    .flip-watchlist-heading{
        align-items:flex-start;
        flex-direction:column;
    }
}


/* ================= WATCHLIST UI REFINEMENT v2.14.13 ================= */

/* Keep listing controls together instead of allowing the watch button and
   growth badge to compete with the listing title/content. */
.flip-listing-controls{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    flex-wrap:wrap;
    gap:8px;
    margin:12px 0 14px;
    min-height:34px;
}

.flip-listing-controls .flip-watchlist-button{
    margin:0;
}

/* More polished marketplace-style watch button. */
.flip-watchlist-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:34px;
    padding:7px 13px;
    border:1px solid #d9dee7;
    border-radius:999px;
    background:#fff;
    color:#334155;
    box-shadow:0 1px 2px rgba(15,23,42,.04);
    text-decoration:none;
    font-size:12px;
    font-weight:600;
    letter-spacing:.01em;
    line-height:1;
    transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}

.flip-watchlist-button:hover{
    transform:translateY(-1px);
    border-color:#c4ccd8;
    box-shadow:0 4px 12px rgba(15,23,42,.10);
    text-decoration:none;
}

.flip-watchlist-button:focus-visible{
    outline:3px solid rgba(59,130,246,.22);
    outline-offset:2px;
}

.flip-watchlist-button.is-watched{
    background:#fff5f6;
    border-color:#f3b7bf;
    color:#c94b5c;
    box-shadow:0 2px 8px rgba(201,75,92,.08);
}

.flip-watchlist-button.is-watched:hover{
    background:#fff0f2;
    border-color:#e99da8;
}

.flip-watchlist-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:17px;
    height:17px;
    font-size:17px;
    line-height:1;
}

.flip-watchlist-label{
    white-space:nowrap;
}

/* Make the growth badge quieter and visually aligned with the watch button. */
.flip-trending-inline{
    display:inline-flex;
    align-items:center;
    min-height:34px;
    box-sizing:border-box;
    margin:0 !important;
    padding:7px 11px !important;
    border-radius:999px;
    font-size:12px;
    line-height:1;
}

/* Give the controls more breathing room on the listing cards. */
.flip-card-listing h3{
    margin-bottom:0;
}

@media(max-width:767px){
    .flip-listing-controls{
        gap:7px;
        margin-top:10px;
        margin-bottom:13px;
    }

    .flip-watchlist-button{
        min-height:36px;
        padding:8px 12px;
        font-size:12px;
    }

    .flip-trending-inline{
        min-height:36px;
    }
}


/* ================= TOP 3 HORIZONTAL LISTING ROW v2.14.14 ================= */

/*
 * The three listings being compared are intentionally presented in one
 * horizontal row. This visually connects the cards with the comparison
 * immediately below them.
 */
.flip-top3-listings{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:22px;
    align-items:stretch;
    width:100%;
    margin:0 0 28px;
}

.flip-top3-listings .flip-card-listing{
    width:100%;
    min-width:0;
    margin:0;
    box-sizing:border-box;
}

/* Keep the top-three cards visually equal even when titles or metadata differ. */
.flip-top3-listings .flip-card-listing{
    display:flex;
    flex-direction:column;
}

.flip-top3-listings .flip-card-listing > a:last-child{
    margin-top:auto;
}

@media(max-width:900px){
    .flip-top3-listings{
        grid-template-columns:repeat(3,minmax(240px,1fr));
        overflow-x:auto;
        padding-bottom:8px;
        scroll-snap-type:x proximity;
        scrollbar-width:thin;
    }

    .flip-top3-listings .flip-card-listing{
        scroll-snap-align:start;
    }
}

@media(max-width:767px){
    /*
     * On phones, retain the requested single horizontal row rather than
     * stacking the three cards. Users can swipe the row horizontally.
     */
    .flip-top3-listings{
        grid-template-columns:repeat(3,minmax(245px,1fr));
        gap:14px;
        margin-bottom:22px;
        padding-right:10px;
    }

    .flip-top3-listings .flip-card-listing{
        min-width:245px;
    }

    .flip-top3-listings:after{
        content:'Swipe to compare the 3 listings →';
        position:absolute;
        margin-top:100%;
        font-size:11px;
        opacity:.55;
        pointer-events:none;
    }
}


/* ================= TOP 3 GRID PLACEMENT FIX v2.14.15 ================= */

/*
 * The Top 3 wrapper is inserted while the main listing grid is active.
 * Make it occupy the complete grid width so the three cards receive the
 * full available row rather than being squeezed into one parent column.
 */
.flip-grid > .flip-top3-listings{
    grid-column:1 / -1;
    width:100%;
    max-width:none;
    min-width:0;
    box-sizing:border-box;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:22px;
    align-items:stretch;
    margin:0 0 28px;
}

.flip-grid > .flip-top3-listings .flip-card-listing{
    width:100%;
    min-width:0;
    max-width:none;
    box-sizing:border-box;
}

/* The comparison panel must also use the full content width. */
.flip-grid > .flip-top3-comparison{
    grid-column:1 / -1;
    width:100%;
    max-width:none;
    min-width:0;
    box-sizing:border-box;
}

@media(max-width:900px){
    .flip-grid > .flip-top3-listings{
        grid-template-columns:repeat(3,minmax(245px,1fr));
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:thin;
        padding-bottom:8px;
    }

    .flip-grid > .flip-top3-listings .flip-card-listing{
        min-width:245px;
    }
}

@media(max-width:767px){
    .flip-grid > .flip-top3-listings{
        gap:14px;
        margin-bottom:22px;
        padding-right:10px;
    }
}


/* ================= LISTING GRID STRUCTURE FIX v2.14.16 ================= */

/*
 * v2.14.15 fixed the Top 3 wrapper as though it were inside .flip-grid.
 * v2.14.16 moves the Top 3 outside the normal listing grid in the markup.
 * These rules ensure the Top 3 stays a three-column row while listings
 * #4 onward use the site's normal multi-column .flip-grid.
 */
.flip-top3-listings{
    width:100%;
    max-width:none;
    box-sizing:border-box;
}

.flip-top3-listings .flip-card-listing{
    width:100%;
    max-width:none;
    min-width:0;
    box-sizing:border-box;
}

.flip-grid{
    width:100%;
    max-width:none;
    box-sizing:border-box;
}

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


/* Fixed-price marketplace listings */
.flipnzee-sale-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin: 24px 0;
}
.flipnzee-sale-card {
    min-width: 0;
    border: 1px solid rgba(127, 127, 127, .28);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    color: #222;
    box-shadow: 0 3px 14px rgba(0, 0, 0, .045);
}
.flipnzee-sale-image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #fff;
}
.flipnzee-sale-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.flipnzee-sale-content {
    padding: 18px;
}
.flipnzee-sale-content h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    line-height: 1.35;
}
.flipnzee-sale-content h3 a {
    text-decoration: none;
}
.flipnzee-sale-excerpt {
    font-size: .94rem;
    line-height: 1.55;
    opacity: .88;
}
.flipnzee-sale-price {
    margin: 14px 0 8px;
    font-size: 1.02rem;
}
.flipnzee-sale-status {
    display: inline-block;
    border-radius: 5px;
    background: #f0f1f3;
    color: #30343b;
    padding: 5px 9px;
    font-size: .82rem;
    font-weight: 700;
}
.flipnzee-status-under_process {
    background: #fff2cc;
    color: #704d00;
}
.flipnzee-status-sold {
    background: #fce8e6;
    color: #8b1e16;
}
.flipnzee-status-auction_active {
    background: #e8efff;
    color: #173c83;
}
.flipnzee-sale-note {
    font-size: .9rem;
    line-height: 1.5;
}
.flipnzee-sale-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
.flipnzee-sale-form label {
    display: grid;
    gap: 5px;
    font-size: .9rem;
    font-weight: 600;
}
.flipnzee-sale-form input,
.flipnzee-sale-form select,
.flipnzee-sale-form textarea {
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #c9cdd3;
    border-radius: 5px;
    background: #fff;
    color: #222;
}
.flipnzee-sale-button {
    display: inline-block;
    width: 100%;
    border: 0;
    border-radius: 6px;
    padding: 11px 14px;
    background: #174ea6;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.flipnzee-sale-button:hover,
.flipnzee-sale-button:focus {
    background: #123d82;
    color: #fff;
}
.flipnzee-sale-button-secondary {
    background: #303842;
}
.flipnzee-sale-form small {
    font-size: .78rem;
    line-height: 1.45;
    opacity: .8;
}
.flipnzee-sale-details {
    margin-top: 16px;
    border-top: 1px solid rgba(127, 127, 127, .25);
    padding-top: 12px;
}
.flipnzee-sale-details summary {
    cursor: pointer;
    font-weight: 700;
}
.flipnzee-sale-empty,
.flipnzee-sale-notice {
    padding: 12px 15px;
    margin: 12px 0;
    border: 1px solid rgba(127, 127, 127, .3);
    border-radius: 6px;
}
.flipnzee-sale-notice-success {
    background: #edf8ef;
    border-color: #a6d7ae;
}
.flipnzee-sale-notice-warning {
    background: #fff7e2;
    border-color: #e7ca77;
}
.flipnzee-sale-notice-error {
    background: #fff0ef;
    border-color: #e5aaa5;
}
.flipnzee-sale-actions-only {
    margin: 20px 0;
}
@media (prefers-color-scheme: dark) {
    .flipnzee-sale-card {
        background: #1f2329;
        color: #f0f2f5;
        border-color: #444a52;
    }
    .flipnzee-sale-image {
        background: #292e35;
    }
    .flipnzee-sale-form input,
    .flipnzee-sale-form select,
    .flipnzee-sale-form textarea {
        background: #15181c;
        color: #f0f2f5;
        border-color: #555d68;
    }
    .flipnzee-sale-status {
        background: #343a42;
        color: #f0f2f5;
    }
    .flipnzee-status-under_process {
        background: #57471f;
        color: #ffe6a3;
    }
    .flipnzee-status-sold {
        background: #512b29;
        color: #ffd0cc;
    }
    .flipnzee-status-auction_active {
        background: #26385b;
        color: #d3e1ff;
    }
}

/* Direct link from the fixed-price sale panel to the matching active auction. */
.flipnzee-sale-auction-link {
    margin-top: 0.5rem;
}
.flipnzee-sale-auction-link a {
    display: inline-block;
    font-weight: 600;
    text-decoration: underline;
}


/* v2.15.21: Fix featured-image sizing on the singular Listings post type.
 * Genesis themes commonly put the entry-image class directly on the img element,
 * and WordPress body classes may use either singular or plural CPT slugs.
 */
body.single-listing img.entry-image,
body.single-listings img.entry-image,
body.single-listing .entry-image img,
body.single-listings .entry-image img,
body.single-listing .entry-image-link img,
body.single-listings .entry-image-link img,
body.single-listing .featured-image img,
body.single-listings .featured-image img,
body.single-listing .post-image img,
body.single-listings .post-image img,
body.single-listing img.wp-post-image,
body.single-listings img.wp-post-image {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: min(100%, 900px) !important;
    max-height: 420px !important;
    object-fit: contain !important;
    object-position: center center !important;
    margin: 0 auto 24px !important;
}

/* Also constrain common Genesis featured-image wrapper dimensions. */
body.single-listing .entry-image-link,
body.single-listings .entry-image-link,
body.single-listing .featured-image,
body.single-listings .featured-image {
    display: block;
    max-width: 100%;
    text-align: center;
}
