.wp-block-headless-product-cards {
    padding: clamp(28px, 3.2vw, 40px);
    border-radius: 34px;
    background: transparent;
    box-shadow: none;
}

.product-cards-header {
    margin-bottom: 34px;
    text-align: center;
}

.product-cards-header--align-left {
    text-align: left;
}

.product-cards-header--align-left .product-cards-section-subtitle {
    margin-left: 0;
    margin-right: 0;
}

.product-cards-section-title {
    margin: 0;
    color: #365072;
    font-size: 52px;
    font-weight: 600;
    line-height: 1.1;
}

.product-cards-section-subtitle {
    max-width: 760px;
    margin: 16px auto 0;
    color: rgba(22, 30, 35, 0.75);
    font-size: clamp(1.02rem, 1.5vw, 1.35rem);
    line-height: 1.6;
}

.product-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

.product-cards-grid[data-card-count="1"] {
    grid-template-columns: minmax(0, 1fr);
}

.product-cards-grid[data-card-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-cards-grid[data-card-count="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-cards-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 46px rgba(27, 45, 61, 0.08);
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.product-cards-card.is-highlighted {
    box-shadow: 0 20px 46px rgba(27, 45, 61, 0.08);
}

.product-cards-card:hover,
.product-cards-card.is-highlighted:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 60px rgba(67, 98, 124, 0.18);
}

.product-cards-card-top {
    position: relative;
    overflow: hidden;
}

.product-cards-title {
    margin: 0 0 12px;
    color: #365072;
    font-size: clamp(1.6rem, 2vw, 2rem);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.03em;
}

.product-cards-subtitle {
    margin: 0 0 12px;
    color: #000000;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.product-cards-count {
    position: absolute;
    top: 18px;
    right: 18px;
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    z-index: 2;
}

.product-cards-count span {
    color: rgba(255, 255, 255, 0.46);
    font-weight: 600;
}

.product-cards-image {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 470px;
    padding: 10px 18px 0;
    background: linear-gradient(180deg, #5b7099 0%, #b7d8eb 100%);
}

.product-cards-image img {
    display: block;
    max-width: 118%;
    max-height: 505px;
    width: auto;
    height: auto;
    object-fit: contain;
    transform: scale(1.08);
    transform-origin: center bottom;
}

.product-cards-card:nth-child(1) .product-cards-image:not(.product-cards-image--photo) {
    background: linear-gradient(180deg, #5b7099 0%, #b7d8eb 100%);
}

.product-cards-card:nth-child(2) .product-cards-image:not(.product-cards-image--photo) {
    background: linear-gradient(180deg, #ffc08b 0%, #bedcf0 100%);
}

.product-cards-card:nth-child(3) .product-cards-image:not(.product-cards-image--photo) {
    background: linear-gradient(180deg, #313131 0%, #d8dce3 100%);
}

/* Photo mode: image fills the top edge-to-edge, cover-cropped, no decorative
   gradient. Opt-in per block (imageStyle=photo) for reuse with wide scene photos.
   Placed after the nth-child defaults so single-class rules override the base. */
.product-cards-image--photo {
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    background: transparent;
}

.product-cards-image--photo img {
    max-width: 100%;
    max-height: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
}

.product-cards-image-placeholder {
    border-radius: 0;
    border: none;
    background: transparent;
}

.product-cards-image-placeholder span {
    color: #6e7b86;
    font-size: 0.95rem;
    font-weight: 600;
}

.product-cards-footer {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    position: relative;
    z-index: 2;
    margin-top: -132px;
    padding: 30px 24px 26px;
    background: rgba(255, 255, 255, 0.98);
    border-top-left-radius: 26px;
    border-top-right-radius: 26px;
}

.product-cards-description {
    margin: 0 0 16px;
    color: rgba(22, 30, 35, 0.75);
    font-size: 0.875rem;
    line-height: 1.6;
}

.product-cards-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.product-cards-tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: #edf2f7;
    color: #728191;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1;
}

.product-cards-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    /* Reset native chrome so a <button> CTA (form-modal action) matches the
       <a>/<span> link CTA — these are no-ops for anchors/spans. */
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    font-family: inherit;
    color: #fa700d;
    font-size: 1rem;
    font-weight: 700;
}

/* Card with a primary View link + a secondary "Direct quote" button. */
.product-cards-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-top: auto;
}

.product-cards-actions .product-cards-cta {
    margin-top: 0;
    text-decoration: none;
}

.product-cards-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1.5px solid #fa700d;
    border-radius: 999px;
    background: transparent;
    color: #fa700d;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.product-cards-quote:hover {
    background: #fa700d;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(250, 112, 13, 0.28);
}

.product-cards-compare-wrap {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.product-cards-compare-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.96);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
}

.product-cards-compare-link::after {
    content: "→";
    font-size: 1.05em;
}

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

@media (max-width: 700px) {
    .wp-block-headless-product-cards {
        padding: 16px;
        border-radius: 22px;
    }

    .product-cards-header {
        margin-bottom: 20px;
    }

    .product-cards-section-title {
        font-size: clamp(1.8rem, 7vw, 2.4rem);
    }

    .product-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-cards-grid[data-card-count="2"],
    .product-cards-grid[data-card-count="3"] {
        grid-template-columns: 1fr;
    }

    .product-cards-card {
        border-radius: 20px;
    }

    .product-cards-image {
        min-height: 220px;
        padding: 6px 14px 0;
    }

    .product-cards-image img {
        max-width: 80%;
        max-height: 240px;
        transform: scale(1);
    }

    .product-cards-image--photo {
        padding: 0;
    }

    .product-cards-image--photo img {
        max-width: 100%;
        max-height: none;
        width: 100%;
        height: 100%;
        transform: none;
    }

    .product-cards-footer {
        margin-top: -60px;
        padding: 20px 18px 18px;
        border-top-left-radius: 18px;
        border-top-right-radius: 18px;
    }

    .product-cards-title {
        font-size: 1.35rem;
        margin-bottom: 8px;
    }

    .product-cards-subtitle {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .product-cards-description {
        font-size: 0.92rem;
        margin-bottom: 12px;
    }

    .product-cards-tags {
        gap: 6px;
        margin-bottom: 14px;
    }

    .product-cards-tag {
        min-height: 28px;
        padding: 0 10px;
        font-size: 0.78rem;
    }
}
