:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --text: #121826;
    --muted: #667085;
    --primary: #ff5a5f;
    --primary-dark: #e94b50;
    --border: #e6e8ef;
    --shadow: 0 12px 30px rgba(18, 24, 38, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 18px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #ff8b5e);
    color: #fff;
    box-shadow: var(--shadow);
}

.searchbar {
    flex: 1;
    display: flex;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.searchbar input {
    flex: 1;
    border: 0;
    padding: 14px 18px;
    outline: none;
    font-size: 14px;
    background: transparent;
}

.searchbar button {
    border: 0;
    padding: 0 18px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.desktop-nav {
    display: flex;
    gap: 18px;
    font-weight: 600;
    color: var(--muted);
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-pill {
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff3f3;
    color: var(--primary-dark);
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid transparent;
}

.btn-light {
    background: #fff;
    border-color: var(--border);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.footer {
    margin-top: 60px;
    padding: 40px 0 90px;
    background: #0f172a;
    color: #cbd5e1;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.footer h4 {
    margin: 0 0 12px;
    color: #fff;
}

.footer-bottom {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 14px;
}

.mobile-nav {
    display: none;
}

@media (max-width: 900px) {
    .desktop-nav,
    .auth-actions {
        display: none;
    }

    .topbar-inner {
        flex-wrap: wrap;
    }

    .searchbar {
        order: 3;
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .mobile-nav {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.96);
        border-top: 1px solid var(--border);
        box-shadow: 0 -10px 30px rgba(0,0,0,0.06);
        z-index: 1000;
    }

    .mobile-nav a {
        padding: 14px 8px;
        text-align: center;
        font-size: 13px;
        font-weight: 600;
        color: var(--muted);
    }

    body {
        padding-bottom: 72px;
    }
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(18,24,38,0.05);
}

.icon-btn svg,
.floating-nav-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.icon-dot-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 3px #fff;
}

.floating-nav {
    display: none;
}

@media (max-width: 900px) {
    .floating-nav {
        display: flex;
        justify-content: space-between;
        gap: 8px;
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        bottom: 16px;
        width: min(560px, calc(100% - 20px));
        padding: 10px 12px;
        background: rgba(255,255,255,0.94);
        border: 1px solid var(--border);
        border-radius: 22px;
        box-shadow: 0 16px 40px rgba(15,23,42,0.16);
        backdrop-filter: blur(16px);
        z-index: 1000;
    }

    .floating-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 10px 4px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
    }

    .floating-nav-item svg {
        width: 19px;
        height: 19px;
    }

    body {
        padding-bottom: 92px;
    }
}
.search-shell {
    position: relative;
    flex: 1;
    min-width: 0;
}

.search-suggest {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(15,23,42,0.14);
    overflow: hidden;
    z-index: 1200;
    display: none;
}

.search-suggest.open {
    display: block;
}

.search-suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
}

.search-suggest-item:hover {
    background: #f8fafc;
}

.search-suggest-thumb {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
}

.search-suggest-main strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.search-suggest-main span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.search-suggest-label {
    margin-left: auto;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(18,24,38,0.05);
    color: var(--text);
}

.icon-btn svg,
.floating-nav-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.icon-dot-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 3px #fff;
}

.header-bell {
    display: none;
}

.floating-nav {
    display: none;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 900px) {
    .header-bell {
        display: inline-grid;
        flex: 0 0 auto;
    }

    .topbar-actions,
    .desktop-nav {
        display: none !important;
    }

    .topbar-inner {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 10px;
    }

    .search-shell {
        min-width: 0;
    }

    .searchbar {
        width: 100%;
    }

    .searchbar input {
        font-size: 13px;
        padding-left: 14px;
    }

    .searchbar button {
        padding: 0 14px;
    }

    .floating-nav {
        display: flex;
        justify-content: space-between;
        gap: 8px;
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        bottom: 16px;
        width: min(560px, calc(100% - 20px));
        padding: 10px 12px;
        background: rgba(255,255,255,0.94);
        border: 1px solid var(--border);
        border-radius: 22px;
        box-shadow: 0 16px 40px rgba(15,23,42,0.16);
        backdrop-filter: blur(16px);
        z-index: 1000;
        transition: transform 0.22s ease, opacity 0.22s ease;
    }

    .floating-nav.nav-hidden {
        transform: translateX(-50%) translateY(120%);
        opacity: 0;
        pointer-events: none;
    }

    .floating-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 10px 4px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
    }

    .floating-nav-item svg {
        width: 19px;
        height: 19px;
    }

    body {
        padding-bottom: 92px;
    }
}

.category-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(84px, 1fr);
    gap: 14px;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scrollbar-width: none;
}

.category-rail::-webkit-scrollbar {
    display: none;
}

.category-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 14px 10px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(18,24,38,0.05);
    min-width: 92px;
}

.category-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 22px;
    box-shadow: var(--shadow);
}

.category-card span {
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    color: var(--text);
}

.deal-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.deal-image {
    position: relative;
    min-height: 220px;
    background: linear-gradient(135deg,#ff5a5f,#ff8b5e);
}

.deal-image-inner {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.22), transparent 35%);
}

.like-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    color: #111827;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15,23,42,.14);
    z-index: 2;
}

.like-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.like-btn.is-liked {
    background: #fff1f1;
    color: var(--primary-dark);
}

.deal-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 8px 10px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.deal-content {
    padding: 16px;
}

.deal-merchant {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-dark);
}

.deal-content h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    line-height: 1.25;
}

.deal-excerpt {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
}

.deal-pricing {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
}

.deal-pricing strong { font-size: 1.2rem; }

.deal-pricing span {
    text-decoration: line-through;
    color: var(--muted);
    font-size: 13px;
}

.btn-block { width: 100%; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

@media (max-width: 1100px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}
