:root {
    --bg: #f4f7fb;
    --bg-2: #eef3f8;
    --panel: #ffffff;
    --panel-strong: #ffffff;
    --line: #dde6f0;
    --line-strong: #cfd9e4;
    --ink: #12233b;
    --muted: #5f7188;
    --blue: #126bdb;
    --blue-deep: #0b56b0;
    --green: #2fa84f;
    --green-deep: #1f7e3a;
    --amber: #f4b740;
    --orange: #ea7b20;
    --coral: #e95b6b;
    --soft-blue: #eef5ff;
    --soft-green: #edf8f0;
    --soft-amber: #fff6e8;
    --success: #168a4e;
    --danger: #d63649;
    --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.05);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Manrope", sans-serif;
    background: var(--bg);
}

a { color: inherit; text-decoration: none; }
img { width: 100%; display: block; border-radius: 22px; }
button, input, select, textarea { font: inherit; }
main { padding-bottom: 36px; }

.site-shell {
    width: calc(100% - 32px);
    max-width: 1680px;
    margin: 0 auto;
}

.topbar, .hero, .section, .listing-card, .feature-panel, .mini-card, .metric-card, .sidebar, .form-card, .flash, .result-row, .menu-item, .site-footer, .table-wrap, .empty-state, .auth-card, .stats-row article {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.topbar {
    margin: 18px 0 22px;
    padding: 18px 24px;
    border-radius: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    position: sticky;
    top: 14px;
    z-index: 30;
}

.site-header {
    margin: 18px 0 22px;
    padding: 14px 22px 18px;
    border-radius: 30px;
    position: sticky;
    top: 14px;
    z-index: 30;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.header-top-row,
.header-middle-row,
.header-search-row,
.header-nav-row,
.header-user-alerts,
.header-icon-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-top-row {
    justify-content: space-between;
    margin-bottom: 18px;
}

.header-user-alerts {
    min-width: 0;
    flex-wrap: nowrap;
}

.header-user-name {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    color: var(--ink);
    font-size: 0.98rem;
}

.header-location-form {
    margin: 0;
    max-width: 320px;
    width: 100%;
}

.header-location-pill {
    min-width: 0;
    width: 100%;
    font-size: 0.96rem;
}

.header-middle-row {
    justify-content: space-between;
    gap: 22px;
}

.desktop-header-row {
    display: flex !important;
}

.mobile-header-row,
.mobile-search-row {
    display: none !important;
}

.header-brand {
    flex: 0 0 auto;
}

.header-search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    flex: 1 1 620px;
    min-width: 0;
}

.header-search-form input {
    width: 100%;
    padding: 15px 18px;
    border-radius: 999px;
    border: 1px solid rgba(12, 33, 67, 0.12);
    background: rgba(255, 255, 255, 0.98);
    color: var(--ink);
}

.header-search-form button {
    border-radius: 999px;
    padding: 14px 22px;
}

.header-icon-links {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.header-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 800;
    color: #35557f;
}

.header-icon-link.compact {
    padding: 11px 12px;
}

.header-icon-glyph {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--soft-blue);
    color: var(--blue-deep);
    font-size: 16px;
    font-weight: 900;
}

.header-count-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: var(--blue);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.header-nav-row {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(12, 33, 67, 0.08);
    flex-wrap: wrap;
    justify-content: center;
}

.header-nav-row a {
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid rgba(14, 100, 195, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,248,255,0.92));
    font-weight: 700;
    color: #35557f;
    font-size: 0.98rem;
}

.header-nav-row a.active,
.header-nav-row a:hover {
    color: var(--blue);
    border-color: rgba(13, 125, 242, 0.24);
}

.mobile-menu-toggle {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    font-size: 20px;
    line-height: 1;
}

.brand, h1, h2, h3, h4 {
    font-family: "Space Grotesk", sans-serif;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 0 0 auto;
}

.brand-logo {
    display: block;
    width: 140px !important;
    max-width: 140px !important;
    height: auto;
    object-fit: contain;
}

.header-brand .brand-logo {
    width: 210px !important;
    max-width: 210px !important;
}

.header-search-form button {
    white-space: nowrap;
}

.header-search-form.mobile-search-form {
    width: 100%;
}

.header-search-form.mobile-search-form button {
    min-width: 72px;
}

.header-location-form .location-wrapper {
    width: 100%;
}

.header-location-form .location-dropdown {
    width: 100%;
    min-width: 260px;
}

@media (max-width: 1100px) {
    .site-shell {
        width: min(1260px, calc(100% - 20px));
    }

    .header-middle-row {
        gap: 14px;
    }

    .header-search-form input {
        min-width: 0;
    }

    .header-nav-row {
        gap: 10px;
    }

    .header-nav-row a {
        padding: 10px 14px;
    }

    .header-brand .brand-logo {
        width: 180px !important;
        max-width: 180px !important;
    }
}

@media (max-width: 860px) {
    .site-header {
        padding: 14px 14px 16px;
        border-radius: 24px;
    }

    .header-top-row {
        gap: 12px;
        margin-bottom: 12px;
        align-items: flex-start;
    }

    .header-user-alerts {
        flex: 1 1 45%;
        min-width: 0;
    }

    .header-user-name {
        max-width: 100%;
        font-size: 0.92rem;
        padding: 9px 12px;
    }

    .header-location-form {
        flex: 1 1 48%;
        min-width: 0;
    }

    .header-location-pill {
        min-width: 0;
        width: 100%;
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .desktop-header-row {
        display: none !important;
    }

    .mobile-header-row,
    .mobile-search-row {
        display: flex !important;
    }

    .mobile-header-row {
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
    }

    .mobile-brand {
        flex: 1 1 auto;
        justify-content: center;
    }

    .mobile-brand .brand-logo {
        width: 128px !important;
        max-width: 128px !important;
    }

    .mobile-icon-links {
        gap: 8px;
    }

    .mobile-menu-toggle,
    .header-icon-link.compact {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        padding: 0;
        justify-content: center;
    }

    .mobile-search-row {
        margin-bottom: 12px;
    }

    .mobile-search-form {
        grid-template-columns: 1fr auto;
    }

    .header-nav-row {
        display: none;
        margin-top: 0;
        padding-top: 12px;
        border-top: 1px solid rgba(12, 33, 67, 0.08);
        flex-direction: column;
        align-items: stretch;
    }

    .header-nav-row.is-open {
        display: flex;
    }

    .header-nav-row a {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 580px) {
    .header-top-row {
        flex-direction: column;
        align-items: stretch;
    }

    .header-user-alerts,
    .header-location-form {
        width: 100%;
    }

    .header-user-alerts {
        justify-content: space-between;
    }

    .header-user-name {
        flex: 1 1 auto;
        justify-content: center;
    }

    .mobile-search-form {
        grid-template-columns: 1fr;
    }

    .mobile-search-form button {
        width: 100%;
    }
}

.main-nav, .topbar-actions, .hero-badges, .meta-row, .filters, .status-strip, .stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.main-nav a, .cart-pill, .location-pill, .user-pill, .tag, .button-link, button, .hero-badges span, .badge {
    padding: 10px 15px;
    border-radius: 999px;
}

.main-nav a, .location-pill, .user-pill, .tag, .badge, .hero-badges span {
    border: 1px solid var(--line);
    background: #ffffff;
}

.main-nav a {
    font-weight: 700;
    color: #35557f;
}

.main-nav a:hover {
    color: var(--blue);
    border-color: rgba(13, 125, 242, 0.24);
}

.button-link, button, .cart-pill {
    border: none;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    background: var(--blue-deep);
    box-shadow: 0 8px 18px rgba(11, 86, 176, 0.18);
}

.button-link:hover, button:hover, .cart-pill:hover {
    transform: translateY(-1px);
    background: var(--blue);
    box-shadow: 0 12px 22px rgba(11, 86, 176, 0.18);
}

.button-link.secondary, button.secondary {
    background: #ffffff;
    color: var(--ink);
    border: 1px solid rgba(12, 33, 67, 0.12);
    box-shadow: none;
}

.location-pill {
    min-width: 220px;
    color: var(--ink);
    font-weight: 700;
}

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 36px;
    padding: 46px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 26px;
    background: #ffffff;
}

.hero h1 {
    font-size: clamp(2.8rem, 5vw, 5rem);
    line-height: 0.94;
    margin: 12px 0 18px;
    max-width: 12ch;
}

.hero-search, .inline-form, .form-grid, .checkout-grid, .two-column {
    display: grid;
    gap: 14px;
}

.hero-search {
    grid-template-columns: 1fr auto;
    margin: 24px 0;
}

.hero-search input, .inline-form input, .form-grid input, .form-grid select, .form-grid textarea, .menu-actions select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(12, 33, 67, 0.12);
    background: rgba(255, 255, 255, 0.98);
    color: var(--ink);
}

.hero-panel {
    display: grid;
    gap: 16px;
}

.section, .form-card, .auth-card, .table-wrap {
    border-radius: var(--radius-xl);
    padding: 28px;
    margin: 22px 0;
}

.page-banner, .ad-hero {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    padding: 28px;
    margin: 22px 0;
    background: #0f223a;
    color: #fff;
    box-shadow: var(--shadow);
}

.banner-grid, .ad-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: center;
}

.page-banner .eyebrow, .ad-hero .eyebrow,
.page-banner p, .ad-hero p {
    color: rgba(255,255,255,0.9);
}

.banner-actions, .footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.banner-media {
    min-height: 220px;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.2);
}

.banner-media img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
}

.feature-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.feature-tile {
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.feature-tile strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.section-head {
    margin-bottom: 20px;
}

.section-head p, p.meta, td, .muted {
    color: var(--muted);
}

.listing-grid, .category-grid, .mini-grid, .three-up, .dashboard-grid, .stats-row {
    display: grid;
    gap: 18px;
}

.category-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.listing-grid { grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); }
.mini-grid, .dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.three-up { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.listing-card, .feature-panel, .mini-card, .metric-card, .empty-state, .auth-card, .stats-row article {
    overflow: hidden;
    border-radius: 24px;
    padding: 22px;
}

.listing-card {
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.listing-card:hover {
    transform: translateY(-4px);
}

.listing-card img {
    margin-bottom: 16px;
    aspect-ratio: 16 / 11;
    object-fit: cover;
}

.mini-card {
    position: relative;
    background: #fff;
}

.mini-card::after {
    content: "";
    position: absolute;
    inset: auto 18px 14px auto;
    width: 54px;
    height: 6px;
    border-radius: 999px;
    background: var(--blue);
    opacity: 0.8;
}

.metric-card {
    background: #0f223a;
    color: #fff;
    border: none;
}

.metric-card span {
    color: rgba(255,255,255,0.88);
}

.metric-card strong {
    display: block;
    font-size: 2.35rem;
}

.dashboard-shell { display: grid; grid-template-columns: 260px 1fr; gap: 20px; margin-bottom: 30px; }

.sidebar {
    display: grid;
    gap: 10px;
    align-self: start;
    position: sticky;
    top: 100px;
    padding: 22px;
    border-radius: 24px;
}

.sidebar a {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(238, 247, 255, 0.7);
}

.dashboard-content { display: grid; gap: 20px; }

.result-row, .menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border-radius: 20px;
}

.menu-actions { display: grid; gap: 10px; min-width: 220px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid rgba(12, 33, 67, 0.08); }
th { font-family: "Space Grotesk", sans-serif; font-size: 0.95rem; color: var(--blue-deep); }
.flash.success, .status-ok { color: var(--success); }
.flash.error, .status-bad { color: var(--danger); }
.flash { padding: 16px 20px; border-radius: 18px; margin: 12px 0; }
.auth-shell { min-height: 60vh; display: grid; place-items: center; }
.auth-card { width: min(760px, 100%); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.checkout-grid, .two-column { grid-template-columns: 1.1fr 0.9fr; }

.site-footer {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    margin: 28px 0;
    padding: 30px;
    border-radius: 26px;
    background: #ffffff;
    color: var(--ink);
}

.site-footer p { color: var(--muted); }

.footer-brand strong {
    display: inline-block;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue-deep);
    font-size: 0.8rem;
}

.footer-brand h3, .footer-links h4 {
    margin: 8px 0 10px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
}

.footer-links a {
    display: block;
    margin-top: 10px;
    color: var(--muted);
}

.footer-links a:hover { color: var(--blue); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: var(--blue-deep);
    font-weight: 800;
}

.eyebrow::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 12px 0 0 rgba(18, 107, 219, 0.22);
}

.page-narrow {
    width: min(1320px, 100%);
    margin: 0 auto;
    padding: 0 16px 90px;
}

@media (max-width: 1080px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .brand {
        justify-content: center;
    }

    .brand-logo {
        width: 120px !important;
        max-width: 120px !important;
    }
}

@media (max-width: 960px) {
    .topbar, .site-footer, .result-row, .menu-item { flex-direction: column; align-items: flex-start; }
    .hero, .dashboard-shell, .checkout-grid, .two-column, .banner-grid, .ad-grid, .site-footer { grid-template-columns: 1fr; }
    .topbar { position: static; }
    .hero-search, .form-grid, .grid-2 { grid-template-columns: 1fr; }
    .site-shell { width: calc(100% - 20px); }
    .hero { padding: 30px 22px; }
}

@media (max-width: 768px) {
    .page-narrow {
        padding: 0 12px 86px;
    }

    .section, .form-card, .auth-card, .table-wrap {
        padding: 18px;
        margin: 16px 0;
        border-radius: 18px;
    }

    .section-head {
        margin-bottom: 14px;
    }

    .section-head h1,
    .section-head h2 {
        font-size: 1.45rem;
        line-height: 1.15;
        margin-bottom: 8px;
    }

    .dashboard-grid,
    .mini-grid,
    .listing-grid,
    .three-up,
    .stats-row {
        gap: 12px;
    }

    .metric-card,
    .listing-card,
    .mini-card,
    .empty-state,
    .auth-card,
    .stats-row article {
        padding: 16px;
        border-radius: 18px;
    }

    .metric-card strong {
        font-size: 1.8rem;
    }

    .inline-form,
    .form-grid,
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    th, td {
        padding: 10px 8px;
        font-size: 0.92rem;
    }

    .table-wrap {
        overflow-x: auto;
    }
}

.app-hero-block {
    margin: 0 0 18px;
}

.app-hero-card {
    position: relative;
    overflow: hidden;
    min-height: 228px;
    padding: 18px;
    border-radius: 28px;
    background: #0f172a center/cover no-repeat;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.1);
    display: grid;
    align-items: end;
}

.app-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.64));
}

.app-hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    max-width: 640px;
    color: #fff;
}

.app-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-hero-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.85rem, 4.6vw, 3.8rem);
    line-height: 0.98;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.app-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.app-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 800;
    border: 1px solid transparent;
    background: #0f6fff;
    color: #fff;
}

.app-hero-btn.secondary {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

@media (min-width: 768px) {
    .app-hero-card {
        min-height: 290px;
        padding: 24px;
        border-radius: 32px;
    }
}

@media (max-width: 768px) {
    .app-hero-block {
        margin-bottom: 14px;
    }

    .app-hero-card {
        min-height: 206px;
        padding: 16px;
        border-radius: 24px;
    }

    .app-hero-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-hero-btn {
        min-height: 42px;
        padding: 0 14px;
        font-size: 0.86rem;
    }
}
