.npc-catalog {
    --npc-border: #e5e7eb;
    --npc-text: #161616;
    --npc-muted: #7d7d7d;
    --npc-soft: #f5f5f5;
    --npc-accent: #2f63cf;
    --npc-radius: 14px;
    --npc-image-col-width: 38%;
    --npc-gap: 48px;
    width: 100%;
    box-sizing: border-box;
}

.npc-catalog * {
    box-sizing: border-box;
}

.npc-hero {
    display: grid;
    grid-template-columns: minmax(0, var(--npc-image-col-width, 38%)) minmax(0, 1fr);
    gap: var(--npc-gap, 48px);
    align-items: start;
    position: relative;
}

.npc-hero.npc-has-column-divider::after {
    content: '';
    position: absolute;
    left: calc(var(--npc-image-col-width, 38%) + (var(--npc-gap, 48px) / 2));
    top: calc(50% + var(--npc-hero-divider-offset-y, 0px));
    transform: translate(-50%, -50%);
    height: var(--npc-hero-divider-height, 100%);
    width: 0;
    border-right: var(--npc-hero-divider-width, 1px) var(--npc-hero-divider-style, solid) var(--npc-hero-divider-color, #e5e5e5);
    pointer-events: none;
    z-index: 2;
}

.npc-hero-media {
    min-width: 0;
    align-self: start;
    height: auto;
}

.npc-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: var(--npc-img-aspect, 1 / 1);
    max-width: 100%;
    overflow: hidden;
    background: var(--npc-img-bg, #f7f7f7);
    border-radius: var(--npc-img-radius, var(--npc-radius));
    box-sizing: border-box;
}

.npc-main-image {
    position: absolute;
    top: var(--npc-img-pad-top, 0);
    left: var(--npc-img-pad-left, 0);
    right: var(--npc-img-pad-right, 0);
    bottom: var(--npc-img-pad-bottom, 0);
    width: calc(100% - var(--npc-img-pad-left, 0px) - var(--npc-img-pad-right, 0px));
    height: calc(100% - var(--npc-img-pad-top, 0px) - var(--npc-img-pad-bottom, 0px));
    object-fit: var(--npc-img-fit, contain);
    background: var(--npc-img-bg, #f7f7f7);
}

.npc-main-image--secondary {
    position: absolute;
    top: var(--npc-img-pad-top, 0);
    left: var(--npc-img-pad-left, 0);
    right: var(--npc-img-pad-right, 0);
    bottom: var(--npc-img-pad-bottom, 0);
    width: calc(100% - var(--npc-img-pad-left, 0px) - var(--npc-img-pad-right, 0px));
    height: calc(100% - var(--npc-img-pad-top, 0px) - var(--npc-img-pad-bottom, 0px));
    object-fit: var(--npc-img-fit, contain);
    z-index: 2;
    background: var(--npc-img-bg, #f7f7f7);
}

.npc-image-code {
    position: absolute;
    left: calc(var(--npc-img-pad-left, 0px) + 18px);
    bottom: calc(var(--npc-img-pad-bottom, 0px) + 14px);
    z-index: 3;
    max-width: calc(100% - var(--npc-img-pad-left, 0px) - var(--npc-img-pad-right, 0px) - 36px);
    padding: var(--npc-badge-padding, 8px 12px);
    border-radius: var(--npc-badge-radius, 8px);
    background: var(--npc-badge-bg, rgba(0, 0, 0, .78));
    color: var(--npc-badge-color, #fff);
    font-size: var(--npc-badge-size, 12px);
    line-height: 1.1;
    letter-spacing: .04em;
}

.npc-hero-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* 3-tier Title Hierarchy */
.npc-header-group {
    order: 1;
    margin-bottom: 20px;
}

.npc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--npc-eyebrow-color, var(--npc-muted, #7d7d7d));
    font-size: var(--npc-eyebrow-size, 13px);
    font-weight: var(--npc-eyebrow-weight, 600);
    letter-spacing: var(--npc-eyebrow-spacing, 0.08em);
    text-transform: uppercase;
}

.npc-eyebrow.npc-eyebrow--no-line {
    gap: 0;
}

.npc-eyebrow.npc-eyebrow--no-line .npc-eyebrow-line {
    display: none !important;
}

.npc-eyebrow-line {
    display: inline-block;
    width: var(--npc-eyebrow-line-width, 36px);
    height: var(--npc-eyebrow-line-height, 1.5px);
    background-color: var(--npc-eyebrow-line-color, currentColor);
    border-radius: 1px;
    flex-shrink: 0;
}

.npc-eyebrow-text {
    display: inline-block;
}

.npc-title {
    margin: 0 0 8px;
    color: var(--npc-title-color, var(--npc-text));
    font-size: var(--npc-title-size, clamp(26px, 2.6vw, 38px));
    line-height: 1.15;
    font-weight: 700;
}

.npc-subtitle-code {
    display: inline-block;
    margin: 0 0 16px;
    color: var(--npc-subtitle-color, var(--npc-eyebrow-color, #7d7d7d));
    font-size: var(--npc-subtitle-size, var(--npc-eyebrow-size, 13px));
    font-weight: var(--npc-subtitle-weight, var(--npc-eyebrow-weight, 600));
    letter-spacing: var(--npc-subtitle-spacing, var(--npc-eyebrow-spacing, 0.08em));
    text-transform: uppercase;
}

/* Descriptions Group */
.npc-descriptions-group {
    order: 2;
    margin-bottom: 24px;
}

.npc-description {
    margin: 0 0 14px;
    color: var(--npc-desc-color, #4b4b4b);
    font-size: var(--npc-desc-size, 16px);
    line-height: 1.7;
}

.npc-option-description-wrapper {
    overflow: hidden;
    margin: 0;
    transition: height 0.32s cubic-bezier(0.25, 1, 0.5, 1), margin-bottom 0.32s cubic-bezier(0.25, 1, 0.5, 1);
}

.npc-option-description {
    box-sizing: border-box;
    margin: 0;
    padding: var(--npc-opt-desc-padding, 12px 16px);
    border-left: var(--npc-opt-desc-border-width, 3px) solid var(--npc-accent);
    background: var(--npc-opt-desc-bg, rgba(47, 99, 207, 0.04));
    border-radius: var(--npc-opt-desc-radius, 0 8px 8px 0);
    color: var(--npc-opt-desc-color, #333);
    font-size: var(--npc-opt-desc-size, 15px);
    line-height: 1.6;
}

/* Features Block */
.npc-features-wrap {
    order: 3;
    margin: 0 0 28px;
}

.npc-features-wrap .npc-features {
    margin-bottom: 0;
}

.npc-features-heading {
    margin-bottom: 12px;
    color: var(--npc-heading-color, var(--npc-text));
    font-size: var(--npc-heading-size, 14px);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.npc-features {
    order: 3;
    display: grid;
    grid-template-columns: repeat(var(--npc-features-cols, 2), minmax(0, 1fr));
    gap: var(--npc-features-gap, 12px 20px);
    margin: 0 0 28px;
}

.npc-features.npc-features--inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--npc-features-gap, 10px 12px);
}

.npc-features.npc-features--inline .npc-feature {
    flex: 0 0 auto;
    width: auto;
}

/* Categories & Options in Right Column */
.npc-selector {
    order: 4;
    margin-top: 0;
    margin-bottom: 28px;
}

.npc-categories-wrap {
    margin-bottom: 20px;
}

.npc-options-wrap {
    margin-bottom: 0;
}

.npc-selector-heading {
    margin-bottom: 12px;
    color: var(--npc-heading-color, var(--npc-text));
    font-size: var(--npc-heading-size, 14px);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.npc-categories,
.npc-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--npc-btn-gap, 10px);
}

.npc-category,
.npc-option {
    appearance: none;
    border: 1px solid transparent;
    border-radius: var(--npc-cat-radius, 999px);
    background: var(--npc-cat-bg, var(--npc-soft));
    color: var(--npc-cat-color, #555);
    cursor: pointer;
    font: inherit;
    font-size: var(--npc-cat-font-size, 14px);
    font-weight: 500;
    line-height: 1.25;
    padding: var(--npc-cat-padding, 11px 19px);
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.npc-category:hover {
    background: var(--npc-cat-hover-bg, #eaeaea);
    color: var(--npc-cat-hover-color, #222);
    border-color: var(--npc-cat-hover-border, transparent);
    transform: translateY(-1px);
}

.npc-category.is-active {
    border-color: var(--npc-cat-active-border, var(--npc-accent));
    background: var(--npc-cat-active-bg, #f4f7ff);
    color: var(--npc-cat-active-color, var(--npc-accent));
    font-weight: 600;
}

.npc-option {
    border-radius: var(--npc-opt-radius, 999px);
    border: 1px solid var(--npc-opt-border, var(--npc-border));
    background: var(--npc-opt-bg, #fff);
    color: var(--npc-opt-color, #444);
    font-size: var(--npc-opt-font-size, 14px);
    padding: var(--npc-opt-padding, 11px 19px);
}

.npc-option:hover {
    background: var(--npc-opt-hover-bg, #f9f9f9);
    color: var(--npc-opt-hover-color, #111);
    border-color: var(--npc-opt-hover-border, #ccc);
    transform: translateY(-1px);
}

.npc-option.is-active {
    border-color: var(--npc-opt-active-border, var(--npc-accent));
    background: var(--npc-opt-active-bg, var(--npc-accent));
    color: var(--npc-opt-active-color, #fff);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(47, 99, 207, 0.22);
}

.npc-feature {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
    box-sizing: border-box;
    background-color: var(--npc-feature-bg, transparent);
    border-radius: var(--npc-feature-radius, 0px);
    border: var(--npc-feature-border-width, 0px) var(--npc-feature-border-style, solid) var(--npc-feature-border-color, transparent);
    padding: var(--npc-feature-padding, 0px);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.npc-feature:hover {
    background-color: var(--npc-feature-hover-bg, var(--npc-feature-bg, transparent));
    border-color: var(--npc-feature-hover-border-color, var(--npc-feature-border-color, transparent));
    transform: var(--npc-feature-hover-transform, none);
}

.npc-feature:hover .npc-feature-text {
    color: var(--npc-feature-hover-color, var(--npc-feature-text-color, var(--npc-text)));
}

.npc-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 var(--npc-feature-icon-box, 24px);
    width: var(--npc-feature-icon-box, 24px);
    height: var(--npc-feature-icon-box, 24px);
    border-radius: var(--npc-feature-icon-radius, 7px);
    background: var(--npc-feature-icon-bg, #dff4e6);
    color: var(--npc-feature-icon-color, #208342);
    font-size: var(--npc-feature-icon-size, 13px);
    font-weight: 700;
}

.npc-feature-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.npc-feature-text {
    color: var(--npc-feature-text-color, var(--npc-text));
    font-size: var(--npc-feature-text-size, 15px);
    line-height: 1.35;
}

/* Product Information (Fluid Animated Height & Column Divider) */
.npc-information {
    order: 5;
    margin-top: 0;
    margin-bottom: 28px;
    width: var(--npc-info-table-width, 100%);
    max-width: 100%;
    background-color: var(--npc-info-table-bg, transparent);
    padding: var(--npc-info-table-padding, 0px);
    border-radius: var(--npc-info-table-radius, 0px);
    box-sizing: border-box;
}

.npc-information-heading {
    margin-bottom: 0;
    padding: 0 0 13px;
    color: var(--npc-info-heading-color, var(--npc-text));
    font-size: var(--npc-info-heading-size, 14px);
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.npc-information-list-wrapper {
    overflow: hidden;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.npc-information-list {
    border-top: var(--npc-info-border-top-width, 1px) var(--npc-info-border-top-style, solid) var(--npc-info-border-color, var(--npc-border));
}

/* Prevent double borders when table has an outer border */
.npc-information.npc-borders-between .npc-information-list,
.npc-information.npc-borders-none .npc-information-list,
.npc-information.npc-no-first-border .npc-information-list {
    border-top: none;
}

.npc-information-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(120px, 42%) minmax(0, 1fr);
    gap: 18px;
    padding-top: var(--npc-info-row-padding-top, 14px);
    padding-bottom: var(--npc-info-row-padding-bottom, 14px);
    padding-left: var(--npc-info-row-padding-left, 0px);
    padding-right: var(--npc-info-row-padding-right, 0px);
    box-sizing: border-box;
    animation: npcRowFadeIn 0.25s cubic-bezier(0.2, 0.8, 0.4, 1) both;
}

/* Customizable Row Divider Line (via ::after) */
.npc-information-row::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--npc-info-row-divider-left, 50%);
    transform: var(--npc-info-row-divider-transform, translateX(-50%));
    width: var(--npc-info-row-divider-width, 100%);
    height: 0;
    border-bottom: var(--npc-info-row-divider-thickness, 1px) var(--npc-info-row-divider-style, solid) var(--npc-info-border-color, var(--npc-border));
    pointer-events: none;
}

/* Extend dividers across container padding when enabled */
.npc-information.npc-extend-dividers .npc-information-row::after {
    left: calc(-1 * var(--npc-info-container-pad-left, 0px) + (50% - (var(--npc-info-row-divider-width, 100%) / 2)));
    width: calc(var(--npc-info-row-divider-width, 100%) + var(--npc-info-container-pad-left, 0px) + var(--npc-info-container-pad-right, 0px));
}

/* Between-only mode: hide bottom divider on the last row */
.npc-information.npc-borders-between .npc-information-row:last-child::after,
.npc-information.npc-no-last-border .npc-information-row:last-child::after {
    display: none !important;
}

/* None mode: hide all row dividers */
.npc-information.npc-borders-none .npc-information-row::after {
    display: none !important;
}

.npc-information.npc-has-column-divider .npc-information-label {
    border-right: var(--npc-info-col-divider-w, 1px) var(--npc-info-col-divider-s, solid) var(--npc-info-col-divider-c, var(--npc-border));
    padding-right: 14px;
}

.npc-information.npc-has-column-divider .npc-information-value {
    padding-left: 14px;
}

@keyframes npcRowFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.npc-information-label {
    color: var(--npc-info-label-color, #98928a);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: var(--npc-info-label-size, 12px);
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.npc-information-value {
    color: var(--npc-info-value-color, var(--npc-text));
    font-size: var(--npc-info-value-size, 15px);
    font-weight: 600;
    text-align: right;
}

.npc-information-empty,
.npc-options-empty {
    padding: 16px 0;
    color: var(--npc-muted);
    font-size: 14px;
}

.npc-selected-code {
    display: inline-block;
}

.npc-error,
.npc-editor-placeholder {
    padding: 18px;
    border: 1px dashed #d7d7d7;
    border-radius: 10px;
    color: #666;
    font-size: 14px;
}

/* Responsive Rules */
@media (max-width: 1024px) {
    .npc-hero {
        grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
        gap: 32px;
    }
}

@media (max-width: 767px) {
    .npc-hero {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .npc-hero.npc-has-column-divider::after {
        display: none !important;
    }

    .npc-features {
        grid-template-columns: 1fr;
    }

    .npc-information-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .npc-information.npc-has-column-divider .npc-information-label {
        border-right: none;
        padding-right: 0;
    }

    .npc-information.npc-has-column-divider .npc-information-value {
        padding-left: 0;
    }

    .npc-information-value {
        text-align: left;
    }
}

/* Corner Frame Marks (4 corner lines) */
.frame,
.npc-image-wrap.has-frame {
    position: relative;
}

.fr {
    position: absolute;
    width: var(--npc-frame-size, 18px);
    height: var(--npc-frame-size, 18px);
    pointer-events: none;
    z-index: 10;
    border-color: var(--npc-frame-color, #8b5a2b);
    border-style: solid;
    box-sizing: border-box;
}

.fr-tl {
    top: var(--npc-frame-offset, 0px);
    left: var(--npc-frame-offset, 0px);
    border-width: var(--npc-frame-width, 2px) 0 0 var(--npc-frame-width, 2px);
}

.fr-tr {
    top: var(--npc-frame-offset, 0px);
    right: var(--npc-frame-offset, 0px);
    border-width: var(--npc-frame-width, 2px) var(--npc-frame-width, 2px) 0 0;
}

.fr-bl {
    bottom: var(--npc-frame-offset, 0px);
    left: var(--npc-frame-offset, 0px);
    border-width: 0 0 var(--npc-frame-width, 2px) var(--npc-frame-width, 2px);
}

.fr-br {
    bottom: var(--npc-frame-offset, 0px);
    right: var(--npc-frame-offset, 0px);
    border-width: 0 var(--npc-frame-width, 2px) var(--npc-frame-width, 2px) 0;
}
