/* Helfinch storefront correction 2026-12-02 — catalogue, family cards, product
 * buying area, owned footer and compact selectors. Uses the existing --hf27-*
 * tokens (Germany: graphite + restrained gold; other markets: Shopfront's own
 * palette). Spacing steps 8/12/16/24/32/48/64 px. No new theme layer. */

.hf-global {
    --hf-sf-surface: var(--hf27-surface);
    --hf-sf-raised: var(--hf27-elevated);
    --hf-sf-border: var(--hf27-border);
    --hf-sf-text: var(--hf27-text);
    --hf-sf-muted: var(--hf27-muted);
    --hf-sf-accent: var(--hf27-accent);
    --hf-sf-radius: 6px;
}

/* ---------- Catalogue lead-in: compact ---------- */

/* Catalogue/product: products arrive within the first desktop viewport. */
.hf-global-portal-compact .cs-site-content {
    margin-top: 12px;
}

.hf-global :is(.hf-fam-card__title, .hf-pd__title, .hf-fam-card__badge, .hf-pd__badge, .hf-cat-head h1) {
    letter-spacing: 0;
    word-spacing: normal;
}

.hf-global .hf-cat-toolbar select,
.hf-global .hf-pd__quote input,
.hf-global .hf-cat-toolbar input[type="search"] {
    height: 40px;
    min-height: 40px;
    padding-block: 0;
    line-height: 38px;
}

.hf-global .hf-cat-toolbar select:not([size]):not([multiple]) {
    width: auto;
    height: 40px;
    min-height: 40px;
    padding: 0 32px 0 12px;
    line-height: 38px;
}

.hf-cat-crumbs {
    margin: 8px 0 16px;
    color: var(--hf-sf-muted);
    font-size: .8125rem;
}

.hf-cat-crumbs a {
    color: var(--hf-sf-text);
    text-underline-offset: .2em;
}

.hf-cat-head {
    max-width: 62rem;
    margin: 0 0 16px;
}

.hf-cat-head h1 {
    margin: 0 0 6px;
    font-size: clamp(1.875rem, 1.8vw + .9rem, 2.375rem);
    line-height: 1.08;
    letter-spacing: -.02em;
}

.hf-cat-head p {
    margin: 0;
    max-width: 92ch;
    color: var(--hf-sf-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.hf-cat-nav ul,
.hf-cat-filters,
.hf-cat-active {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hf-cat-nav {
    margin: 0 0 8px;
}

.hf-cat-nav a,
.hf-cat-chip {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--hf-sf-border);
    border-radius: 999px;
    color: var(--hf-sf-text);
    font-size: .875rem;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.hf-cat-nav a:is(:hover, :focus-visible),
.hf-cat-chip:is(:hover, :focus-visible) {
    border-color: var(--hf-sf-accent);
}

.hf-cat-nav a[aria-current],
.hf-cat-chip[aria-current] {
    border-color: var(--hf-sf-accent);
    background: var(--hf-sf-accent);
    color: var(--hf27-bg, #101216);
    font-weight: 700;
}

.hf-cat-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin: 0 0 16px;
    padding: 8px 0;
    border-block: 1px solid var(--hf-sf-border);
}

.hf-cat-search {
    display: flex;
    gap: 8px;
    flex: 0 1 340px;
    min-width: 0;
}

.hf-cat-toolbar input[type="search"],
.hf-cat-toolbar select,
.hf-pd__quote input {
    min-height: 40px;
    min-width: 0;
    padding: 0 12px;
    border: 1px solid var(--hf-sf-border);
    border-radius: var(--hf-sf-radius);
    background: var(--hf-sf-surface);
    color: var(--hf-sf-text);
    font-size: .9375rem;
}

.hf-cat-toolbar input[type="search"] {
    flex: 1;
    width: 100%;
}

.hf-cat-btn {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid var(--hf-sf-border);
    border-radius: var(--hf-sf-radius);
    background: var(--hf-sf-raised);
    color: var(--hf-sf-text);
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.hf-cat-btn:is(:hover, :focus-visible) {
    border-color: var(--hf-sf-accent);
}

.hf-cat-btn--primary {
    border-color: var(--hf-sf-accent);
    background: var(--hf-sf-accent);
    color: var(--hf27-bg, #101216);
}

.hf-cat-filter {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
}

.hf-cat-filter__label,
.hf-cat-sort label {
    color: var(--hf-sf-muted);
    font-size: .8125rem;
}

.hf-cat-count {
    margin: 0 0 0 auto;
    color: var(--hf-sf-muted);
    font-size: .8125rem;
}

.hf-cat-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hf-cat-active {
    align-items: center;
    margin: 0 0 16px;
}

.hf-cat-clear {
    margin-left: 8px;
    color: var(--hf-sf-text);
    font-size: .8125rem;
}

.hf-cat-empty {
    padding: 32px 0;
}

.hf-cat-empty p {
    margin: 0 0 12px;
}

/* ---------- Family cards ---------- */

.hf-fam-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hf-fam-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0 0 4px;
}

.hf-fam-card__link {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.hf-fam-card__media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--hf-sf-border);
    border-radius: var(--hf-sf-radius);
    background: var(--hf-sf-surface);
}

.hf-fam-card__media > img,
.hf-pd__image > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hf-fam-card__media > img.hf27-fan-photo {
    inset: 8% 6%;
    width: 88%;
    height: 84%;
}

.hf-fam-card__badge,
.hf-pd__badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    padding: 4px 8px;
    border: 1px solid var(--hf-sf-border);
    border-radius: 4px;
    background: rgb(10 11 13 / 82%);
    color: #f2f3f5;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.3;
}

.hf-fam-card__link:is(:hover, :focus-visible) .hf-fam-card__media {
    border-color: var(--hf-sf-accent);
}

.hf-fam-card__title {
    margin: 0;
    color: var(--hf-sf-text);
    font-size: clamp(1rem, .4vw + .9rem, 1.1875rem);
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: break-word;
}

.hf-fam-card__link:is(:hover, :focus-visible) .hf-fam-card__title {
    text-decoration: underline;
    text-underline-offset: .18em;
}

.hf-fam-card__compat,
.hf-fam-card__summary,
.hf-fam-card__price {
    margin: 0;
    color: var(--hf-sf-muted);
    font-size: .8125rem;
    line-height: 1.45;
}

.hf-fam-card__price {
    color: var(--hf-sf-text);
}

.hf-fam-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 4px 0 0;
}

.hf-fam-card__action {
    color: var(--hf-sf-accent);
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
}

.hf-fam-compare {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    gap: 6px;
    color: var(--hf-sf-muted);
    font-size: .8125rem;
    cursor: pointer;
}

.hf-fam-compare input {
    width: 16px;
    height: 16px;
    accent-color: var(--hf-sf-accent);
}

.hf-texttile {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, var(--hf-sf-raised), var(--hf-sf-surface));
    color: var(--hf-sf-muted);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

/* Comparison tray: only visible once a configuration is selected. */
.hf-compare-tray {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding: 12px 16px;
    border: 1px solid var(--hf-sf-border);
    border-radius: var(--hf-sf-radius);
    background: var(--hf-sf-raised);
    box-shadow: 0 -8px 24px rgb(0 0 0 / 25%);
}

.hf-cat-form:has(.hf-fam-compare input:checked) .hf-compare-tray {
    display: flex;
}

.hf-compare-tray p {
    margin: 0 auto 0 0;
    color: var(--hf-sf-muted);
    font-size: .875rem;
}

.hf-cat-compare {
    margin: 0 0 32px;
}

.hf-cat-compare h2 {
    margin: 0 0 12px;
    font-size: 1.25rem;
}

.hf-cat-compare__scroll {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--hf-sf-border);
    border-radius: var(--hf-sf-radius);
}

.hf-cat-compare table {
    width: 100%;
    min-width: 36rem;
    margin: 0;
    border-collapse: collapse;
    font-size: .875rem;
}

.hf-cat-compare :is(th, td) {
    padding: 10px 12px;
    border-bottom: 1px solid var(--hf-sf-border);
    text-align: left;
    vertical-align: top;
}

.hf-cat-pagination ul {
    display: flex;
    gap: 8px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.hf-cat-pagination :is(a, span) {
    display: inline-flex;
    min-width: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hf-sf-border);
    border-radius: var(--hf-sf-radius);
    color: var(--hf-sf-text);
    text-decoration: none;
}

.hf-cat-pagination [aria-current] {
    border-color: var(--hf-sf-accent);
    background: var(--hf-sf-accent);
    color: var(--hf27-bg, #101216);
}

.hf-global--catalogue .hf-jr-related {
    margin-top: 48px;
}

/* ---------- Product (family) detail ---------- */

.hf-pd {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
    margin: 0 0 48px;
}

.hf-pd__image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--hf-sf-border);
    border-radius: var(--hf-sf-radius);
    background: var(--hf-sf-surface);
}

.hf-pd__media .hf27-gallery__main {
    position: relative;
}

.hf-pd__provenance {
    margin: 8px 0 0;
    color: var(--hf-sf-muted);
    font-size: .75rem;
}

.hf-pd__eyebrow {
    margin: 0 0 8px;
    color: var(--hf-sf-accent);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hf-pd__title {
    margin: 0 0 8px;
    font-size: clamp(1.625rem, 1.6vw + 1rem, 2.25rem);
    line-height: 1.12;
    letter-spacing: -.015em;
}

.hf-pd__compat {
    margin: 0 0 12px;
    color: var(--hf-sf-muted);
    font-size: .875rem;
}

.hf-pd__desc {
    margin: 0 0 24px;
    max-width: 52ch;
    line-height: 1.55;
}

.hf-pd__options {
    margin: 0 0 16px;
}

.hf-pd__options-label {
    margin: 0 0 8px;
    font-size: .8125rem;
    font-weight: 700;
}

.hf-pd__options ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hf-opt {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--hf-sf-border);
    border-radius: var(--hf-sf-radius);
    color: var(--hf-sf-text);
    font-size: .875rem;
    text-decoration: none;
}

.hf-opt:is(:hover, :focus-visible) {
    border-color: var(--hf-sf-accent);
}

.hf-opt[aria-current] {
    border: 2px solid var(--hf-sf-accent);
    padding: 0 13px;
    background: var(--hf27-accent-soft, transparent);
    font-weight: 700;
}

.hf-pd__summary {
    display: grid;
    gap: 8px;
    margin: 8px 0 16px;
    padding: 12px 16px;
    border: 1px solid var(--hf-sf-border);
    border-radius: var(--hf-sf-radius);
    background: var(--hf-sf-surface);
    font-size: .875rem;
}

.hf-pd__summary div {
    display: grid;
    grid-template-columns: minmax(7rem, auto) 1fr;
    gap: 12px;
}

.hf-pd__summary dt {
    color: var(--hf-sf-muted);
}

.hf-pd__summary dd {
    margin: 0;
    font-weight: 600;
}

.hf-pd__price {
    margin: 0 0 12px;
    font-size: 1.25rem;
    font-weight: 700;
}

.hf-pd__note,
.hf-pd__account {
    margin: 8px 0 0;
    color: var(--hf-sf-muted);
    font-size: .8125rem;
}

.hf-pd__account a {
    color: var(--hf-sf-text);
}

.hf-pd__quote label {
    display: block;
    margin: 0 0 6px;
    font-size: .8125rem;
    font-weight: 700;
}

.hf-pd__quote-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hf-pd__quote input {
    width: 7rem;
}

.hf-pd-specs {
    margin: 0 0 32px;
    padding-top: 24px;
    border-top: 1px solid var(--hf-sf-border);
}

.hf-pd-specs h2 {
    margin: 0 0 12px;
    font-size: 1.25rem;
}

.hf-pd-specs dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 32px;
    max-width: 56rem;
    margin: 0;
}

.hf-pd-specs dl div {
    display: grid;
    grid-template-columns: minmax(9rem, 40%) 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--hf-sf-border);
    font-size: .875rem;
}

.hf-pd-specs dt {
    color: var(--hf-sf-muted);
}

.hf-pd-specs dd {
    margin: 0;
}

.hf-global-check {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
}

.hf-global-check input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
}

/* ---------- Header selectors: flag + code, currency inside the menu ---------- */

.hf-global-preference-code {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.hf-global-preference-currency {
    color: var(--hf-sf-muted, inherit);
    font-size: .75rem;
}

/* ---------- Owned footer ---------- */

.hf-footer {
    padding: 48px 0 24px;
    border-top: 1px solid var(--hf27-border);
}

.hf-footer__top {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 2.4fr);
    gap: 48px;
}

.hf-footer__logo img {
    width: auto;
    max-width: 180px;
    height: auto;
    max-height: 44px;
}

.hf-footer__logo span {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: .06em;
}

.hf-footer__tagline {
    margin: 16px 0 8px;
    color: var(--hf27-text);
    font-size: 1rem;
    font-weight: 600;
}

.hf-footer__copy {
    max-width: 44ch;
    margin: 0;
    color: var(--hf27-muted);
    font-size: .875rem;
    line-height: 1.6;
}

.hf-footer__nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.hf-footer__heading {
    margin: 0 0 12px;
    color: var(--hf27-text);
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hf-footer__group ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hf-footer__group a {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    color: var(--hf27-muted);
    font-size: .875rem;
    text-decoration: none;
}

.hf-footer__group a:is(:hover, :focus-visible) {
    color: var(--hf27-text);
    text-decoration: underline;
    text-underline-offset: .2em;
}

.hf-footer__bottom {
    margin-top: 40px;
    padding-top: 16px;
    border-top: 1px solid var(--hf27-border);
}

.hf-footer__bottom p {
    margin: 0;
    color: var(--hf27-muted);
    font-size: .8125rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199.98px) {
    .hf-fam-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hf-fam-grid--home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
    .hf-pd { grid-template-columns: minmax(0, 1fr); }
    .hf-pd__image { max-width: 36rem; }
    .hf-footer__top { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .hf-footer__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hf-pd-specs dl { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767.98px) {
    .hf-fam-grid,
    .hf-fam-grid--home { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .hf-cat-count { margin-left: 0; order: 3; }
    .hf-global .hf-cat-toolbar select,
    .hf-global .hf-pd__quote input,
    .hf-global .hf-cat-toolbar input[type="search"],
    .hf-global .hf-cat-toolbar select:not([size]):not([multiple]) { height: 44px; min-height: 44px; line-height: 42px; }
    .hf-cat-search { flex: 1 1 100%; }
    .hf-cat-nav ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
    .hf-cat-nav a, .hf-cat-chip, .hf-cat-btn, .hf-opt { min-height: 44px; }
}

@media (max-width: 479.98px) {
    .hf-fam-grid,
    .hf-fam-grid--home { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .hf-fam-card__media { aspect-ratio: 16 / 10; }
    .hf-cat-head p { font-size: .9375rem; }
    .hf-cat-sort { margin-left: auto; }
    .hf-footer__nav { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .hf-fam-card__media { transition: none; }
}

/* No large unexplained band between the last content block and the footer. */
.hf-global-portal-compact .cs-site-content,
.hf-global-portal-compact .cs-main-content {
    margin-bottom: 0;
    padding-bottom: 32px;
}

.hf-global--catalogue .hf-jr-related {
    margin-bottom: 0;
}

/* Long German/French labels wrap inside narrow footer columns (no page overflow at 320 px). */
.hf-footer__group,
.hf-footer__group a {
    min-width: 0;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.hf-jr-home .cs-featured-products__header > div:first-child {
    flex: 1 1 16rem;
    min-width: 0;
}

.hf27-hw-cat__body {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 359.98px) {
    .hf-footer__nav { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- SF7: category-level artwork, accessories list, enquiry/no-image pages ---------- */

.hf-fam-card__media--category > img.hf-img-category {
    object-fit: cover;
    object-position: 50% 50%;
}

.hf-pd__image--category {
    aspect-ratio: 16 / 9;
}

.hf-pd__image--category > img {
    object-fit: cover;
}

.hf-pd--noimage {
    grid-template-columns: minmax(0, 46rem);
}

.hf-cat-list {
    margin: 40px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--hf-sf-border);
}

.hf-cat-list h2 {
    margin: 0 0 6px;
    font-size: 1.25rem;
    letter-spacing: 0;
}

.hf-cat-list > p {
    max-width: 62ch;
    margin: 0 0 16px;
    color: var(--hf-sf-muted);
    font-size: .875rem;
}

.hf-cat-list ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hf-cat-list li a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    min-height: 44px;
    padding: 10px 0;
    border-bottom: 1px solid var(--hf-sf-border);
    color: var(--hf-sf-text);
    text-decoration: none;
}

.hf-cat-list__name {
    font-weight: 600;
}

.hf-cat-list__sku {
    grid-column: 1;
    color: var(--hf-sf-muted);
    font-size: .75rem;
}

.hf-cat-list__action {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    color: var(--hf-sf-accent);
    font-size: .8125rem;
    font-weight: 700;
}

.hf-cat-list li a:is(:hover, :focus-visible) .hf-cat-list__name {
    text-decoration: underline;
    text-underline-offset: .18em;
}

.hf-price-preview-bar {
    margin: 0 0 16px;
    padding: 8px 12px;
    border: 1px dashed var(--hf-sf-accent);
    border-radius: var(--hf-sf-radius);
    color: var(--hf-sf-text);
    font-size: .8125rem;
}

@media (max-width: 767.98px) {
    .hf-cat-list ul { grid-template-columns: minmax(0, 1fr); }
}

/* Volume-tier table in the buying area (approved or owner-preview prices). */
.hf-pd .hf-global-tiers {
    margin: 16px 0;
}

.hf-pd .hf-global-tiers h2 {
    margin: 0 0 8px;
    font-size: 1rem;
    letter-spacing: 0;
}

.hf-pd .hf-global-tiers table.tiered-pricing-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    background: var(--hf-sf-surface);
    font-size: .875rem;
}

.hf-pd .hf-global-tiers table.tiered-pricing-table :is(th, td) {
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid var(--hf-sf-border);
    background: var(--hf-sf-surface);
    color: var(--hf-sf-text);
    text-align: left;
    letter-spacing: 0;
    word-spacing: normal;
    text-transform: none;
}

.hf-pd .hf-global-tiers table.tiered-pricing-table th {
    color: var(--hf-sf-muted);
    font-weight: 600;
}
