﻿:root {
    --brand-a: #0a90b4;
    --brand-b: #ff4747;
    --ink: #083a49;
    --bg: #f2f4f5;
    --panel: #ffffff;
    --line: #dbe3e8;
    --ok: #10b14b;
    --off: #a1aab1;
}

* { box-sizing: border-box; }

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

body {
    font-family: Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.brand {
    font-size: 46px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1px;
}

.brand-a { color: var(--brand-a); }
.brand-b { color: var(--brand-b); }

.app-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--brand-a);
    font-weight: 700;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px 14px;
}

.app-cta img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 14px;
    padding: 14px;
}

.left-menu {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    height: fit-content;
    position: sticky;
    top: 12px;
}

.left-menu h2 {
    margin: 0 0 10px;
    font-size: 17px;
}

.left-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
    max-height: 72vh;
    overflow: auto;
}

.left-menu a {
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    display: block;
    padding: 8px 10px;
    border: 1px solid #edf2f6;
    border-radius: 10px;
    background: #fbfdfe;
}

.left-menu a.active {
    border-color: #cbe7f2;
    background: #eaf6fb;
    color: #0a6f8a;
}

.content {
    min-width: 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.merchant-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(0,0,0,.16);
}

.overlay-top {
    position: absolute;
    inset: 0 0 auto 0;
    min-height: 34%;
    background: rgba(0,0,0,.70);
    color: #fff;
    padding: 12px;
    display: grid;
    align-content: start;
    gap: 8px;
    z-index: 2;
}

.overlay-top h3 {
    margin: 0;
    text-align: center;
    font-size: 28px;
    line-height: 1.05;
    font-weight: 900;
    text-transform: uppercase;
}

.attrs {
    margin: 0;
    text-align: center;
    font-size: 13px;
    line-height: 1.35;
    opacity: .95;
}

.modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mode {
    border-radius: 10px;
    padding: 8px 8px;
    text-align: left;
    font-size: 14px;
    font-weight: 800;
    border: 0;
    background: rgba(255,255,255,.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mode .ti {
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.mode.on { color: #fff; }
.mode.off { color: #e6e8ea; }
.mode.on .ti { color: var(--ok); }
.mode.off .ti { color: #ff8a2b; }

.card-link {
    position: absolute;
    inset: 0;
    z-index: 3;
    text-indent: -9999px;
}

.site-footer {
    margin-top: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    background: var(--panel);
    color: #5a6f78;
    font-size: 14px;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 980px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand {
        font-size: 38px;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .left-menu {
        position: static;
    }

    .left-menu ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .site-header {
        padding: 12px;
    }

    .brand {
        font-size: 32px;
    }

    .app-cta {
        width: 100%;
        justify-content: center;
    }

    .layout {
        padding: 10px;
        gap: 10px;
    }

    .left-menu ul {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .overlay-top h3 {
        font-size: 18px;
    }

    .attrs {
        font-size: 11px;
    }

    .mode {
        font-size: 11px;
        padding: 6px 4px;
    }

    .mode .ti {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
}
