/* ==========================================================================
   Block: Product Grid
   Values mirror the approved mock (CDS Page Redesign.dc.html, section 5).
   Vertical padding comes from the vp-* class on the section, not from the
   wrapper, so the editor's padding control stays authoritative.
   ========================================================================== */

.product-grid {
    position: relative;
    overflow: hidden;
}

.pg-wrapper {
    max-width: var(--max-w-wrapper);
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

@media (min-width: 1024px) {
    .pg-wrapper {
        padding-left: 80px;
        padding-right: 80px;
    }
}

/* Header — eyebrow full width, then headline left and lede right */
.pg-header {
    margin-bottom: 32px;
}

@media (min-width: 1024px) {
    .pg-header {
        margin-bottom: 48px;
    }
}

.pg-header-split {
    display: grid;
    grid-template-columns: 1fr;
    align-items: end;
    gap: 24px;
}

@media (min-width: 1024px) {
    .pg-header-split--inline {
        grid-template-columns: 7fr 5fr;
        gap: 80px;
    }
}

/* Text below the title: one column at every width, tighter gap, and the lede
   left-aligned under the headline rather than optically centred against it. */
.pg-header-split--below {
    align-items: start;
    gap: 20px;
}

.pg-eyebrow {
    color: var(--color-coral);
    margin: 0 0 10px;
    font-size: var(--font-h5-size);
    font-weight: var(--font-h5-weight);
    line-height: var(--font-h5-line);
    text-transform: uppercase;
}

.pg-title {
    font-size: var(--font-h2-size);
    font-weight: var(--font-h2-weight);
    line-height: var(--font-h2-line);
    letter-spacing: var(--font-h2-letter);
    max-width: 24ch;
    margin: 0;
    text-wrap: pretty;
}

.pg-text {
    font-size: var(--font-p0-size);
    line-height: var(--font-p0-line);
    color: var(--color-gray-hover);
    margin: 0;
    text-wrap: pretty;
}

.pg-header-split--inline .pg-text{
	max-width: 54ch;
	font-size: var(--font-link-header-size);
    line-height: var(--font-link-header-line);
}

/* Group */
.pg-group {
    margin-bottom: 32px;
}

@media (min-width: 1024px) {
    .pg-group {
        margin-bottom: 44px;
    }
}

/* Label and note sit inline on one baseline, rule underneath */
.pg-group-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(202, 202, 202, 0.28);
}

.pg-group-label {
    font-size: 19px;
    font-weight: 500;
    line-height: 1.15;
    margin: 0;
}

@media (min-width: 1024px) {
    .pg-group-label {
        font-size: 21px;
    }
}

.pg-group-note {
    font-size: var(--font-p2-size);
    font-weight: 400;
    line-height: 1.4;
    color: var(--color-steel);
	opacity: .8;
    margin: 0;
}

/* Cards — auto-fill so a short group does not stretch its cards */
.pg-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
    gap: 16px;
}

/* Per-group column count. Auto-fit needs no rule — it is the base .pg-cards
   behaviour; the fixed counts override it from the two-column breakpoint up. */
@media (min-width: 1024px) {
    .pg-cards--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pg-cards--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pg-cards--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.pg-cards li {
    display: flex;
}

.pg-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 28px 24px;
    background-color: var(--color-deep-field);
    text-decoration: none;
    color: inherit;
}

.pg-card--link {
    position: relative;
    cursor: pointer;
}

.pg-card--link:hover:not(:has(.pg-card-text a:hover)) .pg-card-link {
	color: var(--color-teal);
}

.product-grid--inverse .pg-card {
    background-color: var(--color-black);
}

.pg-card-tag {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-teal);
    margin: 0;
}

.pg-card-name {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-white);
    margin: 0;
    text-wrap: pretty;
}

.pg-card-text {
    font-size: var(--font-p1-size);
    font-weight: 400;
    line-height: 20px;
    color: var(--color-gray-hover);
    flex-grow: 1;
    margin: 0;
    text-wrap: pretty;
}

.pg-card-text a:not(.cta-btn) {
    position: relative;
    z-index: 2;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.25s ease-out;
}

.pg-card-text a:not(.cta-btn):hover{
	color: var(--color-teal);
}

.pg-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-p2-size);
    font-weight: 500;
    line-height: 1;
    color: var(--color-gray-hover);
    transition: color 0.25s ease-out;
}

.pg-card-link-label {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pg-card-arrow {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
}

.pg-card-arrow svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.pg-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 32px;
    padding-top: 8px;
}

.pg-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-gray-hover);
    text-decoration: none;
    transition: color 0.15s ease-out;
}

.pg-link:hover,
.pg-link:focus {
    color: var(--color-teal);
}

/* The card's real link stretches over the whole card */
.pg-card-stretch {
    color: inherit;
    text-decoration: none;
}

.pg-card-stretch::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Focus ring on the card instead of just the heading text */
.pg-card-stretch:focus-visible {
    outline: none;
}

.pg-card--link:has(.pg-card-stretch:focus-visible) {
    outline: 2px solid var(--color-teal);
    outline-offset: 2px;
}