/* Special Deals slider — TCC "Chef's Specials" */
.tcc-special-deals {
    /* Brand tokens (mirrors the-coin-chest theme). */
    --sd-gold: #c9a227;
    --sd-gold-light: #e9df8d;
    --sd-gold-dark: #87642f;
    --sd-border: #b59762;
    --sd-gradient: linear-gradient(to top right, #e9df8d 0%, #87642f 100%);
    --sd-radius: 10px;

    max-width: 240px;
    margin: 0 auto;
    text-align: center;
    /* Match the surrounding menu/theme typography instead of the browser default. */
    font-family: inherit;
}

/* Heading with centred gold underline accent. */
.tcc-special-deals__heading {
    position: relative;
    font-family: inherit;
    font-size: 1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 12px;
    padding-bottom: 8px;
    color: var(--sd-gold);
}

.tcc-special-deals__heading::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 40px;
    height: 2px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #c9a227, #f1d27a, #c9a227);
    border-radius: 2px;
}

.tcc-special-deals__viewport {
    position: relative;
    /* Reserve space so rotating between slides doesn't shift the layout. */
    min-height: 220px;
}

.tcc-special-deals__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    /*
     * Keep the outgoing slide visible while it fades out: defer the
     * visibility -> hidden switch until the opacity/scale transition ends,
     * so slides cross-fade smoothly instead of hard-cutting (flicker).
     */
    visibility: hidden;
    transform: scale(1.035);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.7s;
    pointer-events: none;
}

.tcc-special-deals__slide.is-active {
    position: relative;
    opacity: 1;
    transform: scale(1);
    /*
     * Inherit visibility from the ancestor rather than forcing `visible`.
     * Max Mega Menu hides its closed flyout panels with `visibility: hidden`,
     * which cascades to children. Forcing `visibility: visible` here would
     * override that inherited state and leak the active slide onto the page
     * while the menu is closed. `inherit` keeps the slide tied to the menu's
     * open/closed state (and still resolves to `visible` outside a menu).
     * The incoming slide appears immediately (no visibility delay).
     */
    visibility: inherit;
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: auto;
}

/* Card wrapper around each deal. */
.tcc-special-deals__link {
    display: block;
    padding: 11px 11px 13px;
    text-decoration: none;
    color: inherit;
    font-family: inherit;
    border: 1px solid rgba(181, 151, 98, 0.55);
    border-radius: var(--sd-radius);
    background: rgba(0, 0, 0, 0.18);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.tcc-special-deals__link:hover,
.tcc-special-deals__link:focus-visible {
    border-color: var(--sd-gold);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

/* Light panel behind the product so silver/gold coins pop on dark menus. */
.tcc-special-deals__image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    margin-bottom: 10px;
    padding: 8px;
    background: #f4f4f4;
    border-radius: 8px;
    overflow: hidden;
}

.tcc-special-deals__image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0;
}

/* Sale / discount badge over the image corner. */
.tcc-special-deals__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 9px;
    font-size: 0.72em;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1c1305;
    background: var(--sd-gradient);
    border: 1px solid var(--sd-border);
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.tcc-special-deals__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    font-family: inherit;
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
    color: #fff;
}

.tcc-special-deals__price {
    display: block;
    font-family: inherit;
    font-size: 1.02em;
    font-weight: 700;
    color: var(--sd-gold);
    margin-bottom: 10px;
}

.tcc-special-deals__price del {
    opacity: 1;
    font-weight: 400;
    color: #b7b7b7;
    margin-right: 6px;
}

.tcc-special-deals__price ins {
    text-decoration: none;
}

/* Premium metallic CTA button. */
.tcc-special-deals__cta {
    position: relative;
    display: block;
    width: 100%;
    padding: 10px 16px;
    overflow: hidden;
    font-family: inherit;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #2a1e07;
    text-align: center;
    background: linear-gradient(to bottom, #f7ecb4 0%, #dcbc5c 46%, #b8912f 100%);
    border: 1px solid #8a6a2c;
    border-radius: 8px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.35);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
    transition:
        box-shadow 0.25s ease,
        transform 0.25s ease,
        filter 0.25s ease;
}

/* Light sweep that glides across the button on hover. */
.tcc-special-deals__cta::before {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 55%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}

.tcc-special-deals__link:hover .tcc-special-deals__cta,
.tcc-special-deals__link:focus-visible .tcc-special-deals__cta {
    filter: brightness(1.04);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12),
        0 5px 16px rgba(201, 162, 39, 0.45);
    transform: translateY(-1px);
}

.tcc-special-deals__link:hover .tcc-special-deals__cta::before,
.tcc-special-deals__link:focus-visible .tcc-special-deals__cta::before {
    left: 130%;
}

.tcc-special-deals__dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
}

.tcc-special-deals__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(181, 151, 98, 0.4);
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.tcc-special-deals__dot:hover {
    background: rgba(201, 162, 39, 0.7);
}

.tcc-special-deals__dot.is-active {
    background: var(--sd-gold);
    transform: scale(1.3);
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.25);
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
    .tcc-special-deals__slide,
    .tcc-special-deals__slide.is-active {
        transform: none;
        transition:
            opacity 0.2s ease,
            visibility 0s linear 0.2s;
    }

    .tcc-special-deals__slide.is-active {
        transition: opacity 0.2s ease;
    }

    .tcc-special-deals__cta,
    .tcc-special-deals__cta::before,
    .tcc-special-deals__link {
        transition: none;
    }

    .tcc-special-deals__link:hover .tcc-special-deals__cta::before,
    .tcc-special-deals__link:focus-visible .tcc-special-deals__cta::before {
        left: -80%;
    }
}
