/* Age discount sash — diagonal corner ribbon on pallet images.
 *
 * Width auto-sizes to text. ::before/::after extend the background colour
 * infinitely along the ribbon axis; the parent's overflow: hidden clips it. */
.age-discount-sash {
    position: absolute;
    top: 0;
    left: 0;
    padding: 6px 1em;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    z-index: 1;
    pointer-events: none;
    line-height: 1;
    white-space: nowrap;
    transform: translateX(-30%) rotate(-45deg);
    transform-origin: top right;
}

.age-discount-sash::before,
.age-discount-sash::after {
    content: '';
    position: absolute;
    top: 0;
    margin: 0 -1px;
    width: 100%;
    height: 100%;
    background: inherit;
}

.age-discount-sash::before {
    right: 100%;
}

.age-discount-sash::after {
    left: 100%;
}

/* Horizontal banner — show page, sits between the carousel and the price block */
.age-discount-banner {
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-medium) var(--radius-medium) 0 0;
    font-size: var(--font-size-large);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* When a promo banner sits above, flatten the top corners too */
.age-discount-banner--below-promo {
    border-radius: 0;
}

/* Row-level variant — clipped by .sash-wrapper so the ribbon corners don't escape the cell */
.sash-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.age-discount-sash--row {
    padding: 3px 0.5em;
    font-size: 0.48rem;
    letter-spacing: 0.04em;
}
