/* TrideFair storefront handover layer.
   Loaded last to replace conflicting historical width and card hotfixes. */
:root {
    --tf-content-width: 1440px;
    --tf-gutter: 24px;
    --tf-ink: #111820;
    --tf-muted: #5f6b7a;
    --tf-line: #dfe3e8;
    --tf-page: #f7f7f8;
    --tf-surface: #fff;
    --tf-primary: #155eef;
    --tf-primary-hover: #0d4fd7;
    --tf-accent: #f5a000;
    --tf-radius: 14px;
    --tf-radius-lg: 22px;
}

html { overflow-x: hidden; }
body.marketplace-shell { min-width: 320px; background: #fff; color: var(--tf-ink); }
.tf-storefront-frame { width: 100% !important; max-width: none !important; margin: 0 !important; background: #fff; }
.tf-site-container,
.tf-page-shell { width: min(calc(100% - (var(--tf-gutter) * 2)), var(--tf-content-width)) !important; max-width: var(--tf-content-width) !important; margin-inline: auto !important; }
.tf-page-shell { padding-block: 28px 42px; }

/* Complete marketplace header. The Blade markup and these rules are kept as
   one component so desktop browsers never fall back to an unstyled mobile flow. */
.tf-market-header { position: relative; z-index: 1050; width: 100%; background: #fff; border-bottom: 1px solid var(--tf-line); }
.tf-market-header__container { width: min(calc(100% - (var(--tf-gutter) * 2)), var(--tf-content-width)); margin-inline: auto; }
.tf-market-header a { color: var(--tf-ink); text-decoration: none; }
.tf-market-header a:hover { color: var(--tf-primary); }
.tf-market-header__top { border-bottom: 1px solid #e8ebef; font-size: 12px; }
.tf-market-header__top-inner { min-height: 31px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.tf-market-header__top-left,
.tf-market-header__top-right { display: flex; align-items: center; gap: 17px; white-space: nowrap; }
.tf-market-header__top-right { gap: 14px; }
.tf-header-menu { position: relative; }
.tf-header-menu > summary,
.tf-shop-categories > summary,
.tf-mobile-menu > summary { list-style: none; cursor: pointer; }
.tf-header-menu > summary::-webkit-details-marker,
.tf-shop-categories > summary::-webkit-details-marker,
.tf-mobile-menu > summary::-webkit-details-marker { display: none; }
.tf-header-menu > summary { min-height: 30px; display: inline-flex; align-items: center; gap: 5px; }
.tf-menu-chevron { display: inline-block; font-size: 14px; line-height: 1; transition: transform .18s ease; transform-origin: 50% 52%; }
.tf-header-menu[open] .tf-menu-chevron { transform: rotate(180deg); }
.tf-header-menu__panel { position: absolute; top: calc(100% + 7px); left: 0; z-index: 1100; width: 310px; padding: 9px; border: 1px solid var(--tf-line); border-radius: 13px; background: #fff; box-shadow: 0 18px 45px rgba(15,23,42,.16); white-space: normal; }
.tf-header-menu--right .tf-header-menu__panel { right: 0; left: auto; }
.tf-header-menu__intro { padding: 10px 11px 12px; border-bottom: 1px solid #e8ebef; }
.tf-header-menu__intro strong,
.tf-header-menu__intro span,
.tf-header-menu__panel a strong,
.tf-header-menu__panel a span { display: block; }
.tf-header-menu__intro span,
.tf-header-menu__panel a span { margin-top: 2px; color: var(--tf-muted); font-size: 11px; line-height: 1.4; }
.tf-header-menu__panel a,
.tf-header-menu__panel button { width: 100%; display: block; padding: 9px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--tf-ink); text-align: left; font-size: 12px; }
.tf-header-menu__panel a:hover,
.tf-header-menu__panel button:hover { background: #f4f7fb; color: var(--tf-primary); }
.tf-market-header__main { background: #fff; }
.tf-market-header__desktop-search { min-height: 82px; display: flex; align-items: center; gap: 15px; }
.tf-header-logo { flex: 0 0 auto; display: inline-flex; align-items: center; }
.tf-header-wordmark { color: #f28b00; font-weight: 800; letter-spacing: -.05em; }
.tf-header-wordmark b { color: var(--tf-primary); }
.tf-shop-categories { position: relative; flex: 0 0 72px; }
.tf-shop-categories > summary { display: flex; align-items: center; gap: 5px; color: #4d5664; font-size: 12px; line-height: 1.15; }
.tf-shop-categories[open] > summary span { transform: rotate(180deg); }
.tf-shop-categories > summary span { display: inline-block; transition: transform .18s ease; }
.tf-shop-categories__panel { position: absolute; top: calc(100% + 18px); left: 0; z-index: 1100; width: 270px; max-height: 70vh; padding: 9px; overflow-y: auto; border: 1px solid var(--tf-line); border-radius: 12px; background: #fff; box-shadow: 0 18px 45px rgba(15,23,42,.16); }
.tf-shop-categories__panel a { display: block; padding: 9px 10px; border-radius: 7px; font-size: 13px; }
.tf-shop-categories__panel a:hover { background: #f4f7fb; }
.tf-header-search { min-width: 0; flex: 1 1 auto; min-height: 46px; display: grid; grid-template-columns: 34px minmax(120px,1fr) 38px minmax(150px,190px) 128px; align-items: center; overflow: hidden; border: 2px solid #111820; border-radius: 25px; }
.tf-header-search svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tf-header-search__icon { margin-left: 13px; color: #687383; }
.marketplace-header form.tf-header-search input,
.marketplace-header form.tf-header-search select { min-width: 0; min-height: 42px; border: 0 !important; outline: 0 !important; background: #fff; color: var(--tf-ink); box-shadow: none !important; }
.marketplace-header form.tf-header-search input { padding: 0 10px; font-size: 15px; }
.marketplace-header form.tf-header-search select { padding: 0 30px 0 14px; border-left: 1px solid var(--tf-line) !important; font-size: 12px; }
.tf-image-search { min-height: 42px; display: grid; place-items: center; border: 0; background: #fff; color: #687383; opacity: .7; }
.tf-header-search__submit { align-self: stretch; margin: -2px; border: 0; border-radius: 25px; background: var(--tf-primary); color: #fff; font-weight: 800; }
.tf-header-search__submit:hover { background: var(--tf-primary-hover); }
.tf-advanced-search { flex: 0 0 auto; color: #5f6874 !important; font-size: 11px; }
.tf-header-icon { position: relative; width: 31px; height: 31px; display: grid; place-items: center; }
.tf-header-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tf-header-count { position: absolute; top: -3px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #d92d20; color: #fff; font-size: 10px; font-weight: 800; }
.tf-header-count.is-hidden,
.tf-header-count.hidden { display: none !important; }
.tf-market-header__categories { border-top: 1px solid #e8ebef; }
.tf-category-rail { min-height: 44px; display: flex; align-items: center; gap: 27px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.tf-category-rail::-webkit-scrollbar { display: none; }
.tf-category-rail a { flex: 0 0 auto; font-size: 12px; }
.tf-market-header__mobile-main { display: none; }

/* Larger TrideFair wordmark without squeezing the search controls. */
.tf-market-header__desktop-search > .tf-header-logo {
    min-width: 170px !important;
    flex: 0 0 170px;
    display: flex;
    align-items: center;
}
.tf-market-header__desktop-search > .tf-header-logo img {
    width: 164px !important;
    height: 58px !important;
    max-width: 164px !important;
    object-fit: contain;
}
.tf-market-header__desktop-search .tf-header-wordmark { font-size: 34px; line-height: 1; }
.tf-market-header__mobile-main > .tf-header-logo img { width: 132px !important; height: 46px !important; object-fit: contain; }
.tf-market-header__mobile-main .tf-header-wordmark { font-size: 27px; line-height: 1; }

/* Compact, consistent product presentation. */
.tf-product-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    grid-auto-flow: row dense;
    align-items: stretch;
    gap: 10px !important;
}
.tf-product-card { min-width: 0; height: 100%; display: flex; flex-direction: column; border-color: var(--tf-line); border-radius: 16px; box-shadow: none; }
.tf-product-media { aspect-ratio: 1 / .88 !important; max-height: 205px; }
.tf-product-media img { object-fit: contain !important; padding: 8px !important; background: #f7f7f8; }
.tf-product-body { flex: 1 1 auto; padding: 11px 11px 9px !important; display: flex; flex-direction: column; }
.tf-product-category-label { margin-bottom: 4px; font-size: 10px; }
.tf-product-title { min-height: 39px; margin-bottom: 5px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tf-product-price-row { margin-top: auto !important; padding-top: 8px; }
.tf-product-price { font-size: 19px; }
.tf-product-actions { grid-template-columns: 1fr 1fr auto !important; padding: 0 11px 11px !important; }
.tf-product-actions button { min-height: 36px !important; }
.tf-product-actions .tf-card-buy,
.tf-product-actions .tf-card-cart { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 7px 11px; border-radius: 9px; font-weight: 800; text-decoration: none; }

/* Product purchase panel: familiar marketplace hierarchy in TrideFair styling. */
.tf-product-purchase-column { align-content: start; }
.tf-purchase-actions { display: grid; gap: 9px; width: 100%; padding: 18px; border: 1px solid #cfd6e2; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(24, 38, 63, .08); }
.tf-purchase-actions__heading { display: grid; gap: 3px; padding-bottom: 5px; }
.tf-purchase-actions__heading strong { color: var(--tf-ink); font-size: 18px; }
.tf-purchase-actions__heading span { color: #667085; font-size: 12px; line-height: 1.45; }
.tf-purchase-action {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: 2px solid var(--tf-primary);
    border-radius: 999px;
    background: #fff;
    color: var(--tf-primary);
    font-weight: 800;
    line-height: 1.2;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.tf-purchase-action:hover { background: #eef4ff; }
.tf-purchase-action:focus-visible { outline: 3px solid rgba(35,93,230,.28); outline-offset: 2px; }
.tf-purchase-action:disabled { cursor: not-allowed; opacity: .64; }
.tf-purchase-action--primary { background: var(--tf-primary); color: #fff; }
.tf-purchase-action--primary:hover { background: #1748bc; border-color: #1748bc; }
.tf-purchase-action--secondary.is-added { border-color: #167a46; background: #eaf8f0; color: #12633a; }
.tf-purchase-action--watch { border-color: #9da8b8; color: var(--tf-ink); }
.tf-purchase-action--watch:hover { border-color: var(--tf-primary); color: var(--tf-primary); }
.tf-purchase-action--disabled { border-color: #c8cfd9; background: #f3f5f7; color: #667085; }
.tf-buy-now-guidance { margin: -2px 0 2px; color: #596579; font-size: 12px; line-height: 1.45; text-align: center; }
.tf-purchase-center-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 2px 2px; border-top: 1px solid #dde2ea; color: var(--tf-primary); text-decoration: none; }
.tf-purchase-center-link span { flex: 0 0 auto; font-weight: 800; }
.tf-purchase-center-link small { color: #667085; font-size: 11px; line-height: 1.35; text-align: right; }
.tf-purchase-center-link:hover span { text-decoration: underline; }
.tf-mobile-purchase-bar { display: none; }
.tf-cart-next-steps { padding: 13px; border: 1px solid #a9d4bb; border-radius: 12px; background: #f0fbf5; color: #164c32; }
.tf-cart-next-steps strong { display: block; margin-bottom: 9px; }
.tf-cart-next-steps > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tf-cart-next-steps a { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 11px; border: 1px solid #167a46; border-radius: 999px; color: #12633a; font-weight: 800; text-decoration: none; }
.tf-cart-next-steps a:last-child { background: #167a46; color: #fff; }
@media (max-width: 520px) {
    .tf-purchase-center-link { align-items: flex-start; flex-direction: column; gap: 3px; }
    .tf-purchase-center-link small { text-align: left; }
}
@media (min-width: 769px) {
    .tf-product-purchase-column .tf-purchase-actions { position: sticky; top: 18px; z-index: 4; }
}
@media (max-width: 768px) {
    .tf-page-shell:has(.tf-mobile-purchase-bar) { padding-bottom: 112px !important; }
    .tf-mobile-purchase-bar {
        position: fixed;
        z-index: 80;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 9px;
        padding: 11px max(14px, env(safe-area-inset-right)) calc(11px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
        border-top: 1px solid #cfd6e2;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 -8px 24px rgba(24, 38, 63, .13);
        backdrop-filter: blur(12px);
    }
    .tf-mobile-purchase-bar button { min-height: 48px; border-radius: 999px; font-weight: 800; }
    .tf-mobile-purchase-bar__buy { border: 2px solid var(--tf-primary); background: var(--tf-primary); color: #fff; }
    .tf-mobile-purchase-bar__cart { border: 2px solid var(--tf-primary); background: #fff; color: var(--tf-primary); }
    .tf-mobile-purchase-bar button:disabled { cursor: wait; opacity: .68; }
    .tf-mobile-purchase-bar__cart.is-added { border-color: #167a46; background: #eaf8f0; color: #12633a; }
}
.tf-cart-checkout-primary { min-height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 999px !important; background: var(--tf-primary) !important; font-weight: 800 !important; }
.tf-cart-mobile-checkout { display: none; }

/* Homepage campaign carousel: wide enough for desktop, with visible white sides. */
.tf-page-banner--home.tf-hero-carousel {
    width: min(calc(100% - (var(--tf-gutter) * 2)), var(--tf-content-width)) !important;
    max-width: var(--tf-content-width) !important;
    min-height: 352px !important;
    margin: 24px auto 8px !important;
    border-radius: var(--tf-radius-lg) !important;
    box-shadow: none !important;
}
.tf-page-banner--home .tf-page-banner__inner { min-height: 352px !important; padding: 46px 64px !important; }
.tf-page-banner--home .tf-page-banner__copy { width: min(565px, 49%) !important; max-width: 565px !important; }
.tf-page-banner--home .tf-page-banner__title { margin-bottom: 14px; color: #fff !important; font-size: clamp(39px, 3.4vw, 54px) !important; line-height: 1.02; }
.tf-page-banner--home .tf-page-banner__description { margin-bottom: 23px; color: rgba(255,255,255,.92) !important; font-size: 17px !important; line-height: 1.5; }
.tf-page-banner--home .tf-page-banner__eyebrow { color: #ffd7c1 !important; }
.tf-page-banner--home .tf-page-banner__actions { display: flex !important; }
.tf-page-banner--home .tf-page-banner__primary { min-height: 46px; padding: 11px 20px; border-radius: 24px; background: #fff !important; color: #111820 !important; font-weight: 800; text-decoration: none; }
.tf-hero-slide { min-height: 352px; }
.tf-hero-slide--discover { background-color: #321b36; }

/* Authentication follows the same restrained marketplace shell. */
.tf-auth-page { min-height: clamp(580px, 70vh, 760px) !important; padding-block: 44px 64px !important; background: #fff !important; }
.tf-auth-panel { max-width: 460px !important; }
.tf-auth-panel > .text-center img { max-height: 44px; }
.tf-auth-panel h2 { color: var(--tf-ink); font-size: clamp(28px, 3vw, 36px); letter-spacing: -.035em; }
.tf-auth-form { padding: 28px !important; border: 1px solid var(--tf-line) !important; border-radius: 18px !important; box-shadow: 0 10px 30px rgba(17,24,32,.05) !important; }
.tf-auth-form input[type="email"],
.tf-auth-form input[type="password"],
.tf-auth-form input[type="text"],
.tf-auth-form input[type="tel"] { min-height: 48px; border-radius: 10px !important; }
.tf-auth-form button[type="submit"] { min-height: 48px; border-radius: 24px !important; background: var(--tf-primary) !important; font-size: 15px !important; font-weight: 800 !important; }

/* Keep long-form marketplace pages readable instead of stretching edge to edge. */
.tf-listing-header > .tf-site-container { padding-block: 4px; }
.tf-listing-layout { grid-template-columns: 238px minmax(0, 1fr); }
.tf-filter-panel { top: 18px; }
.tf-category-hero { margin-top: 6px; }
.tf-trust-row { overflow: hidden; }
.tf-recently-viewed { display: none !important; }
.tf-store-banner { margin-top: 22px !important; border-radius: 18px; }
.tf-store-banner img { object-position: center; }
.tf-brand-search { margin-bottom: 28px; padding: 18px; border: 1px solid var(--tf-line); border-radius: 14px; background: #f7f9fc; }
.tf-brand-search label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 800; }
.tf-brand-search > div { display: flex; gap: 9px; }
.tf-brand-search input { min-width: 0; flex: 1; min-height: 44px; padding: 9px 13px; border: 1px solid #bfc7d2; border-radius: 9px; background: #fff; }
.tf-brand-search button { min-height: 44px; padding: 9px 20px; border: 0; border-radius: 22px; background: var(--tf-primary); color: #fff; font-weight: 800; }
.tf-brand-section + .tf-brand-section { margin-top: 30px; }
.tf-brand-section > h2 { margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--tf-line); font-size: 25px; }

@media (max-width: 1380px) {
    .tf-product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}

@media (max-width: 900px) {
    :root { --tf-gutter: 18px; }
    .tf-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 9px !important; }
    .tf-page-banner--home .tf-page-banner__copy { width: min(520px, 62%) !important; }
    .tf-listing-layout { grid-template-columns: 1fr; }
}

@media (min-width: 481px) and (max-width: 860px) and (pointer: fine) {
    .tf-market-header__desktop-search > .tf-header-logo { min-width: 112px !important; flex-basis: 112px; }
    .tf-market-header__desktop-search > .tf-header-logo img { width: 108px !important; height: 44px !important; }
}

@media (max-width: 700px) {
    :root { --tf-gutter: 10px; }
    .tf-page-shell { padding-block: 14px 28px; }
    .tf-site-container,
    .tf-page-shell { width: calc(100% - 12px) !important; }
    .tf-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 6px !important; }
    .tf-product-card { border-radius: 9px; overflow: hidden; }
    .tf-product-media { aspect-ratio: 1 / 1 !important; max-height: none; }
    .tf-product-media img { padding: 3px !important; }
    .tf-product-badges { top: 4px; left: 4px; gap: 3px; }
    .tf-product-badge { padding: 2px 4px; border-radius: 4px; font-size: 8px; }
    .tf-product-body { padding: 6px 6px 7px !important; }
    .tf-product-category-label,
    .tf-product-meta,
    .tf-product-stock,
    .tf-product-seller,
    .tf-product-actions { display: none !important; }
    .tf-product-title { min-height: 29px; margin: 0; font-size: 11px; line-height: 1.3; -webkit-line-clamp: 2; }
    .tf-product-price-row { min-height: 20px; margin-top: 3px !important; padding-top: 0; gap: 3px; }
    .tf-product-price { font-size: 14px; line-height: 1.2; }
    .tf-product-original-price { display: none; }
    .tf-section { padding-block: 13px; }
    .tf-section-heading { margin-bottom: 8px; }
    .tf-section-heading h2 { font-size: 19px; }
    .tf-section-heading p { display: none; }
    .tf-home .tf-department-section,
    .tf-home .tf-spotlight-section,
    .tf-home .tf-trust-row,
    .tf-home .tf-seller-banner { display: none !important; }
    .tf-home-dealbar { min-height: 42px; margin-block: 7px 4px; padding: 9px 11px; border-radius: 9px; }
    .tf-home-dealbar span { display: none; }
    .tf-home-dealbar strong,
    .tf-home-dealbar a { font-size: 11px; }
    .tf-cart-page { padding-bottom: 98px; }
    .tf-cart-mobile-checkout {
        position: fixed;
        z-index: 45;
        right: 10px;
        bottom: 10px;
        left: 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 11px 12px;
        border: 1px solid #d7dce4;
        border-radius: 16px;
        background: rgba(255,255,255,.97);
        box-shadow: 0 10px 32px rgba(17,24,32,.2);
        backdrop-filter: blur(12px);
    }
    .tf-cart-mobile-checkout span { display: block; color: #667085; font-size: 11px; }
    .tf-cart-mobile-checkout strong { display: block; color: var(--tf-ink); font-size: 18px; }
    .tf-cart-mobile-checkout a { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 19px; border-radius: 999px; background: var(--tf-primary); color: #fff; font-weight: 800; text-decoration: none; }
    .tf-page-banner--home.tf-hero-carousel,
    .tf-store-banner { display: none !important; }
    .tf-auth-page { padding-inline: 16px !important; }
    .tf-auth-form { padding: 22px !important; }
    .tf-store-banner { height: 150px !important; margin-top: 10px !important; border-radius: 14px; }
    .tf-brand-search > div { align-items: stretch; flex-direction: column; }
}

@media (max-width: 420px) {
    .tf-product-price { font-size: 13px; }
    .tf-card-save { width: 38px; overflow: hidden; color: transparent !important; }
    .tf-card-save::before { content: '\2661'; color: var(--tf-ink); font-size: 18px; }
}

@media (max-width: 760px) {
    .tf-market-header__top,
    .tf-market-header__desktop-search { display: none !important; }
    .tf-market-header__mobile-main { min-height: 62px; display: grid !important; grid-template-columns: 34px minmax(92px,1fr) auto; align-items: center; gap: 6px; padding-block: 6px; }
    .tf-market-header__mobile-main > .tf-header-logo img { width: 104px !important; height: 34px !important; }
    .tf-mobile-menu { position: relative; display: block !important; }
    .tf-mobile-menu > summary { width: 38px; height: 38px; display: grid; place-items: center; }
    .tf-mobile-menu svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; }
    .tf-mobile-menu__panel { position: absolute; top: 43px; left: 0; z-index: 1150; width: min(290px, calc(100vw - 20px)); padding: 9px; border: 1px solid var(--tf-line); border-radius: 12px; background: #fff; box-shadow: 0 18px 45px rgba(15,23,42,.16); }
    .tf-mobile-menu__panel a { display: block; padding: 10px; border-radius: 7px; }
    .tf-mobile-menu__panel a:hover { background: #f4f7fb; }
    .tf-mobile-actions { display: flex; align-items: center; gap: 1px; }
    .tf-mobile-search { grid-column: 1 / -1; min-height: 39px; display: grid; grid-template-columns: 30px minmax(0,1fr) 32px 40px; align-items: center; overflow: hidden; border: 1.5px solid #111820; border-radius: 21px; }
    .tf-mobile-search svg { width: 19px; height: 19px; margin-inline: auto; fill: none; stroke: currentColor; stroke-width: 1.8; }
    .tf-mobile-search input { min-width: 0; min-height: 36px; border: 0; outline: 0; font-size: 13px; }
    .tf-mobile-search button { align-self: stretch; border: 0; background: #fff; }
    .tf-mobile-search button:last-child { background: var(--tf-primary); color: #fff; }
    .tf-market-header__categories { display: block !important; border-top: 1px solid #e8ebef; }
    .tf-category-rail { min-height: 36px; gap: 7px; padding-block: 4px; }
    .tf-category-rail a { padding: 5px 9px; border: 1px solid #dfe3e8; border-radius: 999px; background: #fff; font-size: 10px; }
}

@media (max-width: 340px) {
    .tf-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (min-width: 701px) and (max-width: 900px) {
    .tf-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
}


/* v26 compact legacy homepage cards on phones */
@media (max-width: 700px) {
#featured-products-grid > .tf-product-card{min-width:0!important;height:auto!important}
#featured-products-grid > .tf-product-card > a:first-child > .relative.aspect-square{width:100%!important;height:auto!important;aspect-ratio:1/1!important}
#featured-products-grid > .tf-product-card > a:first-child img{padding:2px!important;object-fit:contain!important}
#featured-products-grid .tf-product-card > .p-4.space-y-2{min-width:0!important;padding:5px 5px 7px!important}
#featured-products-grid .tf-product-card h3{min-height:29px!important;margin:0!important;display:-webkit-box;overflow:hidden;font-size:11px!important;line-height:1.3!important;-webkit-box-orient:vertical;-webkit-line-clamp:2}
#featured-products-grid .tf-product-card h3 + .flex,#featured-products-grid .tf-product-card > .p-4.space-y-2 > div.mb-2,#featured-products-grid .tf-product-card > .p-4.space-y-2 > p,#featured-products-grid .tf-product-card .tf-true-price-card,#featured-products-grid .tf-product-card > .p-4.space-y-2 > a.text-xs,#featured-products-grid .tf-product-card .tf-product-card__actions,#featured-products-grid .tf-product-card > .tf-product-compare{display:none!important}
#featured-products-grid .tf-product-card > .p-4.space-y-2 > .flex.items-center.gap-2{min-width:0;min-height:20px;margin-top:3px!important;gap:3px!important}
#featured-products-grid .tf-product-card > .p-4.space-y-2 > .flex.items-center.gap-2 .text-xl{font-size:14px!important;line-height:1.2!important}
#featured-products-grid .tf-product-card > .p-4.space-y-2 > .flex.items-center.gap-2 .line-through{display:none!important}
.tf-product-shell > .mb-6{margin-bottom:8px!important}
.tf-product-shell > .mb-6 > p{display:none!important}
}
