:root {
    --bg: #f5f7f4;
    --surface: #ffffff;
    --line: #dce4dc;
    --text: #172018;
    --muted: #667267;
    --green: #146b3a;
    --green-dark: #0d4b29;
    --amber: #c98816;
    --blue: #246b8f;
    --shadow: 0 8px 28px rgba(18, 35, 20, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Tahoma, Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.narrow {
    width: min(760px, calc(100% - 32px));
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 190px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--green);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.main-nav {
    display: flex;
    gap: 4px;
    flex: 1;
}

.main-nav a,
.nav-actions a {
    padding: 10px 12px;
    color: var(--muted);
    border-radius: 6px;
    font-size: 14px;
}

.main-nav a:hover,
.nav-actions a:hover {
    background: #edf3ee;
    color: var(--green-dark);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-link,
.primary {
    background: var(--green);
    color: #fff !important;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.quick {
    padding: 24px 0 14px;
}

.searchbar {
    display: grid;
    grid-template-columns: 1fr 160px 160px 150px 90px;
    gap: 10px;
}

input,
select,
textarea,
button {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font: inherit;
    padding: 10px 12px;
}

textarea {
    resize: vertical;
}

.category-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 0 4px;
}

.category-strip a {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 6px;
    padding: 8px 13px;
    color: var(--muted);
}

.category-strip a.active,
.category-strip a:hover {
    border-color: var(--green);
    color: var(--green-dark);
}

.content-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 22px;
    align-items: start;
}

.side-panel,
.page-panel,
.contact-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.side-panel {
    position: sticky;
    top: 94px;
    padding: 16px;
}

.side-panel h2,
.feed-head h1,
.page-panel h1,
.detail-main h1 {
    margin: 0;
}

.side-panel h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.side-panel a {
    display: block;
    padding: 9px 0;
    border-top: 1px solid #eef2ef;
    color: var(--blue);
}

.feed {
    min-width: 0;
}

.feed-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.feed-head h1 {
    font-size: 24px;
}

.feed-head span {
    color: var(--muted);
}

.listing {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    padding: 14px;
    margin-bottom: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.listing-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e9efe9;
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: var(--green);
    font-size: 34px;
    font-weight: 700;
}

.listing-image img,
.detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing h2 {
    margin: 0 0 4px;
    font-size: 21px;
    color: var(--green-dark);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

.meta a {
    color: var(--blue);
}

.listing p {
    margin: 8px 0;
    color: #344036;
}

.seller {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.seller span {
    color: var(--muted);
}

.seller strong,
.price {
    color: var(--amber);
    font-size: 22px;
}

.empty,
.notice {
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.page-panel {
    margin-block: 28px;
    padding: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 18px;
}

.form-grid label {
    display: grid;
    gap: 6px;
    color: var(--muted);
}

.form-grid .full {
    grid-column: 1 / -1;
}

.form-grid button {
    grid-column: 1 / -1;
}

.notice.success {
    border-color: #9bd0ae;
    color: var(--green-dark);
}

.notice.error {
    border-color: #e2a5a5;
    color: #8b1c1c;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 22px;
    align-items: start;
    padding-block: 28px;
}

.detail-main {
    min-width: 0;
}

.detail-media {
    aspect-ratio: 16 / 9;
    background: #e9efe9;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--green);
    font-weight: 700;
}

.detail-main h1 {
    margin-top: 18px;
    font-size: 30px;
}

.description {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    white-space: normal;
}

.contact-box {
    position: sticky;
    top: 94px;
    padding: 18px;
}

.contact-box h2 {
    margin: 8px 0 16px;
}

.link-button {
    display: block;
    text-align: center;
    padding: 12px;
    margin-top: 10px;
    border-radius: 6px;
}

.ghost {
    border: 1px solid var(--line);
    background: #fff;
}

.footer {
    margin-top: 36px;
    padding: 26px 0;
    background: #102216;
    color: #e8f0e9;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr repeat(5, max-content);
    gap: 16px;
    align-items: center;
}

.footer p {
    margin: 4px 0 0;
    color: #aab9ad;
}

.post-shell,
.admin-page {
    padding-block: 30px;
}

.post-title {
    margin-bottom: 18px;
}

.post-title span {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 6px;
    background: #e8f2ec;
    color: var(--green-dark);
    font-weight: 700;
    font-size: 13px;
}

.post-title h1 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.2;
}

.post-form {
    display: grid;
    gap: 16px;
}

.form-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.form-section h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.check-row {
    min-height: 44px;
    display: flex !important;
    align-items: center;
    gap: 10px !important;
    color: var(--text) !important;
}

.check-row input {
    width: 18px;
    min-height: 18px;
}

.upload-box {
    border: 1px dashed #a9b9ab;
    border-radius: 8px;
    padding: 16px;
    background: #fbfcfb;
}

.upload-box span {
    color: var(--muted);
    font-size: 13px;
}

.publish-bar {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 10px;
    padding: 12px;
    background: rgba(245, 247, 244, 0.92);
    border: 1px solid var(--line);
    border-radius: 8px;
    backdrop-filter: blur(12px);
}

.pro-detail .detail-media {
    box-shadow: var(--shadow);
}

.thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.thumbs img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--line);
}

.spec-grid,
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 18px 0;
}

.spec-grid div,
.stat-grid div {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.spec-grid span,
.stat-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.spec-grid strong,
.stat-grid strong {
    display: block;
    margin-top: 4px;
    color: var(--text);
}

.admin-note {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.admin-table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.admin-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: right;
    vertical-align: top;
}

.admin-table th {
    background: #eef4ef;
    color: var(--green-dark);
}

.admin-table small {
    color: var(--muted);
}

.status {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 13px;
}

.status.active {
    background: #e3f3e8;
    color: var(--green-dark);
}

.status.hidden {
    background: #f6e8e8;
    color: #8b1c1c;
}

.inline-form button {
    min-height: 36px;
    padding: 7px 10px;
}

.car-market {
    display: grid;
    gap: 12px;
    padding-top: 12px;
}

.car-chip-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    border-top: 8px solid #f3f5f7;
    scrollbar-color: #a7aab0 transparent;
}

.car-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 18px;
    border-radius: 8px;
    background: #f3f5fb;
    color: #587094;
    font-weight: 800;
}

.car-chip.active,
.car-chip:hover {
    background: #e6eef8;
    color: #2d73bd;
}

.car-filter-form {
    display: grid;
    gap: 12px;
}

.car-filter-form label {
    display: grid;
    gap: 6px;
    color: #2d73bd;
    font-weight: 800;
}

.car-filter-form .primary {
    min-height: 48px;
    background: #2d73bd;
}

.filter-title {
    color: #2d73bd;
    font-weight: 800;
    padding-top: 8px;
}

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

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

.toggle-grid label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: 8px;
    background: #f3f5fb;
    color: #587094;
    box-shadow: 0 6px 16px rgba(26, 40, 60, 0.08);
}

.toggle-grid input {
    width: 16px;
    min-height: 16px;
}

.toggle-grid .wide {
    grid-column: 1 / -1;
}

.body-type-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.body-type-card {
    min-height: 96px;
    display: grid;
    place-items: center;
    gap: 6px;
    padding: 10px;
    border: 1.5px solid #82b3e8;
    border-radius: 8px;
    background: #fff;
    color: #2e537f;
    text-align: center;
    font-weight: 800;
}

.body-type-card:hover,
.body-type-card.active {
    background: #edf5ff;
    border-color: #2d73bd;
}

.body-type-card strong {
    font-size: 14px;
}

.car-line-icon {
    position: relative;
    width: 92px;
    height: 34px;
    display: block;
}

.car-line-icon::before {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 10px;
    height: 10px;
    border: 2px solid #174b80;
    border-top-left-radius: 28px;
    border-top-right-radius: 46px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.car-line-icon::after {
    content: "";
    position: absolute;
    left: 18px;
    bottom: 3px;
    width: 13px;
    height: 13px;
    border: 2px solid #174b80;
    border-radius: 50%;
    box-shadow: 43px 0 0 -2px #fff, 43px 0 0 0 #174b80;
}

.car-line-icon.suv::before,
.car-line-icon.luxury-suv::before,
.car-line-icon.jeep::before {
    height: 16px;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}

.car-line-icon.compact::before,
.car-line-icon.hatchback::before {
    right: 18px;
    border-top-right-radius: 18px;
}

.car-line-icon.coupe::before {
    right: 20px;
    height: 8px;
    border-top-left-radius: 34px;
    border-top-right-radius: 34px;
}

.car-line-icon.van::before {
    height: 18px;
    border-radius: 8px;
}

.car-line-icon.pickup-small::before,
.car-line-icon.pickup-large::before {
    right: 34px;
    border-top-right-radius: 5px;
}

.car-line-icon.pickup-small::after,
.car-line-icon.pickup-large::after {
    box-shadow: 50px 0 0 -2px #fff, 50px 0 0 0 #174b80;
}

.car-line-icon.classic::before {
    height: 8px;
    border-radius: 30px 30px 4px 4px;
}

/* Polished cars marketplace */
.cars-layout {
    grid-template-columns: 390px 1fr;
    gap: 24px;
}

.cars-layout .side-panel {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.cars-layout .side-panel h2 {
    color: #2b6fb8;
    font-size: 19px;
    padding: 0 4px 10px;
}

.brand-logo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-height: 720px;
    overflow-y: auto;
    padding: 4px 4px 18px;
    margin-bottom: 18px;
}

.brand-logo-card {
    min-height: 104px;
    display: grid;
    place-items: center;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(38, 60, 86, 0.06);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.brand-logo-card:hover,
.brand-logo-card.active {
    border-color: #2d73bd;
    box-shadow: 0 12px 28px rgba(45, 115, 189, 0.16);
    transform: translateY(-2px);
}

.brand-logo-card img {
    width: 86px;
    max-height: 58px;
    object-fit: contain;
}

.brand-logo-card span {
    color: #2d73bd;
    font-weight: 800;
}

.cars-layout .car-filter-form {
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(38, 60, 86, 0.07);
}

.cars-layout .feed {
    display: grid;
    gap: 10px;
}

.cars-layout .feed-head {
    padding-inline: 6px;
}

.car-listing {
    grid-template-columns: 170px 1fr;
    min-height: 156px;
    padding: 18px;
    border: 0;
    background: #f8fafc;
    box-shadow: none;
}

.car-listing .listing-image {
    border-radius: 10px;
    background: #eef3f8;
}

.car-listing .listing-body {
    display: grid;
    align-content: center;
    gap: 8px;
}

.car-listing h2 {
    font-size: 23px;
    color: #43b978;
}

.car-listing .meta {
    color: #8f969e;
    font-size: 15px;
    gap: 14px;
}

.car-listing .seller strong {
    color: #2d73bd;
}

.listing-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: #60748e;
    font-weight: 800;
}

.listing-brand-badge img {
    width: 32px;
    height: 24px;
    object-fit: contain;
}

.car-market {
    background: #fff;
    border-radius: 8px;
    padding: 8px 0;
}

.car-chip-row {
    border-top: 6px solid #f4f6f8;
}

.car-chip {
    background: #f3f5fb;
    color: #5c7090;
    box-shadow: 0 4px 12px rgba(38, 60, 86, 0.05);
}

.car-chip.active,
.car-chip:hover {
    background: #e9f1fb;
    color: #2d73bd;
}

@media (max-width: 840px) {
    .nav,
    .main-nav,
    .nav-actions {
        flex-wrap: wrap;
    }

    .nav {
        padding: 12px 0;
        gap: 10px;
    }

    .brand {
        width: 100%;
    }

    .searchbar,
    .content-layout,
    .detail-layout,
    .form-grid,
    .footer-grid,
    .spec-grid,
    .stat-grid,
    .publish-bar {
        grid-template-columns: 1fr;
    }

    .side-panel,
    .contact-box {
        position: static;
    }

    .listing {
        grid-template-columns: 96px 1fr;
        gap: 12px;
    }

    .listing h2 {
        font-size: 18px;
    }
}

@media (max-width: 520px) {
    .shell,
    .narrow {
        width: min(100% - 20px, 1180px);
    }

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

    .listing-image {
        aspect-ratio: 16 / 9;
    }

    .main-nav a,
    .nav-actions a {
        padding-inline: 8px;
    }
}

/* Refined posting experience */
body {
    background:
        linear-gradient(180deg, rgba(236, 243, 239, 0.95), rgba(247, 248, 245, 0.96) 360px),
        #f7f8f5;
}

.topbar {
    box-shadow: 0 12px 30px rgba(25, 41, 31, 0.06);
}

.post-shell {
    width: min(1160px, calc(100% - 36px));
}

.post-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0 4px;
}

.post-title span {
    width: fit-content;
    background: #102216;
    color: #fff;
    letter-spacing: 0;
}

.post-title h1 {
    color: #102216;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
}

.post-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 18px;
    align-items: start;
}

.post-aside {
    position: sticky;
    top: 96px;
}

.post-aside-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    background: #102216;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 18px 46px rgba(16, 34, 22, 0.18);
}

.post-aside-card strong {
    font-size: 18px;
}

.post-aside-card span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dcebe0;
    font-size: 14px;
}

.post-aside-card span::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d7a034;
}

.post-form {
    gap: 18px;
}

.form-section {
    padding: 22px;
    background: rgba(255, 255, 255, 0.96);
    border-color: #e2e8e1;
    box-shadow: 0 16px 42px rgba(28, 43, 31, 0.08);
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.section-heading span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #e5f0e8;
    color: var(--green-dark);
    font-weight: 800;
}

.section-heading h2 {
    margin: 0;
    color: #172018;
    font-size: 21px;
}

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

.form-grid label {
    color: #344036;
    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea {
    min-height: 48px;
    border-color: #d7ded7;
    background: #fbfcfb;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(20, 107, 58, 0.12);
}

textarea {
    min-height: 150px;
}

.check-row {
    justify-content: flex-start;
    border: 1px solid #d7ded7;
    border-radius: 8px;
    background: #fbfcfb;
    padding: 12px;
}

.upload-box {
    min-height: 126px;
    justify-content: center;
    border-color: #b8c7ba;
    background: linear-gradient(180deg, #ffffff, #f5faf6);
}

.upload-box input {
    border: 0;
    background: transparent;
    padding-inline: 0;
}

.publish-bar {
    grid-template-columns: 170px 1fr;
    padding: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 -12px 36px rgba(20, 30, 24, 0.08);
}

.publish-bar .primary,
.publish-bar .ghost {
    min-height: 50px;
}

@media (max-width: 900px) {
    .post-layout {
        grid-template-columns: 1fr;
    }

    .post-aside {
        position: static;
    }

    .post-aside-card {
        grid-template-columns: 1fr 1fr;
    }

    .post-aside-card strong {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .post-shell {
        width: min(100% - 20px, 1160px);
    }

    .form-section {
        padding: 16px;
    }

    .form-grid,
    .post-aside-card,
    .publish-bar {
        grid-template-columns: 1fr;
    }

    .post-title h1 {
        font-size: 28px;
    }
}

/* Premium Sham Trend visual system */
:root {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --surface-soft: #f9fbfd;
    --line: #dfe7ee;
    --text: #152033;
    --muted: #69768a;
    --green: #168957;
    --green-dark: #0d6544;
    --amber: #d69a2d;
    --blue: #246fb8;
    --blue-dark: #163f78;
    --ink: #0f1d32;
    --shadow: 0 18px 48px rgba(21, 32, 51, 0.09);
    --shadow-soft: 0 10px 28px rgba(21, 32, 51, 0.06);
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 84% 0%, rgba(36, 111, 184, 0.14), transparent 34%),
        radial-gradient(circle at 16% 12%, rgba(214, 154, 45, 0.10), transparent 30%),
        linear-gradient(180deg, #f7fafc 0%, #eef4f8 420px, #f7f8fb 100%);
    color: var(--text);
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    font-weight: 500;
}

.shell {
    width: min(1240px, calc(100% - 36px));
}

.topbar {
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(207, 219, 230, 0.82);
    box-shadow: 0 18px 40px rgba(15, 29, 50, 0.07);
    backdrop-filter: blur(18px);
}

.nav {
    min-height: 78px;
}

.brand {
    min-width: 220px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent),
        linear-gradient(135deg, var(--green), #1d76bc);
    box-shadow: 0 12px 24px rgba(22, 137, 87, 0.22);
}

.brand strong {
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
}

.brand small {
    color: var(--muted);
    font-weight: 600;
}

.main-nav a,
.nav-actions a {
    border-radius: 10px;
    color: #516176;
    font-weight: 800;
}

.main-nav a:hover,
.nav-actions a:hover {
    background: rgba(36, 111, 184, 0.09);
    color: var(--blue-dark);
}

.post-link,
.primary,
.searchbar button {
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), #1b8f65);
    box-shadow: 0 12px 28px rgba(36, 111, 184, 0.22);
    color: #fff !important;
    font-weight: 900;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.post-link:hover,
.primary:hover,
.searchbar button:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(36, 111, 184, 0.26);
}

.quick {
    padding-top: 30px;
}

.searchbar {
    padding: 12px;
    border: 1px solid rgba(215, 226, 235, 0.92);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

input,
select,
textarea,
button {
    min-height: 50px;
    border-color: #d5e0ea;
    border-radius: 12px;
    background: #fff;
    font-family: "Cairo", Tahoma, Arial, sans-serif;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(36, 111, 184, 0.12);
}

.category-strip {
    padding-top: 18px;
}

.category-strip a,
.car-chip {
    border: 1px solid rgba(211, 222, 234, 0.88);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    color: #53657f;
    box-shadow: 0 8px 18px rgba(21, 32, 51, 0.04);
    font-weight: 800;
}

.category-strip a.active,
.category-strip a:hover,
.car-chip.active,
.car-chip:hover {
    border-color: rgba(36, 111, 184, 0.34);
    background: linear-gradient(180deg, #ffffff, #edf6ff);
    color: var(--blue-dark);
}

.content-layout {
    gap: 26px;
}

.side-panel,
.page-panel,
.contact-box,
.form-section,
.description,
.admin-table-wrap,
.empty,
.notice {
    border: 1px solid rgba(214, 225, 235, 0.9);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.side-panel {
    padding: 18px;
}

.side-panel h2,
.feed-head h1,
.page-panel h1,
.detail-main h1 {
    color: var(--ink);
    font-weight: 900;
}

.feed-head {
    margin-bottom: 16px;
}

.feed-head span {
    padding: 6px 12px;
    border: 1px solid #dfe7ee;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: #66758a;
    font-weight: 800;
}

.listing {
    border: 1px solid rgba(215, 226, 235, 0.78);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 26px rgba(21, 32, 51, 0.05);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.listing:hover {
    border-color: rgba(36, 111, 184, 0.24);
    box-shadow: 0 18px 44px rgba(21, 32, 51, 0.09);
    transform: translateY(-2px);
}

.listing-image,
.detail-media {
    border-radius: 14px;
    background: linear-gradient(135deg, #eef5fb, #f7faf6);
}

.listing h2 {
    color: var(--green-dark);
    font-weight: 900;
}

.seller strong,
.price {
    color: var(--blue);
    font-weight: 900;
}

.footer {
    background:
        linear-gradient(135deg, rgba(36, 111, 184, 0.20), transparent 44%),
        #0f1d32;
}

.post-title span {
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ink), var(--blue-dark));
}

.post-title h1 {
    color: var(--ink);
    font-weight: 900;
}

.post-aside-card {
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(214, 154, 45, 0.18), transparent 48%),
        linear-gradient(135deg, #102039, #0e6044);
    box-shadow: 0 22px 54px rgba(15, 29, 50, 0.20);
}

.section-heading span {
    border-radius: 12px;
    background: linear-gradient(135deg, #eaf5ee, #eaf3ff);
    color: var(--blue-dark);
}

.upload-box {
    border-color: #b9c9d8;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f3f8fb);
}

.publish-bar {
    border-radius: 18px;
}

/* Premium marketplace pages: cars and devices */
.car-market {
    border: 1px solid rgba(215, 226, 235, 0.86);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.car-chip-row {
    border-top: 0;
    padding: 12px;
}

.cars-layout {
    grid-template-columns: 392px minmax(0, 1fr);
}

.cars-layout .side-panel {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.cars-layout .side-panel h2 {
    color: var(--blue-dark);
    font-size: 20px;
    font-weight: 900;
}

.brand-logo-grid {
    gap: 12px;
    padding: 6px 4px 20px;
}

.brand-logo-card {
    min-height: 108px;
    border-color: #d8e2ec;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 253, 0.98));
    box-shadow: 0 12px 28px rgba(21, 32, 51, 0.06);
}

.brand-logo-card:hover,
.brand-logo-card.active {
    border-color: rgba(36, 111, 184, 0.46);
    background: #fff;
    box-shadow: 0 18px 38px rgba(36, 111, 184, 0.18);
}

.brand-logo-card img {
    width: 90px;
    max-height: 62px;
}

.cars-layout .car-filter-form {
    border: 1px solid rgba(215, 226, 235, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.car-filter-form label,
.filter-title {
    color: var(--blue-dark);
    font-weight: 900;
}

.car-filter-form .primary {
    min-height: 52px;
}

.body-type-card,
.toggle-grid label {
    border-color: #c9dceb;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f5f9fd);
    box-shadow: 0 8px 18px rgba(21, 32, 51, 0.05);
}

.body-type-card:hover,
.body-type-card.active {
    background: linear-gradient(180deg, #ffffff, #edf6ff);
    border-color: var(--blue);
}

.car-listing {
    border: 1px solid rgba(217, 227, 237, 0.76);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 30px rgba(21, 32, 51, 0.055);
}

.car-listing h2 {
    color: #18a56d;
    font-weight: 900;
}

.car-listing .meta {
    color: #7f8c9e;
}

.listing-brand-badge {
    padding: 5px 10px;
    border: 1px solid #dce7f0;
    border-radius: 999px;
    background: #f7fafc;
}

@media (max-width: 920px) {
    .searchbar,
    .content-layout,
    .cars-layout,
    .detail-layout,
    .form-grid,
    .footer-grid,
    .spec-grid,
    .stat-grid,
    .publish-bar {
        grid-template-columns: 1fr;
    }

    .cars-layout .side-panel,
    .side-panel,
    .contact-box {
        position: static;
    }

    .brand-logo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-height: none;
    }
}

@media (max-width: 560px) {
    .shell,
    .narrow,
    .post-shell {
        width: min(100% - 20px, 1240px);
    }

    .nav {
        gap: 12px;
    }

    .brand {
        min-width: 0;
    }

    .searchbar,
    .form-section,
    .page-panel {
        padding: 14px;
        border-radius: 16px;
    }

    .brand-logo-grid,
    .body-type-grid,
    .toggle-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

/* Mobile-first polish override */
@media (max-width: 760px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        background:
            linear-gradient(180deg, #f7fafc 0%, #eef5f9 280px, #f7f8fb 100%);
    }

    .shell,
    .narrow,
    .post-shell {
        width: min(100% - 20px, 1240px);
    }

    .topbar {
        position: sticky;
    }

    .nav {
        min-height: auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px 0 12px;
    }

    .brand {
        width: 100%;
        min-width: 0;
        gap: 10px;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 22px;
    }

    .brand strong {
        font-size: 17px;
    }

    .brand small {
        max-width: 260px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11px;
    }

    .main-nav,
    .nav-actions,
    .category-strip,
    .car-chip-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .main-nav::-webkit-scrollbar,
    .nav-actions::-webkit-scrollbar,
    .category-strip::-webkit-scrollbar,
    .car-chip-row::-webkit-scrollbar {
        display: none;
    }

    .main-nav a,
    .nav-actions a,
    .category-strip a,
    .car-chip {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 8px 12px;
        white-space: nowrap;
        font-size: 13px;
    }

    .nav-actions .post-link {
        min-width: 118px;
    }

    .quick {
        padding: 14px 0 10px;
    }

    .searchbar {
        grid-template-columns: 1fr;
        gap: 9px;
        padding: 10px;
        border-radius: 16px;
    }

    input,
    select,
    textarea,
    button {
        min-height: 46px;
        border-radius: 11px;
        font-size: 14px;
    }

    .category-strip {
        padding: 12px 0 2px;
    }

    .car-market {
        margin-top: 10px;
        border-radius: 16px;
    }

    .car-chip-row {
        padding: 10px;
    }

    .content-layout,
    .cars-layout,
    .detail-layout,
    .post-layout,
    .form-grid,
    .footer-grid,
    .spec-grid,
    .stat-grid,
    .publish-bar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px;
    }

    .side-panel,
    .contact-box,
    .post-aside {
        position: static !important;
        top: auto;
    }

    .cars-layout .feed {
        order: 1;
    }

    .cars-layout .side-panel {
        order: 2;
        padding-top: 6px;
    }

    .feed-head {
        margin: 2px 0 10px;
    }

    .feed-head h1 {
        font-size: 20px;
    }

    .feed-head span {
        padding: 5px 10px;
        font-size: 12px;
    }

    .listing,
    .car-listing {
        grid-template-columns: 108px minmax(0, 1fr) !important;
        gap: 12px;
        min-height: 126px;
        padding: 12px;
        border-radius: 16px;
    }

    .listing-image,
    .car-listing .listing-image {
        width: 108px;
        aspect-ratio: 1;
        border-radius: 13px;
        font-size: 26px;
    }

    .listing-body,
    .car-listing .listing-body {
        min-width: 0;
        align-content: center;
        gap: 5px;
    }

    .listing h2,
    .car-listing h2 {
        margin: 0;
        font-size: 17px;
        line-height: 1.45;
    }

    .listing h2 a {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .meta,
    .car-listing .meta {
        gap: 7px;
        font-size: 12px;
        line-height: 1.5;
    }

    .listing p {
        display: none;
    }

    .seller {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .seller span {
        font-size: 12px;
    }

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

    .listing-brand-badge {
        max-width: 100%;
        padding: 4px 8px;
        font-size: 12px;
    }

    .listing-brand-badge img {
        width: 26px;
        height: 20px;
    }

    .cars-layout .side-panel h2 {
        padding-top: 4px;
        font-size: 18px;
    }

    .brand-logo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        max-height: none;
        overflow: visible;
        padding-bottom: 12px;
    }

    .brand-logo-card {
        min-height: 84px;
        border-radius: 14px;
    }

    .brand-logo-card img {
        width: 62px;
        max-height: 42px;
    }

    .cars-layout .car-filter-form,
    .form-section,
    .page-panel,
    .contact-box,
    .description {
        padding: 14px;
        border-radius: 16px;
    }

    .car-filter-form {
        gap: 10px;
    }

    .split-inputs,
    .toggle-grid,
    .body-type-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .body-type-card {
        min-height: 82px;
        padding: 8px;
    }

    .body-type-card strong {
        font-size: 13px;
    }

    .car-line-icon {
        width: 76px;
        height: 30px;
    }

    .post-title h1,
    .detail-main h1 {
        font-size: 26px;
    }

    .post-aside-card {
        grid-template-columns: 1fr;
    }

    .publish-bar {
        position: sticky;
        bottom: 10px;
        z-index: 8;
    }
}

@media (max-width: 380px) {
    .listing,
    .car-listing {
        grid-template-columns: 96px minmax(0, 1fr) !important;
        gap: 10px;
        padding: 10px;
    }

    .listing-image,
    .car-listing .listing-image {
        width: 96px;
    }

    .brand-logo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.ajax-loading body {
    cursor: progress;
}

.ajax-loading main {
    opacity: 0.58;
    pointer-events: none;
    transition: opacity 0.16s ease;
}

.ajax-loading .topbar::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -1px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--blue), var(--green), transparent);
    background-size: 220% 100%;
    animation: ajaxBar 0.9s linear infinite;
}

@keyframes ajaxBar {
    from {
        background-position: 100% 0;
    }

    to {
        background-position: -100% 0;
    }
}
