.product--spotlight {
    align-self: stretch !important;
}

.patrick-spotlight-card {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding: 1rem;
    border-radius: 1rem;
    background-image: var(--spot-bg, none);
    background-position: center;
    background-size: cover;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .06);
}

/*
 * Background video layer.
 * The media is removed from document flow and stretched across the card.
 */
.patrick-spotlight-card__media,
.patrick-spotlight-card__media-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.patrick-spotlight-card__media {
    z-index: -2;
    pointer-events: none;
}

/*
 * JavaScript calculates true background-size: cover dimensions for the
 * 16:9 iframe. Explicit pixel dimensions avoid browser differences when an
 * iframe has both an aspect ratio and min-width/min-height constraints.
 */
.patrick-spotlight-card__iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    border: 0;
    transform: translate(-50%, -50%) scale(1.02);
    transform-origin: center;
    pointer-events: none;
}

/* Dark gradient above the image/video and below the card content. */
.patrick-spotlight-card__overlay,
.patrick-spotlight-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, .25) 30%, rgba(0, 0, 0, .75) 100%);
}

/* The rendered overlay div is enough; avoid drawing the gradient twice. */
.patrick-spotlight-card:has(.patrick-spotlight-card__overlay)::after {
    display: none;
}

.patrick-spotlight-card .spotlight-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: auto;
}

ul.products li.product.product--spotlight {
    margin-bottom: 0 !important;
}

ul.products li.product.product--spotlight::before {
    box-shadow: none !important;
}

.spotlight-badge,
.spotlight-heading,
.spotlight-subheading,
.spotlight-cta {
    position: relative;
    z-index: 1;
    color: #fff;
}

.spotlight-badge {
    width: fit-content;
    padding: .5rem;
    border: 1px solid #fff;
    border-radius: 1rem;
    font-size: .75rem;
}

.spotlight-heading {
    margin-bottom: 0;
    text-transform: uppercase;
}

.patrick-spotlight-card a.button {
    position: relative !important;
}

li .patrick-spotlight-card a.button {
    min-width: 100%;
}

.patrick-spotlights-grid {
    margin-bottom: 2rem;
}

.patrick-spotlights-grid .patrick-spotlight-card {
    min-height: 300px;
}

.patrick-spotlight-card .button {
    border-radius: 0 !important;
    text-transform: uppercase;
}

/*
 * Keep YouTube's startup chrome hidden until the player is ready.
 * The fallback image/background color remains visible during initialization.
 */
.video-provider-youtube .patrick-spotlight-card__iframe {
    opacity: 0;
    transition: opacity .35s ease;
}

.video-provider-youtube.is-video-visible .patrick-spotlight-card__iframe {
    opacity: 1;
}

/* Preserve the selected background image while YouTube initializes. */
.video-provider-youtube:not(.is-video-visible) .patrick-spotlight-card__media {
    visibility: hidden;
}

/* Cover the entire spotlight, including narrow product-grid cards. The iframe is
   resized by JS using the video's intrinsic aspect ratio and centered/cropped. */
.patrick-spotlight-card.has-background-video .patrick-spotlight-card__media,
.patrick-spotlight-card.has-background-video .patrick-spotlight-card__media-inner {
    position:absolute !important; inset:0 !important; width:100% !important; height:100% !important; overflow:hidden !important;
}
.patrick-spotlight-card.has-background-video .patrick-spotlight-card__iframe {
    position:absolute !important; left:50% !important; top:50% !important;
    max-width:none !important; max-height:none !important; min-width:0 !important; min-height:0 !important;
    transform:translate(-50%,-50%) !important; border:0 !important; pointer-events:none !important;
}

/* Toolkit 1.0.0: marketing media controls. Legacy gradient remains the default. */
.patrick-spotlight-card.patrick-spotlight-overlay-none .patrick-spotlight-card__overlay,
.patrick-spotlight-card.patrick-spotlight-overlay-none::after { background: none !important; }
.patrick-spotlight-card.patrick-spotlight-overlay-light .patrick-spotlight-card__overlay,
.patrick-spotlight-card.patrick-spotlight-overlay-light::after { background: rgba(255,255,255,.22) !important; }
.patrick-spotlight-card.patrick-spotlight-overlay-dark .patrick-spotlight-card__overlay,
.patrick-spotlight-card.patrick-spotlight-overlay-dark::after { background: rgba(0,0,0,.5) !important; }
.patrick-spotlight-card.patrick-spotlight-fit-contain:not(.has-background-video):not(.patrick-spotlight-template-image_link) {
    background-size: contain; background-repeat: no-repeat;
}
/* Art-directed image links: use an image element, not a cropped background. */
.patrick-spotlight-template-image_link {
    display: block; padding: 0; background-image: none !important;
    text-decoration: none; position: relative;
}
.patrick-spotlight-template-image_link .patrick-spotlight-artwork {
    display: block; width: 100%; height: 100%;
    max-width: none; object-position: center; object-fit: cover;
}
.patrick-spotlight-template-image_link.patrick-spotlight-fit-contain .patrick-spotlight-artwork { object-fit: contain; }
.patrick-spotlight-template-image_link.patrick-spotlight-fit-natural .patrick-spotlight-artwork {
    height: auto; object-fit: initial;
}
/* For full-width natural artwork, don't enforce a minimum fixed height. */
.patrick-spotlights-grid .patrick-spotlight-template-image_link.patrick-spotlight-fit-natural { min-height: 0; height: auto; }
.patrick-spotlight-template-image_link .patrick-spotlight-card__overlay { z-index: 1; }
.patrick-spotlight-template-image_link::after { display: none; }
