/* Thrift Heaven public market surfaces: one grid, one visual language. */
:root {
    --th-market-bg: #08080a;
    --th-market-surface: #0f0f12;
    --th-market-surface-2: #16161a;
    --th-market-line: #23232a;
    --th-market-line-strong: #35353e;
    --th-market-ink: #f2f2ef;
    --th-market-ink-2: #a5a5a2;
    --th-market-ink-3: #8c8c8e;
    --th-market-metal: #d2a72c;
    --th-market-metal-2: #e7bf4a;
    --th-market-ease: cubic-bezier(.2,.8,.2,1);
}

body.thf-skin,
body.thf-skin #page,
body.thf-skin .site-content { background: var(--th-market-bg) !important; color: var(--th-market-ink); }

/* The global navigation owns the page. The old grid header stays in the DOM
   only because legacy search code still queries it. */
body.thf-skin .thf-container > .thf-minimal-header { display: none !important; }

body.thf-skin .thf-container,
body.thf-skin .thf-store-wrapper {
    width: 100%;
    max-width: none;
    background: var(--th-market-bg) !important;
    color: var(--th-market-ink);
    font-family: Archivo, system-ui, sans-serif;
}

/* Exact progressive filter language used by Home V3. */
body.thf-skin .thf-catalog-filters {
    display: grid;
    justify-items: center;
    width: 100%;
    min-width: 0;
    gap: 12px;
    padding: 22px clamp(20px, 5vw, 72px) 16px;
    border-bottom: 1px solid var(--th-market-line);
    background: var(--th-market-bg);
}
body.thf-skin .thf-h3-filter-row {
    display: flex;
    justify-content: center;
    width: 100%;
    min-width: 0;
}
body.thf-skin .thf-h3-filter-stage { animation: thf-market-filter-in 260ms var(--th-market-ease) both; }
body.thf-skin .thf-h3-filter-stage[hidden] { display: none; }
@keyframes thf-market-filter-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}
body.thf-skin .thf-h3-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
body.thf-skin .thf-h3-filter {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 16px !important;
    border: 1px solid var(--th-market-line) !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--th-market-ink-2) !important;
    font: 500 12px/1 "IBM Plex Mono", monospace !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    transition: color 160ms var(--th-market-ease), border-color 160ms var(--th-market-ease), background 160ms var(--th-market-ease);
}
body.thf-skin .thf-h3-filter b { color: var(--th-market-ink-3); font-size: 10px; font-weight: 500; }
body.thf-skin .thf-h3-filter:hover { border-color: var(--th-market-metal) !important; color: var(--th-market-ink) !important; }
body.thf-skin .thf-h3-filter.is-active {
    border-color: var(--th-market-ink) !important;
    background: var(--th-market-ink) !important;
    color: var(--th-market-bg) !important;
}
body.thf-skin .thf-h3-filter.is-active b { color: rgba(8, 8, 10, .62); }
body.thf-skin .thf-h3-filter-more { display: flex; justify-content: center; min-height: 34px; }
body.thf-skin .thf-h3-filter-more[hidden] { display: none; }
body.thf-skin .thf-h3-filter-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 16px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--th-market-surface-2) !important;
    color: var(--th-market-ink-2) !important;
    font: 500 10px/1 "IBM Plex Mono", monospace !important;
}
body.thf-skin .thf-h3-filter-add:hover,
body.thf-skin .thf-h3-filter-add[aria-expanded="true"] { color: var(--th-market-ink) !important; background: var(--th-market-line) !important; }
body.thf-skin .thf-h3-filter-add span { color: var(--th-market-metal); font-size: 16px; line-height: 1; }
body.thf-skin .thf-h3-filter-summary { min-height: 18px; margin: 0; color: var(--th-market-ink-3); font: 500 10px/1.4 "IBM Plex Mono", monospace; }
body.thf-skin .thf-deeplink-notice {
    max-width: none;
    margin: 0;
    padding: 14px clamp(20px, 5vw, 72px);
    border: 0;
    border-bottom: 1px solid var(--th-market-line);
    border-radius: 0;
    background: var(--th-market-bg);
    color: var(--th-market-ink-3);
    font: 500 12px/1.3 "IBM Plex Mono", monospace;
}
body.thf-skin .thf-deeplink-notice strong { color: var(--th-market-ink) !important; font-weight: 500; }
body.thf-skin .thf-deeplink-notice a { color: var(--th-market-metal-2) !important; text-decoration: none; }
body.thf-skin .thf-deeplink-notice a:hover { text-decoration: underline; }

/* Catalog and seller inventory share the same responsive grid. */
body.thf-skin .thf-products-grid,
body.thf-skin .thf-store-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr)) !important;
    gap: 40px 20px !important;
    width: 100%;
    padding: 36px clamp(20px, 5vw, 72px) 72px !important;
    background: var(--th-market-bg) !important;
}

body.thf-skin a.thf-product-card,
body.thf-skin .thf-store-product-card,
body.thf-skin .thf-store-card-link {
    min-width: 0;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--th-market-ink) !important;
    text-decoration: none !important;
}
body.thf-skin a.thf-product-card,
body.thf-skin .thf-store-card-link {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    gap: 16px;
}
body.thf-skin a.thf-product-card:hover,
body.thf-skin .thf-store-product-card:hover { transform: none !important; box-shadow: none !important; }

body.thf-skin a.thf-product-card .thf-product-image,
body.thf-skin .thf-store-card-img-wrap {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5 !important;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 18px !important;
    background: var(--th-market-surface) !important;
}
body.thf-skin a.thf-product-card .thf-product-image img,
body.thf-skin .thf-store-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 360ms var(--th-market-ease), opacity 220ms var(--th-market-ease);
}
body.thf-skin .thf-store-card-img { position: absolute; inset: 0; }
body.thf-skin a.thf-product-card:hover .thf-product-image img,
body.thf-skin .thf-store-product-card:hover .thf-store-card-img { transform: scale(1.04); }

body.thf-skin a.thf-product-card .thf-product-info,
body.thf-skin .thf-store-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 0 !important;
    background: transparent !important;
}
body.thf-skin .thf-product-topline,
body.thf-skin .thf-store-card-brand {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    overflow: hidden;
    color: var(--th-market-ink-3) !important;
    font: 500 12px/1.2 "IBM Plex Mono", monospace !important;
    letter-spacing: .035em !important;
    text-transform: none !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}
body.thf-skin .thf-product-title,
body.thf-skin .thf-store-card-title {
    margin: 0 !important;
    color: var(--th-market-ink) !important;
    font: 600 17px/1.18 Archivo, system-ui, sans-serif !important;
    font-variation-settings: "wdth" 106;
    letter-spacing: 0 !important;
    text-transform: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-decoration: 1px solid underline transparent;
    text-underline-offset: 4px;
    transition: text-decoration-color 120ms var(--th-market-ease);
}
body.thf-skin a.thf-product-card:hover .thf-product-title,
body.thf-skin .thf-store-product-card:hover .thf-store-card-title { text-decoration-color: var(--th-market-metal); }
body.thf-skin .thf-product-bottomline,
body.thf-skin .thf-store-card-footer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}
body.thf-skin .thf-product-price,
body.thf-skin .thf-store-card-price {
    margin: 0 !important;
    color: var(--th-market-ink) !important;
    font: 600 16px/1 "IBM Plex Mono", monospace !important;
    font-variant-numeric: tabular-nums;
}
body.thf-skin .thf-product-seller,
body.thf-skin .thf-store-card-size { color: var(--th-market-ink-3) !important; font: 500 12px/1.2 "IBM Plex Mono", monospace !important; }
body.thf-skin .thf-store-badge { display: none !important; }

/* Store hero keeps the real seller identity and removes the generic white UI. */
body.thf-skin .thf-store-header { padding: clamp(48px, 7vw, 88px) clamp(20px, 5vw, 72px) 40px; border-bottom: 1px solid var(--th-market-line); background: var(--th-market-bg); }
body.thf-skin .thf-store-banner { display: none; }
body.thf-skin .thf-store-identity { max-width: 1180px; margin: 0 !important; padding: 0 !important; gap: 28px; align-items: center; }
body.thf-skin .thf-store-avatar-wrap { width: 96px; height: 96px; border: 1px solid var(--th-market-line-strong); border-radius: 18px; box-shadow: none; }
body.thf-skin .thf-store-info { padding: 0 !important; }
body.thf-skin .thf-store-name { color: var(--th-market-ink) !important; font: 700 clamp(30px, 4vw, 52px)/1 Archivo, system-ui, sans-serif !important; letter-spacing: -.03em !important; text-transform: none !important; }
body.thf-skin .thf-store-bio { color: var(--th-market-ink-2) !important; font-family: Archivo, system-ui, sans-serif !important; }
body.thf-skin .thf-store-meta-item,
body.thf-skin .thf-store-stat-label { color: var(--th-market-ink-3) !important; }
body.thf-skin .thf-store-stat-value { color: var(--th-market-ink) !important; }
body.thf-skin .thf-store-products-section { padding: 0 !important; background: var(--th-market-bg) !important; }
body.thf-skin .thf-store-filters-bar { padding: 22px clamp(20px, 5vw, 72px) 0 !important; margin: 0 !important; }
body.thf-skin .thf-store-sort-label { color: var(--th-market-ink-3) !important; }
body.thf-skin .thf-store-sort-select { min-height: 40px; border: 1px solid var(--th-market-line) !important; border-radius: 999px !important; background: var(--th-market-surface) !important; color: var(--th-market-ink) !important; }

body.thf-skin .thf-store-skeleton { border: 0; background: transparent; }
body.thf-skin .thf-store-skeleton-img { aspect-ratio: 4 / 5; padding: 0; border-radius: 18px; background: var(--th-market-surface-2); animation: thf-market-pulse 1.4s ease-in-out infinite alternate; }
body.thf-skin .thf-store-skeleton-title,
body.thf-skin .thf-store-skeleton-price { background: var(--th-market-surface-2); animation: thf-market-pulse 1.4s ease-in-out infinite alternate; }
@keyframes thf-market-pulse { to { opacity: .55; } }

@media (max-width: 760px) {
    body.thf-skin .thf-catalog-filters { justify-items: stretch; gap: 8px; padding: 14px 12px 10px; overflow: hidden; }
    body.thf-skin .thf-h3-filter-row { max-width: 100%; overflow: hidden; }
    body.thf-skin .thf-h3-filters { flex-wrap: nowrap; justify-content: flex-start; width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
    body.thf-skin .thf-h3-filters::-webkit-scrollbar { display: none; }
    body.thf-skin .thf-h3-filter { flex: 0 0 auto; }
    body.thf-skin .thf-deeplink-notice { padding: 12px; }
    body.thf-skin .thf-products-grid,
    body.thf-skin .thf-store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 28px 10px !important; padding: 28px 12px 64px !important; }
    body.thf-skin a.thf-product-card .thf-product-image,
    body.thf-skin .thf-store-card-img-wrap { border-radius: 12px !important; }
    body.thf-skin .thf-product-title,
    body.thf-skin .thf-store-card-title { font-size: 15px !important; }
    body.thf-skin .thf-store-header { padding: 36px 16px 28px; }
    body.thf-skin .thf-store-identity { align-items: flex-start; gap: 16px; }
    body.thf-skin .thf-store-avatar-wrap { width: 72px; height: 72px; border-radius: 14px; }
    body.thf-skin .thf-store-info { min-width: 0; flex: 1; }
    body.thf-skin .thf-store-stats { flex-wrap: wrap; }
    body.thf-skin .thf-store-filters-bar { padding-inline: 12px !important; }
}

@media (prefers-reduced-motion: reduce) {
    body.thf-skin a.thf-product-card *,
    body.thf-skin .thf-store-product-card *,
    body.thf-skin .thf-store-skeleton * { animation: none !important; transition: none !important; }
}
