:root {
    --primary-blue: #0087eb;
    --dark-bg: #001e33;
    --white: #ffffff;
    --text-gray: #666;
    --shadow: 0 8px 24px rgba(0,0,0,0.15);
    --shadow-strong: 0 16px 45px rgba(0, 0, 0, 0.22);
    --border: rgba(0,0,0,0.08);
    --muted: rgba(255,255,255,0.75);
    --ring: rgba(0, 135, 235, 0.28);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }

body {
    background: #f6f8fb;
    color: #0b1a2a;
}

button { font: inherit; }

/* --- Toast --- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%) translateY(18px);
    background: rgba(0, 30, 51, 0.92);
    color: white;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 16px 45px rgba(0,0,0,0.28);
    border: 1px solid rgba(255,255,255,0.10);
    font-weight: 800;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
    z-index: 5000;
    max-width: min(92vw, 720px);
    text-align: center;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- Header Styling --- */
.main-header {
    background: rgba(0, 30, 51, 0.65);
    backdrop-filter: saturate(140%) blur(10px);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 4%;
    position: sticky;
    top: 0; z-index: 1000;
    transition: background 160ms ease, box-shadow 160ms ease;
}

.main-header.scrolled {
    background: rgba(0, 30, 51, 0.92);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.header-left { display: flex; align-items: center; gap: 10px; }
.header-right { display: flex; align-items: center; gap: 14px; }

.logo { font-size: 24px; font-weight: 800; cursor: pointer; }
.logo a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.logo img { height: 28px; width: auto; display: block; object-fit: contain; }
.location-picker { font-size: 13px; margin-left: 15px; cursor: pointer; border: 1px solid #444; padding: 4px 8px; border-radius: 4px; }

.nav-links a { color: #ccc; text-decoration: none; font-size: 13px; margin: 0 12px; }
.nav-links a:hover { color: white; }
.badge { background: #ff4d4d; font-size: 9px; padding: 2px 4px; border-radius: 2px; }

.btn-post { background: transparent; border: 1px solid white; color: white; padding: 6px 15px; border-radius: 4px; cursor: pointer; }
.btn-post span { color: #4caf50; font-weight: bold; margin-left: 5px; }

.user-profile {
    background: transparent;
    border: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-menu { position: relative; }

.user-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 320px;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.10);
    box-shadow: 0 18px 55px rgba(0,0,0,0.22);
    padding: 14px;
    display: none;
    gap: 12px;
    color: #0b1a2a;
}

.user-popover.open { display: grid; }
.user-popover[hidden] { display: none !important; }

.user-popover-top {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 10px;
    align-items: center;
}

.user-popover-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(0, 135, 235, 0.10);
    border: 1px solid rgba(0, 135, 235, 0.18);
    display: grid;
    place-items: center;
    color: rgba(0, 30, 51, 0.85);
}

.user-popover-name { font-weight: 950; font-size: 14px; }
.user-popover-sub { font-weight: 700; font-size: 12px; color: rgba(11, 26, 42, 0.60); margin-top: 2px; }

.user-popover-card {
    background: #ffefdd;
    border-radius: 14px;
    padding: 12px 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.06);
}

.user-popover-metric { display: grid; gap: 2px; }
.user-popover-metric .num { font-size: 22px; font-weight: 950; }
.user-popover-metric .label { font-size: 12px; font-weight: 800; color: rgba(11, 26, 42, 0.70); }
.user-popover-link { color: rgba(11, 26, 42, 0.70); }

.user-popover-cta {
    height: 44px;
    border-radius: 12px;
    border: none;
    background: var(--primary-blue);
    color: white;
    font-weight: 950;
    cursor: pointer;
}

.user-popover-cta:hover { filter: brightness(0.98); }

.user-popover-auth-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
}

.user-popover-auth-links button {
    background: transparent;
    border: none;
    color: rgba(11, 26, 42, 0.80);
    cursor: pointer;
    padding: 4px 8px;
}

.user-popover-auth-links button:hover { color: var(--primary-blue); }

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
}

.logout-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.22);
    display: grid;
    place-items: center;
    text-decoration: none;
    color: white;
}

/* --- Auth overlay (Login/Register) --- */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.auth-overlay.open { display: flex; }

.auth-overlay-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
}

.auth-dialog {
    position: relative;
    width: min(560px, 92vw);
    max-height: calc(100vh - 48px);
    background: white;
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.10);
    box-shadow: 0 24px 70px rgba(0,0,0,0.32);
    overflow: hidden;
    overflow-y: auto;
}

.auth-dialog.auth-loading .auth-head,
.auth-dialog.auth-loading .auth-tabs,
.auth-dialog.auth-loading .auth-alert,
.auth-dialog.auth-loading .auth-panels {
    filter: blur(2px);
    opacity: 0.52;
    pointer-events: none;
    user-select: none;
}

.auth-loading-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(2px);
}

.auth-dialog.auth-loading .auth-loading-layer {
    display: flex;
}

.auth-loading-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 12px 18px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
    color: #0b1a2a;
    font-size: 14px;
    font-weight: 900;
}

.auth-spinner {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 3px solid rgba(0, 135, 235, 0.20);
    border-top-color: var(--primary-blue);
    animation: authSpin 0.8s linear infinite;
    flex: 0 0 auto;
}

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

.auth-head {
    padding: 18px 20px 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: start;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    background: linear-gradient(180deg, rgba(0, 135, 235, 0.08), rgba(0, 135, 235, 0.02));
}

.auth-kicker {
    font-size: 12px;
    font-weight: 900;
    color: rgba(11, 26, 42, 0.65);
    letter-spacing: 0.4px;
}

.auth-title {
    margin-top: 4px;
    font-size: 20px;
    font-weight: 950;
    letter-spacing: -0.25px;
    color: #0b1a2a;
}

.auth-sub {
    margin-top: 6px;
    font-size: 13px;
    color: rgba(11, 26, 42, 0.65);
}

.auth-x {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.12);
    background: white;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: rgba(11, 26, 42, 0.75);
}

.auth-form {
    padding: 16px 20px 18px;
    display: grid;
    gap: 12px;
}

.auth-tabs {
    padding: 10px 20px 0;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.auth-alert {
    margin: 12px 20px 0;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(0, 0, 0, 0.04);
    color: rgba(11, 26, 42, 0.88);
    font-size: 13px;
    font-weight: 800;
}

.auth-alert.info {
    background: rgba(0, 135, 235, 0.10);
    border-color: rgba(0, 135, 235, 0.22);
}

.auth-alert.ok {
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.22);
}

.auth-alert.err {
    background: rgba(255, 77, 77, 0.10);
    border-color: rgba(255, 77, 77, 0.22);
}

.auth-tab {
    background: transparent;
    border: none;
    padding: 10px 12px;
    border-radius: 12px 12px 0 0;
    font-weight: 950;
    font-size: 13px;
    color: rgba(11, 26, 42, 0.65);
    cursor: pointer;
}

.auth-tab.active {
    color: rgba(11, 26, 42, 0.92);
    background: rgba(0, 135, 235, 0.08);
    border: 1px solid rgba(0, 135, 235, 0.18);
    border-bottom-color: rgba(255,255,255,0);
}

.auth-panels { padding: 0; }
.auth-panel { padding: 0; }

.auth-field > span {
    display: block;
    font-size: 12px;
    font-weight: 900;
    color: rgba(11, 26, 42, 0.65);
    margin: 6px 0;
}

.auth-field input,
.auth-phone-row select {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.12);
    background: white;
    padding: 12px 12px;
    font-size: 14px;
    outline: none;
}

.auth-field input:focus,
.auth-phone-row select:focus {
    box-shadow: 0 0 0 5px rgba(0, 135, 235, 0.18);
    border-color: rgba(0, 135, 235, 0.45);
}

.auth-email-row,
.auth-phone-row {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 10px;
    align-items: center;
}

.auth-phone-row {
    grid-template-columns: 120px 1fr;
}

.auth-otp-btn {
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(0, 135, 235, 0.35);
    background: rgba(0, 135, 235, 0.10);
    color: #0b1a2a;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.auth-otp-btn:disabled { opacity: 0.55; cursor: default; }

.auth-hint {
    margin-top: 6px;
    font-size: 11px;
    color: rgba(11, 26, 42, 0.55);
}

.auth-pill {
    margin-top: 4px;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(246, 248, 251, 0.9);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-pill-title { font-weight: 900; color: rgba(11, 26, 42, 0.85); font-size: 13px; }
.auth-pill-actions { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 13px; }
.auth-pill-actions label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: rgba(11, 26, 42, 0.70);
    padding-top: 2px;
}

.auth-terms a { color: var(--primary-blue); text-decoration: none; font-weight: 900; }
.auth-terms a:hover { text-decoration: underline; }

.auth-actions {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 12px;
    margin-top: 6px;
}

.auth-primary {
    height: 48px;
    border-radius: 14px;
    border: none;
    background: var(--primary-blue);
    color: white;
    font-weight: 950;
    cursor: pointer;
}

.auth-secondary {
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.12);
    background: white;
    color: rgba(11, 26, 42, 0.85);
    font-weight: 900;
    cursor: pointer;
}

.auth-foot {
    text-align: center;
    font-size: 12px;
    color: rgba(11, 26, 42, 0.65);
    padding-top: 6px;
}

.auth-foot a { color: var(--primary-blue); text-decoration: none; font-weight: 900; }

@media (max-width: 560px) {
    .auth-head { padding: 14px 14px 12px; }
    .auth-tabs { padding: 8px 14px 0; }
    .auth-alert { margin: 10px 14px 0; }
    .auth-form { padding: 14px 14px 16px; }
    .auth-email-row,
    .auth-phone-row { grid-template-columns: 1fr; }
    .auth-actions { grid-template-columns: 1fr; }
    .user-popover { width: min(92vw, 320px); }
}

/* --- Hero Section --- */
.hero-section {
    min-height: 520px;
    height: 62vh;
    background: url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
    display: grid;
    align-items: end;
    padding: 0 4% 64px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 500px at 20% 15%, rgba(0, 0, 0, 0.10), transparent 60%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12) 55%, rgba(246, 248, 251, 1) 92%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, 430px) minmax(320px, 980px);
    gap: 26px;
    align-items: end;
    width: min(1180px, 100%);
    margin: 0 auto;
}

.ad-banner {
    color: white;
    padding: 10px 0 8px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.ad-kicker {
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.25px;
    margin-bottom: 10px;
}

.ad-banner h1 {
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.4px;
}

.ad-sub {
    margin-top: 10px;
    color: rgba(255,255,255,0.86);
    font-size: 14px;
    line-height: 1.45;
    max-width: 42ch;
}

.btn-explore {
    margin-top: 18px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.30);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.btn-explore:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.42);
}

/* --- The Search Card (Innovation: Modern Grid Layout) --- */
.search-card {
    background: var(--white);
    width: 100%;
    border-radius: 16px;
    box-shadow: var(--shadow-strong);
    padding: 12px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.70);
}

.tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 2px 2px 8px;
    margin-bottom: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    position: relative;
    background: transparent;
    border: none;
    border-radius: 10px;
    white-space: nowrap;
}

.tab:hover { background: rgba(0, 135, 235, 0.07); color: #0b1a2a; }

.divider {
    width: 1px;
    height: 22px;
    background: rgba(0,0,0,0.10);
    margin: 0 6px;
}

.tab.active { color: #000; }
.tab.active::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 15%; width: 70%;
    height: 3px; background: var(--primary-blue);
}

.tab .dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    margin-left: 6px;
    background: #ff4d4d;
    vertical-align: middle;
}

.post-tab {
    color: #0b1a2a;
    margin-left: auto;
}

.post-tab span {
    margin-left: 6px;
    background: rgba(76, 175, 80, 0.16);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.32);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    font-weight: 700;
}

/* Accuracy: Search Bar Row using CSS Grid */
.search-bar-row {
    position: relative;
    display: grid;
    grid-template-columns: 175px 1fr 44px 44px 112px;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 12px;
    margin: 10px 10px 8px;
    background: white;
    overflow: hidden;
    transition: box-shadow 160ms ease, border-color 160ms ease;
}

.search-bar-row:focus-within {
    border-color: rgba(0, 135, 235, 0.55);
    box-shadow: 0 0 0 6px var(--ring);
}

.dropdown-part {
    padding: 13px 12px;
    border-right: 1px solid rgba(0,0,0,0.06);
    font-size: 14px;
    cursor: pointer;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #0b1a2a;
}

.dropdown-part i { color: rgba(0,0,0,0.55); }

.input-part {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 12px;
    min-width: 0;
}

.input-part i { color: rgba(0,0,0,0.55); }

.input-part input {
    border: none;
    outline: none;
    width: 100%;
    padding: 12px 10px;
    font-size: 14px;
    min-width: 0;
}

.icon-part {
    color: var(--primary-blue);
    text-align: center;
    cursor: pointer;
    background: transparent;
    border: none;
    height: 100%;
    display: grid;
    place-items: center;
}

.icon-part:hover { background: rgba(0, 135, 235, 0.08); }

.btn-search {
    background: var(--primary-blue);
    color: white; border: none; height: 100%;
    border-radius: 0 0 0 0;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.2px;
}

.btn-search:hover { filter: brightness(0.96); }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 10px;
    width: 240px;
    background: white;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 6px;
    display: none;
    z-index: 20;
}

.dropdown-menu.open { display: block; }

.dropdown-item {
    width: 100%;
    text-align: left;
    padding: 10px 10px;
    border-radius: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #0b1a2a;
    font-size: 14px;
}

.dropdown-item:hover { background: rgba(0, 135, 235, 0.08); }

.suggestions {
    position: absolute;
    left: 36px;
    right: 12px;
    top: calc(100% + 6px);
    background: white;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: none;
    z-index: 15;
}

.suggestions.open { display: block; }

.suggestions button {
    width: 100%;
    text-align: left;
    padding: 11px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.suggestions button:hover { background: rgba(0, 135, 235, 0.08); }

.suggestions .hint {
    color: rgba(0,0,0,0.55);
    font-size: 12px;
    margin-left: auto;
}

/* --- Category Cards --- */
.categories-container {
    margin-top: 88px;
    text-align: center;
    padding: 24px 4% 48px;
}

.section-label { font-size: 11px; font-weight: bold; color: var(--text-gray); margin-bottom: 20px; }

.category-shell {
    position: relative;
    width: min(1180px, 100%);
    margin: 0 auto;
}

.category-grid {
    display: flex;
    align-items: stretch;
    gap: 18px;
    overflow-x: auto;
    padding: 0 54px 6px 0;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 12px;
    scrollbar-width: none;
}

.category-grid::-webkit-scrollbar { display: none; }

.cat-card {
    flex: 0 0 190px;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
}

.img-box {
    width: 100%;
    height: 116px;
    background: linear-gradient(135deg, rgba(0, 135, 235, 0.12), rgba(0, 30, 51, 0.06));
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 77, 77, 0.92);
    color: white;
    font-size: 10px;
    font-weight: 900;
    padding: 3px 6px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    z-index: 2;
}

.cat-card p { font-size: 13px; font-weight: 700; }

.cat-card:hover .img-box { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(0, 135, 235, 0.22); }

.promo-box {
    background: rgba(46, 204, 113, 0.16);
    border-color: rgba(46, 204, 113, 0.25);
    display: grid;
    grid-template-columns: 1fr 86px;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 12px 14px;
}

.promo-title {
    font-weight: 1000;
    line-height: 1.2;
    letter-spacing: -0.2px;
    color: #0b1a2a;
    font-size: 14px;
}

.promo-sub {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(11, 26, 42, 0.70);
    font-weight: 700;
}

.promo-figure {
    width: 100%;
    height: 96px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    background:
        radial-gradient(closest-side, rgba(0, 135, 235, 0.22), transparent 70%),
        linear-gradient(135deg, rgba(0, 30, 51, 0.12), rgba(0, 135, 235, 0.10));
}

.cat-scroll-btn {
    position: absolute;
    right: 0;
    top: 36px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.10);
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.10);
    cursor: pointer;
    display: grid;
    place-items: center;
    color: rgba(0, 30, 51, 0.85);
}

.cat-scroll-btn:hover { filter: brightness(0.98); }
.cat-scroll-btn[hidden] { display: none; }
.cat-scroll-btn i { font-size: 14px; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: rgba(0, 30, 51, 0.96);
    color: white;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease, transform 150ms ease;
    z-index: 2000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

/* --- Recommended Section --- */
.reco-wrapper {
    padding: 54px 4% 0;
}

.reco-container {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.reco-block + .reco-block { margin-top: 34px; }

.reco-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.reco-header h2 {
    font-size: 28px;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}

.reco-header p {
    color: rgba(11, 26, 42, 0.65);
    font-size: 13px;
}

.reco-grid {
    display: grid;
    gap: 18px;
}

.reco-grid-properties { grid-template-columns: repeat(4, minmax(170px, 1fr)); }
.reco-grid-projects { grid-template-columns: repeat(3, minmax(220px, 1fr)); }

.reco-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
    outline: none;
}

.reco-card:hover,
.reco-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(0, 135, 235, 0.30);
    box-shadow: 0 16px 45px rgba(0,0,0,0.12);
}

.reco-media {
    position: relative;
    height: 140px;
    background: linear-gradient(135deg, rgba(0, 135, 235, 0.12), rgba(0, 30, 51, 0.06));
}

.project-card .reco-media { height: 154px; }

.reco-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.heart-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.55);
    background: rgba(0,0,0,0.25);
    color: white;
    display: grid;
    place-items: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.heart-btn.saved { background: rgba(255, 77, 77, 0.28); border-color: rgba(255,255,255,0.65); }

.price-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: white;
    color: #0b1a2a;
    font-weight: 900;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 13px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.reco-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    background: rgba(46, 204, 113, 0.92);
    color: white;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.reco-tag {
    position: absolute;
    left: 10px;
    top: 10px;
    background: rgba(0, 30, 51, 0.90);
    color: white;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
}

.reco-tag.subtle { background: rgba(0, 30, 51, 0.76); top: auto; bottom: 10px; }

.reco-card h3 {
    font-size: 15px;
    font-weight: 900;
    padding: 12px 12px 6px;
    letter-spacing: -0.15px;
}

.reco-card .meta {
    padding: 0 12px 8px;
    font-size: 12px;
    color: rgba(11, 26, 42, 0.65);
}

.reco-card .meta.strong { color: #0b1a2a; font-weight: 900; }

.meta-row {
    padding: 0 12px 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: rgba(11, 26, 42, 0.65);
    font-size: 11px;
}

.reco-side { display: grid; gap: 16px; }

.side-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    padding: 16px;
}

.user-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(0, 135, 235, 0.10);
    border: 1px solid rgba(0,0,0,0.08);
    color: rgba(0, 30, 51, 0.85);
    display: grid;
    place-items: center;
}

.user-name { font-weight: 900; }
.user-sub { color: rgba(11, 26, 42, 0.65); font-size: 12px; margin-top: 2px; }

.activity-card {
    background: rgba(255, 220, 180, 0.45);
    border-radius: 12px;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 6px 10px;
    align-items: start;
    margin-bottom: 14px;
}

.activity-count { font-size: 26px; font-weight: 1000; line-height: 1; }
.activity-label { color: rgba(11, 26, 42, 0.75); font-weight: 800; font-size: 12px; }
.activity-card i { color: rgba(11, 26, 42, 0.65); }

.btn-login {
    width: 100%;
    border: none;
    background: var(--primary-blue);
    color: white;
    font-weight: 900;
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
}

.btn-login:hover { filter: brightness(0.96); }

.user-hint {
    margin-top: 10px;
    font-size: 11px;
    color: rgba(11, 26, 42, 0.60);
    text-align: center;
}

.sell-card { background: rgba(46, 204, 113, 0.12); border-color: rgba(46, 204, 113, 0.22); }

.sell-grid {
    display: grid;
    grid-template-columns: 1fr 98px;
    gap: 12px;
    align-items: center;
}

.sell-title { font-weight: 1000; font-size: 16px; line-height: 1.25; }
.sell-sub { color: rgba(11, 26, 42, 0.70); margin-top: 6px; font-size: 13px; }

.btn-sell {
    margin-top: 12px;
    border: none;
    background: var(--primary-blue);
    color: white;
    font-weight: 900;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    width: 100%;
}

.btn-sell:hover { filter: brightness(0.96); }

.sell-img {
    width: 100%;
    height: 118px;
    border-radius: 14px;
    background: radial-gradient(closest-side, rgba(0, 135, 235, 0.26), transparent 68%),
        linear-gradient(135deg, rgba(0, 30, 51, 0.18), rgba(0, 135, 235, 0.10));
    border: 1px solid rgba(0,0,0,0.06);
}

/* --- Owner tools / articles concept section --- */
.owner-tools { padding: 32px 4% 60px; }

.owner-container {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.owner-hero {
    background: rgba(255,255,255,0.82);
    border-radius: 18px;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 520px);
    align-items: center;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 16px 45px rgba(0,0,0,0.08);
}

.owner-hero-media {
    min-height: 320px;
    position: relative;
    background: radial-gradient(900px 380px at 45% 40%, rgba(255,255,255,0.55), transparent 60%);
}

.owner-hero-media img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    display: block;
    mix-blend-mode: multiply;
    opacity: 0.92;
}

.owner-hero-copy {
    padding: 38px 34px;
    background: rgba(255,255,255,0.82);
    border-left: 1px solid rgba(0,0,0,0.06);
}

.owner-hero-copy h2 {
    font-size: 30px;
    line-height: 1.12;
    letter-spacing: -0.35px;
}

.owner-hero-copy p {
    margin-top: 10px;
    color: rgba(11, 26, 42, 0.68);
    font-size: 14px;
}

.owner-hero-actions { margin-top: 56px; display: grid; gap: 10px; justify-items: start; }

.btn-owner-primary {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 135, 235, 0.18);
}

.btn-owner-primary:hover { filter: brightness(0.96); }

.btn-owner-link {
    background: transparent;
    border: none;
    padding: 8px 2px;
    color: rgba(0, 30, 51, 0.92);
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-owner-link i.fab { color: #25D366; font-size: 16px; }

.owner-articles {
    margin-top: -34px;
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 18px;
    box-shadow: 0 16px 45px rgba(0,0,0,0.08);
    padding: 22px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    position: relative;
}

.articles-left h3 {
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: -0.25px;
}

.articles-left p {
    margin-top: 14px;
    color: rgba(11, 26, 42, 0.65);
    font-size: 13px;
    max-width: 34ch;
}

.articles-right { position: relative; padding-right: 56px; }

.articles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
    align-items: start;
}

.article-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.06);
    background: rgba(246, 248, 251, 0.9);
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.article-item:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 135, 235, 0.22);
    background: rgba(0, 135, 235, 0.06);
}

.article-item img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

.article-title {
    font-weight: 900;
    font-size: 13px;
    line-height: 1.25;
}

.article-date {
    margin-top: 6px;
    font-size: 11px;
    color: rgba(11, 26, 42, 0.60);
    font-weight: 700;
}

.articles-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-weight: 900;
    text-decoration: none;
    color: rgba(0, 30, 51, 0.92);
}

.articles-more:hover { color: var(--primary-blue); }

.articles-next {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.10);
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.10);
    cursor: pointer;
    display: grid;
    place-items: center;
    color: rgba(0, 30, 51, 0.85);
}

.articles-next:hover { filter: brightness(0.98); }

@media (max-width: 980px) {
    .nav-links { display: none; }
    .hero-content { grid-template-columns: 1fr; }
    .ad-sub { max-width: 58ch; }
    .search-bar-row { grid-template-columns: 160px 1fr 44px 44px 108px; }
    .category-grid { padding-right: 54px; }
    .reco-container { grid-template-columns: 1fr; }
    .reco-grid-properties { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
    .reco-grid-projects { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
    .owner-hero { grid-template-columns: 1fr; }
    .owner-hero-copy {background: rgba(255,255,255,0.82);}
    .owner-articles { grid-template-columns: 1fr; margin-top: 16px; }
    .articles-right { padding-right: 0; }
    .articles-next { display: none; }
}

@media (max-width: 560px) {
    .main-header { padding: 10px 3%; }
    .header-right { gap: 10px; }
    .btn-post { display: none; }
    .hero-section { padding: 0 3% 54px; height: auto; min-height: 560px; }
    .search-card { padding: 10px; border-radius: 14px; }
    .search-bar-row { grid-template-columns: 1fr 44px 44px; }
    .dropdown-part { display: none; }
    .btn-search { display: none; }
    .suggestions { left: 12px; }
    .category-shell { width: 100%; }
    .category-grid { padding-right: 50px; gap: 14px; }
    .cat-card { flex-basis: 170px; }
    .img-box { height: 110px; }
    .reco-wrapper { padding: 42px 3% 0; }
    .reco-grid-properties { grid-template-columns: 1fr; }
    .reco-grid-projects { grid-template-columns: 1fr; }
    .reco-header h2 { font-size: 22px; }
    .reco-media { height: 160px; }
    .project-card .reco-media { height: 170px; }
    .owner-tools { padding: 18px 3% 48px; }
    .owner-hero-media img { min-height: 240px; }
    .owner-hero-copy { padding: 22px 18px; }
    .owner-hero-copy h2 { font-size: 24px; }
    .articles-grid { grid-template-columns: 1fr; }
}
