:root {
    --page-bg: #fff;
    --text-dark: #111;
    --text-muted: #4d4f66;
    --card-bg: #fff;
    --accent: #0054ff;
    --accent-muted: rgba(0, 84, 255, 0.08);
    --border: #e0e3f0;
}

html, body {
    height: auto;
    min-height: 100%;
}

body.discounts-body {
    font-family: 'Nunito Sans', sans-serif;
    background: var(--page-bg);
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    display: block;
    position: static;
    overflow-y: auto;
}

body.discounts-body::-webkit-scrollbar {
    background-color: transparent;
    width: 1px;
}

/* background of the scrollbar except button or resizer */
body.discounts-body::-webkit-scrollbar-track {
    background-color: transparent;
}

/* scrollbar itself */
body.discounts-body::-webkit-scrollbar-thumb {
    background-color: #babac0;
    border-radius: 16px;
    border: none;
}

.discounts-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 64px 20px 80px;
}

.discounts-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 10px;
}

.discounts-hero .title {
    font-family: 'UniChat', 'Clash Display', sans-serif;
    font-size: clamp(2.0rem, 4vw, 3.6rem);
    font-weight: 700;
    margin: 0;
}

.discounts-hero .title-U {
    color: var(--accent);
}

.hero-copy {
    max-width: 720px;
    width: 100%;
}

.hero-copy .hero-subtitle {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--text-dark);
}

.hero-copy p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin: 0 0 16px;
    text-align: center;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 8px;
}

.search-bar {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-bar input {
    width: 100%;
    max-width: 520px;
    padding: 16px 20px;
    border-radius: 15px;
    border: 1px solid var(--border);
    font-size: 1rem;
    box-shadow: 0px 12px 40px rgba(0, 13, 58, 0.15);
}

.location-banner {
    margin: 14px auto 0;
    max-width: 560px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.location-banner p {
    margin: 0;
    text-align: left;
    font-size: 0.92rem;
}

.location-btn {
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
}

.location-btn[disabled] {
    opacity: 0.6;
    cursor: wait;
}

.discounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.discounts-grid.few-results {
    grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
    justify-content: center;
}

.discounts-grid.few-results .discount-card {
    max-width: 360px;
    width: 100%;
}

.discount-card {
    cursor: pointer;
    background: var(--card-bg);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.discount-card-gold {
    border: 2px solid #f4b942;
}

.discount-card-points-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f7d16c, #f4b942);
    color: #111;
    font-size: 0.8rem;
    font-weight: 800;
}

.discount-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(15, 33, 71, 0.12);
}

.discount-card-banner {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.discount-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.venue-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.venue-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.venue-name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.venue-description {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
    min-height: 68px;
}

.venue-rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 6px;
}

.venue-address {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    min-width: 0;
}

.venue-address img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.venue-address-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.92rem;
}

.venue-stars {
    color: #f4b400;
    letter-spacing: 1px;
    font-size: 1rem;
    white-space: nowrap;
}

.venue-distance {
    font-size: 0.86rem;
    color: #1143bb;
    font-weight: 700;
    margin-top: 2px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    display: none;
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.load-more-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-dark);
    border-radius: 999px;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 33, 71, 0.12);
}

.load-more-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#results-count {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 12px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.location-consent-overlay[hidden] {
    display: none;
}

.location-consent-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 12, 27, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10020;
    padding: 16px;
}

.location-consent-modal {
    width: min(460px, 100%);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 16px 36px rgba(13, 24, 48, 0.22);
}

.location-consent-modal h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-family: 'UniChat', 'Clash Display', sans-serif;
}

.location-consent-modal p {
    margin: 0;
    color: var(--text-muted);
    text-align: left;
}

.location-consent-actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.location-btn-secondary {
    background: #fff;
    color: var(--text-dark);
    border: 1px solid var(--border);
}

@media (max-width: 600px) {
    .discounts-page {
        padding: 40px 16px 60px;
    }

    .search-bar input {
        max-width: 100%;
    }

    .location-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .location-consent-actions {
        flex-direction: column;
    }

    .location-consent-actions .location-btn {
        width: 100%;
    }
}

.location-help-banner[hidden] {
    display: none;
}

.location-help-banner {
    position: fixed;
    top: 16px;
    left: 16px;
    right: 16px;
    z-index: 10010;
    margin: 0;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(184, 111, 0, 0.18);
    background: linear-gradient(180deg, #fff8eb 0%, #fff4de 100%);
    color: #6a4a00;
    box-shadow: 0 12px 28px rgba(80, 55, 0, 0.16);
}

.location-help-banner-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.location-help-banner strong {
    display: block;
    margin-bottom: 4px;
    color: #503700;
    font-size: 0.95rem;
}

.location-help-banner p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.location-help-banner-close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 999px;
    background: rgba(80, 55, 0, 0.08);
    color: #6a4a00;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.outdated-app-banner {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1200;
    width: calc(95% - 30px);
    max-width: min(95vw, 560px);
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff3cd;
    border: 1px solid #f0d98b;
    color: #5f4600;
    font-size: 17px;
    line-height: 1.4;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    text-align: center;
}

.outdated-app-banner a {
    color: #8a5a00;
    font-weight: 700;
    text-decoration: underline;
}