:root {
    --tj-space-1: 4px;
    --tj-space-2: 8px;
    --tj-space-3: 12px;
    --tj-space-4: 16px;
    --tj-space-6: 24px;
    --tj-space-8: 32px;
}
.app-main { min-width: 0; }
.app-main:has(.tj-storefront),.app-main:has(.tj-catalog) { background:var(--tj-surface); }
.market-privacy { margin-block:32px 0; }
.market-privacy .alpha-notice { background:transparent;border:0;border-top:1px solid var(--tj-line);border-radius:0;padding:16px 0;color:var(--tj-text-secondary);font-size:14px; }
.market-privacy .alpha-notice summary { cursor:pointer;min-height:44px;display:flex;align-items:center; }
.tj-image-placeholder { align-content:center;justify-items:center;gap:12px; }
.tj-image-placeholder .tj-ui-icon { width:44px;height:44px;stroke-width:1.2;opacity:.65; }
.tj-container { min-width: 0; }
.tj-market-intro { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; padding-block: 40px; align-items: center; }
.tj-market-intro h1 { max-width: 680px; font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.7; color: var(--tj-ink); margin: 8px 0; }
.tj-market-intro p { color: var(--tj-muted); line-height: 2; margin: 8px 0 20px; }
.tj-intro-side { border-inline-start: 1px solid var(--tj-line); padding-inline-start: var(--tj-space-8); }
.tj-intro-side strong { font-size: 1.1rem; color: var(--tj-ink); }
.tj-seller-start { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--tj-line); padding-top: 28px; }
.tj-seller-start p { color: var(--tj-muted); }
.tj-product { min-width: 0; box-shadow: none; }
.tj-product-body { min-width: 0; }
.tj-product-title { overflow-wrap: anywhere; }
.tj-product-meta, .tj-seller { overflow-wrap: anywhere; }
.tj-price-row { flex-wrap: wrap; gap: var(--tj-space-2); align-items: end; margin-top: auto; }
.tj-listing-price { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tj-listing-price .tj-price, .tj-listing-price > small { flex-basis: 100%; }
.tj-listing-price > small { color: var(--tj-muted); font-size:var(--tj-type-help); line-height: 1.8; }
.tj-image-placeholder { width: 100%; height: 100%; min-height: 120px; background: var(--tj-blue-50); color: var(--tj-muted); display: grid; place-items: center; text-align: center; font-size:var(--tj-type-help); padding: var(--tj-space-4); }
.tj-product-media img, .tj-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.tj-btn, .tj-icon-btn, .tj-product-cart { min-height: 44px; }
.tj-btn:disabled, .tj-product-cart:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.tj-btn[aria-busy="true"] { cursor: progress; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--tj-blue-700); outline-offset: 3px; }
.tj-footer :where(a, button):focus-visible { outline-color: #ffd17c; }
.tj-skip-link { position: fixed; inset-inline-start: 16px; top: -100px; z-index: 300; padding: 12px 20px; background: var(--tj-surface); color: var(--tj-blue-700); border: 2px solid currentColor; }
.tj-skip-link:focus { top: 12px; }
.tj-search-submit { padding: 8px 12px; background: var(--tj-blue-700); color: var(--tj-on-brand); border: 0; border-radius: var(--tj-r-xs); min-height: 36px; flex-shrink: 0; }
.tj-search input { min-width: 0; width: 100%; }
.tj-category-menu > summary { cursor: pointer; padding-block: var(--tj-space-3); list-style: none; }
.tj-header-disclosure > summary { cursor: pointer; list-style: none; }
.tj-header-disclosure > summary::-webkit-details-marker { display: none; }
.tj-category-menu > .tj-dropdown-panel.is-wide { display: block; max-height: 70vh; overflow-y: auto; width: min(520px, 90vw); }
.tj-category-group { border-bottom: 1px solid var(--tj-line); }
.tj-category-group > summary { padding: var(--tj-space-3); cursor: pointer; }
.tj-category-group[open] > summary { color: var(--tj-blue-700); background: var(--tj-blue-50); }
.tj-data-notice { padding: 12px 20px; background: var(--tj-amber-50); color: var(--tj-ink); text-align: center; font-size:var(--tj-type-help); line-height: 2; }
.tj-footer-unavailable { display: block; opacity: .7; font-size:var(--tj-type-help); line-height: 2; }
.tj-store-filter { display: flex; align-items: center; gap: var(--tj-space-3); margin-block: var(--tj-space-6); }
.tj-store-filter .tj-select { width: auto; }
@media (max-width:800px), (min-width:801px) and (max-width:1000px) and (max-height:500px) {
    .tj-catalog .tj-input, .tj-catalog .tj-select, .tj-store-filter .tj-select { font-size:16px; }
    .tj-catalog .tj-chip, .tj-catalog .tj-checkbox, .tj-catalog .tj-filter-group summary, .tj-catalog .tj-filter-title .tj-link { min-height:44px; }
    .tj-catalog .tj-filter-group summary { align-items:center; }
    .tj-store-breadcrumb a { display:inline-flex; align-items:center; min-height:44px; }
}
.tj-store h3, .tj-store p { overflow-wrap: anywhere; }
.tj-store { min-width: 0; }
.tj-buybox .tj-btn { margin-block: var(--tj-space-1); }
.tj-pdp-title { overflow-wrap: anywhere; }
.tj-public-reviews { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tj-toast { max-width: calc(100vw - 24px); overflow-wrap: anywhere; }
.tj-mobile-purchase { display: none; }
@media (max-width: 800px), (min-width: 801px) and (max-width: 1000px) and (max-height: 500px) {
    :root { --tj-mobile-nav-height: 60px; --tj-mobile-nav-offset: calc(var(--tj-mobile-nav-height) + env(safe-area-inset-bottom, 0px)); }
    body { padding-bottom: calc(var(--tj-mobile-nav-offset) + 8px); }
    .tj-mobile-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; z-index: 80; bottom: 0; inset-inline: 0; height: var(--tj-mobile-nav-offset); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--tj-surface); border-top: 1px solid var(--tj-line); box-shadow: 0 -3px 16px rgba(6,26,56,.06); }
    .tj-mobile-nav a { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1px; min-width: 44px; min-height: 59px; padding: 4px 2px; color: #52647c; }
    .tj-mobile-nav__icon { display: grid; place-items: center; width: 42px; height: 28px; border-radius: var(--tj-r-control); }
    .tj-mobile-nav__icon svg { display: block; width: 26px; height: 26px; flex-shrink: 0; }
    .tj-mobile-nav a small { font-size: .75rem; line-height: 18px; font-weight: 700; white-space: nowrap; }
    .tj-mobile-nav a.is-active .tj-mobile-nav__icon { color: var(--tj-blue-700); background: #e9f1ff; }
    .tj-mobile-nav a:focus-visible { outline-offset: -3px; border-radius: var(--tj-r-sm); }
    .tj-compare-bar { bottom: var(--tj-mobile-nav-offset); }
    body:has(.tj-compare-bar) { padding-bottom: calc(var(--tj-mobile-nav-offset) + 88px); }
    .tj-market-intro { grid-template-columns: 1fr; gap: var(--tj-space-6); padding-block: var(--tj-space-6); }
    .tj-header-disclosure > summary.tj-btn { display: flex; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tj-intro-side { border-inline-start: 0; border-top: 1px solid var(--tj-line); padding-inline-start: 0; padding-top: 20px; }
    .tj-market-intro .tj-hero-actions { flex-wrap: wrap; }
    .tj-filter.is-open { display: block; position: static; max-height: none; }
    .tj-filter-fab { bottom: calc(var(--tj-mobile-nav-offset) + 18px); inset-inline-end: 12px; min-height: 44px; z-index: 85; }
    .tj-public-reviews { grid-template-columns: 1fr; }
    .tj-buybox { scroll-margin-top: 140px; }
    .tj-mobile-purchase { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--tj-space-2); position: fixed; bottom: var(--tj-mobile-nav-offset); inset-inline: 0; padding: 8px 12px; background: var(--tj-surface); border-top: 1px solid var(--tj-line); z-index: 75; }
    body:has(.tj-mobile-purchase) { padding-bottom: calc(var(--tj-mobile-nav-offset) + 84px); }
    body:has(.tj-compare-bar) .tj-mobile-purchase { bottom: calc(var(--tj-mobile-nav-offset) + 80px); }
    body:has(.tj-compare-bar):has(.tj-mobile-purchase) { padding-bottom: calc(var(--tj-mobile-nav-offset) + 164px); }
    .tj-footer { padding-bottom: 0; }
    .tj-toast { bottom: calc(var(--tj-mobile-nav-offset) + 80px); }
}
@media (max-width: 500px) {
    .tj-product-cart { display: inline-flex; justify-content: center; align-items: center; min-width: 44px; }
    .tj-product-cart.is-wide { font-size:var(--tj-type-help); padding-inline: var(--tj-space-2); }
    .tj-product-title { font-size: .85rem; }
    .tj-price { font-size: .9rem; }
    .tj-section-head { align-items: start; gap: var(--tj-space-3); flex-wrap: wrap; }
    .tj-toolbar { flex-wrap: wrap; }
}

/* Shared listing media must never size a grid track from the intrinsic image dimensions. */
img.tj-listing-image { display:block; width:100%; height:100%; max-width:100%; max-height:100%; min-width:0; min-height:0; }
.cartpage__list, .cartline, .cartline__info, .cartline__controls, .cartline__price { min-width:0; }
.cartline__media { overflow:hidden; max-width:100%; flex-shrink:0; }
.cartline__media .tj-image-placeholder { min-height:0; height:100%; padding:6px; box-sizing:border-box; }
.cartline__title { overflow-wrap:anywhere; }
@media(max-width:768px) { .cartline__price { white-space:normal; overflow-wrap:anywhere; } .cartline__controls { flex-wrap:wrap; } }

.cartline__media img.tj-listing-image { object-fit:contain; }
.tj-footer .license-badges .trust-seal img { background:rgba(255,255,255,.9);border-radius:var(--tj-r-sm);padding:5px;opacity:.9; }
.tj-compare-col-head > a:first-of-type { display:block; width:84px; height:84px; }
.tj-compare-col-head img.tj-listing-image { object-fit:contain; }

.btn:disabled { opacity: .65; cursor: not-allowed; box-shadow: none; }
.qty__btn:disabled { opacity: .45; color: var(--tj-text-muted); background: var(--tj-border); cursor: not-allowed; }
