/* cms-promo-tiles v1.1.0 | 2026-11-05
   Tokens: corsetmaking.css :root (2026-11-05 or newer). No hex, font stacks, px font sizes or var() fallbacks.
   Documented exceptions: department colors (button / badge options - rgb values, see cms-department-colors-reference),
   overlay darkness (rgba computed per instance from the Overlay Opacity setting) and the tile hover shadow.
   1.1.0: token pass; CTA button and corner badge colors are classes with contrast-checked text
   (Gold -> --btn-gold-* pair, Light Gray -> --btn-neutral-* pair, Hat / Costume -> black text).
   1.0.10: no Bootstrap .container - fills its column; boxes itself to the page width on SFNT. */

.cms-promo-tiles-outer {
    width: 100%;
}

.cms-promo-tiles {
    width: 100%;
    box-sizing: border-box;
    padding: var(--space-2xl) 0;
}

/* Homepage and department pages: the body is full width there, so line the section up with the 1440 header.
   The outer wrapper (section background color) stays full width - band pattern. */
body#SFNT .cms-promo-tiles {
    width: var(--container-width);
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
}

/* Gold section heading (site pattern) - --brand-gold-text is for white backgrounds; on a colored Section Background use Text Color tokens in a later version */
.cms-promo-tiles__section-heading {
    text-align: center;
    font-family: var(--font-accent);
    font-size: var(--font-size-35);
    font-weight: 600;
    line-height: 1.2;
    color: var(--brand-gold-text);
    margin: 0 0 var(--space-md) 0;
}

.cms-promo-tiles__section-intro {
    text-align: center;
    font-family: var(--font-primary);
    font-size: var(--font-size-16);
    color: var(--text-body);
    max-width: var(--content-narrow);
    margin: 0 auto var(--space-xl) auto;
}

.cms-promo-tiles__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg);
}

.cms-promo-tiles__row--align-left .cms-promo-tiles__content {
    align-items: flex-start;
    text-align: left;
}

.cms-promo-tiles__row--align-center .cms-promo-tiles__content {
    align-items: center;
    text-align: center;
}

.cms-promo-tiles__row--align-left .cms-promo-tiles__cta-button {
    align-self: flex-start;
}

.cms-promo-tiles__row--align-center .cms-promo-tiles__cta-button {
    align-self: center;
}

.cms-promo-tiles__tile {
    position: relative;
    flex: 0 1 340px;
    max-width: 380px;
    border-radius: 4px;
    overflow: hidden;
    background-color: var(--brand-gold-ink);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

@media (prefers-reduced-motion: no-preference) {
    .cms-promo-tiles__tile {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .cms-promo-tiles__tile:hover {
        transform: translateY(-4px);
    }

    .cms-promo-tiles__overlay {
        transition: background-color 0.2s ease, background-image 0.2s ease;
    }
}

.cms-promo-tiles__tile:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Corner badge - label style (12px, 700, uppercase)
   ========================================================================== */
.cms-promo-tiles__corner-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    font-family: var(--font-ui-family);
    font-size: var(--font-ui-size-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 5px 10px;
    border-radius: 3px;
}

.cms-promo-tiles__link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.cms-promo-tiles__link:hover,
.cms-promo-tiles__link:focus {
    text-decoration: none;
}

.cms-promo-tiles__link:focus-visible {
    outline: var(--focus-ring);
    outline-offset: -4px;
}

.cms-promo-tiles__overlay {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: var(--space-lg) 20px;
    box-sizing: border-box;
}

.cms-promo-tiles__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.cms-promo-tiles__overlay--flat .cms-promo-tiles__content {
    justify-content: center;
}

.cms-promo-tiles__overlay--gradient .cms-promo-tiles__content {
    justify-content: flex-end;
}

/* ==========================================================================
   Text over the photo - offset shadow kept (halo treatment on hold, Sid 2026-11-04)
   ========================================================================== */
.cms-promo-tiles__stat {
    font-family: var(--font-accent);
    font-size: var(--font-size-50);
    font-weight: 600;
    line-height: 1;
    color: var(--color-white);
    text-shadow: 2px 2px 1px var(--color-black);
    margin: 0 0 4px 0;
}

.cms-promo-tiles__stat-label {
    display: inline-block;
    font-family: var(--font-primary);
    font-size: var(--font-size-16);
    font-weight: 600;
    color: var(--brand-gold-on-dark);
    text-shadow: 2px 2px 1px var(--color-black);
    margin-left: 6px;
    vertical-align: middle;
}

.cms-promo-tiles__heading {
    font-family: var(--font-accent);
    font-size: var(--font-accent-size-md);
    font-weight: 600;
    color: var(--color-white);
    text-shadow: 2px 2px 1px var(--color-black);
    margin: 0 0 var(--space-sm) 0;
}

.cms-promo-tiles__subtext {
    font-family: var(--font-primary);
    font-size: var(--font-size-14);
    color: var(--color-white);
    text-shadow: 2px 2px 1px var(--color-black);
    margin: 0 0 var(--space-md) 0;
}

/* ==========================================================================
   CTA button - one contrast-checked pair per color option (text / background)
   ========================================================================== */
.cms-promo-tiles__cta-button {
    display: inline-block;
    font-family: var(--font-primary);
    font-size: var(--font-size-16);
    font-weight: 600;
    text-shadow: none;
    border-radius: 3px;
    padding: 10px 22px;
    background-color: var(--btn-gold-bg);
    color: var(--btn-gold-text);
}

/* Gold (default): 5.63:1 - hover follows the tile (whole tile is the link) */
.cms-promo-tiles__cta-button--gold {
    background-color: var(--btn-gold-bg);
    color: var(--btn-gold-text);
}

.cms-promo-tiles__tile:hover .cms-promo-tiles__cta-button--gold {
    background-color: var(--btn-gold-hover-bg);
    color: var(--btn-gold-hover-text);
}

/* Light Gray: neutral pair, 8.34:1 */
.cms-promo-tiles__cta-button--light-gray {
    background-color: var(--btn-neutral-bg);
    color: var(--btn-neutral-text);
}

.cms-promo-tiles__tile:hover .cms-promo-tiles__cta-button--light-gray {
    background-color: var(--btn-neutral-hover-bg);
    color: var(--btn-neutral-hover-text);
}

/* Department colors (documented exception). White text: Corset 6.0, Steampunk 11.3, Leather 16.3.
   Black text: Hat 6.4, Costume 7.2 (white fails - Sid 2026-11-05), Bra 4.67 (white measures 4.497 - just under 4.5). */
.cms-promo-tiles__cta-button--corset,
.cms-promo-tiles__corner-badge--corset {
    background-color: rgb(133, 82, 125);
    color: var(--color-white);
}

.cms-promo-tiles__cta-button--bra,
.cms-promo-tiles__corner-badge--bra {
    background-color: rgb(197, 77, 112);
    color: var(--color-black);
}

.cms-promo-tiles__cta-button--hat,
.cms-promo-tiles__corner-badge--hat {
    background-color: rgb(0, 154, 190);
    color: var(--color-black);
}

.cms-promo-tiles__cta-button--costume,
.cms-promo-tiles__corner-badge--costume {
    background-color: rgb(223, 127, 32);
    color: var(--color-black);
}

.cms-promo-tiles__cta-button--steampunk,
.cms-promo-tiles__corner-badge--steampunk {
    background-color: rgb(119, 16, 0);
    color: var(--color-white);
}

.cms-promo-tiles__cta-button--leather,
.cms-promo-tiles__corner-badge--leather {
    background-color: rgb(35, 31, 32);
    color: var(--color-white);
}

/* Corner badge - Gold and Light Gray */
.cms-promo-tiles__corner-badge--gold {
    background-color: var(--brand-gold-accent);
    color: var(--brand-gold-ink);
}

.cms-promo-tiles__corner-badge--light-gray {
    background-color: var(--btn-neutral-bg);
    color: var(--btn-neutral-text);
}

/* 768-1199px: narrow slightly to stay closer to a 3-across layout */
@media (min-width: 768px) and (max-width: 1199px) {
    .cms-promo-tiles__tile {
        flex: 0 1 280px;
    }
}

/* Phones (767 and below): single column */
@media (max-width: 767px) {
    .cms-promo-tiles__row {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .cms-promo-tiles__tile {
        flex: 0 1 auto;
        width: 100%;
        max-width: 450px;
    }

    .cms-promo-tiles__section-heading {
        font-size: var(--font-size-30);
    }

    .cms-promo-tiles__stat {
        font-size: var(--font-size-35);
    }

    .cms-promo-tiles__heading {
        font-size: var(--font-size-20);
    }

    .cms-promo-tiles__cta-button {
        min-height: 44px;
        box-sizing: border-box;
    }
}
