.grimfaste-products-wrap {
    --grimfaste-bg: transparent;
    --grimfaste-accent: #111827;
    --grimfaste-text: #1f2937;
    --grimfaste-muted: #6b7280;
    --grimfaste-card-border: #d7dde6;
    --grimfaste-card-bg: #ffffff;
    --grimfaste-button-bg: linear-gradient(180deg, #ce4fe8 0%, #a12acb 100%);
    --grimfaste-button-text: #ffffff;
    margin: 1.5rem 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    max-width: 940px;
}

.grimfaste-products-wrap.grimfaste-products-single {
    max-width: 560px;
}

.grimfaste-products-heading {
    margin: 0 0 1rem;
    color: var(--grimfaste-accent);
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    line-height: 1.2;
    text-align: left;
    font-weight: 700;
}

.grimfaste-product-grid {
    display: grid;
    gap: 1rem;
}

.grimfaste-product-grid.grimfaste-columns-1 {
    grid-template-columns: 1fr;
}

.grimfaste-product-grid.grimfaste-columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grimfaste-product-grid.grimfaste-columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grimfaste-product-grid.grimfaste-columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grimfaste-product-card {
    border: 1px solid var(--grimfaste-card-border);
    border-radius: 10px;
    background: var(--grimfaste-card-bg);
    color: var(--grimfaste-text);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.grimfaste-product-image-wrap {
    padding: 1rem 1rem 0;
}

.grimfaste-product-image {
    width: 100%;
    height: clamp(160px, 17vw, 220px);
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.grimfaste-product-image--placeholder {
    width: 100%;
    height: clamp(160px, 17vw, 220px);
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grimfaste-muted);
    font-weight: 600;
    font-size: 0.9rem;
    background: #f8fafc;
}

.grimfaste-product-body {
    padding: 0.95rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    flex: 1;
}

.grimfaste-product-title {
    margin: 0;
    color: var(--grimfaste-text);
    font-size: 0.96rem;
    line-height: 1.3;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}

.grimfaste-product-rating {
    color: var(--grimfaste-muted);
    font-size: 0.85rem;
}

.grimfaste-product-description {
    margin: 0;
    color: var(--grimfaste-muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.grimfaste-product-features {
    margin: 0;
    padding-left: 1rem;
    color: var(--grimfaste-muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

.grimfaste-product-features li {
    margin: 0 0 0.35rem;
}

.grimfaste-product-footer {
    margin-top: auto;
    padding-top: 0.8rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.grimfaste-product-source {
    color: var(--grimfaste-accent);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
}

.grimfaste-product-cta,
.grimfaste-affiliate-link {
    display: inline-flex;
    width: auto;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.45rem 1.05rem;
    border-radius: 8px;
    border: none;
    background: var(--grimfaste-button-bg);
    color: var(--grimfaste-button-text);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.grimfaste-product-cta:hover,
.grimfaste-affiliate-link:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.grimfaste-product-disclosure {
    margin: 0.15rem 0 0;
    color: var(--grimfaste-muted);
    font-size: 0.7rem;
    line-height: 1.35;
}

/* Simple: hide rating, description, features */
.grimfaste-template-simple .grimfaste-product-card {
    text-align: center;
}

.grimfaste-template-simple .grimfaste-product-description,
.grimfaste-template-simple .grimfaste-product-rating,
.grimfaste-template-simple .grimfaste-product-features {
    display: none;
}

/* Detailed: horizontal grid layout */
.grimfaste-template-detailed .grimfaste-product-card {
    display: grid;
    grid-template-columns: minmax(190px, 35%) minmax(0, 1fr);
}

.grimfaste-template-detailed .grimfaste-product-image-wrap {
    padding: 1rem;
}

.grimfaste-template-detailed .grimfaste-product-body {
    padding: 1.2rem 1.2rem 1rem 0.5rem;
}

.grimfaste-products-single .grimfaste-product-card {
    max-width: 460px;
    margin: 0 auto;
}

@media (max-width: 960px) {
    .grimfaste-product-grid.grimfaste-columns-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grimfaste-product-grid.grimfaste-columns-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grimfaste-template-detailed .grimfaste-product-card {
        grid-template-columns: 1fr;
    }

    .grimfaste-template-detailed .grimfaste-product-body {
        padding: 1rem;
    }

    .grimfaste-product-image,
    .grimfaste-product-image--placeholder {
        height: clamp(150px, 26vw, 200px);
    }
}

@media (max-width: 640px) {
    .grimfaste-product-grid.grimfaste-columns-4,
    .grimfaste-product-grid.grimfaste-columns-3,
    .grimfaste-product-grid.grimfaste-columns-2 {
        grid-template-columns: 1fr;
    }

    .grimfaste-product-title {
        font-size: 0.95rem;
    }

    .grimfaste-product-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .grimfaste-product-cta {
        width: 100%;
    }
}

/* ── Editorial & Showcase: use full width ── */
.grimfaste-template-editorial.grimfaste-products-wrap,
.grimfaste-template-showcase.grimfaste-products-wrap {
    max-width: 940px;
}

.grimfaste-template-editorial.grimfaste-products-single .grimfaste-product-card,
.grimfaste-template-showcase.grimfaste-products-single .grimfaste-product-card {
    max-width: none;
}

/* ── Editorial template ── */
.grimfaste-template-editorial .grimfaste-product-card {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    text-align: left;
}

.grimfaste-template-editorial .grimfaste-product-image-wrap {
    padding: 1rem;
}

.grimfaste-template-editorial .grimfaste-product-image,
.grimfaste-template-editorial .grimfaste-product-image--placeholder {
    height: auto;
    max-height: 180px;
}

.grimfaste-template-editorial .grimfaste-product-body {
    padding: 1.2rem 1.2rem 1rem 0.5rem;
}

.grimfaste-template-editorial .grimfaste-product-title {
    font-size: 1.2rem;
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    min-height: 0;
}

.grimfaste-template-editorial .grimfaste-product-content-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
}

.grimfaste-template-editorial .grimfaste-product-features {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    color: var(--grimfaste-text);
    font-size: 0.88rem;
    line-height: 1.5;
}

.grimfaste-template-editorial .grimfaste-product-features li {
    padding-left: 1.4em;
    position: relative;
    margin: 0 0 0.3rem;
}

.grimfaste-template-editorial .grimfaste-product-features li::before {
    content: "\2714";
    color: #059669;
    position: absolute;
    left: 0;
    font-weight: 700;
}

.grimfaste-template-editorial .grimfaste-product-actions {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
}

.grimfaste-template-editorial .grimfaste-product-cta {
    text-transform: uppercase;
    font-weight: 800;
    padding: 0.6rem 1.4rem;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* ── Showcase template ── */
.grimfaste-template-showcase .grimfaste-product-card {
    padding: 2rem;
    text-align: center;
}

.grimfaste-template-showcase .grimfaste-product-body {
    padding: 0;
    gap: 1.2rem;
}

.grimfaste-template-showcase .grimfaste-product-title {
    font-size: 1.6rem;
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    min-height: 0;
    text-align: center;
}

.grimfaste-template-showcase .grimfaste-product-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 1.5rem;
}

.grimfaste-template-showcase .grimfaste-product-image-wrap {
    padding: 0;
}

.grimfaste-template-showcase .grimfaste-product-image,
.grimfaste-template-showcase .grimfaste-product-image--placeholder {
    height: auto;
    max-height: 350px;
}

.grimfaste-template-showcase .grimfaste-product-verdict {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.grimfaste-template-showcase .grimfaste-product-verdict-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--grimfaste-muted);
    font-weight: 600;
}

.grimfaste-template-showcase .grimfaste-product-verdict-score {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--grimfaste-accent);
    line-height: 1;
}

.grimfaste-template-showcase .grimfaste-product-verdict-reviews {
    font-size: 0.82rem;
    color: var(--grimfaste-muted);
}

.grimfaste-template-showcase .grimfaste-product-footer {
    justify-content: center;
    border-top: none;
    padding-top: 0;
}

.grimfaste-template-showcase .grimfaste-product-source {
    display: none;
}

.grimfaste-template-showcase .grimfaste-product-cta {
    text-transform: uppercase;
    font-weight: 800;
    padding: 0.65rem 2rem;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
}

.grimfaste-template-showcase .grimfaste-product-description {
    text-align: left;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--grimfaste-text);
    border-top: 1px solid #e5e7eb;
    padding-top: 1.2rem;
    margin: 0;
}

.grimfaste-template-showcase .grimfaste-product-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    text-align: center;
}

.grimfaste-template-showcase .grimfaste-product-spec {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: var(--grimfaste-text);
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.grimfaste-template-showcase .grimfaste-product-spec-label {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.grimfaste-template-showcase .grimfaste-product-spec-value {
    color: var(--grimfaste-text);
}

/* ── Responsive: Editorial ── */
@media (max-width: 960px) {
    .grimfaste-template-editorial .grimfaste-product-card {
        grid-template-columns: 1fr;
    }

    .grimfaste-template-editorial .grimfaste-product-body {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .grimfaste-template-editorial .grimfaste-product-content-row {
        flex-direction: column;
        gap: 1rem;
    }

    .grimfaste-template-editorial .grimfaste-product-cta {
        width: 100%;
    }
}

/* ── Responsive: Showcase ── */
@media (max-width: 640px) {
    .grimfaste-template-showcase .grimfaste-product-hero {
        grid-template-columns: 1fr;
    }

    .grimfaste-template-showcase .grimfaste-product-specs {
        grid-template-columns: 1fr;
    }

    .grimfaste-template-showcase .grimfaste-product-title {
        font-size: 1.3rem;
    }
}

/* ── Light horizontal banner ── */
.grimfaste-product-card-light {
    border-radius: 8px;
    min-height: auto;
}

.grimfaste-light-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
}

.grimfaste-light-thumb {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
    background: #fff;
}

.grimfaste-light-title {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--grimfaste-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.grimfaste-product-card-light .grimfaste-product-cta {
    flex-shrink: 0;
}

/* ── Mini Review template ── */
.grimfaste-minireview-summary {
    font-style: italic;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--grimfaste-text);
    border-top: 1px solid #e5e7eb;
    padding-top: 0.6rem;
    margin: 0;
}

.grimfaste-product-card-minireview .grimfaste-product-footer {
    justify-content: center;
    border-top: none;
    padding-top: 0;
}

/* ── Comparison table ── */
.grimfaste-comparison-table {
    display: grid;
    gap: 0;
}

.grimfaste-comparison-table.grimfaste-comparison-columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grimfaste-comparison-table.grimfaste-comparison-columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grimfaste-comparison-table.grimfaste-comparison-columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grimfaste-comparison-column {
    border: 1px solid var(--grimfaste-card-border);
    background: var(--grimfaste-card-bg);
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.grimfaste-comparison-column + .grimfaste-comparison-column {
    border-left: none;
}

.grimfaste-comparison-column:first-child {
    border-radius: 10px 0 0 10px;
}

.grimfaste-comparison-column:last-child {
    border-radius: 0 10px 10px 0;
}

.grimfaste-comparison-column:only-child {
    border-radius: 10px;
}

.grimfaste-comparison-column .grimfaste-product-body {
    padding: 0.8rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    align-items: center;
}

.grimfaste-comparison-column .grimfaste-product-title {
    font-size: 0.88rem;
    text-align: center;
}

.grimfaste-comparison-column .grimfaste-product-cta {
    margin-top: auto;
}

@media (max-width: 640px) {
    .grimfaste-comparison-table.grimfaste-comparison-columns-2,
    .grimfaste-comparison-table.grimfaste-comparison-columns-3,
    .grimfaste-comparison-table.grimfaste-comparison-columns-4 {
        grid-template-columns: 1fr;
    }

    .grimfaste-comparison-column + .grimfaste-comparison-column {
        border-left: 1px solid var(--grimfaste-card-border);
        border-top: none;
    }

    .grimfaste-comparison-column:first-child {
        border-radius: 10px 10px 0 0;
    }

    .grimfaste-comparison-column:last-child {
        border-radius: 0 0 10px 10px;
    }
}

/* ── Verdict template ── */
.grimfaste-product-card-verdict {
    text-align: center;
    padding: 2rem 1.5rem;
}

.grimfaste-product-card-verdict .grimfaste-product-body {
    align-items: center;
}

.grimfaste-verdict-badge {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ce4fe8 0%, #a12acb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.grimfaste-verdict-score {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.grimfaste-product-card-verdict .grimfaste-product-title {
    text-align: center;
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    min-height: 0;
}

.grimfaste-verdict-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--grimfaste-text);
    margin: 0;
}

.grimfaste-product-card-verdict .grimfaste-product-cta {
    text-transform: uppercase;
    font-weight: 800;
    padding: 0.65rem 2rem;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    margin-top: 0.5rem;
}

/* ── Inline template ── */
.grimfaste-inline-wrap {
    display: inline;
}

.grimfaste-inline-mention {
    display: inline;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.grimfaste-inline-link {
    color: var(--grimfaste-accent, #111827);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

.grimfaste-inline-link:hover {
    text-decoration-thickness: 2px;
}

/* ── Pros & Cons template ── */
.grimfaste-pros-list,
.grimfaste-cons-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--grimfaste-text);
}

.grimfaste-pros-list li,
.grimfaste-cons-list li {
    padding-left: 1.4em;
    position: relative;
    margin: 0 0 0.3rem;
}

.grimfaste-pros-list li::before {
    content: "\2714";
    color: #059669;
    position: absolute;
    left: 0;
    font-weight: 700;
}

.grimfaste-cons-list li::before {
    content: "\2718";
    color: #dc2626;
    position: absolute;
    left: 0;
    font-weight: 700;
}

.grimfaste-product-card-proscons .grimfaste-product-footer {
    justify-content: center;
    border-top: none;
    padding-top: 0;
}
