:root {
    --market-text: #111820;
    --market-muted: #566273;
    --market-border: #d9dde3;
    --market-soft: #f5f7fa;
    --market-blue: #3157d5;
    --market-dark: #111827;
    --market-white: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #ffffff;
    color: var(--market-text);
}

.market-container {
    width: min(1420px, calc(100% - 48px));
    margin: 0 auto;
}


/*
 * HEADER
 */

.market-header {
    background: #ffffff;
    border-bottom: 1px solid #eef0f3;
}

.market-header-top {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.market-brand {
    color: #111827;
    text-decoration: none;
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.market-brand span {
    font-weight: 500;
}

.market-header-links {
    display: flex;
    gap: 26px;
}

.market-header-links a {
    color: #111827;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}


/*
 * SEARCH
 */

.market-search-row {
    padding: 20px 0 18px;
}

.market-search-form {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.market-search-shell {
    flex: 1;
    min-width: 0;
    height: 54px;
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border: 2px solid #111827;
    border-radius: 999px;
    overflow: hidden;
}

.market-search-input-wrap {
    flex: 1;
    min-width: 0;
    position: relative;
}

.market-search-icon {
    position: absolute;
    left: 19px;
    top: 50%;
    transform: translateY(-50%);
    color: #667085;
    font-size: 22px;
}

.market-search-input-wrap input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    padding: 0 20px 0 49px;
    background: transparent;
    font-size: 16px;
    color: #111827;
}

.market-category-select-wrap {
    width: 220px;
    border-left: 1px solid #cfd4dc;
    position: relative;
}

.market-category-select-wrap select {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    appearance: auto;
    background: #ffffff;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    cursor: pointer;
}

.market-search-button {
    height: 54px;
    min-width: 150px;
    padding: 0 28px;
    border: 0;
    border-radius: 999px;
    background: #3157d5;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
}

.market-search-button:hover {
    background: #2749bd;
}


/*
 * CATEGORY NAV
 */

.market-category-bar {
    border-top: 1px solid #f0f1f3;
    border-bottom: 1px solid #e7e9ed;
}

.market-category-scroll {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 52px;
    overflow-x: auto;
    scrollbar-width: none;
}


.market-category-scroll a {
    flex: 0 0 auto;
    padding: 9px 15px;
    border-radius: 999px;
    color: #344054;
    text-decoration: none;
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
}

.market-category-scroll a:hover {
    background: #f0f2f5;
    color: #111827;
}

.market-category-scroll a.active {
    background: #111827;
    color: #ffffff;
}


/*
 * HERO
 */

.market-hero {
    padding: 58px 0;
    background:
        radial-gradient(
            circle at 76% 25%,
            rgba(79, 70, 229, 0.11),
            transparent 33%
        ),
        linear-gradient(
            135deg,
            #f7faff,
            #eef3ff
        );
}

.market-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
    gap: 60px;
    align-items: center;
}

.market-eyebrow {
    color: #5145e5;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.market-hero h1 {
    margin: 13px 0 15px;
    max-width: 650px;
    font-size: clamp(46px, 6vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.07em;
}

.market-hero-copy > p {
    max-width: 650px;
    margin: 0;
    color: var(--market-muted);
    font-size: 18px;
    line-height: 1.65;
}

.market-primary-link {
    display: inline-flex;
    margin-top: 24px;
    padding: 13px 20px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

.market-hero-card {
    padding: 28px;
    border: 1px solid #d7dce5;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.market-hero-card strong {
    display: block;
    margin-top: 10px;
    font-size: 29px;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.market-hero-card p {
    margin-bottom: 0;
    color: var(--market-muted);
    line-height: 1.55;
}


/*
 * BENEFITS
 */

.market-benefits {
    padding: 34px 0;
    border-bottom: 1px solid #eef0f3;
}

.market-benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.market-benefit-grid article {
    padding: 21px 23px;
    border: 1px solid #dde1e7;
    border-radius: 18px;
}

.market-benefit-grid strong {
    font-size: 16px;
}

.market-benefit-grid p {
    margin: 9px 0 0;
    color: var(--market-muted);
    line-height: 1.55;
    font-size: 14px;
}


/*
 * PRODUCT SECTIONS
 */

.market-product-section {
    padding: 48px 0 62px;
}

.market-recent-section {
    background: #ffffff;
    padding-bottom: 30px;
}

.market-product-section + .market-product-section {
    border-top: 1px solid #f0f1f3;
}

.market-section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 25px;
    margin-bottom: 22px;
}

.market-section-title-row h2 {
    margin: 7px 0 4px;
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -0.045em;
}

.market-section-title-row p {
    margin: 0;
    color: var(--market-muted);
}


/*
 * SIX-COLUMN MARKETPLACE GRID
 */

.market-six-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.market-product-card {
    min-width: 0;
}

.market-product-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    background: #f1f3f5;
}

.market-product-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition:
        transform 0.22s ease,
        opacity 0.22s ease;
}

.market-product-card:hover .market-product-image img {
    transform: scale(1.025);
}

.market-product-content {
    padding: 12px 2px 5px;
}

.market-product-category {
    display: inline-block;
    margin-bottom: 6px;
    color: #5c46d7;
    text-decoration: none;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.market-product-card h3 {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 650;
}

.market-product-card h3 a {
    color: #111827;
    text-decoration: none;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.market-product-card h3 a:hover {
    text-decoration: underline;
}

.market-product-condition {
    min-height: 18px;
    margin-top: 5px;
    color: #697586;
    font-size: 12px;
}

.market-product-price {
    margin-top: 5px;
    color: #111827;
    font-size: 17px;
    font-weight: 900;
}

.market-image-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #98a2b3;
    font-size: 13px;
    font-weight: 700;
}


/*
 * RECENT ITEMS
 */

.market-text-button {
    padding: 8px 13px;
    border: 0;
    border-radius: 999px;
    background: #f1f3f5;
    color: #344054;
    font-weight: 700;
    cursor: pointer;
}

.market-text-button:hover {
    background: #e4e7ec;
}


/*
 * EMPTY STATE
 */

.market-empty {
    padding: 42px;
    border: 1px dashed #d0d5dd;
    border-radius: 20px;
    text-align: center;
    color: var(--market-muted);
}


/*
 * FOOTER
 */

.market-footer {
    padding: 40px 0 60px;
    border-top: 1px solid #eef0f3;
    color: #667085;
}

.market-footer strong {
    color: #111827;
}

.market-footer p {
    font-size: 13px;
}


/*
 * RESPONSIVE
 */

@media (max-width: 1280px) {
    .market-six-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .market-six-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .market-hero-inner {
        grid-template-columns: 1fr;
    }

    .market-hero-card {
        max-width: 500px;
    }
}

@media (max-width: 850px) {
    .market-container {
        width: min(100% - 30px, 1420px);
    }

    .market-six-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .market-benefit-grid {
        grid-template-columns: 1fr;
    }

    .market-search-form {
        align-items: stretch;
    }

    .market-category-select-wrap {
        width: 180px;
    }
}

@media (max-width: 650px) {
    .market-header-links {
        display: none;
    }

    .market-search-form {
        flex-direction: column;
    }

    .market-search-shell {
        height: auto;
        min-height: 54px;
        flex-direction: column;
        border-radius: 22px;
    }

    .market-search-input-wrap {
        height: 52px;
    }

    .market-category-select-wrap {
        width: 100%;
        height: 48px;
        border-left: 0;
        border-top: 1px solid #d0d5dd;
    }

    .market-search-button {
        width: 100%;
    }

    .market-six-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

    .market-hero {
        padding: 45px 0;
    }

    .market-hero h1 {
        font-size: 47px;
    }

    .market-section-title-row h2 {
        font-size: 29px;
    }
}


.catalog-load-sentinel {
    grid-column: 1 / -1;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.catalog-load-sentinel.loading span::after {
    content: "...";
}


/*
 * HYBRID CATALOG LOADING
 */

.catalog-load-controls {
    width: 100%;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 26px 0 10px;
}

.catalog-scroll-trigger {
    width: 100%;
    height: 2px;
}

.catalog-loading-message,
.catalog-end-message {
    color: #667085;
    font-size: 13px;
    font-weight: 650;
}

.catalog-load-more-button {
    min-width: 230px;
    min-height: 48px;
    padding: 0 26px;
    border: 2px solid #111827;
    border-radius: 999px;
    background: #ffffff;
    color: #111827;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
    transition:
        background 0.16s ease,
        color 0.16s ease,
        transform 0.16s ease;
}

.catalog-load-more-button:hover {
    background: #111827;
    color: #ffffff;
    transform: translateY(-1px);
}

.catalog-load-more-button:active {
    transform: translateY(0);
}


/*
 * EXPANDED FOOTER
 */

.market-footer {
    margin-top: 20px;
    padding: 58px 0 28px;
    border-top: 1px solid #e4e7ec;
    background: #f8fafc;
}

.seo-footer-grid {
    display: grid;
    grid-template-columns:
        minmax(280px, 1.6fr)
        repeat(3, minmax(150px, 1fr));
    gap: 46px;
}

.seo-footer-brand {
    max-width: 390px;
}

.seo-footer-brand p {
    margin: 15px 0 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.65;
}

.seo-footer-brand .seo-footer-disclosure {
    font-size: 12px;
    color: #7b8494;
}

.seo-footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.seo-footer-column h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 14px;
    font-weight: 900;
}

.seo-footer-column a {
    color: #475467;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
}

.seo-footer-column a:hover {
    color: #111827;
    text-decoration: underline;
}

.seo-footer-column p {
    margin: 7px 0 0;
    color: #7b8494;
    font-size: 12px;
    line-height: 1.55;
}

.seo-footer-bottom {
    margin-top: 45px;
    padding-top: 22px;
    border-top: 1px solid #e4e7ec;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #7b8494;
    font-size: 12px;
}


@media (max-width: 960px) {
    .seo-footer-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 560px) {
    .seo-footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .seo-footer-bottom {
        flex-direction: column;
    }
}


/*
 * CATEGORY NAVIGATION HORIZONTAL SCROLL
 */

.market-category-bar {
    width: 100%;
    overflow: visible;
    background: #ffffff;
}

.market-category-scroll {
    display: flex;
    align-items: center;
    gap: 8px;

    width: min(
        1420px,
        calc(100% - 48px)
    );

    min-height: 58px;

    overflow-x: auto;
    overflow-y: hidden;

    white-space: nowrap;

    padding-top: 7px;
    padding-bottom: 10px;

    scroll-behavior: smooth;
    scroll-padding-left: 12px;
    scroll-padding-right: 40px;

    /*
     * Firefox
     */
    scrollbar-width: thin;
    scrollbar-color:
        #b8bec8
        #f1f3f5;
}


/*
 * Chrome / Edge / Safari
 */

.market-category-scroll::-webkit-scrollbar {
    display: block;
    height: 7px;
}

.market-category-scroll::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 999px;
}

.market-category-scroll::-webkit-scrollbar-thumb {
    background: #b8bec8;
    border-radius: 999px;
}

.market-category-scroll::-webkit-scrollbar-thumb:hover {
    background: #8d96a5;
}


/*
 * Never squeeze or truncate category labels
 */

.market-category-scroll a {
    flex:
        0
        0
        auto;

    max-width: none;

    white-space: nowrap;

    overflow: visible;

    text-overflow: clip;

    padding:
        9px
        15px;
}


/*
 * Give final category enough breathing room
 */

.market-category-scroll a:last-child {
    margin-right: 24px;
}


/*
 * Slightly tighter categories on medium screens
 */

@media (max-width: 1100px) {
    .market-category-scroll {
        width:
            calc(
                100% - 30px
            );
    }

    .market-category-scroll a {
        padding:
            8px
            13px;

        font-size: 13px;
    }
}


/*
 * SEO BREADCRUMBS
 */

.market-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    padding-top: 18px;
    padding-bottom: 4px;

    color: #667085;

    font-size: 12px;
    line-height: 1.45;
}

.market-breadcrumbs a {
    color: #475467;
    text-decoration: none;
}

.market-breadcrumbs a:hover {
    color: #111827;
    text-decoration: underline;
}

.market-breadcrumbs span:last-child {
    color: #667085;

    max-width: 620px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.market-category-intro {
    max-width: 670px;

    color: #566273;

    font-size: 17px;
    line-height: 1.65;
}


@media (max-width: 650px) {
    .market-breadcrumbs {
        padding-top: 13px;

        font-size: 11px;
    }

    .market-breadcrumbs span:last-child {
        max-width: 240px;
    }

    .market-category-intro {
        font-size: 15px;
    }
}
