/* ReFlex Global Tighten + Responsive Polish
   Safe override layer for all pages/devices
*/

:root {
    --rf-bg: #f6f3ee;
    --rf-surface: #ffffff;
    --rf-surface-soft: #fbfaf7;
    --rf-text: #111827;
    --rf-muted: #6b7280;
    --rf-border: rgba(17, 24, 39, 0.12);
    --rf-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --rf-shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.07);
    --rf-radius: 18px;
    --rf-radius-sm: 12px;
    --rf-max: 1180px;
    --rf-pad: clamp(16px, 3vw, 34px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--rf-bg);
    color: var(--rf-text);
    line-height: 1.55;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* Main page wrappers */
.page,
.container,
.content,
.content-wrap,
.dashboard,
.dashboard-page,
.dashboard-container,
.marketplace-page,
.listings-page,
.listing-page,
.asset-page,
.admin-page,
.settings-page,
.auth-page,
main > .wrap,
main > .inner {
    width: min(100% - 32px, var(--rf-max));
    margin-left: auto;
    margin-right: auto;
}

/* If a page uses a full-width hero, keep it full width */
.hero,
.hero-section,
.home-hero,
.landing-hero {
    width: 100%;
}

/* Better vertical rhythm */
section,
.section {
    margin-top: clamp(22px, 4vw, 54px);
    margin-bottom: clamp(22px, 4vw, 54px);
}

section:first-child,
.section:first-child {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 5vw, 4.2rem);
}

h2 {
    font-size: clamp(1.55rem, 3.2vw, 2.65rem);
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.65rem);
}

p {
    max-width: 72ch;
}

.lead,
.subtitle,
.hero p,
.hero-text,
.section-subtitle {
    color: var(--rf-muted);
    font-size: clamp(1rem, 1.5vw, 1.16rem);
}

/* Cards / panels */
.card,
.panel,
.box,
.tile,
.stat-card,
.asset-card,
.market-card,
.marketplace-card,
.listing-card,
.plan-card,
.subscription-card,
.form-card,
.table-card,
.chart-card,
.info-card {
    background: var(--rf-surface);
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    box-shadow: var(--rf-shadow-soft);
    padding: clamp(16px, 2.2vw, 28px);
}

.card:hover,
.asset-card:hover,
.market-card:hover,
.marketplace-card:hover,
.listing-card:hover,
.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--rf-shadow);
}

.card,
.asset-card,
.market-card,
.marketplace-card,
.listing-card,
.plan-card {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

/* Grids */
.grid,
.cards,
.card-grid,
.asset-grid,
.market-grid,
.marketplace-grid,
.listing-grid,
.plans-grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: clamp(14px, 2vw, 24px);
}

/* Header / nav tightening */
header,
.navbar,
.topbar,
.site-header {
    width: 100%;
}

header .inner,
.navbar .inner,
.topbar .inner,
.site-header .inner,
.nav-wrap,
.nav-container {
    width: min(100% - 32px, var(--rf-max));
    margin-left: auto;
    margin-right: auto;
}

nav a,
.nav a,
.navbar a,
.menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 999px;
    line-height: 1.15;
}

nav,
.nav,
.navbar,
.menu {
    gap: 8px;
}

/* Buttons */
button,
.btn,
.button,
input[type="submit"],
a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

.btn-group,
.actions,
.form-actions,
.button-row,
.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Forms */
form {
    max-width: 100%;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--rf-border);
    padding: 11px 13px;
    font: inherit;
    background: #fff;
    color: var(--rf-text);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(17, 24, 39, 0.12);
    border-color: rgba(17, 24, 39, 0.35);
}

.form-row,
.row,
.field-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.form-group,
.field,
.input-group {
    margin-bottom: 16px;
}

/* Tables */
.table-container,
.table-wrap,
.responsive-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--rf-radius);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--rf-surface);
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    overflow: hidden;
}

th,
td {
    padding: 13px 14px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--rf-border);
}

th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rf-muted);
    background: var(--rf-surface-soft);
}

tr:last-child td {
    border-bottom: 0;
}

/* Chart / SVG safety */
.chart,
.chart-wrap,
.chart-container,
svg {
    max-width: 100%;
}

.chart-container {
    overflow: hidden;
    border-radius: var(--rf-radius);
}

/* Modals */
.modal,
.modal-content,
.dialog,
.popup {
    max-width: min(94vw, 720px);
    border-radius: var(--rf-radius);
}

.modal-content,
.dialog,
.popup {
    padding: clamp(18px, 3vw, 32px);
}

/* Utility improvements */
.center,
.text-center {
    text-align: center;
}

.centered,
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.hidden-mobile {
    display: initial;
}

.mobile-only {
    display: none;
}

/* Tablet */
@media (max-width: 900px) {
    .page,
    .container,
    .content,
    .content-wrap,
    .dashboard,
    .dashboard-page,
    .dashboard-container,
    .marketplace-page,
    .listings-page,
    .listing-page,
    .asset-page,
    .admin-page,
    .settings-page,
    .auth-page,
    main > .wrap,
    main > .inner {
        width: min(100% - 24px, var(--rf-max));
    }

    .form-row,
    .row,
    .field-row {
        flex-direction: column;
    }

    .form-row > *,
    .row > *,
    .field-row > * {
        width: 100%;
    }

    .btn-group,
    .actions,
    .form-actions,
    .button-row,
    .cta-row {
        align-items: stretch;
    }

    .btn-group .btn,
    .actions .btn,
    .form-actions .btn,
    .button-row .btn,
    .cta-row .btn {
        flex: 1 1 180px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    :root {
        --rf-radius: 15px;
        --rf-radius-sm: 10px;
    }

    body {
        font-size: 15px;
    }

    .page,
    .container,
    .content,
    .content-wrap,
    .dashboard,
    .dashboard-page,
    .dashboard-container,
    .marketplace-page,
    .listings-page,
    .listing-page,
    .asset-page,
    .admin-page,
    .settings-page,
    .auth-page,
    main > .wrap,
    main > .inner,
    header .inner,
    .navbar .inner,
    .topbar .inner,
    .site-header .inner,
    .nav-wrap,
    .nav-container {
        width: min(100% - 20px, var(--rf-max));
    }

    section,
    .section {
        margin-top: 24px;
        margin-bottom: 24px;
    }

    .card,
    .panel,
    .box,
    .tile,
    .stat-card,
    .asset-card,
    .market-card,
    .marketplace-card,
    .listing-card,
    .plan-card,
    .subscription-card,
    .form-card,
    .table-card,
    .chart-card,
    .info-card {
        padding: 16px;
    }

    .grid,
    .cards,
    .card-grid,
    .asset-grid,
    .market-grid,
    .marketplace-grid,
    .listing-grid,
    .plans-grid,
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    button,
    .btn,
    .button,
    input[type="submit"],
    a.btn {
        width: 100%;
        min-height: 46px;
        white-space: normal;
    }

    .btn-inline,
    table .btn,
    td .btn,
    .table-container .btn {
        width: auto;
        min-height: 38px;
        padding: 9px 12px;
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 11px 10px;
        font-size: 0.92rem;
    }

    table {
        min-width: 560px;
    }

    .mobile-stack,
    .split,
    .two-col,
    .three-col,
    .columns {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .hidden-mobile {
        display: none !important;
    }

    .mobile-only {
        display: initial;
    }

    .hero,
    .hero-section,
    .home-hero,
    .landing-hero {
        text-align: center;
        padding-left: 10px;
        padding-right: 10px;
    }

    .hero .btn,
    .hero-section .btn,
    .home-hero .btn,
    .landing-hero .btn {
        width: 100%;
    }
}

/* Very small phones */
@media (max-width: 420px) {
    body {
        font-size: 14.5px;
    }

    h1 {
        font-size: clamp(1.75rem, 12vw, 2.55rem);
    }

    h2 {
        font-size: clamp(1.35rem, 8vw, 2rem);
    }

    .card,
    .panel,
    .box,
    .tile,
    .stat-card,
    .asset-card,
    .market-card,
    .marketplace-card,
    .listing-card,
    .plan-card,
    .subscription-card,
    .form-card,
    .table-card,
    .chart-card,
    .info-card {
        padding: 14px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }
}

/* Homepage top trending by category */
.category-trends-section {
    position: relative;
}

.category-trends-head {
    align-items: flex-end;
}

.category-trends-head .section-subtitle {
    margin: 8px 0 0;
    max-width: 760px;
    color: #64748b;
}

.category-trend-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.category-trend-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 20px;
    padding: 20px;
    min-height: 280px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.category-trend-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.1);
    border-color: rgba(15, 23, 42, 0.2);
}

.category-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.category-label {
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.68rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.category-trend-card h3 {
    margin: 0;
    font-size: 1.18rem;
    letter-spacing: -0.03em;
}

.category-range {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 6px 9px;
    background: #f6f3ee;
    color: #334155;
    font-size: 0.74rem;
    font-weight: 900;
    white-space: nowrap;
}

.category-trend-card p {
    margin: 0;
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.45;
}

.trend-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.trend-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 9px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #111827;
    font-size: 0.78rem;
    font-weight: 800;
}

.category-note {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 12px;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.35;
}

@media (max-width: 1180px) {
    .category-trend-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .category-trends-head {
        align-items: flex-start;
        gap: 14px;
    }

    .category-trend-grid {
        grid-template-columns: 1fr;
    }

    .category-trend-card {
        min-height: auto;
    }

    .category-card-top {
        flex-direction: column;
    }

    .category-range {
        white-space: normal;
    }
}

/* Homepage top trending by category */
.category-trends-section {
    position: relative;
}

.category-trends-head {
    align-items: flex-end;
}

.category-trends-head .section-subtitle {
    margin: 8px 0 0;
    max-width: 760px;
    color: #64748b;
}

.category-trend-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.category-trend-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 20px;
    padding: 20px;
    min-height: 280px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.category-trend-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.1);
    border-color: rgba(15, 23, 42, 0.2);
}

.category-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.category-label {
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.68rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.category-trend-card h3 {
    margin: 0;
    font-size: 1.18rem;
    letter-spacing: -0.03em;
}

.category-range {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 6px 9px;
    background: #f6f3ee;
    color: #334155;
    font-size: 0.74rem;
    font-weight: 900;
    white-space: nowrap;
}

.category-trend-card p {
    margin: 0;
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.45;
}

.trend-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.trend-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 9px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #111827;
    font-size: 0.78rem;
    font-weight: 800;
}

.category-note {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 12px;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.35;
}

@media (max-width: 1180px) {
    .category-trend-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .category-trends-head {
        align-items: flex-start;
        gap: 14px;
    }

    .category-trend-grid {
        grid-template-columns: 1fr;
    }

    .category-trend-card {
        min-height: auto;
    }

    .category-card-top {
        flex-direction: column;
    }

    .category-range {
        white-space: normal;
    }
}

/* Live category section */
.category-trends-head {
    align-items: flex-end;
}

.category-trends-head .section-subtitle {
    margin: 8px 0 0;
    max-width: 760px;
    color: #64748b;
}

.live-category-block {
    margin-top: 30px;
}

.live-category-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.live-category-title {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    font-size: 0.78rem;
    font-weight: 800;
    color: #334155;
    white-space: nowrap;
}

.trending-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.live-market-card {
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
}

.live-market-card .item-image {
    height: 210px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.live-market-card .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-market-card .item-body {
    padding: 16px;
}

.live-market-card .item-title {
    margin: 6px 0 10px;
    font-size: 1.02rem;
    line-height: 1.35;
}

.live-market-card .item-price {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}

.live-market-card .pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.live-market-card .seller-line {
    color: #64748b;
    font-size: 0.88rem;
    margin-top: 4px;
}

.live-link-wrap {
    margin-top: 12px;
}

.live-listing-link {
    font-weight: 800;
    text-decoration: none;
    color: #0f172a;
}

.live-listing-link:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .live-category-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .trending-category-grid {
        grid-template-columns: 1fr;
    }

    .live-market-card .item-image {
        height: 220px;
    }

    .category-count {
        white-space: normal;
    }
}

/* Simple homepage trending snapshot grid */
.homepage-trending-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.homepage-trending-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.homepage-trending-card .item-image {
    height: 220px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.homepage-trending-card .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trend-category-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #111827;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.homepage-trending-card .item-body {
    padding: 16px;
}

.homepage-trending-card .item-title {
    font-size: 0.98rem;
    line-height: 1.32;
    margin: 6px 0 10px;
}

.homepage-trending-card .item-price {
    font-size: 1.45rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 10px;
}

.homepage-trending-card .pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.seller-line {
    color: #64748b;
    font-size: 0.86rem;
}

.live-link-wrap {
    margin-top: 12px;
}

.live-listing-link {
    font-weight: 900;
    color: #0f172a;
    text-decoration: none;
}

.live-listing-link:hover {
    text-decoration: underline;
}

@media (max-width: 1120px) {
    .homepage-trending-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .homepage-trending-grid {
        grid-template-columns: 1fr;
    }

    .homepage-trending-card .item-image {
        height: 240px;
    }
}

/* Dashboard internal/external market search */
.dashboard-market-search-block {
    width: 100%;
    margin: 18px 0;
}

.dashboard-market-search-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    padding: clamp(16px, 2.4vw, 26px);
}

.dashboard-market-search-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.dashboard-market-search-head h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.dashboard-market-search-head p {
    margin: 6px 0 0;
    color: #64748b;
}

.dashboard-market-search-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
}

.dashboard-market-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 20px;
}

.dashboard-market-column {
    min-width: 0;
}

.dashboard-market-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.dashboard-market-column-head h3 {
    margin: 0;
    font-size: 1rem;
}

.dashboard-market-column-head span {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 10px;
    background: #f6f3ee;
    border: 1px solid rgba(15, 23, 42, 0.1);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-market-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.dashboard-market-result-card {
    display: grid;
    grid-template-columns: 98px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    background: #fbfaf7;
    border: 1px solid rgba(15, 23, 42, 0.09);
    color: #111827;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.dashboard-market-result-card:hover {
    transform: translateY(-2px);
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.dashboard-market-result-image {
    width: 98px;
    height: 98px;
    border-radius: 12px;
    background: #f3f0ea;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-market-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-market-result-body {
    min-width: 0;
}

.dashboard-market-result-body h4 {
    margin: 6px 0 6px;
    font-size: 0.92rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.dashboard-market-result-body p {
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
}

.result-price {
    font-size: 1.05rem;
    font-weight: 900;
    margin-bottom: 4px;
}

.result-source-pill {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 8px;
    background: #e8f7ec;
    color: #137a3a;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.result-source-pill.external {
    background: #eef2ff;
    color: #3341a5;
}

.result-mini-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.result-mini-row span {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 8px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #334155;
    font-size: 0.72rem;
    font-weight: 800;
}

.dashboard-market-empty {
    padding: 14px;
    border-radius: 14px;
    background: #fbfaf7;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    color: #64748b;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .dashboard-market-results {
        grid-template-columns: 1fr;
    }

    .dashboard-market-search-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .dashboard-market-result-card {
        grid-template-columns: 82px 1fr;
    }

    .dashboard-market-result-image {
        width: 82px;
        height: 82px;
    }
}

/* Dynamic homepage plans from admin */
.homepage-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.homepage-plan-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.plan-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.homepage-plan-card h3 {
    margin: 0;
    font-size: 1.35rem;
}

.plan-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 10px;
    background: #111827;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.plan-badge.free {
    background: #f6f3ee;
    color: #111827;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.plan-price strong {
    font-size: 2.15rem;
    letter-spacing: -0.05em;
}

.plan-price span,
.plan-yearly {
    color: #64748b;
    font-weight: 700;
}

.plan-feature-list {
    margin: 0;
    padding-left: 18px;
    color: #334155;
    line-height: 1.65;
}

.plan-action {
    margin-top: auto;
}

.plan-action form,
.plan-action .btn {
    width: 100%;
}

.plan-action button,
.plan-action .btn {
    width: 100%;
}

.inquiry-count-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #52617a;
    font-weight: 800;
}

.inquiry-count-link:hover {
    color: #111827;
    text-decoration: underline;
}
