.hnjrw-v2-recipe {
    --hnjrw-accent: var(--wd-primary-color, var(--e-global-color-primary, #2271b1));
    --hnjrw-button-text: #fff;
    --hnjrw-card-bg: #fff;
    --hnjrw-card-border: rgba(0,0,0,.12);
    --hnjrw-text: inherit;
    --hnjrw-radius: 12px;
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    color: var(--hnjrw-text);
}
.hnjrw-v2-recipe *, .hnjrw-v2-recipe *::before, .hnjrw-v2-recipe *::after { box-sizing: border-box; }
.hnjrw-v2-intro, .hnjrw-v2-extra { margin: 0 0 2rem; }
.hnjrw-v2-intro > :first-child, .hnjrw-v2-extra > :first-child { margin-top: 0; }
.hnjrw-v2-intro > :last-child, .hnjrw-v2-extra > :last-child { margin-bottom: 0; }

.hnjrw-recipe-card-v2 {
    width: 100%;
    margin: 2rem 0;
    padding: clamp(1.1rem, 2.5vw, 2rem);
    border: 1px solid var(--hnjrw-card-border);
    border-radius: var(--hnjrw-radius);
    background: var(--hnjrw-card-bg);
}
.hnjrw-card-v2-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.25rem; }
.hnjrw-card-v2-head h2 { margin: .2rem 0 .55rem; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.15; }
.hnjrw-card-kicker { display: block; font-size: .78em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.hnjrw-card-summary { margin: 0; max-width: 70ch; }
.hnjrw-card-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; flex: 0 0 auto; }
.hnjrw-secondary-button, .hnjrw-primary-button, .hnjrw-scale-button {
    appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 42px;
    padding: .65rem .9rem; border: 1px solid currentColor; border-radius: 7px; background: transparent;
    color: inherit; font: inherit; line-height: 1.1; text-decoration: none; cursor: pointer;
}
.hnjrw-secondary-button:hover, .hnjrw-secondary-button:focus-visible { opacity: .78; }
.hnjrw-cook-mode.is-active { background: var(--hnjrw-accent); border-color: var(--hnjrw-accent); color: var(--hnjrw-button-text); }
.hnjrw-primary-button { background: var(--hnjrw-accent); border-color: var(--hnjrw-accent); color: var(--hnjrw-button-text); font-weight: 700; }
.hnjrw-primary-button[disabled] { opacity: .65; cursor: wait; }

.hnjrw-v2-meta { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; margin: 1.25rem 0 1.75rem; overflow: hidden; border: 1px solid var(--hnjrw-card-border); border-radius: 9px; background: var(--hnjrw-card-border); }
.hnjrw-v2-meta > div { min-width: 0; padding: .8rem 1rem; background: var(--hnjrw-card-bg); }
.hnjrw-v2-meta span { display: block; margin-bottom: .15rem; font-size: .82em; opacity: .68; }
.hnjrw-v2-meta strong { display: block; overflow-wrap: anywhere; }

.hnjrw-v2-section { margin-top: 1.8rem; }
.hnjrw-v2-section > h3, .hnjrw-v2-section-head h3 { margin: 0; font-size: 1.35em; }
.hnjrw-v2-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.hnjrw-scale-controls { display: inline-flex; gap: .35rem; }
.hnjrw-scale-button { min-width: 44px; min-height: 38px; padding: .45rem .65rem; }
.hnjrw-scale-button.is-active { background: var(--hnjrw-accent); border-color: var(--hnjrw-accent); color: var(--hnjrw-button-text); }

.hnjrw-v2-ingredient-list { list-style: none !important; margin: 0 !important; padding: 0 !important; border-top: 1px solid var(--hnjrw-card-border); }
.hnjrw-v2-ingredient { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: .65rem; align-items: start; margin: 0 !important; padding: .75rem 0; border-bottom: 1px solid var(--hnjrw-card-border); }
.hnjrw-v2-ingredient::before { display: none !important; }
.hnjrw-v2-ingredient input[type="checkbox"] { width: 18px; height: 18px; margin: .18rem 0 0; }
.hnjrw-v2-bullet { font-size: 1.35em; line-height: 1; }
.hnjrw-v2-ingredient label { cursor: pointer; }
.hnjrw-amount-display { font-weight: 700; }
.hnjrw-ingredient-content { min-width: 0; }
.hnjrw-product-line { display: flex; align-items: center; gap: .65rem; margin-top: .45rem; min-width: 0; opacity: .82; }
.hnjrw-product-thumb-link { display: block; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 6px; overflow: hidden; border: 1px solid var(--hnjrw-card-border); background: var(--hnjrw-card-bg); }
.hnjrw-product-thumb { display: block !important; width: 46px !important; height: 46px !important; max-width: none !important; object-fit: cover; margin: 0 !important; }
.hnjrw-product-info { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .5rem; }
.hnjrw-product-link { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.hnjrw-product-price, .hnjrw-product-stock { white-space: nowrap; }
.hnjrw-shop-action { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: 1.1rem; }
.hnjrw-status a { font-weight: 700; }

.hnjrw-steps-list { list-style: none !important; margin: 1rem 0 0 !important; padding: 0 !important; }
.hnjrw-step { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 1rem; align-items: start; margin: 0 0 1.5rem !important; padding: 0 !important; }
.hnjrw-step::before { display: none !important; }
.hnjrw-step-number-front { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: var(--hnjrw-accent); color: var(--hnjrw-button-text); font-weight: 800; }
.hnjrw-step-body p { margin: .4rem 0 .8rem; }
.hnjrw-step-image { display: block; width: 100%; max-width: 760px; height: auto; margin: .75rem 0 0; border-radius: var(--hnjrw-radius); }
.hnjrw-tips { padding: 1rem 1.1rem; border-left: 4px solid var(--hnjrw-accent); background: color-mix(in srgb, var(--hnjrw-accent) 7%, transparent); }
.hnjrw-tips ul { margin-bottom: 0; }

.hnjrw-single-category-nav { margin: 0 0 1.5rem; padding: 1rem 0; border-top: 1px solid rgba(127,127,127,.2); border-bottom: 1px solid rgba(127,127,127,.2); }
.hnjrw-single-category-label { display: block; margin-bottom: .65rem; font-weight: 700; }
.hnjrw-single-category-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.hnjrw-single-category-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: .6rem .9rem; border: 1px solid currentColor; border-radius: 6px; background: transparent; color: inherit; text-decoration: none; }
.hnjrw-single-category-button.is-active, .hnjrw-single-category-button:hover, .hnjrw-single-category-button:focus-visible { background: var(--hnjrw-accent); border-color: var(--hnjrw-accent); color: var(--hnjrw-button-text); }
.hnjrw-single-category-button.is-child { opacity: .85; }

.hnjrw-related { margin: 2.5rem 0 1rem; }
.hnjrw-related h2 { margin-bottom: 1rem; }
.hnjrw-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.hnjrw-related-grid article { min-width: 0; }
.hnjrw-related-grid a { display: block; color: inherit; text-decoration: none; }
.hnjrw-related-grid img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; margin-bottom: .55rem; border-radius: 8px; }
.hnjrw-related-grid strong { display: block; line-height: 1.25; }

@media (max-width: 800px) {
    .hnjrw-v2-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .hnjrw-card-v2-head { flex-direction: column; }
    .hnjrw-card-tools { justify-content: flex-start; }
    .hnjrw-related-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
    .hnjrw-recipe-card-v2 { padding: 1rem; }
    .hnjrw-v2-meta { grid-template-columns: 1fr; }
    .hnjrw-v2-section-head { align-items: flex-start; flex-direction: column; }
    .hnjrw-step { grid-template-columns: 36px minmax(0,1fr); gap: .7rem; }
    .hnjrw-step-number-front { width: 34px; height: 34px; }
    .hnjrw-shop-action, .hnjrw-primary-button { width: 100%; }
    .hnjrw-related-grid { grid-template-columns: 1fr; }
}

/* Hoofdafbeelding vergroting: alleen actief op HNJWEB-recepten. */
html.hnjrw-lightbox-open { overflow: hidden; }
.hnjrw-image-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 4vw, 48px);
    background: rgba(0,0,0,.88);
}
.hnjrw-image-lightbox-large {
    display: block;
    max-width: min(96vw, 1800px) !important;
    max-height: 92vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}
.hnjrw-image-lightbox-close {
    position: fixed;
    top: 14px;
    right: 18px;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 999px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font: 34px/1 Arial, sans-serif;
    cursor: pointer;
}


/* v2.3 stock-aware product alternatives. */
.hnjrw-product-line.is-unavailable { opacity: .58; }
.hnjrw-alternative-picker { margin-top: .7rem; padding: .8rem; border: 1px solid var(--hnjrw-card-border); border-radius: 8px; background: rgba(127,127,127,.04); }
.hnjrw-alternative-title { display: block; margin-bottom: .6rem; font-size: .92em; }
.hnjrw-alternative-options { display: grid; gap: .55rem; }
.hnjrw-alternative-option { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: .55rem; align-items: center; }
.hnjrw-alternative-option > input[type="radio"] { width: 18px; height: 18px; margin: 0; }
.hnjrw-alternative-label { display: flex; align-items: center; gap: .6rem; min-width: 0; cursor: pointer; }
.hnjrw-alternative-thumb-link { display: block; flex: 0 0 42px; width: 42px; height: 42px; overflow: hidden; border: 1px solid var(--hnjrw-card-border); border-radius: 6px; background: var(--hnjrw-card-bg); }
.hnjrw-alternative-thumb { display: block !important; width: 42px !important; height: 42px !important; max-width: none !important; object-fit: cover; margin: 0 !important; }
.hnjrw-alternative-info { display: flex; min-width: 0; flex-direction: column; gap: .1rem; }
.hnjrw-alternative-info .hnjrw-product-link { overflow-wrap: anywhere; }
@media (max-width: 600px) {
    .hnjrw-alternative-picker { padding: .65rem; }
}

/* v2.3.3: keep saved alternatives visible even when not directly purchasable. */
.hnjrw-alternative-option.is-unavailable { opacity: .72; }
.hnjrw-alternative-radio-placeholder { display: inline-flex; width: 18px; min-width: 18px; align-items: center; justify-content: center; }
.hnjrw-alternative-option.is-unavailable .hnjrw-alternative-label { cursor: default; }
.hnjrw-alternative-none { margin: .65rem 0 0; font-size: .92em; opacity: .8; }


/* v2.6.0 – verkoopgerichte "Shop dit recept" weergave. */
.hnjrw-v2-ingredients {
    --hnjrw-shop-soft: color-mix(in srgb, var(--hnjrw-accent) 7%, var(--hnjrw-card-bg));
    --hnjrw-shop-soft-strong: color-mix(in srgb, var(--hnjrw-accent) 13%, var(--hnjrw-card-bg));
}
.hnjrw-v2-ingredient input[type="checkbox"],
.hnjrw-v2-ingredient input[type="radio"] {
    accent-color: var(--hnjrw-accent);
}
.hnjrw-v2-ingredient.has-shop-products {
    margin: .55rem 0 !important;
    padding: 1rem !important;
    border: 1px solid var(--hnjrw-card-border);
    border-radius: 10px;
    background: var(--hnjrw-card-bg);
}
.hnjrw-v2-ingredient.has-shop-products + .hnjrw-v2-ingredient.has-shop-products {
    margin-top: .7rem !important;
}
.hnjrw-ingredient-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .7rem;
}
.hnjrw-ingredient-heading > label {
    flex: 1 1 260px;
    font-weight: 600;
    line-height: 1.4;
}
.hnjrw-shop-available-badge,
.hnjrw-choice-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    padding: .22rem .48rem;
    border-radius: 999px;
    font-size: .74em;
    font-weight: 700;
    line-height: 1.2;
}
.hnjrw-shop-available-badge {
    background: var(--hnjrw-shop-soft);
    color: var(--hnjrw-accent);
}
.hnjrw-choice-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}
.hnjrw-choice-badge {
    border: 1px solid color-mix(in srgb, var(--hnjrw-accent) 28%, var(--hnjrw-card-border));
    background: var(--hnjrw-shop-soft);
    color: var(--hnjrw-accent);
}
.hnjrw-choice-badge.is-primary {
    background: var(--hnjrw-accent);
    border-color: var(--hnjrw-accent);
    color: var(--hnjrw-button-text);
}
.hnjrw-choice-badge.is-unavailable {
    border-color: var(--hnjrw-card-border);
    background: rgba(127,127,127,.1);
    color: inherit;
    opacity: .72;
}
.hnjrw-product-line.hnjrw-shop-product-option,
.hnjrw-alternative-option.hnjrw-shop-product-option {
    position: relative;
    margin-top: .65rem;
    padding: .7rem;
    border: 1px solid var(--hnjrw-card-border);
    border-radius: 9px;
    background: color-mix(in srgb, var(--hnjrw-card-bg) 96%, var(--hnjrw-accent));
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.hnjrw-product-line.hnjrw-shop-product-option {
    display: grid;
    grid-template-columns: auto 58px minmax(0,1fr);
    gap: .7rem;
    align-items: center;
    opacity: 1;
}
.hnjrw-product-line.hnjrw-shop-product-option:not(.has-choice-radio) {
    grid-template-columns: 58px minmax(0,1fr);
}
.hnjrw-product-line.hnjrw-shop-product-option.is-selected,
.hnjrw-alternative-option.hnjrw-shop-product-option.is-selected {
    border-color: var(--hnjrw-accent);
    background: var(--hnjrw-shop-soft);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--hnjrw-accent) 22%, transparent);
}
.hnjrw-shop-product-option.is-unavailable {
    opacity: .62;
}
.hnjrw-shop-product-option:not(.is-unavailable) {
    cursor: pointer;
}
.hnjrw-product-thumb-link {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
}
.hnjrw-product-thumb {
    width: 58px !important;
    height: 58px !important;
}
.hnjrw-product-info,
.hnjrw-alternative-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .22rem;
}
.hnjrw-product-link {
    font-weight: 700;
    line-height: 1.3;
    text-decoration-thickness: 1px;
}
.hnjrw-product-price {
    color: var(--hnjrw-accent);
    font-weight: 800;
}
.hnjrw-product-stock {
    font-size: .88em;
    font-weight: 600;
    opacity: .75;
}
.hnjrw-product-view {
    display: inline-flex;
    margin-top: .08rem;
    color: inherit;
    font-size: .82em;
    font-weight: 600;
    text-decoration: none;
    opacity: .72;
}
.hnjrw-product-view:hover,
.hnjrw-product-view:focus-visible {
    color: var(--hnjrw-accent);
    opacity: 1;
}
.hnjrw-alternative-picker {
    margin-top: .8rem;
    padding: .8rem;
    border-color: color-mix(in srgb, var(--hnjrw-accent) 24%, var(--hnjrw-card-border));
    background: var(--hnjrw-shop-soft);
}
.hnjrw-alternative-heading {
    display: flex;
    flex-direction: column;
    gap: .12rem;
    margin-bottom: .65rem;
}
.hnjrw-alternative-heading > span {
    font-size: .86em;
    opacity: .72;
}
.hnjrw-alternative-options {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: .65rem;
}
.hnjrw-alternative-option.hnjrw-shop-product-option {
    grid-template-columns: 22px minmax(0,1fr);
    margin-top: 0;
    background: var(--hnjrw-card-bg);
}
.hnjrw-alternative-label {
    align-items: center;
    gap: .7rem;
}
.hnjrw-alternative-thumb-link {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
}
.hnjrw-alternative-thumb {
    width: 54px !important;
    height: 54px !important;
}
.hnjrw-shop-action {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: .75rem 1rem;
    align-items: center;
    margin-top: 1.25rem;
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--hnjrw-accent) 28%, var(--hnjrw-card-border));
    border-radius: 10px;
    background: var(--hnjrw-shop-soft);
}
.hnjrw-shop-action-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .12rem;
}
.hnjrw-shop-action-kicker {
    color: var(--hnjrw-accent);
    font-size: .76em;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.hnjrw-shop-action-copy > strong {
    font-size: 1.02em;
}
.hnjrw-selected-count {
    font-size: .86em;
    opacity: .7;
}
.hnjrw-shop-action .hnjrw-primary-button {
    min-height: 48px;
    padding-inline: 1.1rem;
}
.hnjrw-shop-action .hnjrw-status {
    grid-column: 1 / -1;
}

@media (max-width: 760px) {
    .hnjrw-alternative-options { grid-template-columns: 1fr; }
    .hnjrw-shop-action { grid-template-columns: 1fr; }
    .hnjrw-shop-action .hnjrw-primary-button { width: 100%; }
}
@media (max-width: 560px) {
    .hnjrw-v2-ingredient.has-shop-products { padding: .8rem !important; }
    .hnjrw-product-line.hnjrw-shop-product-option { grid-template-columns: auto 52px minmax(0,1fr); }
    .hnjrw-product-line.hnjrw-shop-product-option:not(.has-choice-radio) { grid-template-columns: 52px minmax(0,1fr); }
    .hnjrw-product-thumb-link, .hnjrw-product-thumb { width: 52px !important; height: 52px !important; }
}
