:root {
    --bg: #ffffff;

    --panel: #ffffff;
    --panel-light: #f7f7f7;

    --text: #1d1d1f;
    --muted: #777777;

    --accent: #D64123;
    --accent-dark: #b9361d;
    --accent-soft: rgba(214, 65, 35, .10);

    --border: #e8e8e8;

    --radius-lg: 26px;
    --radius-md: 18px;

    --shadow: 0 8px 30px rgba(0, 0, 0, .08);
}


/* --------------------------------------------------
   GLOBAL
-------------------------------------------------- */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;

    background: var(--bg);
    color: var(--text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "Segoe UI",
        sans-serif;
}

body {
    min-height: 100vh;
}

button {
    font: inherit;
}

.app-shell {
    width: 100%;
    max-width: 620px;

    margin: 0 auto;

    padding:
        max(24px, env(safe-area-inset-top))
        18px
        120px;
}


/* --------------------------------------------------
   TOP BAR
-------------------------------------------------- */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 24px;
}

.eyebrow {
    color: var(--accent);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;

    margin-bottom: 4px;
}

.topbar h1 {
    margin: 0;

    color: var(--text);

    font-size: 34px;
    line-height: 1.05;

    letter-spacing: -1.4px;
}

.profile-button {
    width: 46px;
    height: 46px;

    border: none;
    border-radius: 50%;

    background: var(--accent);
    color: #ffffff;

    font-weight: 800;

    cursor: pointer;

    box-shadow: 0 5px 14px rgba(214,65,35,.18);
}

.profile-button:active {
    transform: scale(.97);
}


/* --------------------------------------------------
   OPTIONAL HERO / AREA CARD
   Leave this here if you still use a hero elsewhere.
-------------------------------------------------- */

.hero {
    position: relative;

    display: flex;
    align-items: flex-end;

    overflow: hidden;

    border-radius: var(--radius-lg);

    padding: 24px;

    margin-bottom: 34px;

    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(214, 65, 35, .14),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #ffffff,
            #fafafa
        );

    border: 1px solid var(--border);

    box-shadow: var(--shadow);
}

.area-card {
    min-height: 190px;
}

.hero::after {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            120deg,
            rgba(214,65,35,.02),
            transparent 45%
        );
}

.hero-copy {
    position: relative;
    z-index: 2;

    width: 100%;
}

.hero-label {
    display: inline-flex;

    background: var(--accent);
    color: #ffffff;

    border-radius: 100px;

    padding: 7px 11px;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;

    margin-bottom: 12px;
}

.hero h2 {
    margin: 0 0 10px;

    color: var(--text);

    font-size: 31px;
    line-height: 1.04;

    letter-spacing: -1.2px;
}

.hero p {
    margin: 0;

    color: var(--muted);

    line-height: 1.5;
}

.change-area-btn {
    margin-top: 18px;

    width: auto;

    padding: 10px 16px;

    border: 1px solid var(--border);
    border-radius: 100px;

    background: #ffffff;
    color: var(--accent);

    font-size: 13px;
    font-weight: 800;

    cursor: pointer;
}

.change-area-btn:hover {
    background: #fafafa;
}

.change-area-btn:active {
    transform: scale(.98);
}


/* --------------------------------------------------
   DISCOUNT AREAS
-------------------------------------------------- */

.areas-section {
    margin-bottom: 34px;
}

.areas-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 14px;
}

.areas-header h2 {
    margin: 4px 0 0;

    color: var(--text);

    font-size: 25px;
    line-height: 1.1;

    letter-spacing: -.6px;
}

.add-area-btn {
    width: auto;

    padding: 10px 14px;

    border: 1px solid rgba(214,65,35,.22);
    border-radius: 100px;

    background: var(--accent-soft);
    color: var(--accent);

    font-size: 12px;
    font-weight: 800;

    cursor: pointer;

    transition:
        background .15s ease,
        transform .15s ease;
}

.add-area-btn:hover {
    background: rgba(214,65,35,.15);
}

.add-area-btn:active {
    transform: scale(.98);
}

.area-list {
    display: grid;
    gap: 10px;
}

.area-item {
    display: flex;
    align-items: center;

    gap: 13px;

    padding: 15px;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 18px;

    box-shadow: 0 4px 18px rgba(0,0,0,.04);
}

.active-area {
    border-color: rgba(214,65,35,.30);
}

.area-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: var(--accent-soft);
    color: var(--accent);

    font-size: 18px;
    font-weight: 900;
}

.area-info {
    flex: 1;
    min-width: 0;
}

.area-name {
    font-size: 17px;
    font-weight: 800;

    color: var(--text);

    margin-bottom: 3px;
}

.area-meta {
    font-size: 12px;

    color: var(--muted);
}

.area-status {
    padding: 6px 9px;

    border-radius: 100px;

    background: var(--accent-soft);
    color: var(--accent);

    font-size: 9px;
    font-weight: 900;

    letter-spacing: .8px;
}


/* --------------------------------------------------
   DEALS SECTION HEADER
-------------------------------------------------- */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 14px;

    margin-bottom: 14px;
}

.section-kicker {
    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.5px;

    color: var(--accent);
}

.section-header h3 {
    margin: 4px 0 0;

    color: var(--text);

    font-size: 25px;

    letter-spacing: -.6px;
}

.status {
    font-size: 12px;
    color: var(--muted);

    padding-bottom: 3px;

    text-align: right;
}


/* --------------------------------------------------
   OFFERS LIST
-------------------------------------------------- */

.offers {
    display: grid;
    gap: 15px;
}


/* --------------------------------------------------
   OFFER CARD
-------------------------------------------------- */

.offer-card {
    position: relative;

    overflow: hidden;

    background: #ffffff;

    border-radius: 22px;

    padding: 20px;

    border: 1px solid var(--border);

    box-shadow: 0 6px 24px rgba(0,0,0,.06);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.offer-card:hover {
    border-color: #dddddd;

    box-shadow: 0 10px 28px rgba(0,0,0,.08);
}

.offer-card:active {
    transform: scale(.985);
}


/* --------------------------------------------------
   BUSINESS HEADER
-------------------------------------------------- */

.offer-header {
    display: flex;
    align-items: center;

    gap: 15px;

    margin-bottom: 20px;
}

.offer-logo-wrap {
    width: 72px;
    height: 72px;

    flex: 0 0 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;

    border-radius: 12px;

    overflow: hidden;
}

.offer-logo {
    width: 100%;
    height: 100%;

    object-fit: cover;

    padding: 0;

    border-radius: 12px;
}

.offer-business-info {
    flex: 1;
    min-width: 0;
}

.offer-name {
    margin: 0 0 5px;

    color: var(--text);

    font-size: 24px;
    font-weight: 800;

    line-height: 1.2;
}

.offer-distance {
    color: var(--accent);

    font-size: 13px;
    font-weight: 700;
}


/* --------------------------------------------------
   OFFER CONTENT
-------------------------------------------------- */

.offer-body {
    padding-top: 2px;
}

.offer-title {
    margin-bottom: 10px;

    color: var(--text);

    font-size: 24px;
    font-weight: 800;

    line-height: 1.1;

    letter-spacing: -.5px;
}

.offer-description {
    margin-bottom: 14px;

    color: #555555;

    font-size: 14px;
    line-height: 1.55;
}

.offer-restrictions {
    padding-top: 13px;

    border-top: 1px solid var(--border);

    color: #929292;

    font-size: 11px;
    line-height: 1.4;
}


/* --------------------------------------------------
   REDEEM BUTTON
-------------------------------------------------- */

.redeem-btn {
    width: 100%;

    margin-top: 18px;

    padding: 15px 18px;

    border: none;
    border-radius: 14px;

    background: var(--accent);
    color: #ffffff;

    font-size: 13px;
    font-weight: 900;

    letter-spacing: .6px;

    cursor: pointer;

    box-shadow: 0 6px 16px rgba(214,65,35,.18);

    transition:
        transform .15s ease,
        background .15s ease,
        box-shadow .15s ease;
}

.redeem-btn:hover {
    background: var(--accent-dark);

    box-shadow: 0 8px 20px rgba(214,65,35,.24);
}

.redeem-btn:active {
    transform: scale(.985);
}


/* --------------------------------------------------
   BOTTOM NAVIGATION
-------------------------------------------------- */

.bottom-nav {
    position: fixed;

    left: 50%;
    bottom: max(14px, env(safe-area-inset-bottom));

    transform: translateX(-50%);

    width: calc(100% - 28px);
    max-width: 580px;

    display: grid;
    grid-template-columns: repeat(4, 1fr);

    padding: 10px 6px;

    background: rgba(255,255,255,.96);

    border: 1px solid var(--border);

    border-radius: 24px;

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    box-shadow: 0 8px 30px rgba(0,0,0,.12);

    z-index: 50;
}

.nav-item {
    border: none;

    background: transparent;

    color: #999999;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 3px;

    padding: 8px 4px;

    cursor: pointer;
}

.nav-item span {
    font-size: 20px;
}

.nav-item small {
    font-size: 10px;
    font-weight: 700;
}

.nav-item.active {
    color: var(--accent);
}


/* --------------------------------------------------
   SMALL SCREEN ADJUSTMENTS
-------------------------------------------------- */

@media (max-width: 420px) {

    .app-shell {
        padding-left: 14px;
        padding-right: 14px;
    }

    .topbar h1 {
        font-size: 30px;
    }

    .hero h2 {
        font-size: 28px;
    }

    .offer-card {
        padding: 17px;
    }

    .offer-logo-wrap {
        width: 64px;
        height: 64px;

        flex-basis: 64px;
    }

    .offer-logo {
        border-radius: 10px;
    }

    .offer-name {
        font-size: 21px;
    }

    .offer-title {
        font-size: 22px;
    }

    .section-header {
        align-items: flex-start;
    }

    .status {
        max-width: 130px;
    }

    .areas-header {
        align-items: center;
    }

    .area-name {
        font-size: 16px;
    }

    .area-status {
        font-size: 8px;
    }
}

/* --------------------------------------------------
   CATEGORY SELECTION
-------------------------------------------------- */

.category-section {
    margin-bottom: 35px;
}

.category-heading {
    margin-bottom: 18px;
}

.category-heading h2 {
    margin: 4px 0 6px;

    font-size: 27px;
    line-height: 1.15;

    letter-spacing: -.7px;

    color: var(--text);
}

.category-heading p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
    line-height: 1.5;
}

.category-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;
}

.category-card {
    min-height: 150px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 12px;

    padding: 18px;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 20px;

    box-shadow:
        0 5px 20px rgba(0,0,0,.05);

    color: var(--text);

    text-decoration: none;

    transition:
        transform .15s ease,
        box-shadow .15s ease,
        border-color .15s ease;
}

.category-card:hover {
    border-color:
        rgba(214,65,35,.30);

    box-shadow:
        0 8px 24px rgba(0,0,0,.07);
}

.category-card:active {
    transform: scale(.97);
}

.category-icon {
    width: 72px;
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.category-card span {
    font-size: 15px;
    font-weight: 800;

    text-align: center;

    line-height: 1.2;
}


/* MOBILE */

@media (max-width: 420px) {

    .category-grid {
        gap: 10px;
    }

    .category-card {
        min-height: 135px;

        padding: 15px;
    }

    .category-icon {
        width: 62px;
        height: 62px;
    }

    .category-card span {
        font-size: 14px;
    }
}


/* HEADER LOGO */

.topbar.logo-only {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 40px;
}

.brand-logo {
    display: block;

    width: 90%;
    height: auto;

    max-width: 90%;

    object-fit: contain;
}

.back-row {
    margin-bottom: 18px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--accent);

    font-size: 14px;
    font-weight: 800;

    text-decoration: none;
}

.back-button:hover {
    text-decoration: underline;
}