.discounts-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    grid-gap: 15px;
}

@media (min-width: 640px) {
    .discounts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 980px) {
    .discounts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.discount {
    position: relative;
    background: #1f1f1f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 16px;
    color: #f8f9fa;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.discount:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border-color: rgba(53, 170, 229, 0.35);
}

.discount__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    min-height: 24px;
    /* Keep header height consistent when CTA badge is absent */
}

.discount__label {
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .8;
}

.discount__cta-header-badge {
    display: inline-block;
    font-family: Montserrat, sans-serif;
    font-weight: 700;
    background: #ffd500;
    border: 1px solid #ffd500;
    color: #1f1f1f;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    cursor: pointer;
}

.discount__cta-header-badge {
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.875em;
}

.discount__cta-header-badge:hover {
    text-decoration: none;
    color: #1f1f1f;
    opacity: .85;
}

/* Dropdown CTA (header) */
.discount__cta-header {
    position: relative;
    display: inline-block;
}

.discount__cta-header .discount__cta-header-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    padding: 6px 0;
    margin: 0;
    background: #1f1f1f;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    list-style: none;
    display: none;
    z-index: 20;
}

.discount__cta-header.is-open .discount__cta-header-menu {
    display: block;
}

.discount__cta-header-menu li a {
    display: block;
    padding: 10px 14px;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
}

.discount__cta-header-menu li a:hover {
    background: rgba(255, 213, 0, 0.12);
    color: #ffd500;
}

.discount__description {
    margin: 8px 0 10px 0;
    line-height: 1.5;
}

.discount__footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
    margin-top: 10px;
}

.discount__code {
    margin-top: 10px;
}

.discount__btn {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 12px 16px;
    background: #ffd500;
    border: 1px solid #ffd500;
    color: #1f1f1f;
    font-weight: 700;
    font-size: 0.90em;
    font-family: Montserrat, sans-serif;
    text-transform: uppercase;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity .15s ease, transform .05s ease;
}

.discount__btn:hover {
    text-decoration: none;
    color: #1f1f1f;
    opacity: .85;
}

.discount__btn:active {
    transform: translateY(1px);
}

.discount__code-btn--no-code {
    background: transparent;
    border: 2px dotted #ffd500;
    color: #ffffff;
    font-size: 0.90em;
    /* Match overall height with 1px-bordered button (reduce padding by 1px each side) */
    padding: 11px 16px;
    cursor: default;
}

.discount__code-btn--no-code:hover {
    opacity: 1;
    color: #ffffff;
}

.discount__footer small {
    display: block;
    opacity: 1;
    font-family: inherit;
    font-weight: inherit;
    color: inherit;
    font-size: inherit;
}

.discount__terms-text {
    margin-top: 8px;
    font-size: 0.85em;
    line-height: 1.5;
    font-family: inherit;
    font-weight: inherit;
    color: inherit;
    opacity: 0.85;
}

/* Fallback colors for light themes */
@media (prefers-color-scheme: light) {
    .discount {
        background: #1f1f1f;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .discount__cta-header-badge {
        background: #ffd500;
        border-color: #ffd500;
        color: #1f1f1f;
    }

    .discount__footer {
        border-top-color: rgba(255, 255, 255, 0.08);
    }
}