* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ── Accessibility — skip link, focus styles, touch targets ───────────────── */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0b5cad;
    color: #fff;
    padding: 10px 16px;
    z-index: 10000;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid #ffd34d;
    outline-offset: 2px;
}

/* Visible focus ring on every interactive element for keyboard users */
:focus-visible {
    outline: 3px solid #1e88e5;
    outline-offset: 2px;
    border-radius: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #1e88e5;
    outline-offset: 2px;
}

/* Minimum 44px touch target on small screens — Apple HIG / WCAG 2.5.5 */
@media (pointer: coarse) {
    button,
    .btn,
    a.btn,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    .listing-tab,
    .nav-links a,
    .nav-right a,
    .messages-btn,
    .menu-toggle,
    .photo-remove-btn,
    .modal-close,
    .checkout-close,
    .messages-mobile-close {
        min-height: 44px;
        min-width: 44px;
    }
    /* Don't force min-width on full-width form buttons — only height matters there */
    .btn-block,
    .signup-btn[type="submit"] {
        min-width: 0;
    }
}

/* Honor user reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Screen-reader-only utility — visually hidden but readable by AT */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:root {
    --brand-blue: #1e88e5;
    --brand-green: #1faf5b;
    --accent-color: #1e88e5;
    --accent-soft: rgba(30, 136, 229, 0.16);
    --accent-strong: #0b5cad;
    --panel-shadow: 0 18px 40px rgba(7, 23, 43, 0.12);
    --heading-font: 'Space Grotesk', 'Inter', sans-serif;
}

/* NAVBAR BASE */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 5px 30px;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 10px;
}

/* LEFT SIDE: LOGO + BRAND */
.nav-left {
    display: flex;
    align-items: center;
    gap: 5px;
}

.logo {
    height: 110px; /* bigger logo */
    width: auto;
    display: block;
    padding-left: 50px;
}

.brand {
    font-size: 30px;
    font-weight: 700;
    color: #1e88e5; /* blue brand color */
}

/* SEARCH BAR */
.search-bar {
    flex: 1;
    max-width: 700px;
    margin: 0 6px;
    padding: 12px 16px;
    background: #f2f2f2; /* soft gray */
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    outline: none;
    font-size: 16px;
    position: relative;
}

.search-bar:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.2);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dcdcdc;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.search-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.search-suggestion-item:hover,
.search-suggestion-item.selected {
    background: #f8f8f8;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.nav-primary {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #d9e5f2;
    background: #ffffff;
    color: #17314f;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.nav-primary-button {
    cursor: pointer;
}

.nav-primary-link:hover,
.nav-primary-link:focus-visible,
.nav-primary-link.is-active {
    color: var(--accent-color);
    border-color: rgba(30, 136, 229, 0.26);
    box-shadow: 0 10px 24px var(--accent-soft);
    transform: translateY(-1px);
    outline: none;
}

.nav-primary-link-accent {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
    border-color: transparent;
    color: #ffffff;
}

.nav-primary-link-accent:hover,
.nav-primary-link-accent:focus-visible,
.nav-primary-link-accent.is-active {
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 14px 28px rgba(20, 71, 128, 0.24);
}

/* MIDDLE LINKS */
.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
    list-style: none;
    margin: 0 25px;
    padding: 0;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 17px;
    transition: 0.2s ease;
}

.nav-links a:hover {
    color: #1e88e5; /* blue hover */
}

/* RIGHT SIDE: LOGIN + SIGNUP */
.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.profile-menu {
    position: relative;
}

.profile-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 12px 8px 8px;
    border-radius: 18px;
    border: 1px solid #d8e5f3;
    background: linear-gradient(145deg, #ffffff, #f4f9ff);
    color: #14304d;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.profile-menu-trigger:hover,
.profile-menu-trigger:focus-visible {
    border-color: var(--accent-color);
    box-shadow: 0 12px 26px var(--accent-soft);
    transform: translateY(-1px);
    outline: none;
}

.profile-menu-avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.profile-menu-copy {
    display: grid;
    text-align: left;
}

.profile-menu-copy strong {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.profile-menu-copy small {
    color: #6b7d93;
    font-size: 11px;
}

.profile-menu-caret {
    color: #6d8098;
    font-size: 12px;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid #dae6f4;
    background: #ffffff;
    box-shadow: var(--panel-shadow);
    display: none;
    gap: 4px;
    z-index: 140;
}

.profile-menu.is-open .profile-dropdown {
    display: grid;
}

.profile-dropdown-item {
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #17314f;
    text-align: left;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.profile-dropdown-item:hover,
.profile-dropdown-item:focus-visible {
    background: #eef6ff;
    color: var(--accent-color);
    outline: none;
}

.profile-dropdown-item.danger {
    color: #b13b3b;
}

.profile-menu-trigger-icon {
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 4px;
    justify-content: center;
    border-radius: 50%;
}

.profile-menu-trigger-icon .profile-menu-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
    box-shadow: 0 8px 20px rgba(15, 52, 95, 0.18);
}

.profile-menu-avatar-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.profile-menu-trigger-icon .profile-menu-copy,
.profile-menu-trigger-icon .profile-menu-caret {
    display: none;
}

.nav-right .profile-menu {
    margin-left: 2px;
}

/* BUTTONS (LOGIN + SIGNUP) */
.btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    transition: 0.25s ease;
}

/* LOGIN BUTTON */
.login-btn {
    color: white;
    background: #1e88e5; /* blue */
    border-color: #1e88e5;
}

.login-btn:hover {
    background: white;
    color: #1e88e5;
    border-color: #1e88e5;
}

/* SIGNUP BUTTON */
.signup-btn {
    color: white;
    background: #1faf5b; /* green */
    border-color: #1faf5b;
}

.signup-btn:hover {
    background: white;
    color: #1faf5b;
    border-color: #1faf5b;
}

.about-btn {
    color: #0f4b7d;
    background: #e8f3ff;
    border-color: #c2dcf5;
}

.about-btn:hover {
    background: #ffffff;
    color: #1e88e5;
    border-color: #1e88e5;
}

/* MESSAGES HUB */
.messages-hub {
    position: relative;
    flex-shrink: 0;
}

.messages-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d8e5f3;
    background: linear-gradient(145deg, #ffffff, #f5f9ff);
    color: #1b2c44;
    border-radius: 999px;
    padding: 10px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.messages-btn.is-active {
    border-color: var(--accent-color);
    box-shadow: 0 10px 24px var(--accent-soft);
}

.messages-btn:hover,
.messages-btn:focus-visible {
    border-color: #1e88e5;
    color: #1e88e5;
    box-shadow: 0 8px 22px rgba(30, 136, 229, 0.18);
    transform: translateY(-1px);
}

.messages-icon {
    width: 20px;
    height: 20px;
}

.messages-badge {
    min-width: 24px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #1faf5b;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 1;
}

.messages-badge.is-hidden {
    display: none;
}

.messages-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(380px, 90vw);
    background: #ffffff;
    border: 1px solid #dbe7f5;
    border-radius: 16px;
    box-shadow: 0 20px 38px rgba(12, 24, 42, 0.18);
    overflow: hidden;
    z-index: 120;
}

.messages-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #edf2fa;
}

.messages-dropdown-header h3 {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #1b2c44;
}

.messages-dropdown-header a {
    color: #1e88e5;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.messages-preview-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 360px;
    overflow-y: auto;
}

.messages-preview-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    color: #1f2f45;
    padding: 10px;
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.messages-preview-item:hover {
    background: #eef6ff;
}

.messages-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.messages-preview-text {
    min-width: 0;
}

.messages-preview-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.messages-preview-top strong {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.messages-preview-top time {
    color: #6a7f98;
    font-size: 12px;
}

.messages-snippet {
    color: #4a5e78;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.messages-unread-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #1faf5b;
    justify-self: center;
}

.messages-mobile-panel {
    position: fixed;
    inset: 0;
    background: #f7fbff;
    z-index: 220;
    padding: 12px;
}

.messages-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.messages-mobile-head h3 {
    font-size: 20px;
    color: #182a43;
    font-family: 'Inter', sans-serif;
}

.messages-mobile-close {
    width: 34px;
    height: 34px;
    border: 1px solid #d6e4f4;
    border-radius: 10px;
    background: #ffffff;
    font-size: 18px;
    cursor: pointer;
}

.messages-mobile-open {
    display: block;
    margin-top: 12px;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    padding: 12px;
    color: #ffffff;
    font-weight: 700;
    background: #1e88e5;
    font-family: 'Inter', sans-serif;
}

/* LOCATION SECTION */
.location-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px; /* bigger font */
    font-weight: 700; /* bold */
    color: black;
    cursor: pointer;
}

/* New icon style */
.location-icon {
    font-size: 26px; /* bigger icon */
    color: black;
    font-weight: 700;
}

/* Invisible button but fully interactive */
.location-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Text styling */
.location-text {
    font-weight: 700;
    color: black;
    font-size: 20px;
    font-family: 'inter', sans-serif;
}

.location-miles {
    font-weight: 700;
    color: black;
    font-size: 20px;
    font-family: 'inter', sans-serif;

}

/* Hover effect (subtle but clean) */
.location-box:hover .location-text,
.location-box:hover .location-miles,
.location-box:hover .location-icon {
    color: #1e88e5; /* your blue brand color */
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 16, 28, 0.55);
    display: grid;
    place-items: center;
    padding: 16px;
    z-index: 80;
}

.modal-backdrop[hidden] {
    display: none;
}

.location-modal {
    width: min(720px, 100%);
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e1e7f0;
    box-shadow: 0 24px 60px rgba(12, 25, 46, 0.25);
    padding: 16px;
}

.location-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.location-modal-header h3 {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    color: #192134;
}

.location-close {
    border: 1px solid #d6deea;
    background: #f8fbff;
    color: #2a3550;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.location-modal-subtitle {
    margin: 8px 0 12px;
    font-family: 'Inter', sans-serif;
    color: #54617b;
    font-size: 14px;
}

.location-actions {
    margin-bottom: 12px;
}

.location-map {
    width: 100%;
    height: 300px;
    min-height: 300px;
    border-radius: 12px;
    border: 1px solid #d8e0ee;
    position: relative;
    overflow: hidden;
    z-index: 0;
}

.radius-control {
    margin-top: 14px;
}

.radius-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #263048;
    margin-bottom: 6px;
}

#radius-range {
    width: 100%;
}

.selected-location {
    margin-top: 10px;
    color: #495975;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.location-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.location-nationwide-btn {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 0;
    background: none;
    border: none;
    color: #1a52a8;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.location-nationwide-btn:hover {
    color: #0f3a7a;
}

.location-search-wrap {
    position: relative;
    margin-bottom: 4px;
}

.location-search-input {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid #d0daea;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #192134;
    background: #f8fafd;
    outline: none;
    box-sizing: border-box;
}

.location-search-input:focus {
    border-color: #4a90d9;
    outline: 2px solid #4a90d9;
    outline-offset: 0;
    background: #fff;
}

.location-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #cfd9ea;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(12, 25, 46, 0.13);
    list-style: none;
    padding: 4px 0;
    margin: 0;
    z-index: 9999;
    max-height: 240px;
    overflow-y: auto;
}

.location-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #192134;
    border-bottom: 1px solid #f0f4fa;
    line-height: 1.4;
}

.location-suggestion-item:last-child {
    border-bottom: none;
}

.location-suggestion-item:hover,
.location-suggestion-item[aria-selected="true"] {
    background: #eef4fd;
    color: #1a52a8;
}

.location-suggestion-main {
    font-weight: 600;
}

.location-suggestion-sub {
    font-size: 12px;
    color: #7489a8;
    margin-top: 1px;
}

.location-confirmed-label {
    margin-top: 6px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #1a6e2e;
    font-weight: 500;
}

.location-suggestions-loading,
.location-suggestions-empty {
    padding: 10px 14px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #7489a8;
}

/* PROFILE SECTION */
.profile-section {
    max-width: 1300px;
    margin: 26px auto 10px;
    padding: 0 30px;
}

.profile-backdrop {
    z-index: 95;
}

.profile-panel {
    width: min(1180px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    margin: 0;
    padding: 18px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid #dbe6f5;
}

.profile-panel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.profile-panel-top h2 {
    font-family: 'Inter', sans-serif;
    font-size: 26px;
    color: #19263b;
}

.profile-panel-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-edit-form {
    background: #f8fafd;
    border: 1px solid #dbe6f5;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
}

.profile-edit-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.profile-edit-avatar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.profile-edit-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #cfdbeb;
    background: #e8f1fc;
    display: block;
}

.profile-edit-change-photo {
    font-size: 12px;
    color: #1e4f8a;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-align: center;
    white-space: nowrap;
}

.profile-edit-fields-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.profile-edit-field-label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    font-family: 'Inter', sans-serif;
    margin-top: 4px;
}

.profile-edit-field-label:first-child {
    margin-top: 0;
}

.profile-edit-input {
    padding: 8px 10px;
    border-radius: 7px;
    border: 1px solid #cfdbeb;
    background: #ffffff;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #1a2233;
    width: 100%;
    box-sizing: border-box;
}

.profile-edit-input:focus {
    outline: 2px solid #4a90d9;
    outline-offset: 1px;
    border-color: #4a90d9;
}

.profile-edit-join-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e8eef7;
}

.profile-edit-join-label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    white-space: nowrap;
}

.profile-form-verif-note {
    margin-top: 12px;
    font-size: 13px;
    color: #718096;
    font-style: italic;
}

.profile-avatar-upload-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.profile-avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #cfdbeb;
    background: #e8f1fc;
}

.profile-avatar-file-input {
    font-size: 13px;
    color: #3a5a8a;
    cursor: pointer;
    padding: 0;
    border: none;
    background: none;
    width: 100%;
}

.profile-avatar-upload-hint {
    font-size: 12px;
    color: #718096;
}

.profile-join-date-locked {
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid #cfdbeb;
    background: #f5f8fc;
    color: #718096;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    margin: 0;
    cursor: not-allowed;
}

.profile-shell {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 18px;
}

.profile-main-card,
.profile-side-card,
.active-listings-wrap {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
}

.profile-main-card {
    padding: 18px;
}

.profile-main-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.profile-avatar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #cfdbeb;
    display: block;
}

.profile-change-photo-btn {
    font-size: 12px;
    color: #1e4f8a;
    cursor: pointer;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
    text-align: center;
}

.profile-avatar-file-input-hidden {
    display: none;
}

.profile-main-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
}

.profile-username {
    font-size: 20px;
    font-weight: 600;
    color: #19263b;
    margin: 0;
}

.profile-location-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-location-edit-btn {
    font-size: 12px;
    color: #1e4f8a;
    background: none;
    border: 1px solid #cfdbeb;
    border-radius: 4px;
    padding: 1px 8px;
    cursor: pointer;
}

.profile-location-edit-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.profile-location-inline-input {
    font-size: 13px;
    padding: 4px 8px;
    border: 1px solid #cfdbeb;
    border-radius: 4px;
    width: 160px;
}

.profile-location-save-btn {
    font-size: 12px;
    padding: 3px 10px;
    background: #1e4f8a;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.profile-location-cancel-btn {
    font-size: 12px;
    padding: 3px 10px;
    background: none;
    color: #5b6474;
    border: 1px solid #cfdbeb;
    border-radius: 4px;
    cursor: pointer;
}

.profile-meta {
    font-size: 13px;
    color: #5b6474;
    margin: 0;
}

.profile-trust-row {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.trust-chip {
    background: #f7fafe;
    border: 1px solid #dce8f8;
    border-radius: 10px;
    padding: 11px 12px;
}

.trust-title {
    display: block;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #54617b;
    margin-bottom: 3px;
}

.trust-value {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #183d67;
}

.trust-value span {
    font-size: 14px;
    font-weight: 600;
    color: #5278a6;
}

.profile-history-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.history-card {
    background: #fcfcfc;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 12px;
}

.history-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #1f1f1f;
    margin-bottom: 8px;
}

.mini-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mini-history-card {
    border: 1px solid #e7e7e7;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.mini-history-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.mini-history-card p {
    font-family: 'Inter', sans-serif;
    color: #576173;
    font-size: 13px;
    padding: 8px;
}

.profile-side-card {
    padding: 18px;
}

.profile-side-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #1c2a40;
    margin-bottom: 10px;
}

.verification-item {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    margin-bottom: 7px;
}

.verification-item.verified {
    color: #1d7f4a;
    font-weight: 600;
}

.verification-note {
    margin-top: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #5f6880;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.active-listings-wrap {
    margin-top: 16px;
    padding: 18px;
}

.active-listings-head {
    margin-bottom: 14px;
}

.active-listings-head h3 {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    color: #222;
}

.active-listings-head p {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #697183;
    margin-top: 3px;
}

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

.active-listing-card {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.active-listing-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.active-listing-info {
    padding: 12px;
}

.active-listing-info h4 {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #1f1f1f;
    margin-bottom: 6px;
}

.active-listing-info p {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #5d6678;
}

/* EMAIL VERIFICATION BANNER */
.verify-banner {
    background: #e8f3fd;
    border-bottom: 1px solid #cce0f8;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.dark-mode .verify-banner {
    background: #0d2236;
    border-bottom-color: #1a4060;
}

.verify-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.verify-banner-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #1e88e5;
}

.verify-banner-text {
    font-size: 14px;
    color: #1a3a5c;
    line-height: 1.5;
    margin: 0;
}

body.dark-mode .verify-banner-text {
    color: #a8c8e8;
}

.verify-banner-link {
    background: none;
    border: none;
    padding: 0;
    margin-left: 6px;
    color: #1e88e5;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.verify-banner-link:hover {
    color: #156fc2;
}

.verify-banner-dismiss {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: #5a88b0;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.verify-banner-dismiss:hover {
    background: #cce0f8;
    color: #1a3a5c;
}

body.dark-mode .verify-banner-dismiss:hover {
    background: #1a4060;
    color: #a8c8e8;
}

@media (max-width: 600px) {
    .verify-banner-text {
        font-size: 13px;
    }
}

/* SITE FOOTER */
.site-footer {
    margin-top: 64px;
    border-top: 1px solid #e0e8f0;
    padding: 28px 30px;
    background: #f6f9fc;
}

body.dark-mode .site-footer {
    background: #101318;
    border-top-color: #1e2730;
}

.site-footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer-copy {
    font-size: 13px;
    color: #8a97a6;
    margin: 0;
}

.site-footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.site-footer-links a {
    font-size: 13px;
    color: #5a6878;
    text-decoration: none;
    font-weight: 500;
}

.site-footer-links a:hover {
    color: #1e88e5;
}

body.dark-mode .site-footer-copy {
    color: #5a6878;
}

body.dark-mode .site-footer-links a {
    color: #6b7a8d;
}

body.dark-mode .site-footer-links a:hover {
    color: #4ba3f5;
}

@media (max-width: 480px) {
    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* CHECKOUT MODAL */
.checkout-backdrop {
    z-index: 1100;
}

.checkout-panel {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 28px 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.18);
}

body.dark-mode .checkout-panel {
    background: #1a2235;
    color: #e8eef8;
}

.checkout-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkout-heading {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #0f2b44;
}

body.dark-mode .checkout-heading {
    color: #e8eef8;
}

.checkout-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #718096;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
}

.checkout-close:hover { background: #f0f4f8; }
body.dark-mode .checkout-close:hover { background: #2d3a50; }

.checkout-state {
    text-align: center;
    padding: 20px 0;
}

.checkout-state-icon {
    font-size: 40px;
    margin: 0 0 12px;
}

.checkout-state h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #0f2b44;
}

body.dark-mode .checkout-state h3 { color: #e8eef8; }

.checkout-state p {
    font-size: 14px;
    color: #5d6678;
    line-height: 1.5;
    margin: 0;
}

body.dark-mode .checkout-state p { color: #8b95a8; }

.checkout-summary {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #f7fbff;
    border: 1px solid #deeaf8;
    border-radius: 14px;
    padding: 14px;
}

body.dark-mode .checkout-summary {
    background: #1e2e42;
    border-color: #2d3f58;
}

.checkout-thumb {
    width: 72px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    background: #e8eef8;
}

.checkout-summary-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f2b44;
    margin: 0 0 10px;
}

body.dark-mode .checkout-summary-title { color: #e8eef8; }

.checkout-breakdown {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.checkout-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #5d6678;
}

body.dark-mode .checkout-line { color: #8b95a8; }

.checkout-line-total {
    font-size: 14px;
    font-weight: 700;
    color: #0f2b44;
    padding-top: 6px;
    border-top: 1px solid #deeaf8;
    margin-top: 4px;
}

body.dark-mode .checkout-line-total {
    color: #e8eef8;
    border-top-color: #2d3f58;
}

.checkout-payment-label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin: 0;
}

body.dark-mode .checkout-payment-label { color: #a0aec0; }

#payment-element {
    min-height: 48px;
}

.checkout-error {
    font-size: 13px;
    color: #c0392b;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 10px;
    padding: 10px 14px;
    margin: 0;
}

.checkout-submit {
    width: 100%;
    padding: 14px;
    font-size: 15px;
}

.checkout-secure-note {
    text-align: center;
    font-size: 12px;
    color: #718096;
    margin: 0;
    line-height: 1.4;
}

body.dark-mode .checkout-secure-note { color: #8b95a8; }

@media (max-width: 520px) {
    .checkout-panel {
        border-radius: 20px 20px 0 0;
        max-height: 96vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
    }
}

@media (max-width: 520px) {
    .checkout-panel {
        padding: 20px 16px 24px;
        border-radius: 16px;
        max-height: 94vh;
    }

    .checkout-heading {
        font-size: 16px;
    }

    .checkout-summary {
        flex-direction: column;
        gap: 10px;
    }

    .checkout-thumb {
        width: 100%;
        height: 160px;
        border-radius: 10px;
    }
}

.checkout-redirect-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1b5e20;
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* SELLER ONBOARDING PAGE */
.onboarding-state {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.onboarding-icon {
    font-size: 52px;
    margin: 0 0 16px;
}

.onboarding-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
    line-height: 1.3;
}

body.dark-mode .onboarding-title {
    color: #f0f4ff;
}

.onboarding-desc {
    font-size: 15px;
    color: #5d6678;
    line-height: 1.65;
    margin: 0 0 28px;
}

body.dark-mode .onboarding-desc {
    color: #8b95a8;
}

.onboarding-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.onboarding-note {
    margin-top: 16px;
    font-size: 13px;
    color: #c0392b;
}

/* EMPTY STATES */
.listings-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
}

.listings-empty-icon {
    font-size: 40px;
    margin: 0 0 12px;
}

.listings-empty h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
}

body.dark-mode .listings-empty h3 {
    color: #f0f4ff;
}

.listings-empty p {
    font-size: 14px;
    color: #5d6678;
    margin: 0;
}

body.dark-mode .listings-empty p {
    color: #8b95a8;
}

.messages-empty-state {
    list-style: none;
    text-align: center;
    padding: 48px 24px;
}

.messages-empty-icon {
    font-size: 36px;
    margin: 0 0 10px;
}

.messages-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}

body.dark-mode .messages-empty-title {
    color: #f0f4ff;
}

.messages-empty-desc {
    font-size: 13px;
    color: #718096;
    line-height: 1.5;
    margin: 0;
    max-width: 240px;
    margin: 0 auto;
}

body.dark-mode .messages-empty-desc {
    color: #8b95a8;
}

.messages-preview-empty {
    list-style: none;
    text-align: center;
    padding: 20px 16px;
    font-size: 13px;
    color: #718096;
}

body.dark-mode .messages-preview-empty {
    color: #8b95a8;
}

.chat-thread-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    gap: 8px;
    color: #718096;
    font-size: 14px;
}

body.dark-mode .chat-thread-empty {
    color: #8b95a8;
}

.chat-thread-empty-icon {
    font-size: 32px;
    margin: 0;
}

.seller-empty-icon {
    font-size: 36px;
    margin: 0 0 12px;
    display: block;
}

/* 404 PAGE */
.not-found-page {
    min-height: calc(100vh - 64px - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.not-found-inner {
    text-align: center;
    max-width: 480px;
}

.not-found-code {
    font-size: 96px;
    font-weight: 800;
    color: #1e88e5;
    line-height: 1;
    margin: 0 0 16px;
    letter-spacing: -4px;
}

.not-found-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
}

body.dark-mode .not-found-title {
    color: #f0f4ff;
}

.not-found-desc {
    font-size: 16px;
    color: #5d6678;
    line-height: 1.6;
    margin: 0 0 32px;
}

body.dark-mode .not-found-desc {
    color: #8b95a8;
}

.not-found-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* COOKIE CONSENT BANNER */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
    z-index: 9999;
    padding: 16px 24px;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

body.dark-mode .cookie-banner {
    background: #1e2330;
    border-top-color: #2d3348;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}

.cookie-banner-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 240px;
}

.cookie-banner-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.5;
}

body.dark-mode .cookie-banner-text p {
    color: #a0aec0;
}

.cookie-banner-text a {
    color: #1e88e5;
    text-decoration: underline;
}

.cookie-banner-text a:hover {
    color: #1565c0;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, opacity 0.2s;
}

.cookie-btn-accept {
    background: #1e88e5;
    color: #ffffff;
}

.cookie-btn-accept:hover {
    background: #1565c0;
}

.cookie-btn-decline {
    background: transparent;
    color: #718096;
    border: 1px solid #cbd5e0;
}

.cookie-btn-decline:hover {
    background: #f7fafc;
}

body.dark-mode .cookie-btn-decline {
    color: #a0aec0;
    border-color: #4a5568;
}

body.dark-mode .cookie-btn-decline:hover {
    background: #2d3348;
}

@media (max-width: 600px) {
    .cookie-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}

/* PRIVACY POLICY PAGE */
.policy-page {
    max-width: 720px;
    margin: 48px auto;
    padding: 0 24px 80px;
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    line-height: 1.7;
}

body.dark-mode .policy-page {
    color: #eef2f6;
}

.policy-header {
    margin-bottom: 40px;
}

.policy-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1e88e5;
    margin: 0 0 12px;
}

.policy-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.policy-meta {
    font-size: 13px;
    color: #8a97a6;
    margin: 0 0 20px;
}

.policy-intro {
    font-size: 16px;
    color: #4a5568;
    margin: 0;
    line-height: 1.7;
}

body.dark-mode .policy-intro {
    color: #9aabb8;
}

.policy-toc {
    background: #f0f6ff;
    border: 1px solid #cde0f9;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 48px;
}

body.dark-mode .policy-toc {
    background: #0d1e30;
    border-color: #1a3a5c;
}

.policy-toc-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #1e88e5;
    margin: 0 0 12px;
}

.policy-toc ol {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 6px;
}

.policy-toc a {
    color: #1e88e5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.policy-toc a:hover {
    text-decoration: underline;
}

.policy-body section {
    margin-bottom: 48px;
}

.policy-body h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f0f8;
}

body.dark-mode .policy-body h2 {
    color: #eef2f6;
    border-bottom-color: #1e2d3d;
}

.policy-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: #2d3a48;
    margin: 24px 0 8px;
}

body.dark-mode .policy-body h3 {
    color: #b0c4d8;
}

.policy-body p {
    margin: 0 0 14px;
    font-size: 15px;
    color: #3a4a5c;
}

body.dark-mode .policy-body p {
    color: #9aabb8;
}

.policy-body ul, .policy-body ol {
    margin: 0 0 14px;
    padding-left: 22px;
}

.policy-body li {
    font-size: 15px;
    color: #3a4a5c;
    margin-bottom: 8px;
}

body.dark-mode .policy-body li {
    color: #9aabb8;
}

.policy-body a {
    color: #1e88e5;
    text-decoration: none;
}

.policy-body a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .policy-header h1 {
        font-size: 28px;
    }

    .policy-toc {
        padding: 16px;
    }
}

/* LISTINGS SECTION */
.listings-section {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 30px;
}

.listings-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    min-width: 0;
}

.filters-menu {
    position: relative;
    flex-shrink: 0;
    padding-right: 12px;
    border-right: 1.5px solid #dde4ee;
}

body.dark-mode .filters-menu {
    border-right-color: #2d3a50;
}

/* ── Category Pills ──────────────────────────────────────────────────────────── */
.category-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
}

.category-pills::-webkit-scrollbar { display: none; }

.category-pill {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1.5px solid #d1dbe8;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #4a5568;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.14s, color 0.14s, border-color 0.14s;
}

.category-pill:hover {
    background: #f0f5ff;
    border-color: #93b4f5;
    color: #1e55d0;
}

.category-pill.is-active {
    background: #1e88e5;
    border-color: #1e88e5;
    color: #fff;
}

body.dark-mode .category-pill {
    background: #1e2730;
    border-color: #2d3a50;
    color: #9aabb8;
}

body.dark-mode .category-pill:hover {
    background: #243248;
    border-color: #4a7bbf;
    color: #7eb8f5;
}

body.dark-mode .category-pill.is-active {
    background: #1565c0;
    border-color: #1565c0;
    color: #fff;
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: white;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    cursor: pointer;
}

.quick-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.menu-icon {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
}

.menu-icon span {
    width: 18px;
    height: 2px;
    background: #1a1a1a;
    border-radius: 999px;
}

.filters-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 280px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 12px;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 20;
}

.filters-panel[hidden] {
    display: none;
}

.menu-section {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #efefef;
}

.menu-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.menu-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7f7f7f;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.menu-item {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: #333;
    text-decoration: none;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
}

.menu-item:hover {
    background: #f4f8fd;
    color: #1e88e5;
}

.menu-item-button {
    cursor: pointer;
}

.language-list {
    display: grid;
    gap: 8px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f7f7f7;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    text-align: left;
    cursor: pointer;
    transition: 0.2s ease;
}

.language-option:hover,
.language-option.active {
    background: #e3f0fd;
    color: #1e88e5;
    border-color: #c9dff8;
}

.language-flag {
    font-size: 16px;
    line-height: 1;
}

.filter-link {
    padding: 10px 12px;
    background: #f7f7f7;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: #333;
    text-align: left;
    cursor: pointer;
    transition: 0.2s ease;
}

.filter-link:hover,
.filter-link.active {
    background: #e3f0fd;
    color: #1e88e5;
    border-color: #c9dff8;
}

.quick-filter {
    padding: 9px 14px;
    border-radius: 999px;
}

.browse-categories-list {
    margin-top: 8px;
    padding: 8px;
    border: 1px solid #e4ebf6;
    border-radius: 10px;
    background: #f9fbff;
}

.menu-category-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #4f627e;
    margin-bottom: 6px;
}

.menu-category-select {
    width: 100%;
    border: 1px solid #cfdbed;
    background: #ffffff;
    border-radius: 8px;
    padding: 9px 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #243146;
}

.menu-category-select:focus {
    outline: 2px solid #b9d7f5;
    outline-offset: 0;
    border-color: #88bbea;
}

/* ── Vehicle Search Filters ──────────────────────────────────────────────────── */
.vehicle-search-filters {
    border: 1.5px solid #dce6f5;
    border-radius: 14px;
    background: #f4f8ff;
    padding: 16px 18px 14px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* override: [hidden] must beat display:flex on author stylesheet */
.vehicle-search-filters[hidden],
.vf-vehicle-only[hidden] {
    display: none !important;
}

.vf-top-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.vf-make-model,
.vf-price-range,
.vf-mileage {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 130px;
}

.vf-price-range { min-width: 200px; }

.vf-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5a6a82;
    font-family: 'Inter', sans-serif;
}

.vf-range-pair {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vf-range-sep {
    font-size: 13px;
    color: #9aabb8;
    flex-shrink: 0;
}

.vf-input {
    border: 1.5px solid #cfdbed;
    background: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #243146;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.14s;
}

.vf-input:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30,136,229,0.1);
}

.vf-bottom-row,
.vf-vehicle-row,
.vf-common-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.vf-select {
    border: 1.5px solid #cfdbed;
    background: #fff;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #243146;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.14s;
}

.vf-select:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30,136,229,0.1);
}

.vf-reset-btn {
    margin-left: auto;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1.5px solid #c5d0de;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #4a5568;
    cursor: pointer;
    flex-shrink: 0;
}

.vf-reset-btn:hover {
    background: #f0f5ff;
    border-color: #93b4f5;
    color: #1e55d0;
}

/* ── Vehicle card extras ─────────────────────────────────────────────────────── */
.card-vehicle-meta {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1e88e5;
    margin: 0 0 2px;
}

.card-mileage {
    font-size: 12px;
    color: #718096;
    margin: 2px 0 4px;
}

/* Dark mode vehicle filters */
body.dark-mode .vehicle-search-filters {
    background: #111827;
    border-color: #1e2d42;
}

body.dark-mode .vf-label {
    color: #6b7a8d;
}

body.dark-mode .vf-input,
body.dark-mode .vf-select {
    background: #1a2235;
    border-color: #2d3a50;
    color: #e8eef8;
}

body.dark-mode .vf-reset-btn {
    background: #1a2235;
    border-color: #2d3a50;
    color: #9aabb8;
}

body.dark-mode .card-vehicle-meta {
    color: #4ba3f5;
}

body.dark-mode .card-mileage {
    color: #6b7a8d;
}

/* DARK MODE */
body.dark-mode {
    background: #121417;
    color: #e8e8e8;
}

body.dark-mode .navbar {
    background: #1a1d22;
    border-bottom-color: #2d323a;
}

body.dark-mode .search-bar {
    background: #252a31;
    border-color: #343b44;
    color: #e8e8e8;
}

body.dark-mode .location-text,
body.dark-mode .location-miles,
body.dark-mode .location-icon,
body.dark-mode .listings-header h2,
body.dark-mode .card-title,
body.dark-mode .card-price {
    color: #f0f0f0;
}

body.dark-mode .listings-count,
body.dark-mode .card-location,
body.dark-mode .card-category {
    color: #b6bcc6;
}

body.dark-mode .menu-toggle,
body.dark-mode .filters-panel,
body.dark-mode .listing-card {
    background: #1a1d22;
    border-color: #2c323a;
}

body.dark-mode .menu-icon span {
    background: #e8e8e8;
}

body.dark-mode .menu-label,
body.dark-mode .menu-item,
body.dark-mode .menu-section-title {
    color: #d8dde5;
}

body.dark-mode .menu-item:hover {
    background: #252c35;
    color: #8cc6ff;
}

body.dark-mode .quick-filter,
body.dark-mode .filter-link {
    background: #252a31;
    color: #d8dde5;
    border-color: #343b44;
}

body.dark-mode .language-option {
    background: #252a31;
    color: #d8dde5;
    border-color: #343b44;
}

body.dark-mode .filter-link:hover,
body.dark-mode .filter-link.active {
    background: #1f3a54;
    color: #8cc6ff;
    border-color: #2a4f72;
}

body.dark-mode .language-option:hover,
body.dark-mode .language-option.active {
    background: #1f3a54;
    color: #8cc6ff;
    border-color: #2a4f72;
}

body.dark-mode .location-modal {
    background: #1a1d22;
    border-color: #2d323a;
}

body.dark-mode .location-modal-header h3,
body.dark-mode .radius-label-row,
body.dark-mode .selected-location {
    color: #e6ebf3;
}

body.dark-mode .location-modal-subtitle {
    color: #b8c3d8;
}

body.dark-mode .location-close {
    background: #252a31;
    border-color: #343b44;
    color: #dce4f3;
}

body.dark-mode .location-map {
    border-color: #343b44;
}

body.dark-mode .location-nationwide-btn {
    color: #4a90d9;
}

body.dark-mode .location-nationwide-btn:hover {
    color: #89bff5;
}

body.dark-mode .location-search-input {
    background: #252a31;
    border-color: #343b44;
    color: #e8e8e8;
}

body.dark-mode .location-search-input:focus {
    border-color: #4a90d9;
    outline-color: #4a90d9;
    background: #1e2229;
}

body.dark-mode .location-suggestions {
    background: #1e2229;
    border-color: #343b44;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark-mode .location-suggestion-item {
    color: #dce4f3;
    border-bottom-color: #2a2f38;
}

body.dark-mode .location-suggestion-item:hover,
body.dark-mode .location-suggestion-item[aria-selected="true"] {
    background: #1e3358;
    color: #89bff5;
}

body.dark-mode .location-suggestion-sub {
    color: #6b7a8d;
}

body.dark-mode .location-confirmed-label {
    color: #5dbf7a;
}

body.dark-mode .location-suggestions-loading,
body.dark-mode .location-suggestions-empty {
    color: #6b7a8d;
}

body.dark-mode .profile-main-card,
body.dark-mode .profile-side-card,
body.dark-mode .active-listings-wrap,
body.dark-mode .active-listing-card,
body.dark-mode .history-card {
    background: #1a1d22;
    border-color: #2c323a;
}

body.dark-mode .profile-panel {
    background: #161b22;
    border-color: #2a3340;
}

body.dark-mode .profile-panel-top h2 {
    color: #e7eef9;
}

body.dark-mode .profile-username {
    color: #e7eef9;
}

body.dark-mode .profile-change-photo-btn {
    color: #7aa3cc;
}

body.dark-mode .profile-location-edit-btn {
    color: #7aa3cc;
    border-color: #334152;
}

body.dark-mode .profile-location-inline-input {
    background: #232b36;
    border-color: #334152;
    color: #e6edf7;
}

body.dark-mode .profile-location-cancel-btn {
    color: #8a9bb0;
    border-color: #334152;
}

body.dark-mode .profile-edit-form {
    background: #1a1f27;
    border-color: #2e3948;
}

body.dark-mode .profile-edit-layout {
    color: #c8d6e8;
}

body.dark-mode .profile-edit-field-label,
body.dark-mode .profile-edit-join-label {
    color: #8a9bb0;
}

body.dark-mode .profile-edit-input {
    background: #232b36;
    border-color: #334152;
    color: #e6edf7;
}

body.dark-mode .profile-edit-change-photo {
    color: #7aa3cc;
}

body.dark-mode .profile-edit-avatar-preview {
    border-color: #334152;
}

body.dark-mode .profile-edit-join-row {
    border-top-color: #2e3948;
}

body.dark-mode .profile-form-verif-note {
    color: #6b7a8d;
}

body.dark-mode .profile-join-date-locked {
    background: #1a2230;
    border-color: #334152;
    color: #6b7a8d;
}

body.dark-mode .profile-avatar-preview {
    border-color: #334152;
}

body.dark-mode .profile-avatar-file-input {
    color: #7aa3cc;
}

body.dark-mode .profile-form-field input {
    background: #232b36;
    border-color: #334152;
    color: #e6edf7;
}

body.dark-mode .profile-username,
body.dark-mode .profile-side-card h3,
body.dark-mode .history-card h3,
body.dark-mode .active-listings-head h3,
body.dark-mode .active-listing-info h4 {
    color: #edf2fa;
}

body.dark-mode .profile-meta,
body.dark-mode .verification-note,
body.dark-mode .history-card li,
body.dark-mode .active-listing-info p,
body.dark-mode .active-listings-head p {
    color: #b2bccd;
}

body.dark-mode .trust-chip {
    background: #1f2935;
    border-color: #2f3e4f;
}

body.dark-mode .mini-history-card {
    background: #202730;
    border-color: #304052;
}

body.dark-mode .mini-history-card p {
    color: #b2bccd;
}

body.dark-mode .trust-title {
    color: #adc0da;
}

body.dark-mode .trust-value {
    color: #e2ecfb;
}

body.dark-mode .trust-value span {
    color: #a9c1df;
}

body.dark-mode .verification-item.verified {
    color: #6ed59e;
}

body.dark-mode .browse-categories-list {
    background: #1a2029;
    border-color: #303947;
}

body.dark-mode .menu-category-label {
    color: #adbbcf;
}

body.dark-mode .menu-category-select {
    background: #242d38;
    border-color: #334355;
    color: #e1ebfa;
}

body.dark-mode .vehicle-search-filters {
    background: #1a1f27;
    border-color: #2d3948;
}

body.dark-mode .vehicle-search-filters h3,
body.dark-mode .vehicle-filters-grid label {
    color: #d6e3f6;
}

body.dark-mode .vehicle-filters-grid input,
body.dark-mode .vehicle-filters-grid select {
    background: #242d38;
    border-color: #334355;
    color: #e1ebfa;
}

body.dark-mode .nav-primary-link,
body.dark-mode .profile-menu-trigger,
body.dark-mode .profile-dropdown,
body.dark-mode .settings-panel,
body.dark-mode .settings-sidebar,
body.dark-mode .settings-hero-card,
body.dark-mode .settings-action-row,
body.dark-mode .settings-toggle-row,
body.dark-mode .settings-meta-card,
body.dark-mode .settings-field input,
body.dark-mode .settings-field select,
body.dark-mode .settings-choice-card,
body.dark-mode .settings-pill-btn,
body.dark-mode .settings-chip,
body.dark-mode .payment-pill,
body.dark-mode .settings-accent-card {
    background: #1a1f27;
    border-color: #2d3948;
    color: #e6edf7;
}

body.dark-mode .nav-primary-link.is-active,
body.dark-mode .nav-primary-link:hover,
body.dark-mode .nav-primary-link:focus-visible,
body.dark-mode .profile-dropdown-item:hover,
body.dark-mode .profile-dropdown-item:focus-visible,
body.dark-mode .settings-side-link:hover,
body.dark-mode .settings-side-link:focus-visible {
    background: #203246;
    color: #8cc6ff;
}

body.dark-mode .profile-dropdown-item,
body.dark-mode .settings-side-link,
body.dark-mode .settings-hero-card strong,
body.dark-mode .settings-section-head h2,
body.dark-mode .settings-action-row,
body.dark-mode .settings-toggle-row strong,
body.dark-mode .settings-meta-card strong,
body.dark-mode .settings-field span,
body.dark-mode .settings-hero-copy h1 {
    color: #edf3fb;
}

body.dark-mode .profile-menu-copy small,
body.dark-mode .settings-hero-card span,
body.dark-mode .settings-hero-note,
body.dark-mode .settings-action-row span,
body.dark-mode .settings-toggle-row span,
body.dark-mode .settings-meta-card span,
body.dark-mode .settings-field input,
body.dark-mode .settings-field select,
body.dark-mode .settings-group-label {
    color: #b5c2d5;
}

.listings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.listings-header-left {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.listings-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    font-family: 'Inter', sans-serif;
}

.listings-count {
    font-size: 15px;
    color: #888;
    font-family: 'Inter', sans-serif;
}

.listings-header-actions {
    display: flex;
    gap: 10px;
}

/* POST A TRADE BUTTON */
.post-trade-btn {
    color: white;
    background: #1faf5b;
    border-color: #1faf5b;
}

.post-trade-btn:hover {
    background: white;
    color: #1faf5b;
    border-color: #1faf5b;
}

/* SELL AN ITEM BUTTON */
.sell-btn {
    color: white;
    background: #1e88e5;
    border-color: #1e88e5;
}

.sell-btn:hover {
    background: white;
    color: #1e88e5;
    border-color: #1e88e5;
}

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

/* LISTING CARD */
.listing-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.listing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-img-wrap {
    position: relative;
}

.card-img-wrap img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* CONDITION BADGE */
.condition-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

/* "New" — darker slate so the badge text is clearly readable in the card
   corner (the base style alone left it nearly invisible). */
.condition-badge.new {
    background: #d9e2ec;
    color: #2b3a4a;
}

.condition-badge.like-new {
    background: #e6f7ee;
    color: #1faf5b;
}

.condition-badge.excellent {
    background: #e6f7ee;
    color: #167a43;
}

.condition-badge.good {
    background: #e3f0fd;
    color: #1e88e5;
}

.condition-badge.fair {
    background: #fff4db;
    color: #9b6400;
}

.condition-badge.poor {
    background: #fdeaea;
    color: #b3261e;
}

.condition-badge.used {
    background: #e4e7eb;
    color: #4a5560;
}

/* CARD INFO */
.card-info {
    padding: 12px 14px 14px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    font-family: 'Inter', sans-serif;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-category {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #777;
    font-family: 'Inter', sans-serif;
    margin-bottom: 8px;
}

.listing-type {
    display: inline-block;
    padding: 4px 10px;
    margin-bottom: 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.listing-type.trade {
    background: #e6f7ee;
    color: #1faf5b;
}

.listing-type.sell {
    background: #e3f0fd;
    color: #1e88e5;
}

.card-price {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    font-family: 'Inter', sans-serif;
    margin-bottom: 4px;
}

.card-location {
    font-size: 13px;
    color: #888;
    font-family: 'Inter', sans-serif;
}

.listing-card.hidden {
    display: none;
}

.listing-card.recent-focus {
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.32), 0 14px 34px rgba(12, 25, 46, 0.2);
    transform: translateY(-2px);
}

.listing-detail-backdrop {
    z-index: 110;
    align-items: flex-start;
    padding: 28px 18px 20px;
}

.listing-detail-panel {
    width: min(1220px, 100%);
    max-height: 94vh;
    overflow-y: auto;
    border-radius: 24px;
    border: 1px solid #d9e6f5;
    background:
        radial-gradient(circle at 85% 8%, rgba(31, 175, 91, 0.16), transparent 26%),
        radial-gradient(circle at 8% 10%, rgba(30, 136, 229, 0.2), transparent 30%),
        linear-gradient(145deg, #f9fcff 0%, #ffffff 52%, #eef6ff 100%);
    box-shadow: 0 34px 80px rgba(10, 26, 47, 0.28);
    padding: 26px;
    isolation: isolate;
}

.listing-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #dfeaf7;
}

.listing-detail-kicker {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #5b7696;
    margin-bottom: 4px;
}

.listing-detail-head h2 {
    font-family: 'Inter', sans-serif;
    font-size: 30px;
    color: #19304c;
}

.listing-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.95fr);
    gap: 22px;
}

.listing-detail-media-wrap,
.listing-detail-content-wrap {
    background: #ffffff;
    border: 1px solid #e0e9f5;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(16, 42, 71, 0.08);
}

.listing-detail-media-main {
    border-radius: 12px;
    border: 1px solid #dce6f4;
    background: #f7fbff;
    overflow: hidden;
}

.listing-detail-media-main img,
.listing-detail-media-main video {
    width: 100%;
    max-height: 430px;
    object-fit: cover;
    display: block;
}

.listing-detail-media-nav {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.listing-media-nav-btn {
    border: 1px solid #cfddee;
    background: #f3f9ff;
    color: #1c4774;
    border-radius: 999px;
    padding: 8px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.listing-media-nav-btn:hover {
    background: #e7f3ff;
    border-color: #b2cbe8;
}

.listing-media-count {
    font-family: 'Inter', sans-serif;
    color: #607793;
    font-size: 13px;
    font-weight: 600;
}

.listing-detail-thumbs {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.listing-detail-thumb {
    border: 1px solid #d6e4f2;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    position: relative;
    cursor: pointer;
}

.listing-detail-thumb img,
.listing-detail-thumb video {
    width: 100%;
    height: 78px;
    object-fit: cover;
    display: block;
}

.listing-detail-thumb.is-active {
    border-color: #1e88e5;
    box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.18);
}

.listing-video-chip {
    position: absolute;
    right: 6px;
    bottom: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    background: rgba(12, 26, 46, 0.72);
    color: #ffffff;
    padding: 3px 7px;
}

.listing-detail-media-note {
    margin-top: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #6a8099;
}

.listing-detail-content-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.listing-detail-primary {
    padding: 2px 0 10px;
    border-bottom: 1px dashed #d7e5f5;
}

.listing-detail-category {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #567394;
    margin-bottom: 4px;
}

.listing-detail-primary h3 {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    color: #132a46;
    margin-bottom: 4px;
}

.listing-detail-price {
    font-family: 'Inter', sans-serif;
    font-size: 34px;
    font-weight: 800;
    color: #0d6938;
    margin-bottom: 6px;
}

.listing-detail-meta {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #5b718a;
}

.listing-seller-card {
    border: 1px solid #dbe7f4;
    border-radius: 16px;
    background: linear-gradient(135deg, #f4f9ff 0%, #fafffd 100%);
    padding: 12px;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.listing-seller-card img {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 2px solid #d4e4f6;
    object-fit: cover;
}

.listing-seller-copy h4 {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #163657;
    margin-bottom: 2px;
}

.listing-seller-copy p {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #5f7690;
}

.listing-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px dashed #d8e6f5;
}

.listing-quick-btn {
    border: 1px solid #cfe0f3;
    background: #ffffff;
    color: #1c466f;
    border-radius: 999px;
    padding: 9px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.listing-quick-btn svg {
    width: 16px;
    height: 16px;
}

.listing-quick-btn:hover {
    border-color: #9fc2e4;
    background: #eef6ff;
    color: #1e88e5;
}

.listing-quick-btn.saved {
    border-color: #9ec3e8;
    background: #eaf5ff;
    color: #1e88e5;
}

.listing-more-wrap {
    position: relative;
}

.listing-more-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    border: 1px solid #d5e3f2;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(10, 26, 47, 0.16);
    padding: 5px;
    z-index: 2;
}

.listing-more-item {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 9px 10px;
    text-align: left;
    background: transparent;
    color: #203a59;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.listing-more-item:hover {
    background: #eef6ff;
    color: #1e88e5;
}

.listing-comments,
.listing-map-card,
.listing-vehicle-card {
    border: 1px solid #dfe9f6;
    border-radius: 14px;
    padding: 14px;
    background: #fbfdff;
}

.listing-comments-head,
.listing-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.listing-comments h4,
.listing-map-card h4,
.listing-vehicle-card h4 {
    font-family: 'Inter', sans-serif;
    color: #193553;
    font-size: 16px;
}

#listing-comments-count,
#listing-map-radius-text {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #637d99;
}

.listing-comments-list {
    display: grid;
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
}

.listing-comment-item {
    border: 1px solid #dce7f6;
    background: #ffffff;
    border-radius: 10px;
    padding: 10px;
}

.listing-comment-item strong {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #17416a;
}

.listing-comment-item p {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #344d67;
    margin-top: 3px;
}

.listing-comment-item span {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #6f879f;
}

.listing-comment-form {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.listing-comment-form input {
    border: 1px solid #cfdeef;
    border-radius: 10px;
    padding: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.listing-detail-map {
    width: 100%;
    height: 240px;
    min-height: 240px;
    border-radius: 10px;
    border: 1px solid #d8e3f1;
    position: relative;
    overflow: hidden;
    z-index: 0;
}

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

.listing-vehicle-field {
    border: 1px solid #dce8f6;
    background: #ffffff;
    border-radius: 10px;
    padding: 10px;
}

.listing-vehicle-field strong {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6985a2;
}

.listing-vehicle-field span {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #1d3d60;
    font-weight: 700;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.dark-mode .listing-detail-panel,
body.dark-mode .listing-detail-media-wrap,
body.dark-mode .listing-detail-content-wrap,
body.dark-mode .listing-seller-card,
body.dark-mode .listing-comments,
body.dark-mode .listing-map-card,
body.dark-mode .listing-vehicle-card,
body.dark-mode .listing-comment-item,
body.dark-mode .listing-vehicle-field {
    background: #1a2230;
    border-color: #2e3a4d;
}

body.dark-mode .listing-detail-head h2,
body.dark-mode .listing-detail-primary h3,
body.dark-mode .listing-seller-copy h4,
body.dark-mode .listing-comments h4,
body.dark-mode .listing-map-card h4,
body.dark-mode .listing-vehicle-card h4,
body.dark-mode .listing-vehicle-field span,
body.dark-mode .listing-comment-item strong {
    color: #e6f1ff;
}

body.dark-mode .listing-detail-meta,
body.dark-mode .listing-seller-copy p,
body.dark-mode .listing-detail-media-note,
body.dark-mode #listing-comments-count,
body.dark-mode #listing-map-radius-text,
body.dark-mode .listing-comment-item p,
body.dark-mode .listing-comment-item span,
body.dark-mode .listing-media-count,
body.dark-mode .listing-vehicle-field strong {
    color: #b7c8db;
}

body.dark-mode .listing-detail-media-main,
body.dark-mode .listing-detail-thumb,
body.dark-mode .listing-detail-map,
body.dark-mode .listing-comment-form input,
body.dark-mode .listing-quick-btn,
body.dark-mode .listing-more-menu,
body.dark-mode .listing-more-item,
body.dark-mode .listing-media-nav-btn {
    background: #131b27;
    border-color: #304056;
    color: #c6d8ec;
}

@media (max-width: 1024px) {
    .listing-detail-layout {
        grid-template-columns: 1fr;
    }

    .listing-detail-panel {
        padding: 18px;
    }

    .listing-detail-thumbs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .listing-detail-panel {
        padding: 12px;
        max-height: 96vh;
        border-radius: 16px;
    }

    .listing-detail-head {
        margin-bottom: 14px;
        padding-bottom: 10px;
    }

    .listing-detail-head h2 {
        font-size: 22px;
    }

    .listing-detail-primary h3 {
        font-size: 24px;
    }

    .listing-detail-price {
        font-size: 26px;
    }

    .listing-detail-media-wrap,
    .listing-detail-content-wrap {
        padding: 12px;
        border-radius: 14px;
    }

    .listing-detail-thumbs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .listing-comment-form {
        grid-template-columns: 1fr;
    }

    .listing-vehicle-grid {
        grid-template-columns: 1fr;
    }
}

.recent-backdrop {
    z-index: 95;
    align-items: flex-start;
    padding-top: 36px;
}

.recently-viewed-panel {
    width: min(1040px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    background: linear-gradient(165deg, #f7fbff 0%, #ffffff 55%, #f4f9ff 100%);
    border-radius: 16px;
    border: 1px solid #dce7f5;
    padding: 22px;
    box-shadow: 0 24px 60px rgba(12, 25, 46, 0.22);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recently-viewed-count {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #637890;
}

.recently-viewed-grid {
    display: grid;
    gap: 10px;
}

.recently-viewed-card {
    border: 1px solid #dde8f4;
    border-radius: 12px;
    background: #ffffff;
    padding: 10px;
    display: grid;
    grid-template-columns: minmax(130px, 168px) 1fr auto;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.recently-viewed-card:hover,
.recently-viewed-card:focus-visible {
    transform: translateY(-1px);
    border-color: #b7d0ec;
    box-shadow: 0 10px 26px rgba(20, 44, 72, 0.12);
    outline: none;
}

.recent-thumb-wrap {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.recent-thumb-wrap img {
    width: 100%;
    height: 98px;
    display: block;
    object-fit: cover;
}

.recent-content {
    min-width: 0;
}

.recent-top-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.recent-title {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #14243c;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-timestamp {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #6f8199;
    white-space: nowrap;
}

.recent-specs {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.recent-specs span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #4a5f7a;
}

.recent-specs span strong {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8194ac;
}

.recent-meta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.recent-price {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #192941;
}

.recent-mileage,
.recent-location {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #5f7490;
}

.recent-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.recent-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid #d6e3f2;
    background: #ffffff;
    color: #7891af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.recent-action-btn svg {
    width: 16px;
    height: 16px;
}

.recent-action-btn:hover {
    transform: translateY(-1px);
    border-color: #8bb8e4;
    color: #1e88e5;
    background: #f2f8ff;
}

.recent-action-btn.is-active {
    border-color: #a3c8eb;
    color: #1e88e5;
    background: #edf6ff;
}

.recently-viewed-empty {
    border: 1px dashed #cfdeef;
    border-radius: 12px;
    padding: 34px 20px;
    text-align: center;
}

.recently-viewed-empty-icon {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 10px;
}

.recently-viewed-empty h4 {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #1f3149;
    margin-bottom: 8px;
}

.recently-viewed-empty p {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #60758f;
}

.settings-body {
    background:
        radial-gradient(circle at top right, rgba(31, 175, 91, 0.12), transparent 26%),
        radial-gradient(circle at top left, rgba(30, 136, 229, 0.16), transparent 24%),
        linear-gradient(180deg, #f6fbff 0%, #f3f8fc 38%, #eef4f8 100%);
}

.settings-page {
    width: min(1380px, 94%);
    margin: 28px auto 48px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.settings-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 360px);
    gap: 20px;
}

.settings-hero-copy,
.settings-hero-card,
.settings-panel,
.settings-sidebar {
    animation: fadeUp 0.45s ease both;
}

.settings-hero-copy {
    padding: 34px;
    border-radius: 28px;
    background: linear-gradient(135deg, #082544 0%, #10538f 52%, #16804f 100%);
    color: #ffffff;
    box-shadow: 0 22px 46px rgba(9, 37, 68, 0.2);
}

.settings-kicker,
.settings-section-eyebrow,
.settings-hero-label,
.settings-group-label {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.settings-kicker {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.78);
}

.settings-hero-copy h1,
.settings-section-head h2 {
    font-family: var(--heading-font);
    letter-spacing: -0.03em;
}

.settings-hero-copy h1 {
    font-size: clamp(2.2rem, 3vw, 3.4rem);
    line-height: 1.02;
    max-width: 12ch;
    margin-bottom: 16px;
}

.settings-hero-copy p {
    max-width: 66ch;
    font-size: 17px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.86);
}

.settings-hero-card {
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(14, 48, 80, 0.08);
    backdrop-filter: blur(16px);
    box-shadow: var(--panel-shadow);
    display: grid;
    align-content: start;
    gap: 12px;
}

.settings-hero-card strong {
    font-family: var(--heading-font);
    font-size: 28px;
    color: #11304d;
}

.settings-hero-card span,
.settings-hero-note {
    color: #536983;
    font-size: 15px;
    line-height: 1.5;
}

.settings-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.settings-sidebar {
    position: sticky;
    top: 24px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #d8e6f5;
    box-shadow: var(--panel-shadow);
    display: grid;
    gap: 8px;
}

.settings-side-link {
    padding: 12px 14px;
    border-radius: 14px;
    color: #1a3554;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.settings-side-link:hover,
.settings-side-link:focus-visible {
    background: #eef6ff;
    color: var(--accent-color);
    outline: none;
}

.settings-content {
    display: grid;
    gap: 16px;
}

.settings-panel {
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbe7f4;
    box-shadow: var(--panel-shadow);
}

.settings-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.settings-section-eyebrow {
    color: var(--accent-color);
    margin-bottom: 8px;
}

.settings-section-head h2 {
    font-size: clamp(1.6rem, 2.1vw, 2.2rem);
    color: #102b45;
}

.settings-inline-link {
    color: var(--accent-color);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 800;
    background: var(--accent-soft);
    padding: 10px 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
}

.settings-grid {
    display: grid;
    gap: 14px;
}

.settings-grid.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-field {
    display: grid;
    gap: 8px;
}

.settings-field span {
    color: #3a5472;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'Inter', sans-serif;
}

.settings-field input,
.settings-field select {
    min-height: 54px;
    border: 1px solid #cadeef;
    border-radius: 16px;
    padding: 14px 16px;
    background: #f9fcff;
    color: #17314f;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
}

.settings-field input:focus,
.settings-field select:focus {
    outline: 3px solid var(--accent-soft);
    border-color: var(--accent-color);
}

.settings-action-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.settings-action-row,
.settings-toggle-row,
.settings-meta-card {
    width: 100%;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid #dbe7f3;
    background: #fbfdff;
}

.settings-action-row,
.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.settings-action-row,
.settings-action-row.link-row {
    color: #17314f;
    text-align: left;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

.settings-action-row span,
.settings-toggle-row span,
.settings-meta-card span,
.settings-accent-card span {
    display: block;
    margin-top: 5px;
    color: #637892;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.settings-action-row:hover,
.settings-action-row:focus-visible,
.settings-toggle-row:hover {
    border-color: #bed5ec;
    box-shadow: 0 12px 22px rgba(12, 39, 66, 0.08);
    outline: none;
}

.settings-action-row.danger {
    color: #b23535;
}

.settings-toggle-row strong,
.settings-meta-card strong,
.settings-accent-card strong {
    font-family: 'Inter', sans-serif;
}

.settings-toggle-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--accent-color);
    flex-shrink: 0;
}

.settings-toggle-row.embedded {
    min-height: 100%;
}

.settings-option-group {
    margin-bottom: 18px;
}

.settings-group-label {
    margin-bottom: 10px;
    color: #49647f;
}

.settings-choice-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.settings-choice-row.compact {
    grid-template-columns: repeat(3, minmax(0, max-content));
}

.settings-choice-card,
.settings-pill-btn {
    border: 1px solid #d8e5f3;
    background: #ffffff;
    color: #15304d;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.settings-choice-card {
    min-height: 78px;
    border-radius: 20px;
    font-size: 17px;
}

.settings-pill-btn {
    padding: 12px 16px;
    border-radius: 999px;
    font-size: 14px;
}

.settings-choice-card.is-selected,
.settings-pill-btn.is-selected,
.accent-swatch.is-selected {
    border-color: var(--accent-color);
    box-shadow: 0 12px 26px var(--accent-soft);
    transform: translateY(-1px);
}

.settings-accent-preview {
    display: grid;
    grid-template-columns: 56px 56px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.accent-swatch {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    border: 2px solid transparent;
    cursor: pointer;
}

.accent-swatch.blue {
    background: linear-gradient(135deg, #1e88e5, #58a8f2);
}

.accent-swatch.green {
    background: linear-gradient(135deg, #1faf5b, #52d88d);
}

.settings-accent-card {
    padding: 18px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-soft), rgba(255, 255, 255, 0.95));
    border: 1px solid rgba(30, 136, 229, 0.18);
}

.settings-accent-card p {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-color);
    margin-bottom: 6px;
    font-family: 'Inter', sans-serif;
}

.settings-chip-row,
.settings-payment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.settings-chip,
.payment-pill {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #eff5fb;
    color: #274564;
    font-size: 13px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
}

.settings-chip.is-connected {
    background: rgba(31, 175, 91, 0.14);
    color: #0f7d3f;
}

.inline-field {
    padding: 0;
    border: none;
    background: transparent;
}

.inline-field select {
    background: #fbfdff;
}

body.high-contrast .navbar,
body.high-contrast .messages-btn,
body.high-contrast .nav-primary-link,
body.high-contrast .profile-menu-trigger,
body.high-contrast .settings-panel,
body.high-contrast .settings-sidebar,
body.high-contrast .settings-action-row,
body.high-contrast .settings-toggle-row,
body.high-contrast .settings-meta-card,
body.high-contrast .search-bar {
    border-width: 2px;
    border-color: #0f2235;
    box-shadow: none;
}

body.high-contrast .settings-hero-copy {
    background: linear-gradient(135deg, #031524 0%, #0b4c89 56%, #0a6d3f 100%);
}

body.font-size-compact .settings-page {
    font-size: 0.95rem;
}

body.font-size-large .settings-page,
body.font-size-large .nav-primary-link,
body.font-size-large .profile-menu-copy strong,
body.font-size-large .messages-btn {
    font-size: 1.05rem;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE NAVBAR */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 16px;
    }

    .logo {
        height: 70px;
        padding-left: 0;
    }

    .search-bar {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin: 0;
    }

    .nav-links {
        order: 4;
        margin: 0;
    }

    .nav-primary {
        order: 4;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .nav-right {
        order: 2;
        gap: 8px;
    }

    .messages-hub {
        order: 2;
        margin-left: auto;
    }

    .messages-label {
        display: none;
    }

    .recent-backdrop {
        padding-top: 12px;
    }

    .recently-viewed-panel {
        max-height: 96vh;
        padding: 16px;
    }

    .recently-viewed-card {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .recent-thumb-wrap img {
        height: 180px;
    }

    .recent-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }

    .recent-actions {
        justify-content: flex-start;
    }

    .messages-btn {
        padding: 10px;
    }

    .profile-menu-copy small,
    .profile-menu-caret {
        display: none;
    }

    .messages-badge {
        position: absolute;
        top: -4px;
        right: -4px;
        min-width: 20px;
        padding: 2px 5px;
        font-size: 11px;
    }

    .messages-dropdown {
        display: none;
    }

    .btn {
        padding: 8px 14px;
        font-size: 14px;
    }

    .listings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .listings-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .listings-header-actions {
        flex-wrap: wrap;
    }

    .quick-links {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .vf-top-row {
        flex-direction: column;
        gap: 8px;
    }

    .vf-make-model,
    .vf-price-range,
    .vf-mileage {
        width: 100%;
        min-width: 0;
    }

    .vf-bottom-row {
        gap: 6px;
    }

    .vf-select {
        font-size: 12px;
        padding: 6px 8px;
    }

    .profile-section {
        padding: 0 16px;
    }

    .profile-panel {
        padding: 14px;
    }

    .profile-panel-top {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .profile-edit-layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .profile-edit-avatar-col {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .profile-shell {
        grid-template-columns: 1fr;
    }

    .profile-main-header {
        align-items: flex-start;
    }

    .profile-trust-row,
    .profile-history-grid {
        grid-template-columns: 1fr;
    }

    .mini-history-grid {
        grid-template-columns: 1fr;
    }

    .settings-page {
        width: min(96%, 100%);
    }

    .settings-hero,
    .settings-shell,
    .settings-grid.two-up,
    .settings-choice-row,
    .settings-accent-preview {
        grid-template-columns: 1fr;
    }

    .settings-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-panel,
    .settings-hero-copy,
    .settings-hero-card {
        padding: 20px;
    }

    .settings-section-head,
    .settings-action-row,
    .settings-toggle-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .nav-right {
        gap: 6px;
    }

    .messages-btn {
        border-radius: 12px;
    }

    .btn {
        padding: 7px 11px;
        font-size: 13px;
    }

    /* Tighten the five primary CTAs on phones — they had a 44px min-height
       (from the touch-target accessibility rule at the top of the file) that left
       empty space below the text. Override that and let the button hug its text.
       `.about-btn` added 2026-05-19 so the listing-page nav "Back to browse"
       doesn't tower over the adjacent My Listings button. */
    .about-btn,
    .login-btn,
    .signup-btn,
    .post-trade-btn,
    .sell-btn {
        padding: 8px 14px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        border-width: 1px !important;
        border-radius: 6px !important;
        line-height: 1.2 !important;
        min-height: 0 !important;
        min-width: 0 !important;
        height: auto !important;
    }

    .menu-toggle {
        justify-content: space-between;
    }

    .nav-primary-link {
        min-height: 38px;
        padding: 8px 12px;
        font-size: 13px;
    }

    .filters-panel {
        min-width: 100%;
        width: 100%;
    }

    .location-modal {
        padding: 12px;
    }

    .location-modal-header h3 {
        font-size: 19px;
    }

    .location-map {
        height: 250px;
    }

    .location-modal-footer {
        flex-wrap: wrap;
    }

    .settings-sidebar {
        grid-template-columns: 1fr;
    }
}

/* MESSAGES PAGE */
.messages-page {
    width: min(1280px, 96%);
    margin: 22px auto;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 18px;
    height: calc(100vh - 130px);
}

.conversation-list-wrap,
.chat-window {
    background: #ffffff;
    border: 1px solid #dbe7f5;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(12, 24, 42, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.conversation-list-header {
    padding: 18px 16px 12px;
    border-bottom: 1px solid #edf2fa;
    flex-shrink: 0;
}

.conversation-list-header h1 {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a2d44;
    margin-bottom: 3px;
}

.conversation-list-header p {
    color: #60728a;
    font-size: 12px;
}

.conversation-list {
    list-style: none;
    margin: 0;
    padding: 8px 6px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.conversation-item {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    cursor: pointer;
    transition: background-color 0.18s ease;
    flex-shrink: 0;
}

.conversation-item:hover {
    background: #f1f7ff;
}

.conversation-item.active {
    background: #e6f2ff;
    border-left: 3px solid #1e88e5;
    padding-left: 9px;
}

/* Avatar wrap + online dot */
.conversation-avatar-wrap {
    position: relative;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.conversation-avatar-wrap .messages-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.conversation-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #1faf5b;
    border: 2px solid #ffffff;
}

.conversation-text {
    min-width: 0;
}

.conversation-title {
    font-size: 14px;
    font-weight: 700;
    color: #20344e;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-snippet {
    font-size: 12px;
    color: #556a84;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.conversation-meta time {
    font-size: 11px;
    color: #8fa3bc;
}

.conversation-unread {
    display: inline-block;
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #1faf5b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

/* Chat window */
.chat-window {
    position: relative;
}

.chat-window-header {
    padding: 12px 16px;
    border-bottom: 1px solid #edf2fa;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-back-btn {
    display: none;
    border: 1px solid #d8e6f5;
    background: #f5f9ff;
    color: #1e88e5;
    font-weight: 700;
    font-size: 13px;
    border-radius: 10px;
    padding: 7px 12px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.chat-user-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.chat-user-meta img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chat-user-meta h2 {
    font-size: 17px;
    font-weight: 700;
    color: #1a2e47;
    font-family: 'Inter', sans-serif;
}

.chat-user-meta p {
    font-size: 12px;
    color: #67809f;
}

.chat-thread {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d0e2f5 transparent;
}

.chat-message {
    max-width: 72%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.me {
    align-self: flex-end;
    background: #1e88e5;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.chat-message.them {
    align-self: flex-start;
    background: #ffffff;
    color: #223a57;
    border: 1px solid #dce8f6;
    border-bottom-left-radius: 4px;
}

.chat-message-meta {
    margin-top: 5px;
    font-size: 11px;
    opacity: 0.7;
}

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px 8px;
    color: #5f7390;
    font-size: 12px;
    flex-shrink: 0;
}

/* The element is shown/hidden via the `hidden` attribute in JS, but the
   `display: inline-flex` above overrides `hidden` (an explicit display value
   beats the hidden attribute). This makes `hidden` win again so the indicator
   actually disappears when no one is typing. */
.typing-indicator[hidden] {
    display: none;
}

.typing-indicator span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9ab2ce;
    animation: typingPulse 0.9s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.12s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.24s;
}

@keyframes typingPulse {
    0%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

.chat-compose {
    border-top: 1px solid #edf2fa;
    padding: 12px;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.chat-compose input {
    flex: 1;
    border: 1px solid #d8e6f5;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.chat-compose input:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* Mobile: single-pane navigation */
@media (max-width: 768px) {
    .messages-page {
        width: 100%;
        margin: 0;
        height: calc(100dvh - 96px);
        gap: 0;
        grid-template-columns: 1fr;
        border-radius: 0;
    }

    .conversation-list-wrap {
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
    }

    .chat-window {
        display: none;
        border-radius: 0;
        border: none;
        height: calc(100dvh - 96px);
    }

    .messages-page.chat-open .conversation-list-wrap {
        display: none;
    }

    .messages-page.chat-open .chat-window {
        display: flex;
    }

    .chat-back-btn {
        display: inline-flex;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .chat-message {
        max-width: 88%;
    }

    .conversation-list-header h1 {
        font-size: 19px;
    }
}

/* MY LISTINGS DASHBOARD */
.my-listings-shell {
    width: min(1100px, 94%);
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Per-row spacing is now controlled by each row's own margin (30px 0).
       Setting `gap: 0` here prevents double-stacking with those margins.
       Mobile breakpoints below may re-add a small gap if needed. */
}

.my-listings-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px;       /* was 16px — more generous interior padding so the title isn't crammed */
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #dce8f7;
}

.my-listings-header-card h1 {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    color: #1a2f47;
    margin-bottom: 2px;
}

.my-listings-header-card p {
    color: #617792;
    font-size: 14px;
    max-width: 640px;
}

/* Stat cards row: horizontal layout, 4 across on desktop. Each card keeps
   its own padding/border/shadow. 30px breathing room above and below the
   row is achieved via margin on the row itself — see margin block below.
   Spacing tightens at the 900px/768px/480px breakpoints further down. */
.my-listings-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 30px 0;               /* requested 30px above and below this row */
}

.listing-stat-card {
    padding: 18px 16px;
    border-radius: 12px;
    border: 1px solid #dce8f7;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 43, 68, 0.06);   /* soft shadow, requested */
}

.listing-stat-card span {
    display: block;
    font-size: 12px;
    color: #607894;
    margin-bottom: 4px;
}

.listing-stat-card strong {
    font-size: 28px;
    color: #1e88e5;
    font-family: 'Inter', sans-serif;
}

/* Filter tabs row — horizontal layout AND 30px breathing room above/below
   to match the stat row's rhythm. Single rule, no duplicate. */
.my-listings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 30px 0;
}

.listing-tab {
    border: 1px solid #d7e6f6;
    background: #ffffff;
    color: #355170;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.listing-tab:hover {
    border-color: #1e88e5;
    color: #1e88e5;
}

.listing-tab.is-active {
    background: #1e88e5;
    border-color: #1e88e5;
    color: #ffffff;
}

.my-listings-grid {
    display: grid;
    /* `auto-fill` instead of `auto-fit` keeps cards a consistent ~320px wide
       even when there's only 1 listing — otherwise a single card stretches
       to fill the whole row and looks oversized. */
    grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
    gap: 16px;
    /* Center the grid when fewer cards than columns so listings don't
       sit awkwardly stuck to the left edge. */
    justify-content: start;
}

.seller-listing-card {
    border: 1px solid #dce8f7;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.seller-listing-card:hover {
    transform: translateY(-2px);
    border-color: #c3d9f2;
}

.seller-listing-card.is-draft {
    border-style: dashed;
}

.seller-listing-photo {
    width: 100%;
    height: 170px;          /* was 190px — slightly shorter so card isn't dominated by photo */
    object-fit: cover;
    display: block;
    background: #eef3fb;    /* placeholder color when image is missing/loading */
}

.seller-listing-content {
    padding: 12px;
}

.seller-title-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.seller-title-row h3 {
    font-size: 17px;
    color: #1e324a;
    line-height: 1.25;
}

.seller-price {
    font-size: 20px;
    font-weight: 800;
    color: #1e88e5;
    margin-bottom: 8px;
}

.seller-status {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.seller-status.active {
    background: #e5f2ff;
    color: #1e88e5;
}

.seller-status.pending {
    background: #fff4db;
    color: #9b6400;
}

.seller-status.sold {
    background: #e6f7ee;
    color: #1faf5b;
}

.seller-status.draft {
    background: #eef0f4;
    color: #596b83;
}

.seller-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border: 1px solid #e3ecf9;
    border-radius: 10px;
    margin-bottom: 8px;
}

.seller-meta-grid div {
    text-align: center;
}

.seller-meta-grid span {
    display: block;
    font-size: 11px;
    color: #6f859d;
}

.seller-meta-grid strong {
    font-size: 16px;
    color: #1e324a;
}

.seller-updated {
    font-size: 12px;
    color: #70849a;
    margin-bottom: 10px;
}

.seller-offer-preview {
    border: 1px solid #e1ebf8;
    background: #f8fbff;
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 8px;
}

.seller-offer-preview p {
    font-size: 12px;
    color: #405a76;
    margin-bottom: 3px;
}

.seller-offer-preview p:last-child {
    margin-bottom: 0;
}

.seller-offer-preview .unread-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    background: #1faf5b;
    border-radius: 999px;
    padding: 2px 7px;
    margin-right: 6px;
}

.seller-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.seller-action-btn {
    border: 1px solid #d7e5f6;
    border-radius: 8px;
    background: #ffffff;
    color: #2f4f71;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    flex: 1 1 120px;
}

.seller-action-btn:hover {
    border-color: #1e88e5;
    color: #1e88e5;
}

.seller-action-btn.primary {
    background: #1faf5b;
    border-color: #1faf5b;
    color: #ffffff;
}

.seller-action-btn.success {
    background: #1faf5b;
    border-color: #1faf5b;
    color: #ffffff;
}

.seller-action-btn.danger {
    border-color: #f5c2c7;
    color: #c0392b;
}

.seller-action-btn.danger:hover {
    background: #fdf0f0;
    border-color: #c0392b;
}

.seller-snippet {
    font-size: 13px;
    color: #617792;
    margin: 4px 0 8px;
    line-height: 1.4;
}

.seller-empty-state {
    border: 1px dashed #cdddf0;
    border-radius: 16px;
    background: #fbfdff;
    padding: 22px;
    text-align: center;
    color: #617c99;
}

@media (max-width: 900px) {
    /* Tablet: 2 stat cards per row instead of 4. Base rule is already grid;
       we just override the column count. Margins stay at 30px since tablet
       still has room for that rhythm. */
    .my-listings-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .my-listings-shell {
        width: 100%;
        padding: 0 12px;       /* was 0 10px — slightly more side padding so cards don't kiss the edges */
        gap: 18px;              /* tighter than desktop's 28px — phones have less screen to spend on whitespace */
        margin: 18px auto;
    }

    .my-listings-header-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;          /* tighter than desktop's 24px 28px */
    }

    .my-listings-stats {
        gap: 12px;              /* tighter than tablet's 14px */
        margin: 20px 0;         /* tighter than desktop's 30px — less breathing room needed on small screens */
    }

    .my-listings-tabs {
        margin: 20px 0;         /* match stats row spacing */
    }

    .my-listings-header-card h1 {
        font-size: 22px;       /* was 25px — tighter for narrower screens */
    }

    .my-listings-header-card p {
        font-size: 13px;
    }

    .my-listings-grid {
        /* Allow up to 2 columns on tablets, falling back to 1 when very narrow */
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 12px;
    }

    .seller-listing-photo {
        height: 150px;         /* shorter on tablets */
    }
}

@media (max-width: 480px) {
    /* Keep 2x2 stat grid on phones — showing all 4 metrics at a glance is
       more useful than scrolling through a tall column. */
    .my-listings-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 16px 0;          /* even tighter on phones */
    }

    .my-listings-tabs {
        margin: 16px 0;          /* match stats spacing */
    }

    .listing-stat-card {
        padding: 10px;
    }

    .listing-stat-card strong {
        font-size: 22px;       /* was 28px — proportional to smaller stat card */
    }

    .my-listings-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .my-listings-tabs::-webkit-scrollbar {
        display: none;
    }

    .listing-tab {
        flex-shrink: 0;
        font-size: 12px;
        padding: 7px 12px;
    }

    /* Single column on phones, but each card is tighter so the page feels less
       like one giant card stack and more like a normal feed. */
    .my-listings-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .seller-listing-photo {
        height: 140px;         /* compact photos on phones */
    }

    .seller-listing-content {
        padding: 10px;
    }

    .seller-title-row h3 {
        font-size: 15px;
    }

    .seller-price {
        font-size: 17px;
    }

    .seller-actions {
        flex-direction: column;
    }

    .seller-action-btn {
        flex: 1 1 auto;
        width: 100%;
    }
}

/* POST TRADE PAGE STYLES */

.post-trade-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

/* PROGRESS INDICATORS */
.post-trade-progress {
    margin-bottom: 60px;
}

.progress-indicators {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: #1e88e5;
    color: white;
    border-color: #1e88e5;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
}

.progress-step.completed .step-number {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.step-label {
    font-size: 12px;
    color: #666;
    text-align: center;
    font-weight: 500;
}

.progress-step.active .step-label {
    color: #1e88e5;
    font-weight: 600;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 -5px;
    transition: all 0.3s ease;
}

.progress-line.completed {
    background: #4caf50;
}

/* FORM SECTIONS */
.post-trade-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.form-section {
    padding: 40px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.section-title {
    font-size: 28px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
}

/* FORM GROUPS */
.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.input-counter {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
    text-align: right;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.counter-warning {
    color: #e53935;
    font-weight: 500;
}

/* PHOTO UPLOAD */
.photo-upload-area {
    display: block; /* needed when element is a <label> */
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    position: relative;
    touch-action: manipulation; /* removes 300ms tap delay on mobile */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.photo-upload-area:hover,
.photo-upload-area:focus-within {
    border-color: #1e88e5;
    background: #f5f9ff;
}

.photo-upload-area.dragover {
    border-color: #1e88e5;
    background: #e3f2fd;
    transform: scale(1.02);
}

.photo-upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: #666;
}

.photo-upload-icon svg {
    width: 100%;
    height: 100%;
}

.photo-upload-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
    font-weight: 500;
}

.photo-upload-subtext {
    font-size: 12px;
    color: #999;
}

.photo-input-hidden {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.photo-upload-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 20px;
    background: var(--color-primary, #1e88e5);
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    transition: background 0.2s ease;
}

.photo-upload-area:hover .photo-upload-btn {
    background: #1565c0;
}

.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.photo-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f0f0f0;
}

.photo-preview-item img,
.photo-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
}

.photo-preview-item:hover .photo-remove-btn {
    opacity: 1;
}

/* CHECKBOXES */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.checkbox-label:hover {
    background: #f5f5f5;
}

.form-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #1e88e5;
}

.checkbox-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* TOGGLE SWITCH */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 50px;
    height: 28px;
    border-radius: 14px;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
    position: relative;
    border: none;
}

.toggle-checkbox::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: left 0.3s ease;
}

.toggle-checkbox:checked {
    background: #4caf50;
}

.toggle-checkbox:checked::before {
    left: 24px;
}

.toggle-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.toggle-description {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
    margin-left: 62px;
}

/* RADIO BUTTONS */
.location-option-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.location-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.location-option:hover {
    border-color: #1e88e5;
    background: #f5f9ff;
}

.form-radio {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #1e88e5;
}

.option-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.option-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.option-description {
    font-size: 12px;
    color: #999;
}

/* SLIDER */
.form-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.form-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1e88e5;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1e88e5;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

.location-preview {
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    color: #666;
    border: 1px solid #e0e0e0;
}

.listing-form-map {
    width: 100%;
    height: 280px;
    border-radius: 10px;
    border: 1px solid #d8e0ee;
    margin-top: 16px;
    overflow: hidden;
}

/* REVIEW SECTION */
.review-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.preview-card-wrapper,
.edit-buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.preview-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    padding: 16px;
}

.preview-photo {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
    position: relative;
}

.preview-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin: 0;
}

.preview-price {
    font-size: 18px;
    font-weight: 800;
    color: #1e88e5;
    margin: 4px 0 0;
}

.preview-meta {
    display: flex;
    gap: 12px;
}

.preview-category,
.preview-condition {
    display: inline-block;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.preview-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.preview-trade-info {
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-trade-wants,
.preview-trade-options {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.preview-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #1e88e5;
    margin-top: 8px;
}

.preview-location .material-symbols-outlined {
    font-size: 16px;
}

.terms-box {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fafafa;
    padding: 18px;
    margin-bottom: 8px;
}

.terms-box p {
    font-size: 13px;
    line-height: 1.55;
    color: #4f4f4f;
    margin-bottom: 10px;
}

.terms-box p:last-of-type {
    margin-bottom: 14px;
}

.terms-checkbox-label {
    border: 1px solid #dfe6ee;
    background: #ffffff;
    border-radius: 10px;
}

.terms-checkbox-label:hover {
    background: #f4f9ff;
    border-color: #c9dff8;
}

/* EDIT BUTTONS */
.edit-buttons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.edit-section-btn {
    text-align: left;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.edit-section-btn:hover {
    border-color: #1e88e5;
    background: #f5f9ff;
}

.edit-icon {
    font-size: 18px;
}

/* FORM NAVIGATION */
.form-navigation {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.form-navigation .btn {
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.next-btn {
    background: #1e88e5;
    color: white;
    flex: 1;
}

.next-btn:hover {
    background: #1565c0;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.secondary-btn {
    background: white;
    color: #333;
    border: 1px solid #ddd;
}

.secondary-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.cancel-btn {
    background: white;
    color: #999;
    border: 1px solid #ddd;
}

.cancel-btn:hover {
    color: #666;
    border-color: #999;
}

.publish-btn {
    background: #4caf50;
    color: white;
    flex: 1;
    font-size: 16px;
    padding: 14px 28px;
}

.publish-btn:hover {
    background: #43a047;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.publish-icon {
    font-size: 18px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .post-trade-container {
        padding: 20px 10px;
    }

    .progress-step {
        min-width: 60px;
    }

    .step-label {
        font-size: 10px;
    }

    .progress-line {
        display: none;
    }

    .form-section {
        padding: 24px;
    }

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

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

    .review-container {
        grid-template-columns: 1fr;
    }

    .terms-box {
        padding: 14px;
    }

    .preview-card {
        grid-template-columns: 1fr;
    }

    .preview-photo {
        width: 100%;
        height: 150px;
    }

    .form-navigation {
        flex-direction: column;
        gap: 10px;
    }
    .next-btn,
    .publish-btn {
        width: 100%;
    }

    .secondary-btn {
        width: 100%;
    }
}

/* HELP & SAFETY PAGE */
.help-safety-body {
    background:
        radial-gradient(circle at 12% 8%, rgba(30, 136, 229, 0.1), transparent 30%),
        radial-gradient(circle at 86% 3%, rgba(31, 175, 91, 0.12), transparent 28%),
        linear-gradient(180deg, #f7fbff 0%, #eef5fb 52%, #e8eff6 100%);
}

.help-safety-page {
    width: min(1040px, 94%);
    margin: 28px auto 56px;
    display: grid;
    gap: 22px;
}

.help-emergency-banner {
    border-radius: 14px;
    border: 1px solid #efcaca;
    background: linear-gradient(180deg, #fff8f8 0%, #ffefef 100%);
    color: #7d2222;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    padding: 12px 14px;
}

.help-emergency-banner strong {
    margin-right: 6px;
}

.help-hero,
.help-card,
.help-section,
.checklist-item,
.help-footer-note {
    background: #ffffff;
    border: 1px solid #d9e6f3;
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(14, 39, 66, 0.08);
}

.help-hero {
    padding: 32px;
}

.help-kicker {
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: 12px;
    font-weight: 800;
    color: #1e88e5;
    margin-bottom: 10px;
}

.help-hero h1,
.help-section h2,
.help-card h2,
.help-card h3,
.checklist-item h3 {
    font-family: var(--heading-font);
    color: #123453;
}

.help-hero h1 {
    font-size: clamp(2rem, 3.2vw, 2.75rem);
    line-height: 1.08;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.help-hero p,
.help-section p,
.help-list li,
.help-card li,
.help-steps li {
    font-family: 'Inter', sans-serif;
    color: #33516e;
    line-height: 1.72;
    font-size: 15px;
}

.help-hero > p {
    max-width: 72ch;
}

.help-hero-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.help-quick-nav {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.help-quick-nav a {
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #125082;
    background: #edf5ff;
    border: 1px solid #c9def3;
    border-radius: 999px;
    padding: 8px 13px;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.help-quick-nav a:hover {
    background: #e3f0ff;
    border-color: #a7c8e8;
    transform: translateY(-1px);
}

.help-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.help-card {
    padding: 22px;
}

.help-card-copy {
    margin: 0 0 14px;
}

.help-inline-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.help-card h2,
.help-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.help-card ul,
.help-list,
.help-steps {
    padding-left: 20px;
    margin: 0;
    display: grid;
    gap: 9px;
}

.help-section {
    padding: 26px;
}

.help-section h2 {
    margin-bottom: 14px;
    font-size: clamp(1.35rem, 2.3vw, 1.8rem);
}

.help-checklist-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.checklist-item {
    padding: 18px;
}

.checklist-item h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.alert-list {
    display: grid;
    gap: 12px;
}

.alert-item {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e8cccc;
    background: #fff8f8;
    color: #7b2a2a;
    font-weight: 600;
}

.help-note {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff5e3;
    border: 1px solid #efd7a8;
    color: #6a4700;
    font-weight: 700;
}

.help-card-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.help-faq-list {
    display: grid;
    gap: 12px;
}

.help-faq-item {
    border: 1px solid #d8e6f5;
    border-radius: 12px;
    background: #f8fbff;
    padding: 12px 14px;
}

.help-faq-item summary {
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #143c61;
}

.help-faq-item p {
    margin-top: 10px;
}

.help-footer-note {
    padding: 16px;
}

.help-footer-note p {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #2a4a67;
    font-weight: 700;
}

@media (max-width: 960px) {
    .help-checklist-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .help-hero {
        padding: 24px;
    }

    .help-section,
    .help-card,
    .checklist-item {
        padding: 20px;
    }

    .help-inline-actions .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .help-safety-page {
        width: min(100%, 96%);
        margin-top: 20px;
        gap: 16px;
    }

    .help-hero,
    .help-section,
    .help-card,
    .checklist-item,
    .help-footer-note {
        border-radius: 14px;
    }

    .help-quick-nav a {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   REPORT AN ISSUE MODAL
   ============================================ */

.report-modal {
    width: min(540px, 100%);
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #dde8f6;
    box-shadow: 0 28px 64px rgba(10, 25, 50, 0.22);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    overflow-y: auto;
}

/* Header */
.report-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 24px 0;
}

.report-modal-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.report-modal-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-top: 2px;
}

.report-modal-header h2 {
    font-family: var(--heading-font);
    font-size: 1.45rem;
    color: #0e2c48;
    margin: 0 0 4px;
}

.report-modal-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    color: #5a7290;
    margin: 0;
    line-height: 1.5;
}

.report-modal-close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #d4e2f2;
    background: #f4f8fd;
    color: #466080;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    margin-top: 2px;
}

.report-modal-close:hover {
    background: #ffe9e9;
    border-color: #f0bcbc;
    color: #b33;
}

/* Form body */
.report-modal-form {
    padding: 20px 24px 24px;
    display: grid;
    gap: 16px;
}

.report-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-form-group-inline {
    grid-column: 1 / -1;
}

.report-form-label {
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #1a3553;
}

.report-required {
    color: #d63030;
    margin-left: 2px;
}

.report-optional {
    color: #7b93ae;
    font-weight: 400;
    font-size: 12px;
    margin-left: 4px;
}

.report-form-select,
.report-form-input,
.report-form-textarea {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #1c3450;
    background: #f6faff;
    border: 1.5px solid #c8ddf0;
    border-radius: 10px;
    padding: 10px 12px;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.report-form-select:focus,
.report-form-input:focus,
.report-form-textarea:focus {
    border-color: #1e88e5;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.14);
}

.report-form-textarea {
    resize: vertical;
    min-height: 110px;
}

.report-field-error {
    border-color: #d63030 !important;
    background: #fff8f8 !important;
    box-shadow: 0 0 0 3px rgba(214, 48, 48, 0.1) !important;
}

.report-char-counter {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #8baabf;
    text-align: right;
    margin-top: 2px;
}

/* Footer */
.report-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 6px;
}

.report-cancel-btn {
    color: #4e6880;
    background: #f0f5fb;
    border-color: #c8d9ec;
}

.report-cancel-btn:hover {
    background: #e5edf7;
    border-color: #aac3de;
    color: #1a3553;
}

.report-submit-btn {
    background: linear-gradient(135deg, var(--brand-blue), #1565c0);
    color: #ffffff;
    border-color: transparent;
    min-width: 130px;
}

.report-submit-btn:hover {
    background: linear-gradient(135deg, #1a7dd8, #0f52a8);
    box-shadow: 0 6px 18px rgba(30, 136, 229, 0.32);
}

/* Success state */
.report-success {
    padding: 36px 28px 32px;
    text-align: center;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.report-success.is-visible {
    display: flex;
    animation: reportSuccessFadeIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes reportSuccessFadeIn {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.report-success-ring {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.report-success-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.report-success-circle {
    stroke: #1faf5b;
    stroke-dasharray: 145;
    stroke-dashoffset: 145;
    animation: drawCircle 0.55s 0.05s ease forwards;
}

.report-success-check {
    stroke: #1faf5b;
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
    animation: drawCheck 0.35s 0.52s ease forwards;
}

@keyframes drawCircle {
    to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

.report-success h3 {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    color: #0e2c48;
    margin: 0;
    animation: reportSuccessFadeIn 0.3s 0.55s ease both;
}

.report-success p {
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    color: #4a6a84;
    line-height: 1.72;
    max-width: 40ch;
    margin: 0;
    animation: reportSuccessFadeIn 0.3s 0.65s ease both;
}

.report-success .report-submit-btn {
    min-width: 120px;
    animation: reportSuccessFadeIn 0.3s 0.75s ease both;
}

/* Mobile */
@media (max-width: 600px) {
    .report-modal {
        border-radius: 16px;
    }

    .report-modal-header {
        padding: 18px 18px 0;
    }

    .report-modal-form {
        padding: 16px 18px 20px;
    }

    .report-modal-footer {
        flex-direction: column-reverse;
    }

    .report-cancel-btn,
    .report-submit-btn {
        width: 100%;
        text-align: center;
    }
}

/* ABOUT TRADEIN PAGE */
.about-tradein-body {
    background:
        radial-gradient(circle at 8% 8%, rgba(30, 136, 229, 0.11), transparent 30%),
        radial-gradient(circle at 84% 3%, rgba(31, 175, 91, 0.1), transparent 28%),
        linear-gradient(180deg, #f6fbff 0%, #edf5fc 52%, #e6eef7 100%);
}

.about-tradein-page {
    width: min(1080px, 94%);
    margin: 28px auto 56px;
    display: grid;
    gap: 22px;
}

.about-hero,
.about-section,
.about-card,
.about-step,
.about-feature,
.about-principle {
    background: #ffffff;
    border: 1px solid #d9e6f3;
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(14, 39, 66, 0.08);
}

.about-hero,
.about-section {
    padding: 30px;
}

.about-kicker {
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: 12px;
    font-weight: 800;
    color: #1e88e5;
    margin-bottom: 10px;
}

.about-hero h1,
.about-section h2,
.about-card h3,
.about-step h3,
.about-feature h3,
.about-principle h3 {
    font-family: var(--heading-font);
    color: #123453;
}

.about-hero h1 {
    font-size: clamp(2rem, 3.3vw, 2.8rem);
    line-height: 1.08;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.about-hero p,
.about-section p,
.about-list li,
.about-faq-item p,
.about-card p,
.about-step p,
.about-feature p,
.about-principle p {
    font-family: 'Inter', sans-serif;
    color: #33516e;
    line-height: 1.72;
    font-size: 15px;
}

.about-hero > p {
    max-width: 75ch;
}

.about-hero-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.about-section h2 {
    margin-bottom: 14px;
    font-size: clamp(1.35rem, 2.3vw, 1.8rem);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.about-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.about-card {
    padding: 22px;
}

.about-card h3,
.about-step h3,
.about-feature h3,
.about-principle h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.about-steps-grid,
.about-feature-grid,
.about-principles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.about-step,
.about-feature,
.about-principle {
    padding: 18px;
}

.about-list {
    padding-left: 20px;
    margin: 14px 0 0;
    display: grid;
    gap: 9px;
}

.about-note {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff5e3;
    border: 1px solid #efd7a8;
    color: #6a4700;
    font-weight: 700;
}

.about-faq-list {
    display: grid;
    gap: 12px;
}

.about-faq-item {
    border: 1px solid #d8e6f5;
    border-radius: 12px;
    background: #f8fbff;
    padding: 12px 14px;
}

.about-faq-item summary {
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #143c61;
}

.about-faq-item p {
    margin-top: 10px;
}

.about-cta {
    background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
}

@media (max-width: 980px) {
    .about-grid,
    .about-grid-two {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .about-hero,
    .about-section,
    .about-card,
    .about-step,
    .about-feature,
    .about-principle {
        padding: 20px;
    }

    .about-hero-actions .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .about-tradein-page {
        width: min(100%, 96%);
        margin-top: 20px;
        gap: 16px;
    }

    .about-hero,
    .about-section,
    .about-card,
    .about-step,
    .about-feature,
    .about-principle {
        border-radius: 14px;
    }
}

/* ============================================
   SAVE BUTTON (star on listing cards)
   ============================================ */

.save-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    transition: color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
    opacity: 0;
    z-index: 5;
}

.listing-card:hover .save-btn,
.save-btn.saved {
    opacity: 1;
}

.save-btn:hover {
    color: #f0b429;
    transform: scale(1.12);
}

.save-btn.saved {
    color: #f0b429;
}

/* ============================================
   SAVED ITEMS MODAL
   ============================================ */

.saved-backdrop {
    z-index: 90;
    align-items: flex-start;
    padding-top: 36px;
}

.saved-items-panel {
    width: min(1040px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    background: #f8fbff;
    border-radius: 16px;
    border: 1px solid #dbe6f5;
    padding: 22px;
    box-shadow: 0 24px 60px rgba(12, 25, 46, 0.22);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.saved-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.saved-items-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.saved-items-title-wrap h2 {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #19263b;
}

.saved-items-count {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #7a8898;
}

.saved-items-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #d6deea;
    background: #fff;
    color: #3a4660;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.saved-items-close-btn:hover {
    background: #edf2fb;
}

.saved-items-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.saved-select {
    padding: 9px 12px;
    border: 1px solid #cfdbed;
    border-radius: 8px;
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #243146;
    cursor: pointer;
}

.saved-select:focus {
    outline: 2px solid #b9d7f5;
    outline-offset: 0;
    border-color: #88bbea;
}

.saved-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

/* SAVED ITEM CARD */
.saved-item-card {
    background: #fff;
    border: 1px solid #e4ecf7;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.saved-item-card:hover {
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.09);
}

.saved-item-img-wrap {
    position: relative;
}

.saved-item-img-wrap img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.saved-item-info {
    padding: 12px 14px 8px;
    flex: 1;
}

.saved-item-title {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-item-category {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 7px;
}

.saved-item-price {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 6px;
    margin-bottom: 3px;
}

.saved-item-location {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #888;
}

.saved-item-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 8px 14px 12px;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #f5c0c0;
    background: #fff5f5;
    color: #c0392b;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    width: calc(100% - 28px);
}

.saved-item-remove:hover {
    background: #fce8e8;
    border-color: #e87272;
}

/* EMPTY STATE */
.saved-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.saved-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    line-height: 1;
}

.saved-empty-state h3 {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #2a3550;
    margin-bottom: 8px;
}

.saved-empty-state p {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #6b7a8d;
}

/* AUTH NUDGE TOAST */
.auth-nudge {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a263b;
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 200;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    min-width: 260px;
    max-width: 90vw;
}

.auth-nudge[hidden] {
    display: none;
}

.auth-nudge-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.auth-nudge p {
    flex: 1;
}

.auth-nudge a {
    color: #7dbeff;
    text-decoration: underline;
}

.auth-nudge-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.auth-nudge-close:hover {
    color: #fff;
}

/* ============================================
   DARK MODE — SAVED ITEMS
   ============================================ */

body.dark-mode .save-btn {
    background: rgba(26, 29, 34, 0.88);
    border-color: rgba(255, 255, 255, 0.1);
    color: #666;
}

body.dark-mode .save-btn:hover,
body.dark-mode .save-btn.saved {
    color: #f0b429;
    background: rgba(26, 29, 34, 0.95);
}

body.dark-mode .saved-items-panel {
    background: #161b22;
    border-color: #2a3340;
}

body.dark-mode .saved-items-title-wrap h2 {
    color: #e7eef9;
}

body.dark-mode .saved-items-count {
    color: #7e8fa3;
}

body.dark-mode .saved-items-close-btn {
    background: #252a31;
    border-color: #343b44;
    color: #dce4f3;
}

body.dark-mode .saved-items-close-btn:hover {
    background: #2e3644;
}

body.dark-mode .saved-select {
    background: #242d38;
    border-color: #334355;
    color: #e1ebfa;
}

body.dark-mode .saved-item-card {
    background: #1a1d22;
    border-color: #2c323a;
}

body.dark-mode .saved-item-title,
body.dark-mode .saved-item-price {
    color: #edf2fa;
}

body.dark-mode .saved-item-category,
body.dark-mode .saved-item-location {
    color: #8a94a6;
}

body.dark-mode .saved-item-remove {
    background: #2a1f1f;
    border-color: #5a2e2e;
    color: #ff8080;
}

body.dark-mode .saved-item-remove:hover {
    background: #371f1f;
    border-color: #803030;
}

body.dark-mode .saved-empty-state h3 {
    color: #d8e5f5;
}

body.dark-mode .saved-empty-state p {
    color: #7e8fa3;
}

body.dark-mode .recently-viewed-panel {
    background: linear-gradient(165deg, #151a22 0%, #1a2029 58%, #171d26 100%);
    border-color: #2f3a4a;
}

body.dark-mode .recently-viewed-count,
body.dark-mode .recent-timestamp,
body.dark-mode .recent-mileage,
body.dark-mode .recent-location {
    color: #8b9caf;
}

body.dark-mode .recently-viewed-card {
    background: #1b222d;
    border-color: #2b3647;
}

body.dark-mode .recent-title,
body.dark-mode .recent-price {
    color: #edf4ff;
}

body.dark-mode .recent-specs span {
    color: #9db0c7;
}

body.dark-mode .recent-specs span strong {
    color: #6f849f;
}

body.dark-mode .recent-action-btn {
    background: #1f2733;
    border-color: #324154;
    color: #8da4bf;
}

body.dark-mode .recent-action-btn:hover,
body.dark-mode .recent-action-btn.is-active {
    color: #64b5ff;
    border-color: #45698f;
    background: #233042;
}

body.dark-mode .recently-viewed-empty {
    border-color: #34465c;
}

body.dark-mode .recently-viewed-empty h4 {
    color: #dce8f7;
}

body.dark-mode .recently-viewed-empty p {
    color: #8da0b7;
}

/* ── Publish button loading state ──────────────────────────────────────────── */

.publish-btn-content,
.publish-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.publish-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.form-publish-error {
    background: #fff2f2;
    border: 1.5px solid #f5c6cb;
    border-radius: 8px;
    color: #b91c1c;
    font-size: 14px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
}

.form-hint {
    font-size: 12px;
    color: #718096;
    margin: 4px 0 0;
    font-family: 'Inter', sans-serif;
}

/* ── App Toast ──────────────────────────────────────────────────────────────── */
.app-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: #1a1a1a;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-width: calc(100vw - 32px);
    text-align: center;
    pointer-events: none;
}
.app-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.app-toast--error {
    background: #c62828;
}
.app-toast--info {
    background: #1a1a1a;
}

/* ── Verification Buttons (profile side card) ───────────────────────────────── */
.verify-id-btn,
.verify-phone-btn {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    padding: 10px 16px;
}

.verify-id-btn {
    background: #fff;
    color: #1e88e5;
    border: 1.5px solid #1e88e5;
}

.verify-id-btn:hover {
    background: #e8f0fe;
}

.verify-id-btn.is-verified,
.verify-phone-btn.is-verified {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #a5d6a7;
    cursor: default;
}

.verify-id-btn.is-pending {
    background: #fff8e1;
    color: #f57f17;
    border-color: #ffe082;
    cursor: default;
}

/* ── Verification Modals ─────────────────────────────────────────────────────── */
.verif-backdrop {
    z-index: 1200;
}

.verif-panel {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    padding: 28px 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 24px 64px rgba(0,0,0,0.18);
}

body.dark-mode .verif-panel {
    background: #1a2235;
    color: #e8eef8;
}

.verif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.verif-head h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #0f2b44;
}

body.dark-mode .verif-head h2 {
    color: #e8eef8;
}

.verif-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #718096;
    line-height: 1;
    padding: 2px 8px;
    border-radius: 8px;
}

.verif-close:hover {
    background: #f0f4f8;
}

body.dark-mode .verif-close:hover {
    background: #2d3a50;
}

.verif-desc {
    font-size: 14px;
    color: #4a5568;
    margin: 0 0 20px;
    line-height: 1.6;
}

body.dark-mode .verif-desc {
    color: #9aabb8;
}

.verif-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

body.dark-mode .verif-label {
    color: #cbd5e0;
}

.verif-hint {
    font-weight: 400;
    color: #9ca3af;
}

.verif-input {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #d1d9e0;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: #0f2b44;
    margin-bottom: 16px;
    transition: border-color 0.15s;
}

.verif-input:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30,136,229,0.12);
}

body.dark-mode .verif-input {
    background: #111827;
    color: #e8eef8;
    border-color: #374151;
}

.verif-otp {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 8px;
    text-align: center;
    padding: 14px;
}

.verif-file-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1.5px dashed #cbd5e0;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
    background: #f9fafb;
    cursor: pointer;
}

body.dark-mode .verif-file-input {
    background: #111827;
    border-color: #374151;
    color: #e8eef8;
}

.verif-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 15px;
}

.verif-error {
    color: #c62828;
    font-size: 13px;
    margin: -8px 0 12px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 8px;
}

.verif-link-btn {
    background: none;
    border: none;
    color: #1e88e5;
    font-size: 13px;
    cursor: pointer;
    margin-top: 10px;
    padding: 0;
    text-decoration: underline;
}

.verif-success-icon {
    width: 64px;
    height: 64px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 8px auto 20px;
    color: #2e7d32;
}

.verif-success-icon--pending {
    background: #fff8e1;
    color: #f57f17;
}

.verif-success-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 12px;
    color: #0f2b44;
}

body.dark-mode .verif-success-title {
    color: #e8eef8;
}

@media (max-width: 480px) {
    .verif-panel {
        padding: 20px 16px 24px;
        border-radius: 16px;
    }

    .verif-otp {
        font-size: 22px;
        letter-spacing: 5px;
    }
}

/* ── Mobile safety net — final overrides for small screens ──────────────────
   These rules sit at the bottom of styles.css so they win without !important.
   They fix common launch-blocking mobile issues: horizontal overflow, modal
   sizing, navbar wrap, and undersized form controls. */

html, body {
    /* Prevent horizontal scroll on phones — the most common mobile bug */
    overflow-x: hidden;
    max-width: 100%;
}

img, video {
    /* Stop oversized images from busting the viewport */
    max-width: 100%;
    height: auto;
}

@media (max-width: 600px) {
    /* Modals scroll vertically on phones; headers remain reachable */
    .modal-backdrop,
    .modal {
        align-items: flex-start;
    }
    .modal-content,
    .checkout-panel,
    .listing-detail-panel,
    .profile-panel,
    .location-modal {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        overflow-y: auto;
    }

    /* Form inputs at 16px font prevent iOS auto-zoom on focus */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    input[type="search"],
    input[type="url"],
    select,
    textarea {
        font-size: 16px;
    }

    /* Navbar wraps cleanly on small screens */
    .navbar {
        padding: 8px 12px;
        gap: 8px;
    }

    /* Buttons stay tap-friendly */
    .btn {
        min-height: 44px;
    }
}

@media (max-width: 380px) {
    /* Even smaller phones — squeeze padding without making text unreadable */
    .navbar {
        padding: 6px 8px;
    }
    .btn {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* ────────────────────────────────────────────────────────────────────────────
   LOCATION AUTOCOMPLETE (post-trade.html + sell-item.html manual location)
   Dropdown of real Nominatim places; user must pick one.
   ──────────────────────────────────────────────────────────────────────────── */
.location-autocomplete-wrap {
    position: relative;
}

.location-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #ffffff;
    border: 1px solid #d7e5f6;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 43, 68, 0.12);
    max-height: 260px;
    overflow-y: auto;
}

.location-suggestion {
    padding: 10px 14px;
    font-size: 15px;
    color: #1e324a;
    cursor: pointer;
    transition: background 0.12s ease;
}

/* Hover AND keyboard-highlight share the same look */
.location-suggestion:hover,
.location-suggestion.is-active {
    background: #eef3fb;
}

.location-suggestion--empty {
    color: #8a98ad;
    cursor: default;
    font-style: italic;
}

.location-suggestion--empty:hover {
    background: transparent;
}

/* "✓ Location set to ..." confirmation hint turns green once a pick is made */
.location-hint--ok {
    color: #1faf5b;
    font-weight: 600;
}

@media (max-width: 480px) {
    .location-suggestion {
        padding: 12px 14px;   /* bigger tap targets on phones */
        font-size: 16px;      /* 16px prevents iOS zoom-on-focus */
    }
    .location-suggestions {
        max-height: 220px;
    }
}

/* ────────────────────────────────────────────────────────────────────────────
   LISTING DETAIL PAGE (listing.html / listing.js)
   ──────────────────────────────────────────────────────────────────────────── */

.listing-detail-shell {
    width: min(1100px, 95%);
    margin: 24px auto 60px;
    padding: 0;
}

/* Defensive: the listing detail page relies on the `hidden` HTML attribute to
   swap between loading / error / content states. Some CSS frameworks override
   [hidden] via `display` on the element type, leaving it visible. Force the
   browser default so toggling .hidden actually hides the element. */
.listing-detail-shell [hidden] {
    display: none !important;
}

/* Loading skeleton */
.listing-detail-loading {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 24px;
}
.listing-skeleton-photo {
    aspect-ratio: 4 / 3;
    background: linear-gradient(90deg, #eeeeee 0%, #dddddd 50%, #eeeeee 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s linear infinite;
    border-radius: 12px;
}
.listing-skeleton-body { display: flex; flex-direction: column; gap: 12px; }
.listing-skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, #eeeeee 0%, #dddddd 50%, #eeeeee 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s linear infinite;
    border-radius: 4px;
}
.listing-skeleton-line-title { height: 28px; width: 70%; }
.listing-skeleton-line-price { height: 22px; width: 30%; }
.listing-skeleton-line-short { width: 40%; }

/* Error state */
.listing-detail-error {
    max-width: 540px;
    margin: 60px auto;
    text-align: center;
    padding: 28px;
    border: 1px solid #e7d3d3;
    background: #fff7f7;
    border-radius: 14px;
}
.listing-detail-error h1 { font-size: 24px; color: #8a2c2c; margin-bottom: 8px; }
.listing-detail-error p  { color: #6a5151; margin-bottom: 18px; }

/* Two-column layout on desktop, single column on mobile */
.listing-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.listing-detail-left,
.listing-detail-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* Sticky seller card on desktop so it stays visible while scrolling the description */
@media (min-width: 901px) {
    .listing-detail-right {
        position: sticky;
        top: 20px;
    }
}

/* Photo gallery */
.listing-gallery {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #eef3fb;
    border: 1px solid #dce8f7;
    aspect-ratio: 4 / 3;
}
.listing-gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.25s ease;
}
.listing-gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f7fc;
}
.listing-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}
.listing-gallery-slide--empty {
    color: #94a8c2;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}

.listing-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    color: #1e324a;
    transition: background 0.15s ease;
}
.listing-gallery-nav:hover { background: #ffffff; }
.listing-gallery-prev { left: 10px; }
.listing-gallery-next { right: 10px; }
/* Plain unicode arrow glyphs — larger size so they read as buttons, not random punctuation */
.listing-gallery-nav > span {
    font-size: 26px;
    line-height: 1;
    color: #1e324a;
    font-weight: 600;
}

.listing-gallery-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}
.listing-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease, transform 0.15s ease;
}
.listing-gallery-dot.is-active {
    background: #ffffff;
    transform: scale(1.25);
}

/* Title / price / location header */
.listing-detail-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.listing-detail-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a2f47;
    line-height: 1.25;
}
.listing-detail-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.listing-detail-price {
    font-size: 30px;
    font-weight: 800;
    color: #1e88e5;
}
.listing-detail-badge {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
}
.listing-detail-condition {
    background: #e5f2ff;
    color: #1e88e5;
}
.listing-detail-condition[data-condition="new"],
.listing-detail-condition[data-condition="like-new"] {
    background: #e6f7ee;
    color: #1faf5b;
}
.listing-detail-condition[data-condition="fair"],
.listing-detail-condition[data-condition="poor"] {
    background: #fff4db;
    color: #9b6400;
}
.listing-detail-trade-type {
    background: #f1ecff;
    color: #6a3fb8;
}
.listing-detail-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4b6481;
    font-size: 14px;
}
/* Plain dot used in place of the location-pin icon. Coloured to look like a
   marker rather than a generic bullet. */
.listing-location-pin {
    color: #1e88e5;
    font-size: 14px;
    line-height: 1;
}

/* Description / sections */
.listing-detail-section {
    background: #ffffff;
    border: 1px solid #dce8f7;
    border-radius: 12px;
    padding: 18px;
}
.listing-detail-section h2 {
    font-size: 16px;
    color: #1a2f47;
    margin-bottom: 10px;
    font-weight: 700;
}
.listing-detail-description,
.listing-detail-trade-wants {
    color: #2f4664;
    font-size: 15px;
    line-height: 1.6;
    word-wrap: break-word;
}

/* Vehicle spec grid */
.listing-vehicle-specs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.listing-vehicle-spec {
    background: #f8fbff;
    border: 1px solid #e3ecf9;
    border-radius: 10px;
    padding: 10px 12px;
}
.listing-vehicle-spec dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6f859d;
    margin-bottom: 4px;
}
.listing-vehicle-spec dd {
    font-size: 15px;
    color: #1e324a;
    font-weight: 600;
}

/* Map */
.listing-detail-map {
    height: 260px;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #eef3fb;
}
.listing-detail-map-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #607894;
    font-size: 14px;
    padding: 20px;
    text-align: center;
}
.listing-detail-map-note {
    margin-top: 8px;
    font-size: 12px;
    color: #6f859d;
}

/* Action buttons card */
.listing-actions-card {
    background: #ffffff;
    border: 1px solid #dce8f7;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(15, 43, 68, 0.06);
}
.listing-action-primary,
.listing-action-secondary,
.listing-action-tertiary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.listing-action-primary {
    background: #1e88e5;
    color: #ffffff;
    border-color: #1e88e5;
}
.listing-action-primary:hover:not(:disabled) {
    background: #1670c0;
    border-color: #1670c0;
}
.listing-action-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.listing-action-secondary {
    background: #ffffff;
    color: #2f4f71;
    border-color: #d7e5f6;
}
.listing-action-secondary:hover:not(:disabled) {
    border-color: #1e88e5;
    color: #1e88e5;
}
.listing-action-tertiary {
    background: transparent;
    color: #8a2c2c;
    border-color: transparent;
    font-size: 13px;
    padding: 8px 10px;
}
.listing-action-tertiary:hover { background: #fff3f3; }
.listing-action-primary .material-symbols-outlined,
.listing-action-secondary .material-symbols-outlined,
.listing-action-tertiary .material-symbols-outlined {
    font-size: 18px;
}

.listing-own-note {
    color: #6f859d;
    font-size: 13px;
    text-align: center;
    margin-bottom: 8px;
}

/* Seller card */
.listing-seller-card {
    background: #ffffff;
    border: 1px solid #dce8f7;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 1px 3px rgba(15, 43, 68, 0.06);
}
.listing-seller-top {
    display: flex;
    align-items: center;
    gap: 12px;
}
.listing-seller-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef3fb;
    flex-shrink: 0;
}
.listing-seller-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.listing-seller-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a2f47;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.listing-seller-since { font-size: 12px; color: #6f859d; }
.listing-seller-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #eef3fb;
    border-bottom: 1px solid #eef3fb;
}
.listing-seller-stats > div { text-align: center; }
.listing-seller-stats strong {
    display: block;
    font-size: 18px;
    color: #1e88e5;
}
.listing-seller-stats span {
    font-size: 11px;
    color: #6f859d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.listing-seller-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.listing-seller-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #1faf5b;
    background: #e6f7ee;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600;
}
.listing-seller-badge .material-symbols-outlined { font-size: 13px; }
.listing-seller-view-profile {
    text-align: center;
    text-decoration: none;
    color: #1e88e5;
    font-weight: 600;
    font-size: 14px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.15s ease;
}
.listing-seller-view-profile:hover {
    background: #eef3fb;
}

.listing-detail-footer-meta {
    font-size: 11px;
    color: #94a8c2;
    text-align: center;
    margin-top: 8px;
    word-break: break-all;
}

/* Toast */
.listing-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a2f47;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    max-width: 90%;
}
.listing-toast--error { background: #c0392b; }
.listing-toast--success { background: #1faf5b; }

/* Mobile layout — single column. The right column drops below the left. */
@media (max-width: 900px) {
    .listing-detail-layout,
    .listing-detail-loading {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .listing-detail-title { font-size: 22px; }
    .listing-detail-price { font-size: 24px; }
    .listing-gallery { aspect-ratio: 4 / 3; }
}

@media (max-width: 480px) {
    .listing-detail-shell {
        width: 100%;
        padding: 0 12px;
        margin: 16px auto 40px;
    }
    .listing-detail-section { padding: 14px; }
    .listing-detail-title { font-size: 20px; }
    .listing-detail-price { font-size: 22px; }
    .listing-gallery-nav { width: 34px; height: 34px; }
    .listing-vehicle-specs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ────────────────────────────────────────────────────────────────────────────
   BROWSE LISTINGS (homepage) — dynamic feed populated by initBrowseListings()
   in script.js. Cards are anchor tags so the entire card is tappable, matching
   the Facebook Marketplace pattern the user requested.
   ──────────────────────────────────────────────────────────────────────────── */

/* Whole-card tap target: any <a class="listing-card"> behaves like the existing
   div-based cards visually but is a real link the browser/assistive tech treats
   as one element. */
a.listing-card,
a.listing-card:visited {
    color: inherit;
    text-decoration: none;
    display: block;
}

a.listing-card:focus-visible {
    outline: 3px solid #1e88e5;
    outline-offset: 2px;
    border-radius: 12px;
}

/* Trade-type pill colors — covers the new "trade-or-sell" variant alongside
   the existing "trade" and "sell" classes from the demo HTML. */
.listing-type.trade-or-sell {
    background: #fff3cd;
    color: #856404;
}

/* Skeleton placeholder shown while the first batch of real listings loads.
   Animated gray gradient so the user knows content is on its way. */
.listing-card-skeleton {
    pointer-events: none;
}

.card-img-skeleton,
.skeleton-line {
    background: linear-gradient(90deg, #eeeeee 0%, #dddddd 50%, #eeeeee 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s linear infinite;
    border-radius: 6px;
}

.card-img-skeleton {
    width: 100%;
    aspect-ratio: 5 / 3;
    border-radius: 8px;
}

.skeleton-line {
    height: 12px;
    margin: 8px 0;
}

.skeleton-line-title {
    width: 80%;
    height: 16px;
}

.skeleton-line-meta {
    width: 50%;
}

.skeleton-line-price {
    width: 35%;
    height: 18px;
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* "Loading more…" indicator shown when infinite scroll fetches the next page. */
.browse-loading-more {
    grid-column: 1 / -1;          /* span the full grid width */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
    color: #555;
    font-size: 14px;
}

.browse-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #1e88e5;
    border-radius: 50%;
    animation: browse-spin 0.8s linear infinite;
}

@keyframes browse-spin {
    to { transform: rotate(360deg); }
}

/* "End of feed" message after all pages are loaded. Subtle so it doesn't compete
   with real listings. */
.browse-end-of-feed {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 0 10px;
    color: #888;
    font-size: 13px;
}

/* Mobile two-column layout (Facebook Marketplace style).
   We narrow gap and reduce card padding so each card fits comfortably on a
   ~360px-wide screen with room for the typical two-column grid. */
@media (max-width: 600px) {
    .listings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .listing-card .card-info {
        padding: 8px 10px;
    }

    .listing-card .card-title {
        font-size: 14px;
        line-height: 1.25;
        /* Limit to 2 lines on mobile so cards stay roughly the same height.
           Ship both the webkit-prefixed and standard line-clamp properties so
           the rule works in old Safari and modern Chromium/Firefox. */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .listing-card .card-price {
        font-size: 15px;
        margin-top: 4px;
    }

    .listing-card .card-category,
    .listing-card .card-location,
    .listing-card .card-mileage {
        font-size: 12px;
    }

    .listing-card .listing-type {
        font-size: 11px;
        padding: 2px 6px;
    }

    .listing-card .condition-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* ────────────────────────────────────────────────────────────────────────────
   SELLER PROFILE PAGE (seller.html / seller.js)
   ──────────────────────────────────────────────────────────────────────────── */

.seller-profile-shell {
    width: min(1100px, 95%);
    margin: 24px auto 60px;
}

.seller-profile-shell [hidden] { display: none !important; }

/* Loading skeleton */
.seller-skeleton-header {
    height: 140px;
    border-radius: 14px;
    background: linear-gradient(90deg, #eeeeee 0%, #dddddd 50%, #eeeeee 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s linear infinite;
    margin-bottom: 24px;
}
.seller-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.seller-skeleton-card {
    height: 240px;
    border-radius: 12px;
    background: linear-gradient(90deg, #eeeeee 0%, #dddddd 50%, #eeeeee 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s linear infinite;
}

/* Error state */
.seller-profile-error {
    max-width: 540px;
    margin: 60px auto;
    text-align: center;
    padding: 28px;
    border: 1px solid #e7d3d3;
    background: #fff7f7;
    border-radius: 14px;
}
.seller-profile-error h1 { font-size: 24px; color: #8a2c2c; margin-bottom: 8px; }
.seller-profile-error p  { color: #6a5151; margin-bottom: 18px; }

/* Header card */
.seller-profile-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    background: #ffffff;
    border: 1px solid #dce8f7;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: 0 1px 3px rgba(15, 43, 68, 0.06);
}
.seller-profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef3fb;
}
.seller-profile-meta { min-width: 0; }
.seller-profile-name {
    font-size: 24px;
    font-weight: 800;
    color: #1a2f47;
    margin-bottom: 4px;
}
.seller-profile-location { font-size: 14px; color: #4b6481; margin-bottom: 2px; }
.seller-profile-since { font-size: 13px; color: #6f859d; margin-bottom: 10px; }
.seller-profile-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.seller-profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #1faf5b;
    background: #e6f7ee;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600;
}
.seller-profile-stats {
    display: flex;
    gap: 20px;
    text-align: center;
}
.seller-profile-stats > div { min-width: 60px; }
.seller-profile-stats strong {
    display: block;
    font-size: 22px;
    color: #1e88e5;
}
.seller-profile-stats span {
    font-size: 11px;
    color: #6f859d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.seller-profile-message-btn {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 8px;
    background: #1e88e5;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s ease;
}
.seller-profile-message-btn:hover:not(:disabled) { background: #1670c0; }
.seller-profile-message-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Listings section */
.seller-profile-listings h2 {
    font-size: 18px;
    color: #1a2f47;
    margin-bottom: 16px;
}
.seller-listings-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6f859d;
    background: #f8fbff;
    border: 1px dashed #cfe0f5;
    border-radius: 12px;
}

/* Mobile */
@media (max-width: 768px) {
    .seller-profile-header {
        grid-template-columns: auto 1fr;
        gap: 16px;
        padding: 18px;
    }
    /* Stats drop to full width below name on tablet/mobile */
    .seller-profile-stats {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .seller-profile-shell { width: 100%; padding: 0 12px; }
    .seller-profile-header {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
    .seller-profile-badges { justify-content: center; }
    .seller-profile-stats { justify-content: center; }
    .seller-profile-message-btn { justify-self: stretch; width: 100%; }
}

/* ────────────────────────────────────────────────────────────────────────────
   POST-A-TRADE → Trade Options (radio buttons + inline cash input)
   ──────────────────────────────────────────────────────────────────────────── */

/* Container for the trade-option radios. Same vertical flow as .location-option-group. */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Each radio row — styled to match .location-option so the form feels consistent. */
.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.radio-label:hover {
    border-color: #1e88e5;
    background: #f5f9ff;
}

/* Highlight the selected option using the :has() selector — native radio
   checked state styling without extra JS. */
.radio-label:has(input[type="radio"]:checked) {
    border-color: #1e88e5;
    background: #f0f7ff;
}

/* The custom-rendered radio circle. We hide the native radio visually
   (still focusable / keyboard-navigable) and draw our own. */
.radio-label .form-radio {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #c2d2e5;
    border-radius: 50%;
    margin: 2px 0 0;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.15s ease;
}
.radio-label .form-radio:checked {
    border-color: #1e88e5;
}
.radio-label .form-radio:checked::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #1e88e5;
}

/* Inline cash-amount input that appears under "Trade + Cash" when selected. */
.trade-cash-amount-wrap {
    margin-top: 10px;
    padding: 12px;
    background: #f5f9ff;
    border: 1px dashed #c2d9f2;
    border-radius: 8px;
    /* The wrap sits inside .radio-group (a flex column), so giving it
       full width keeps it under the "Trade + Cash" row visually. */
    align-self: stretch;
}
.trade-cash-amount-wrap .form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
}
.trade-cash-amount-wrap .form-hint {
    margin-top: 4px;
    font-size: 11px;
    color: #6f859d;
}

/* ────────────────────────────────────────────────────────────────────────────
   LISTING DETAIL → "Plus: $XXX cash added by seller" line
   ──────────────────────────────────────────────────────────────────────────── */

.listing-detail-cash-addon {
    margin-top: 10px;
    padding: 8px 12px;
    background: #e6f7ee;
    border-left: 3px solid #1faf5b;
    border-radius: 6px;
    color: #15693c;
    font-size: 14px;
}
.listing-detail-cash-addon strong {
    color: #15693c;
}


