﻿@font-face {
    font-family: "IRANSansX";
    src: url("/fonts/iran-sans-mobile/IRANSansMobile.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "IRANSansX";
    src: url("/fonts/iran-sans-mobile/IRANSansMobile.ttf") format("truetype");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "IRANSansX";
    src: url("/fonts/iran-sans-mobile/IRANSansMobile.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    --senfesh-primary: #1769e0;
    --senfesh-primary-hover: #1158bd;
    --senfesh-text: #20242b;
    --senfesh-muted: #69717d;
    --senfesh-border: #e5e8ec;
    --senfesh-background: #f7f8fa;
    --senfesh-surface: #ffffff;
    --senfesh-danger: #c62828;
    --senfesh-danger-light: #fff1f1;
    --senfesh-success: #16864b;
    --senfesh-warning: #a66a00;
    --senfesh-radius: 14px;
}

html {
    min-height: 100%;
    direction: rtl;
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    min-height: 100vh;
    margin: 0;
    direction: rtl;
    text-align: right;
    font-family: "IRANSansX", Tahoma, Arial, sans-serif;
    font-weight: 400;
    line-height: 1.8;
    color: var(--senfesh-text);
    background-color: var(--senfesh-background);
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

button,
input,
select,
textarea,
option {
    font-family: "IRANSansX", Tahoma, Arial, sans-serif;
}

a {
    color: var(--senfesh-primary);
    text-decoration: none;
}

    a:hover {
        color: var(--senfesh-primary-hover);
    }

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    min-height: 72px;
}

.navbar-brand {
    color: var(--senfesh-text);
    font-size: 1.45rem;
    font-weight: 700;
}

    .navbar-brand:hover {
        color: var(--senfesh-primary);
    }

.nav-link {
    color: var(--senfesh-muted);
    font-weight: 500;
}

    .nav-link:hover,
    .nav-link:focus {
        color: var(--senfesh-primary);
    }

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .site-header-actions form {
        margin: 0;
    }

.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.65rem 1.15rem;
}

.btn-primary {
    background-color: var(--senfesh-primary);
    border-color: var(--senfesh-primary);
}

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: var(--senfesh-primary-hover);
        border-color: var(--senfesh-primary-hover);
    }

.btn-outline-secondary {
    color: var(--senfesh-text);
    border-color: var(--senfesh-border);
    background-color: var(--senfesh-surface);
}

    .btn-outline-secondary:hover {
        color: var(--senfesh-text);
        border-color: #cdd2d8;
        background-color: #f1f3f5;
    }

.btn-outline-danger {
    color: var(--senfesh-danger);
    border-color: #efbaba;
    background-color: var(--senfesh-surface);
}

    .btn-outline-danger:hover {
        color: #ffffff;
        border-color: var(--senfesh-danger);
        background-color: var(--senfesh-danger);
    }

.form-control,
.form-select {
    min-height: 46px;
    border-color: var(--senfesh-border);
    border-radius: 10px;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--senfesh-primary);
        box-shadow: 0 0 0 0.2rem rgb(23 105 224 / 15%);
    }

.validation-summary-errors,
.field-validation-error {
    color: var(--senfesh-danger);
}

.input-validation-error {
    border-color: var(--senfesh-danger);
}

.account-authentication-section {
    padding: 64px 0;
}

.account-authentication-card {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 32px;
    border: 1px solid var(--senfesh-border);
    border-radius: 22px;
    background-color: var(--senfesh-surface);
    box-shadow: 0 18px 45px rgb(32 36 43 / 6%);
}

.account-authentication-header {
    margin-bottom: 28px;
}

    .account-authentication-header h1 {
        margin: 8px 0;
        font-size: 1.75rem;
        font-weight: 700;
    }

    .account-authentication-header p {
        margin: 0;
        color: var(--senfesh-muted);
    }

.account-authentication-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--senfesh-primary);
    background-color: rgb(23 105 224 / 9%);
    font-size: 0.85rem;
    font-weight: 700;
}

.development-otp-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px dashed #e5b45c;
    border-radius: 12px;
    color: var(--senfesh-warning);
    background-color: #fff9eb;
}

    .development-otp-box strong {
        font-size: 1.3rem;
        letter-spacing: 0.15rem;
    }

.verification-code-input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.45rem;
}

.account-secondary-link {
    display: block;
    text-align: center;
    color: var(--senfesh-muted);
    font-weight: 500;
}

.account-dashboard-section {
    padding: 48px 0 72px;
}

.account-dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

    .account-dashboard-heading h1 {
        margin: 4px 0;
        font-size: 2rem;
        font-weight: 700;
    }

    .account-dashboard-heading p {
        margin: 0;
        color: var(--senfesh-muted);
    }

.account-dashboard-eyebrow {
    color: var(--senfesh-primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.account-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.account-dashboard-sidebar {
    padding: 20px;
    border: 1px solid var(--senfesh-border);
    border-radius: 18px;
    background-color: var(--senfesh-surface);
}

.account-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--senfesh-border);
}

    .account-profile-card strong,
    .account-profile-card span {
        display: block;
    }

    .account-profile-card span {
        color: var(--senfesh-muted);
        font-size: 0.9rem;
    }

.account-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #ffffff;
    background-color: var(--senfesh-primary);
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.account-dashboard-navigation {
    display: grid;
    gap: 6px;
    padding: 18px 0;
}

    .account-dashboard-navigation a {
        padding: 10px 12px;
        border-radius: 10px;
        color: var(--senfesh-muted);
        font-weight: 500;
    }

        .account-dashboard-navigation a:hover,
        .account-dashboard-navigation a.active {
            color: var(--senfesh-primary);
            background-color: rgb(23 105 224 / 8%);
        }

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

.account-statistics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.account-statistics-card {
    padding: 20px;
    border: 1px solid var(--senfesh-border);
    border-radius: 16px;
    background-color: var(--senfesh-surface);
}

    .account-statistics-card span,
    .account-statistics-card strong {
        display: block;
    }

    .account-statistics-card span {
        color: var(--senfesh-muted);
        font-size: 0.9rem;
    }

    .account-statistics-card strong {
        margin-top: 8px;
        color: var(--senfesh-primary);
        font-size: 1.8rem;
    }

.account-dashboard-panel {
    padding: 24px;
    border: 1px solid var(--senfesh-border);
    border-radius: 18px;
    background-color: var(--senfesh-surface);
}

.account-dashboard-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

    .account-dashboard-panel-heading h2 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 700;
    }

    .account-dashboard-panel-heading p {
        margin: 3px 0 0;
        color: var(--senfesh-muted);
    }

.account-information-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid var(--senfesh-border);
}

    .account-information-list div {
        padding: 16px 0;
        border-bottom: 1px solid var(--senfesh-border);
    }

        .account-information-list div:nth-child(odd) {
            padding-left: 20px;
        }

        .account-information-list div:nth-child(even) {
            padding-right: 20px;
        }

    .account-information-list dt {
        margin-bottom: 4px;
        color: var(--senfesh-muted);
        font-size: 0.9rem;
        font-weight: 500;
    }

    .account-information-list dd {
        margin: 0;
        font-weight: 600;
    }

.account-empty-state {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 0;
    text-align: center;
}

.account-empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    color: var(--senfesh-primary);
    background-color: rgb(23 105 224 / 9%);
    display: grid;
    place-items: center;
    font-size: 2rem;
}

.account-empty-state h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.account-empty-state p {
    color: var(--senfesh-muted);
}

.account-access-denied-section {
    padding: 80px 0;
}

.account-access-denied-card {
    max-width: 560px;
    margin: 0 auto;
    padding: 48px 32px;
    border: 1px solid var(--senfesh-border);
    border-radius: 22px;
    background-color: var(--senfesh-surface);
    text-align: center;
}

.account-access-denied-code {
    color: var(--senfesh-danger);
    font-size: 4rem;
    font-weight: 700;
}

.account-access-denied-card h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

.account-access-denied-card p {
    color: var(--senfesh-muted);
}

.site-footer {
    margin-top: 64px;
    padding: 28px 0;
    color: var(--senfesh-muted);
    background-color: var(--senfesh-surface);
}

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

    .footer-content strong {
        display: block;
        margin-bottom: 4px;
        color: var(--senfesh-text);
        font-size: 1.1rem;
    }

@media (max-width: 991.98px) {
    .navbar-collapse {
        padding-top: 16px;
    }

    .site-header-actions {
        flex-wrap: wrap;
        padding-bottom: 8px;
    }

    .account-dashboard-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 767.98px) {
    .navbar {
        min-height: 64px;
    }

    .account-authentication-section {
        padding: 32px 0;
    }

    .account-authentication-card {
        padding: 24px 20px;
        border-radius: 18px;
    }

    .account-dashboard-section {
        padding: 30px 0 48px;
    }

    .account-dashboard-heading {
        align-items: stretch;
        flex-direction: column;
    }

        .account-dashboard-heading .btn {
            width: 100%;
        }

    .account-statistics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .account-dashboard-panel {
        padding: 20px 16px;
    }

    .account-dashboard-panel-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .account-information-list {
        grid-template-columns: 1fr;
    }

        .account-information-list div:nth-child(odd),
        .account-information-list div:nth-child(even) {
            padding-right: 0;
            padding-left: 0;
        }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 420px) {
    .account-statistics-grid {
        grid-template-columns: 1fr;
    }

    .site-header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

        .site-header-actions form,
        .site-header-actions form button {
            width: 100%;
        }
}

/* Senfesh marketplace heavy UI - 1.0.0 */
:root {
    --tp-primary: #1246d8;
    --tp-primary-dark: #0b2d91;
    --tp-border: #e3e7ee;
    --tp-muted: #70798a;
    --tp-bg: #f7f8fa;
    --tp-card: #ffffff;
    --tp-danger: #e53935;
    --tp-radius: 18px;
}

body {
    background: var(--tp-bg);
}

.market-shell,
.ads-index-shell {
    max-width: 1800px;
    margin: 0 auto;
    padding: 18px 28px 42px;
}

.market-toolbar {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 18px;
}

.market-search {
    display: flex;
    flex: 1;
    min-height: 52px;
    background: #fff;
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    overflow: hidden;
}

.market-search input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 0 18px;
    background: transparent;
}

.market-search button {
    border: 0;
    padding: 0 28px;
    color: #fff;
    background: var(--tp-primary);
}

.market-stats {
    display: flex;
    gap: 18px;
    color: var(--tp-muted);
    white-space: nowrap;
}

.market-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.market-sidebar {
    position: sticky;
    top: 18px;
    padding: 18px;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    background: #fff;
}

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

.market-sidebar-head a {
    color: var(--tp-primary);
    font-size: .82rem;
}

.market-category-list {
    display: grid;
}

.market-category-list a {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 8px;
    color: #2a3040;
    border-bottom: 1px solid #f0f2f5;
}

.market-category-list a:hover {
    color: var(--tp-primary);
    background: #f6f8ff;
}

.market-category-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #aab3c4;
}

.market-post-ad {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    margin-top: 16px;
    border-radius: 12px;
    color: #fff !important;
    background: var(--tp-primary);
    font-weight: 700;
}

.market-section-heading,
.ads-index-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 16px;
}

.market-section-heading h1,
.ads-index-heading h1 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 800;
}

.market-section-heading p,
.ads-index-heading p {
    margin: 0;
    color: var(--tp-muted);
}

.market-section-heading > a {
    color: var(--tp-primary);
    font-weight: 700;
}

.market-ad-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.market-ad-card {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    min-height: 168px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--tp-border);
    border-radius: 16px;
    transition: transform .18s ease, box-shadow .18s ease;
}

.market-ad-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(22, 35, 66, .08);
}

.market-ad-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 168px;
    background: #eef1f5;
    color: #9aa3b3;
}

.market-ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.market-badge {
    position: absolute;
    top: 9px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: .72rem;
}

.market-badge-featured {
    right: 9px;
    background: var(--tp-danger);
}

.market-badge-urgent {
    left: 9px;
    background: #ff8a00;
}

.market-ad-body {
    display: flex;
    flex-direction: column;
    padding: 15px;
    min-width: 0;
}

.market-ad-body h2 {
    margin: 0 0 10px;
    font-size: 1rem;
    line-height: 1.75;
    font-weight: 800;
}

.market-ad-body h2 a {
    color: #151a25;
}

.market-ad-category {
    color: #5f697a;
    font-size: .85rem;
}

.market-ad-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
    color: #8a93a3;
    font-size: .78rem;
}

.market-ad-price {
    margin-top: 8px;
    color: #202737;
}

.market-empty {
    padding: 60px 20px;
    text-align: center;
    border: 1px dashed #cdd3dd;
    border-radius: 18px;
    background: #fff;
}

.ads-filter-bar {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr) auto auto;
    gap: 10px;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid var(--tp-border);
    border-radius: 16px;
    background: #fff;
}

.ads-filter-bar input,
.ads-filter-bar select {
    min-height: 46px;
    border: 1px solid var(--tp-border);
    border-radius: 10px;
    padding: 0 12px;
    background: #fff;
}

.ads-filter-bar button,
.ads-filter-bar > a,
.ads-create-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
}

.ads-filter-bar button,
.ads-create-button {
    color: #fff !important;
    background: var(--tp-primary);
}

.ads-filter-bar > a {
    color: #3c4555;
    background: #eef1f5;
}

.ad-details-page {
    padding: 24px 0 50px;
}

.ad-details-container {
    max-width: 1220px;
}

.ad-breadcrumb {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    color: #8a93a3;
    font-size: .84rem;
}

.ad-breadcrumb a {
    color: #687386;
}

.ad-details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
    gap: 22px;
    align-items: start;
}

.ad-details-media-column,
.ad-details-info-column {
    display: grid;
    gap: 16px;
}

.ad-gallery-card,
.ad-section-card,
.ad-main-card,
.ad-seller-card,
.ad-description-card {
    overflow: hidden;
    border: 1px solid var(--tp-border);
    border-radius: 18px;
    background: #fff;
}

.ad-gallery-card .carousel-inner {
    height: 520px;
    background: #eef1f5;
}

.ad-gallery-card .carousel-item,
.ad-gallery-card .carousel-item a {
    width: 100%;
    height: 100%;
}

.ad-gallery-card .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ad-gallery-thumbnails {
    display: flex;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
}

.ad-gallery-thumbnails button {
    width: 76px;
    height: 62px;
    flex: 0 0 auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--tp-border);
    border-radius: 10px;
    background: #fff;
}

.ad-gallery-thumbnails img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-gallery-empty {
    display: flex;
    min-height: 400px;
    align-items: center;
    justify-content: center;
    color: #8a93a3;
}

.ad-section-card {
    padding: 16px;
}

.ad-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ad-section-title h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.ad-video {
    width: 100%;
    max-height: 520px;
    border-radius: 14px;
    background: #111;
}

.ad-map {
    height: 310px;
    border-radius: 14px;
}

.ad-map-note {
    margin: 10px 0 0;
    color: #7c8595;
    font-size: .82rem;
}

.ad-main-card {
    padding: 24px;
}

.ad-top-badges {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.ad-top-badges span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef1f5;
    font-size: .78rem;
}

.ad-top-badges .ad-status-featured {
    color: #fff;
    background: var(--tp-primary);
}

.ad-top-badges .ad-status-urgent {
    color: #fff;
    background: var(--tp-danger);
}

.ad-main-card h1 {
    margin: 18px 0 8px;
    font-size: 1.55rem;
    line-height: 1.7;
    font-weight: 900;
}

.ad-location-line {
    color: #7b8494;
}

.ad-action-row {
    display: flex;
    gap: 8px;
    margin: 22px 0;
}

.ad-primary-action,
.ad-secondary-action,
.ad-icon-action {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 10px;
    font-weight: 700;
}

.ad-primary-action {
    flex: 1;
    color: #fff !important;
    background: var(--tp-primary);
}

.ad-secondary-action {
    flex: 1;
    color: var(--tp-primary);
    background: #edf2ff;
}

.ad-icon-action {
    border: 1px solid var(--tp-border);
    background: #fff;
}

.ad-spec-list {
    margin: 0;
}

.ad-spec-list > div {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 12px;
    padding: 13px 0;
    border-top: 1px solid #edf0f4;
}

.ad-spec-list dt {
    color: #737d8e;
    font-weight: 500;
}

.ad-spec-list dd {
    margin: 0;
    font-weight: 700;
}

.ad-seller-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
}

.ad-seller-avatar {
    display: flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: var(--tp-primary);
    font-size: 1.2rem;
    font-weight: 900;
}

.ad-seller-card strong,
.ad-seller-card span {
    display: block;
}

.ad-seller-card span {
    margin-top: 3px;
    color: #818a99;
    font-size: .83rem;
}

.ad-description-card {
    padding: 22px;
}

.ad-description-card h2 {
    font-size: 1.1rem;
    font-weight: 900;
}

.ad-description-card > div {
    white-space: pre-line;
    line-height: 2;
    color: #3f4755;
}

.ad-safety-note {
    padding: 14px 16px;
    border-radius: 12px;
    color: #276b3c;
    background: #eaf8ef;
    font-size: .86rem;
}

.form-page {
    padding: 36px 0 60px;
}

.form-page-container {
    max-width: 1100px;
}

.form-page-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.form-page-heading span {
    color: var(--tp-primary);
    font-weight: 700;
}

.form-page-heading h1 {
    margin: 5px 0;
    font-size: 1.7rem;
    font-weight: 900;
}

.form-page-heading p {
    margin: 0;
    color: #7a8494;
}

.form-card {
    padding: 26px;
    border: 1px solid var(--tp-border);
    border-radius: 18px;
    background: #fff;
}

.form-card .form-control,
.form-card .form-select {
    min-height: 48px;
    border-radius: 10px;
}

.form-card textarea.form-control {
    min-height: 180px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #edf0f4;
}

@media (max-width: 1250px) {
    .market-ad-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .market-layout,
    .ad-details-layout {
        grid-template-columns: 1fr;
    }

    .market-sidebar {
        position: static;
    }

    .market-stats {
        display: none;
    }

    .ads-filter-bar {
        grid-template-columns: 1fr 1fr;
    }

    .ad-details-info-column {
        order: -1;
    }
}

@media (max-width: 680px) {
    .market-shell,
    .ads-index-shell {
        padding: 12px;
    }

    .market-ad-grid {
        grid-template-columns: 1fr;
    }

    .market-ad-card {
        grid-template-columns: 120px minmax(0, 1fr);
        min-height: 145px;
    }

    .market-ad-image {
        min-height: 145px;
    }

    .ads-filter-bar {
        grid-template-columns: 1fr;
    }

    .ad-gallery-card .carousel-inner {
        height: 340px;
    }

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

    .ad-action-row {
        flex-wrap: wrap;
    }

    .ad-icon-action {
        width: 100%;
    }

    .form-page-heading {
        flex-direction: column;
    }
}

/* Senfesh v1.1.0 */
.site-notice {
    padding: 7px 16px;
    text-align: center;
    background: #132b62;
    color: #fff;
    font-size: .82rem;
}

.smart-back-button {
    min-height: 40px;
    margin-bottom: 16px;
    padding: 0 18px;
    border: 1px solid #dfe4ec;
    border-radius: 10px;
    background: #fff;
    color: #2b3444;
}

.market-sidebar {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.market-ad-card {
    grid-template-columns: 126px minmax(0, 1fr);
    min-height: 136px;
}

.market-ad-image {
    min-height: 126px;
    aspect-ratio: 1 / 1;
}

.market-ad-body {
    padding: 12px;
}

.market-ad-body h2 {
    margin-bottom: 5px;
    line-height: 1.55;
}

.media-mini-badges {
    position: absolute;
    right: 7px;
    bottom: 7px;
    display: flex;
    gap: 4px;
}

.media-mini-badges span {
    padding: 3px 6px;
    border-radius: 7px;
    background: rgba(0, 0, 0, .68);
    color: #fff;
    font-size: .67rem;
}

.conversation-page {
    padding: 28px 0 55px;
}

.conversation-container {
    max-width: 900px;
}

.page-heading-simple {
    margin-bottom: 18px;
}

.page-heading-simple h1 {
    margin: 0 0 5px;
    font-size: 1.55rem;
    font-weight: 900;
}

.page-heading-simple p {
    margin: 0;
    color: #778195;
}

.empty-panel {
    padding: 45px 20px;
    border: 1px dashed #ccd3de;
    border-radius: 16px;
    background: #fff;
    text-align: center;
    color: #778195;
}

.conversation-list {
    display: grid;
    gap: 10px;
}

.conversation-list-item {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border: 1px solid #e1e6ee;
    border-radius: 15px;
    background: #fff;
    color: #18202f;
}

.conversation-list-item.has-unread {
    border-color: #8daaf9;
    background: #f5f8ff;
}

.conversation-ad-image {
    width: 82px;
    height: 82px;
    overflow: hidden;
    border-radius: 12px;
    background: #eef1f5;
}

.conversation-ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conversation-ad-image span {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    color: #8d96a5;
}

.conversation-list-content {
    min-width: 0;
}

.conversation-list-top,
.conversation-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.conversation-list-top time {
    color: #8992a2;
    font-size: .75rem;
    white-space: nowrap;
}

.conversation-other-party {
    margin-top: 4px;
    color: #687386;
    font-size: .83rem;
}

.conversation-preview {
    margin-top: 10px;
    color: #737d8e;
}

.conversation-preview > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-state b {
    display: flex;
    min-width: 25px;
    height: 25px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #184bd8;
    color: #fff;
    font-size: .74rem;
}

.conversation-state span {
    color: #1f78dd;
}

.conversation-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #e1e6ee;
    border-radius: 15px;
    background: #fff;
}

.conversation-header-ad {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #172031;
}

.conversation-header-ad strong,
.conversation-header-ad span {
    display: block;
}

.conversation-header-ad span {
    color: #1b55dc;
    font-size: .78rem;
}

.conversation-person {
    color: #687386;
}

.chat-thread {
    display: flex;
    min-height: 420px;
    flex-direction: column;
    gap: 9px;
    padding: 18px;
    border: 1px solid #e1e6ee;
    border-radius: 16px;
    background: #f5f6f8;
}

.chat-bubble {
    max-width: 76%;
    padding: 10px 12px 7px;
    border-radius: 15px;
    line-height: 1.8;
}

.chat-bubble.mine {
    align-self: flex-start;
    background: #dce8ff;
}

.chat-bubble.theirs {
    align-self: flex-end;
    background: #fff;
}

.chat-bubble footer {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    margin-top: 4px;
    color: #7b8494;
    font-size: .67rem;
}

.chat-compose {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 95px;
    gap: 8px;
    margin-top: 10px;
}

.chat-compose textarea {
    min-height: 58px;
    max-height: 160px;
    padding: 11px;
    border: 1px solid #dce2eb;
    border-radius: 12px;
    resize: vertical;
}

.chat-compose button {
    border: 0;
    border-radius: 12px;
    background: #184bd8;
    color: #fff;
    font-weight: 800;
}

.ad-inline-form {
    display: flex;
    flex: 1;
    margin: 0;
}

.ad-inline-form > button {
    width: 100%;
    border: 0;
}

.favorite-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.favorite-card {
    padding: 10px;
    border: 1px solid #e1e6ee;
    border-radius: 15px;
    background: #fff;
}

.favorite-card > a {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
    color: #172031;
}

.favorite-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 11px;
    background: #eef1f5;
}

.favorite-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorite-image span {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #8a93a3;
}

.wallet-balance-card {
    padding: 25px;
    border-radius: 18px;
    background: linear-gradient(135deg, #153fbc, #0d287c);
    color: #fff;
}

.wallet-balance-card span,
.wallet-balance-card strong,
.wallet-balance-card p {
    display: block;
}

.wallet-balance-card strong {
    margin: 9px 0;
    font-size: 1.7rem;
}

.wallet-balance-card p {
    margin: 0;
    opacity: .82;
}

.wallet-transactions > div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 0;
    border-bottom: 1px solid #edf0f4;
}

.wallet-transactions strong,
.wallet-transactions span,
.wallet-transactions time {
    display: block;
}

.wallet-transactions span,
.wallet-transactions time {
    color: #798294;
    font-size: .78rem;
}

.edit-media-section {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #edf0f4;
}

.edit-media-section h2 {
    font-size: 1.15rem;
    font-weight: 900;
}

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

.edit-media-card {
    overflow: hidden;
    border: 2px solid #e1e6ee;
    border-radius: 13px;
    background: #fff;
}

.edit-media-card.primary {
    border-color: #184bd8;
}

.edit-media-card img,
.edit-media-card video {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #eef1f5;
}

.edit-media-card > div {
    display: grid;
    gap: 7px;
    padding: 8px;
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 14px;
}

@media (max-width: 991px) {
    .favorite-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .edit-media-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .conversation-list-item {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .conversation-ad-image {
        width: 68px;
        height: 68px;
    }

    .conversation-header-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .chat-bubble {
        max-width: 88%;
    }

    .chat-compose {
        grid-template-columns: 1fr;
    }

    .chat-compose button {
        min-height: 46px;
    }

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

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

    .footer-contact {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Senfesh v1.2.0 - Mobile Location */
.mobile-bottom-navigation {
    display: none;
}

.mobile-market-header {
    max-width: 1800px;
    margin: 0 auto;
    padding: 14px 24px 0;
}

.mobile-search-form {
    display: flex;
    min-height: 50px;
    overflow: hidden;
    border: 1px solid #d8dde6;
    border-radius: 13px;
    background: #fff;
}

.mobile-search-form input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0 16px;
    outline: 0;
}

.mobile-search-form button {
    border: 0;
    padding: 0 20px;
    color: #fff;
    background: #174bd7;
}

.mobile-location-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    color: #687386;
    font-size: .85rem;
}

.mobile-location-row strong {
    color: #172031;
}

.mobile-location-row b {
    margin-right: auto;
    color: #174bd7;
}

.ads-desktop-shell {
    display: grid;
    grid-template-columns: 255px minmax(0, 1fr);
    gap: 18px;
    max-width: 1800px;
    margin: 0 auto;
    padding: 18px 24px 50px;
}

.divar-mobile-card {
    border-bottom: 1px solid #e6e9ef;
    background: #fff;
}

.divar-mobile-card-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 14px;
    min-height: 170px;
    padding: 12px 0;
    color: #161c28;
}

.divar-mobile-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.divar-mobile-content h2 {
    margin: 0;
    overflow: hidden;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.65;
    text-overflow: ellipsis;
}

.divar-mobile-spacer {
    flex: 1;
}

.divar-mobile-price,
.divar-mobile-meta {
    color: #70798a;
    font-size: .85rem;
}

.divar-mobile-meta {
    margin-top: 5px;
}

.divar-mobile-image {
    position: relative;
    width: 150px;
    height: 150px;
    overflow: hidden;
    border-radius: 12px;
    background: #eef1f5;
}

.divar-mobile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.divar-mobile-image > span {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #8a93a3;
    font-size: .75rem;
}

.divar-media-count {
    position: absolute;
    right: 7px;
    top: 7px;
    display: flex;
    gap: 4px;
}

.divar-media-count span {
    padding: 3px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: .68rem;
}

.location-picker-page {
    padding: 30px 0 70px;
}

.location-picker-container {
    max-width: 620px;
}

.location-picker-card {
    padding: 25px;
    border: 1px solid #e1e6ee;
    border-radius: 18px;
    background: #fff;
}

.location-picker-card h1 {
    font-size: 1.45rem;
    font-weight: 900;
}

.location-picker-card p {
    color: #737d8e;
}

.mobile-auth-input {
    min-height: 54px;
    font-size: 1rem;
}

.mobile-auth-submit {
    min-height: 52px;
    font-weight: 800;
}

@media (max-width: 991px) {
    body {
        padding-bottom: 72px;
        background: #fff;
    }

    .site-header .navbar {
        display: none;
    }

    .site-footer {
        display: none;
    }

    .mobile-bottom-navigation {
        position: fixed;
        z-index: 1050;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        height: 70px;
        border-top: 1px solid #dfe3ea;
        background: rgba(255, 255, 255, .98);
        backdrop-filter: blur(12px);
    }

    .mobile-bottom-navigation a {
        display: flex;
        min-width: 0;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 2px;
        color: #697284;
        font-size: 1.25rem;
    }

    .mobile-bottom-navigation small {
        font-size: .68rem;
        white-space: nowrap;
    }

    .mobile-bottom-navigation .mobile-create-ad span {
        display: flex;
        width: 38px;
        height: 38px;
        align-items: center;
        justify-content: center;
        margin-top: -17px;
        border: 3px solid #fff;
        border-radius: 50%;
        background: #174bd7;
        color: #fff;
        font-size: 1.65rem;
    }

    .mobile-market-header {
        position: sticky;
        z-index: 100;
        top: 0;
        padding: 10px 12px;
        border-bottom: 1px solid #eceff3;
        background: rgba(255, 255, 255, .98);
    }

    .mobile-search-form {
        min-height: 52px;
    }

    .mobile-search-form button {
        width: 72px;
        padding: 0;
    }

    .ads-desktop-shell {
        display: block;
        padding: 0 12px 20px;
    }

    .ads-desktop-sidebar {
        display: none !important;
    }

    .mobile-ad-list {
        display: block;
    }

    .divar-mobile-card-link {
        grid-template-columns: minmax(0, 1fr) 118px;
        min-height: 142px;
    }

    .divar-mobile-image {
        width: 118px;
        height: 118px;
    }
}

@media (min-width: 992px) {
    .mobile-market-header {
        display: none;
    }

    .mobile-ad-list {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .divar-mobile-card {
        overflow: hidden;
        border: 1px solid #e1e6ee;
        border-radius: 15px;
    }

    .divar-mobile-card-link {
        grid-template-columns: minmax(0, 1fr) 130px;
        padding: 10px;
    }

    .divar-mobile-image {
        width: 130px;
        height: 130px;
    }
}

/* ==========================================================================
   Senfesh 1.0.3 - Unified public shell visual repair
   Scope: configurable header/footer only
   ========================================================================== */

.unified-site-shell {
    overflow-x: hidden;
}

.unified-site-shell img {
    max-width: 100%;
}

.site-main-content {
    width: 100%;
    min-width: 0;
}

/* Shared configurable shell elements */

.navigation-icon-image {
    display: block;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    object-fit: contain;
}

.navigation-icon-text {
    display: inline-flex;
    min-width: 18px;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.site-theme-toggle {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--senfesh-border);
    border-radius: 10px;
    color: inherit;
    background: transparent;
    font: inherit;
    white-space: nowrap;
    cursor: pointer;
}

.site-theme-toggle:hover {
    background: rgb(0 0 0 / 4%);
}

.site-notice {
    padding: 7px 16px;
    color: var(--desktop-header-text, var(--senfesh-text));
    background: var(--desktop-header-bg, #fff);
    text-align: center;
    font-size: .82rem;
}

/* Desktop header */

.desktop-configurable-header {
    position: relative;
    z-index: 1000;
    width: 100%;
    color: var(--desktop-header-text, var(--senfesh-text));
    background: var(--desktop-header-bg, #fff);
    border-bottom: 1px solid var(--senfesh-border);
    box-shadow: 0 2px 12px rgb(32 36 43 / 4%);
}

.desktop-configurable-header.is-sticky {
    position: sticky;
    top: 0;
}

.desktop-header-inner {
    display: flex;
    min-height: 72px;
    align-items: center;
    gap: 16px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.desktop-header-inner.layout-centered {
    justify-content: center;
}

.desktop-header-inner.layout-spread,
.desktop-header-inner.layout-default {
    justify-content: space-between;
}

.desktop-site-logo {
    display: inline-flex;
    max-width: 180px;
    min-width: 0;
    flex: 0 0 auto;
    align-items: center;
    color: inherit;
}

.desktop-site-logo:hover {
    color: inherit;
}

.desktop-site-logo img {
    display: block;
    width: auto;
    max-width: 180px;
    height: auto;
    max-height: 52px;
    object-fit: contain;
}

.desktop-site-logo strong {
    display: block;
    overflow: hidden;
    color: inherit;
    font-size: 1.25rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktop-configurable-navigation {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.desktop-nav-item {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 9px;
    border-radius: 9px;
    color: var(--desktop-header-text, var(--senfesh-text));
    font-size: .88rem;
    font-weight: 500;
    white-space: nowrap;
}

.desktop-nav-item:hover,
.desktop-nav-item:focus {
    color: var(--desktop-header-button, var(--senfesh-primary));
    background: rgb(0 0 0 / 4%);
}

.configurable-header-search {
    display: flex;
    min-width: 220px;
    max-width: min(420px, 36vw);
    flex: 0 1 auto;
    align-items: stretch;
    margin: 0;
}

.configurable-header-search input {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--senfesh-border);
    border-left: 0;
    border-radius: 0 10px 10px 0;
    outline: none;
    color: var(--senfesh-text);
    background: var(--senfesh-surface);
}

.configurable-header-search input:focus {
    border-color: var(--desktop-header-button, var(--senfesh-primary));
    box-shadow: inset 0 0 0 1px var(--desktop-header-button, var(--senfesh-primary));
}

.configurable-header-search button {
    min-width: 70px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--desktop-header-button, var(--senfesh-primary));
    border-radius: 10px 0 0 10px;
    color: #fff;
    background: var(--desktop-header-button, var(--senfesh-primary));
    font: inherit;
    font-size: .86rem;
    font-weight: 700;
    cursor: pointer;
}

/* Mobile header */

.mobile-configurable-header {
    position: relative;
    z-index: 1040;
    width: 100%;
    color: var(--mobile-header-text, var(--senfesh-text));
    background: var(--mobile-header-bg, #fff);
    border-bottom: 1px solid var(--senfesh-border);
}

.mobile-configurable-header.is-sticky {
    position: sticky;
    top: 0;
}

.mobile-header-notice {
    padding: 6px 12px;
    border-bottom: 1px solid rgb(0 0 0 / 6%);
    text-align: center;
    font-size: .76rem;
}

.mobile-header-inner {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
}

.mobile-header-inner.layout-stacked {
    align-items: stretch;
    flex-direction: column;
}

.mobile-site-logo {
    display: inline-flex;
    max-width: 130px;
    min-width: 0;
    flex: 0 0 auto;
    align-items: center;
    color: inherit;
}

.mobile-site-logo img {
    display: block;
    width: auto;
    max-width: 130px;
    height: auto;
    max-height: 42px;
    object-fit: contain;
}

.mobile-site-logo strong {
    overflow: hidden;
    color: inherit;
    font-size: 1.08rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-configurable-search {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: stretch;
    margin: 0;
}

.mobile-configurable-search input {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 8px 11px;
    border: 1px solid var(--senfesh-border);
    border-left: 0;
    border-radius: 0 10px 10px 0;
    outline: none;
    color: var(--senfesh-text);
    background: var(--senfesh-surface);
}

.mobile-configurable-search button {
    min-width: 62px;
    height: 42px;
    padding: 0 9px;
    border: 1px solid var(--mobile-header-button, var(--senfesh-primary));
    border-radius: 10px 0 0 10px;
    color: #fff;
    background: var(--mobile-header-button, var(--senfesh-primary));
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
}

.mobile-configurable-location {
    display: inline-flex;
    min-height: 38px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    border-radius: 9px;
    color: var(--mobile-header-text, var(--senfesh-text));
    font-size: .78rem;
    white-space: nowrap;
}

.mobile-configurable-location:hover {
    color: var(--mobile-header-button, var(--senfesh-primary));
    background: rgb(0 0 0 / 4%);
}

/* Configurable bottom navigation */

.mobile-bottom-navigation.configurable {
    overflow: hidden;
}

.mobile-bottom-navigation.configurable a {
    min-width: 0;
    overflow: hidden;
    padding: 5px 2px;
    text-align: center;
}

.mobile-bottom-navigation.configurable .navigation-icon-image {
    width: 22px;
    height: 22px;
}

.mobile-bottom-navigation.configurable small {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Desktop footer */

.desktop-configurable-footer {
    width: 100%;
    margin-top: auto;
    color: var(--desktop-footer-text, var(--senfesh-text));
    background: var(--desktop-footer-bg, #fff);
    border-top: 1px solid var(--senfesh-border);
}

.configurable-footer-grid {
    display: grid;
    grid-template-columns: repeat(var(--footer-columns, 3), minmax(0, 1fr));
    gap: 28px;
    padding-top: 32px;
    padding-bottom: 26px;
}

.configurable-footer-brand,
.configurable-footer-links,
.configurable-footer-contact {
    min-width: 0;
}

.configurable-footer-brand img {
    display: block;
    width: auto;
    max-width: 180px;
    height: auto;
    max-height: 64px;
    margin-bottom: 12px;
    object-fit: contain;
}

.configurable-footer-brand p {
    max-width: 520px;
    margin: 0;
    color: inherit;
    opacity: .78;
    line-height: 1.9;
}

.configurable-footer-links,
.configurable-footer-contact {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
}

.configurable-footer-links a,
.configurable-footer-contact a,
.configurable-footer-contact span {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 6px;
    color: inherit;
    overflow-wrap: anywhere;
}

.configurable-footer-copyright {
    padding: 12px 16px;
    border-top: 1px solid rgb(0 0 0 / 8%);
    text-align: center;
    font-size: .82rem;
    opacity: .82;
}

/* Mobile footer */

.mobile-configurable-footer {
    width: 100%;
    color: var(--mobile-footer-text, var(--senfesh-text));
    background: var(--mobile-footer-bg, #fff);
    border-top: 1px solid var(--senfesh-border);
}

.mobile-configurable-footer .container {
    padding-top: 24px;
    padding-bottom: 24px;
}

.mobile-configurable-footer img {
    display: block;
    width: auto;
    max-width: 140px;
    height: auto;
    max-height: 54px;
    margin-bottom: 12px;
    object-fit: contain;
}

.mobile-configurable-footer p {
    margin-bottom: 14px;
    color: inherit;
    opacity: .8;
}

.mobile-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.mobile-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
}

.mobile-footer-copyright {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgb(0 0 0 / 8%);
    font-size: .78rem;
    opacity: .8;
}

/* Theme compatibility for configurable shell */

html[data-theme="dark"] .desktop-configurable-header,
html[data-theme="dark"] .mobile-configurable-header,
html[data-theme="dark"] .desktop-configurable-footer,
html[data-theme="dark"] .mobile-configurable-footer {
    border-color: rgb(255 255 255 / 10%);
}

html[data-theme="dark"] .configurable-header-search input,
html[data-theme="dark"] .mobile-configurable-search input {
    color: #f3f5f8;
    background: #171a20;
    border-color: rgb(255 255 255 / 14%);
}

html[data-theme="dark"] .site-theme-toggle,
html[data-theme="dark"] .mobile-configurable-location {
    border-color: rgb(255 255 255 / 14%);
}

/* Responsive visibility and sizing */

@media (max-width: 1199px) and (min-width: 992px) {
    .desktop-header-inner {
        gap: 10px;
    }

    .desktop-nav-item {
        padding-right: 6px;
        padding-left: 6px;
        font-size: .81rem;
    }

    .configurable-header-search {
        min-width: 190px;
        max-width: 280px;
    }
}

@media (min-width: 992px) {
    .mobile-configurable-header,
    .mobile-configurable-footer {
        display: none !important;
    }

    .desktop-configurable-header,
    .desktop-configurable-footer {
        display: block;
    }
}

@media (max-width: 991px) {
    .desktop-configurable-header,
    .desktop-configurable-footer,
    .desktop-only-notice {
        display: none !important;
    }

    .mobile-configurable-header,
    .mobile-configurable-footer {
        display: block;
    }

    .mobile-header-inner.layout-stacked .mobile-configurable-search {
        width: 100% !important;
    }

    .site-main-content {
        min-height: calc(100vh - 128px);
    }
}

@media (max-width: 575px) {
    .mobile-header-inner {
        flex-wrap: wrap;
    }

    .mobile-configurable-search {
        order: 3;
        width: 100% !important;
        flex-basis: 100%;
    }

    .mobile-configurable-location {
        margin-right: auto;
    }

    .configurable-footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Senfesh 1.0.4 - Missing Advertisement Wizard and Appearance Studio styles
   Base: exact current site.css received from user
   ========================================================================== */

/* Senfesh v1.3.0 - Smart Advertisement Wizard */
.ad-wizard-page {
    padding: 28px 0 70px;
}

.ad-wizard-container {
    max-width: 1040px;
}

.ad-wizard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.ad-wizard-heading span {
    color: #174bd7;
    font-weight: 800;
}

.ad-wizard-heading h1 {
    margin: 5px 0 0;
    font-size: 1.65rem;
    font-weight: 900;
}

.ad-wizard-tariff {
    min-width: 150px;
    padding: 13px 18px;
    border: 1px solid #dfe5ef;
    border-radius: 14px;
    background: #fff;
    text-align: center;
}

.ad-wizard-tariff span,
.ad-wizard-tariff strong {
    display: block;
}

.ad-wizard-tariff strong {
    margin-top: 3px;
    color: #218344;
    font-size: 1.25rem;
}

.ad-wizard-progress {
    display: grid;
    grid-template-columns: 42px 1fr 42px 1fr 42px 1fr 42px;
    align-items: center;
    margin-bottom: 18px;
}

.ad-wizard-progress button {
    width: 42px;
    height: 42px;
    border: 2px solid #dce2ec;
    border-radius: 50%;
    background: #fff;
    color: #778195;
    font-weight: 900;
}

.ad-wizard-progress button.active {
    border-color: #174bd7;
    background: #174bd7;
    color: #fff;
}

.ad-wizard-progress span {
    height: 2px;
    background: #dce2ec;
}

.ad-wizard-form {
    overflow: hidden;
    border: 1px solid #e0e5ed;
    border-radius: 20px;
    background: #fff;
}

.ad-wizard-step {
    display: none;
    padding: 28px;
}

.ad-wizard-step.active {
    display: block;
}

.ad-wizard-step-title {
    margin-bottom: 24px;
}

.ad-wizard-step-title span {
    color: #174bd7;
    font-size: .82rem;
    font-weight: 800;
}

.ad-wizard-step-title h2 {
    margin: 4px 0 0;
    font-size: 1.35rem;
    font-weight: 900;
}

.ad-wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 28px;
    border-top: 1px solid #edf0f4;
    background: #fafbfc;
}

.ad-wizard-actions .btn {
    min-width: 130px;
    min-height: 48px;
}

.wizard-media-preview {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
    margin-top: 12px;
}

.wizard-preview-item {
    position: relative;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 13px;
    background: #eef1f5;
}

.wizard-preview-item.primary {
    border-color: #174bd7;
}

.wizard-preview-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.wizard-preview-item span {
    position: absolute;
    right: 6px;
    bottom: 6px;
    left: 6px;
    padding: 4px;
    border-radius: 7px;
    background: rgba(0, 0, 0, .67);
    color: #fff;
    font-size: .67rem;
}

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

.wizard-category-card {
    position: relative;
    cursor: pointer;
}

.wizard-category-card input {
    position: absolute;
    opacity: 0;
}

.wizard-category-card span {
    display: flex;
    min-height: 72px;
    align-items: center;
    padding: 15px;
    border: 2px solid #e3e7ee;
    border-radius: 14px;
    background: #fff;
    font-weight: 800;
}

.wizard-category-card b {
    position: absolute;
    left: 13px;
    bottom: 9px;
    color: #174bd7;
    font-size: .72rem;
}

.wizard-category-card input:checked + span {
    border-color: #174bd7;
    background: #f2f6ff;
}

.wizard-location-panel {
    padding: 16px;
    border: 1px solid #e1e6ee;
    border-radius: 16px;
    background: #fafbfc;
}

.wizard-map-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    margin-bottom: 10px;
}

.wizard-map {
    height: 390px;
    border-radius: 14px;
}

.wizard-location-message {
    min-height: 24px;
    margin-top: 8px;
    color: #6e7889;
    font-size: .82rem;
}

.wizard-location-visibility {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.wizard-location-visibility strong {
    width: 100%;
}

.wizard-location-visibility label,
.wizard-contact-options label,
.wizard-checkbox-grid label,
.wizard-video-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 13px;
    border: 1px solid #dfe4ec;
    border-radius: 11px;
    background: #fff;
}

.wizard-section-divider {
    height: 1px;
    margin: 26px 0;
    background: #edf0f4;
}

.wizard-video-primary {
    margin-top: 9px;
}

.wizard-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 18px;
}

.wizard-custom-attributes {
    margin-top: 24px;
    padding: 17px;
    border: 1px solid #e1e6ee;
    border-radius: 15px;
    background: #fafbfc;
}

.wizard-custom-attributes h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
}

.wizard-custom-attributes p {
    margin: 3px 0 0;
    color: #778195;
    font-size: .8rem;
}

.wizard-attribute-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    margin-top: 9px;
}

.wizard-free-tariff {
    padding: 20px;
    border: 1px solid #cfe9d8;
    border-radius: 15px;
    background: #f0fbf4;
}

.wizard-free-tariff span,
.wizard-free-tariff strong,
.wizard-free-tariff p {
    display: block;
}

.wizard-free-tariff strong {
    margin: 5px 0;
    color: #218344;
    font-size: 1.45rem;
}

.wizard-free-tariff p {
    margin: 0;
    color: #557060;
}

.wizard-contact-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.wizard-final-note {
    margin-top: 18px;
    padding: 13px;
    border-radius: 11px;
    color: #575f6d;
    background: #f2f4f7;
}

.advertisement-created-page {
    padding: 70px 0;
}

.advertisement-created-container {
    max-width: 650px;
}

.advertisement-created-card {
    padding: 34px;
    border: 1px solid #dfe5ed;
    border-radius: 20px;
    background: #fff;
    text-align: center;
}

.advertisement-created-icon {
    display: flex;
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dff6e7;
    color: #238447;
    font-size: 2rem;
    font-weight: 900;
}

.advertisement-created-card h1 {
    font-size: 1.55rem;
    font-weight: 900;
}

.advertisement-created-card p {
    color: #697385;
    line-height: 1.9;
}

.advertisement-tracking-code {
    margin: 20px 0;
    padding: 14px;
    border-radius: 12px;
    background: #f4f6f9;
}

.advertisement-tracking-code span,
.advertisement-tracking-code strong {
    display: block;
}

.advertisement-tracking-code strong {
    margin-top: 5px;
    letter-spacing: 2px;
}

.advertisement-created-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Remove desktop card whitespace */
@media (min-width: 992px) {
    .mobile-ad-list {
        align-items: start;
    }

    .divar-mobile-card,
    .market-ad-card {
        min-height: 0 !important;
        height: auto !important;
    }

    .divar-mobile-card-link {
        min-height: 138px !important;
        height: 138px;
        padding: 8px 10px;
    }

    .divar-mobile-image {
        width: 120px !important;
        height: 120px !important;
    }

    .divar-mobile-spacer {
        flex: 0 1 auto;
        min-height: 10px;
    }
}

@media (max-width: 767px) {
    .ad-wizard-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .ad-wizard-step {
        padding: 18px 14px;
    }

    .ad-wizard-actions {
        position: sticky;
        z-index: 50;
        bottom: 70px;
        padding: 12px;
    }

    .wizard-media-preview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .wizard-category-grid {
        grid-template-columns: 1fr;
    }

    .wizard-map-search {
        grid-template-columns: 1fr 1fr;
    }

    .wizard-map-search input {
        grid-column: 1 / -1;
    }

    .wizard-map {
        height: 330px;
    }

    .wizard-checkbox-grid,
    .wizard-contact-options {
        grid-template-columns: 1fr;
    }

    .wizard-attribute-row {
        grid-template-columns: 1fr;
    }

    .advertisement-created-actions {
        flex-direction: column;
    }
}


/* Senfesh v1.4.4 - Settings Workspace */
.appearance-studio {
    max-width: 1500px;
    margin: 0 auto;
    padding: 24px;
}

.appearance-studio-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.appearance-studio-kicker {
    color: #174bd7;
    font-size: .78rem;
    font-weight: 900;
}

.appearance-studio-heading h1 {
    margin: 5px 0;
    font-size: 1.7rem;
    font-weight: 950;
}

.appearance-studio-heading p {
    margin: 0;
    color: #6f798a;
}

.appearance-studio-alert {
    border-radius: 13px;
}

.appearance-identity-card {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid #e0e5ed;
    border-radius: 17px;
    background: #fff;
}

.appearance-card-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.appearance-card-heading h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 900;
}

.appearance-card-heading p {
    margin: 3px 0 0;
    color: #778195;
    font-size: .8rem;
}

.appearance-card-icon,
.settings-group-icon,
.device-switch-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.appearance-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #174bd7;
    background: #edf3ff;
}

.appearance-current-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.appearance-current-logo img {
    width: 110px;
    height: 52px;
    padding: 5px;
    border: 1px solid #e1e5eb;
    border-radius: 9px;
    object-fit: contain;
}

.appearance-current-logo label {
    display: flex;
    align-items: center;
    gap: 7px;
}

.appearance-device-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 13px;
}

.appearance-device-switch button {
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 13px;
    padding: 14px 17px;
    border: 2px solid #e0e5ed;
    border-radius: 15px;
    background: #fff;
    text-align: right;
}

.appearance-device-switch button.active {
    border-color: #174bd7;
    box-shadow: 0 8px 25px rgba(23, 75, 215, .09);
}

.appearance-device-switch strong,
.appearance-device-switch small {
    display: block;
}

.appearance-device-switch small {
    margin-top: 3px;
    color: #7b8493;
}

.device-switch-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    color: #174bd7;
    background: #edf3ff;
    font-size: 1.35rem;
}

.appearance-device-panel,
.appearance-section-panel {
    display: none;
}

.appearance-device-panel.active,
.appearance-section-panel.active {
    display: block;
}

.appearance-section-switch {
    display: flex;
    gap: 7px;
    margin-bottom: 12px;
    padding: 6px;
    border: 1px solid #e0e5ed;
    border-radius: 13px;
    background: #fff;
}

.appearance-section-switch button {
    flex: 1;
    min-height: 45px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    font-weight: 850;
}

.appearance-section-switch button.active {
    color: #fff;
    background: #174bd7;
}

.appearance-section-panel {
    overflow: hidden;
    border: 1px solid #e0e5ed;
    border-radius: 17px;
    background: #f7f9fc;
}

.appearance-form-toolbar {
    position: sticky;
    z-index: 40;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 18px;
    border-bottom: 1px solid #e0e5ed;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
}

.appearance-form-toolbar strong,
.appearance-form-toolbar span {
    display: block;
}

.appearance-form-toolbar span {
    margin-top: 2px;
    color: #788292;
    font-size: .76rem;
}

.appearance-settings-group {
    margin: 14px;
    overflow: hidden;
    border: 1px solid #dfe5ed;
    border-radius: 14px;
    background: #fff;
}

.appearance-settings-group > summary {
    display: flex;
    min-height: 65px;
    align-items: center;
    gap: 11px;
    padding: 12px 15px;
    cursor: pointer;
    list-style: none;
}

.appearance-settings-group > summary::-webkit-details-marker {
    display: none;
}

.appearance-settings-group > summary::after {
    margin-right: auto;
    content: "⌄";
    color: #7b8493;
    font-size: 1.15rem;
}

.appearance-settings-group[open] > summary::after {
    transform: rotate(180deg);
}

.appearance-settings-group summary strong,
.appearance-settings-group summary small {
    display: block;
}

.appearance-settings-group summary small {
    margin-top: 2px;
    color: #7b8493;
    font-size: .74rem;
}

.settings-group-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: #174bd7;
    background: #edf3ff;
}

.appearance-settings-content {
    padding: 18px;
    border-top: 1px solid #edf0f4;
}

.appearance-toggle-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.appearance-toggle-grid label,
.appearance-navigation-status label {
    display: flex;
    align-items: center;
    gap: 7px;
}

.appearance-toggle-grid label {
    padding: 9px 12px;
    border: 1px solid #dde3ec;
    border-radius: 10px;
    background: #fafbfc;
}

.appearance-navigation-list {
    display: grid;
    gap: 9px;
}

.appearance-navigation-item {
    display: grid;
    grid-template-columns:
        105px
        minmax(140px, .8fr)
        100px
        minmax(180px, 1fr)
        minmax(180px, 1fr)
        78px;
    gap: 8px;
    align-items: end;
    padding: 12px;
    border: 1px solid #e1e6ee;
    border-radius: 12px;
    background: #fff;
}

.appearance-navigation-item.core {
    border-right: 4px solid #174bd7;
}

.appearance-navigation-item.custom {
    border-right: 4px solid #9b59b6;
}

.appearance-navigation-status {
    align-self: center;
}

.appearance-navigation-status b {
    display: block;
    width: max-content;
    margin-top: 5px;
    padding: 3px 7px;
    border-radius: 6px;
    color: #627087;
    background: #edf0f5;
    font-size: .66rem;
}

.appearance-fixed-link {
    min-height: 38px;
    overflow: hidden;
    padding: 9px;
    border: 1px solid #e1e6ee;
    border-radius: 8px;
    color: #174bd7;
    background: #f4f7fb;
    direction: ltr;
    font-size: .73rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.appearance-section-actions {
    display: flex;
    justify-content: flex-end;
    padding: 14px 18px;
}

.appearance-section-actions .btn,
.appearance-form-toolbar .btn {
    min-width: 145px;
}

@media (max-width: 1100px) {
    .appearance-navigation-item {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .appearance-studio {
        padding: 12px;
    }

    .appearance-studio-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .appearance-device-switch {
        grid-template-columns: 1fr;
    }

    .appearance-form-toolbar {
        top: 0;
        align-items: stretch;
        flex-direction: column;
    }

    .appearance-form-toolbar .btn {
        width: 100%;
    }

    .appearance-navigation-item {
        grid-template-columns: 1fr;
    }

    .appearance-settings-content {
        padding: 12px;
    }
}



/* Senfesh v1.4.5 - Settings repair and light/dark theme */
:root {
    --tp-page-bg: #f6f8fb;
    --tp-surface: #ffffff;
    --tp-surface-muted: #f2f4f7;
    --tp-border: #e0e5ed;
    --tp-text: #182132;
    --tp-muted: #717b8d;
    --tp-shadow: 0 10px 30px rgba(25, 39, 70, .06);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --tp-page-bg: #111216;
    --tp-surface: #18191e;
    --tp-surface-muted: #24252c;
    --tp-border: #30313a;
    --tp-text: #f5f6f8;
    --tp-muted: #a1a4ae;
    --tp-shadow: none;
}

html[data-theme="dark"] body {
    color: var(--tp-text);
    background: var(--tp-page-bg);
}

.site-theme-toggle {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(120, 130, 150, .28);
    border-radius: 9px;
    padding: 7px 10px;
    color: inherit;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.site-theme-toggle:hover {
    background: rgba(120, 130, 150, .10);
}

.mobile-theme-toggle {
    width: 100%;
}

html[data-theme="dark"] .desktop-configurable-header,
html[data-theme="dark"] .mobile-configurable-header {
    border-color: var(--tp-border);
    color: #f5f6f8 !important;
    background: #18191e !important;
}

html[data-theme="dark"] .desktop-configurable-footer,
html[data-theme="dark"] .mobile-configurable-footer {
    border-color: var(--tp-border);
    color: #b8bbc5 !important;
    background: #15161a !important;
}

html[data-theme="dark"] .configurable-header-search,
html[data-theme="dark"] .mobile-configurable-search {
    border-color: var(--tp-border);
    background: #26272e;
}

html[data-theme="dark"] .configurable-header-search input,
html[data-theme="dark"] .mobile-configurable-search input {
    color: #f3f4f7;
    background: #26272e;
}

html[data-theme="dark"] .configurable-header-search input::placeholder,
html[data-theme="dark"] .mobile-configurable-search input::placeholder {
    color: #999da8;
}

html[data-theme="dark"] .unified-ads-page,
html[data-theme="dark"] .site-main-content {
    background: var(--tp-page-bg);
}

html[data-theme="dark"] .unified-ad-card,
html[data-theme="dark"] .market-sidebar,
html[data-theme="dark"] .empty-panel {
    border-color: var(--tp-border);
    color: var(--tp-text);
    background: var(--tp-surface);
    box-shadow: var(--tp-shadow);
}

html[data-theme="dark"] .unified-ad-card > a,
html[data-theme="dark"] .market-category-list a,
html[data-theme="dark"] .market-sidebar-head,
html[data-theme="dark"] .unified-ad-content h2 {
    color: var(--tp-text);
}

html[data-theme="dark"] .unified-ad-price,
html[data-theme="dark"] .unified-ad-meta,
html[data-theme="dark"] .market-category-list a {
    color: var(--tp-muted);
}

html[data-theme="dark"] .unified-ad-image {
    background: #25262c;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] textarea {
    border-color: var(--tp-border);
    color: var(--tp-text);
    background: var(--tp-surface-muted);
}

html[data-theme="dark"] .advertisement-created-card,
html[data-theme="dark"] .ad-wizard-form,
html[data-theme="dark"] .ad-wizard-step,
html[data-theme="dark"] .wizard-location-panel,
html[data-theme="dark"] .wizard-custom-attributes,
html[data-theme="dark"] .wizard-category-card span {
    border-color: var(--tp-border);
    color: var(--tp-text);
    background: var(--tp-surface);
}

html[data-theme="dark"] .ad-wizard-actions {
    border-color: var(--tp-border);
    background: #14151a;
}

html[data-theme="dark"] .wizard-location-visibility label,
html[data-theme="dark"] .wizard-contact-options label,
html[data-theme="dark"] .wizard-checkbox-grid label,
html[data-theme="dark"] .wizard-video-primary {
    border-color: var(--tp-border);
    color: var(--tp-text);
    background: var(--tp-surface-muted);
}

html[data-theme="dark"] .mobile-bottom-navigation.configurable {
    border-color: var(--tp-border);
    background: #18191e;
}

html[data-theme="dark"] .mobile-bottom-navigation.configurable a {
    color: #d8dae0;
}

html[data-theme="dark"] .mobile-bottom-navigation.configurable .mobile-create-ad {
    color: #fff;
}

@media (max-width: 991px) {
    .mobile-theme-toggle {
        min-height: 40px;
    }
}



/* Senfesh v1.6.7 - Ad Wizard UX */
.wizard-price-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.wizard-price-field {
    min-width: 0;
}

.wizard-inline-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    margin: 0;
    padding: 11px 14px;
    border: 1px solid #dfe4ec;
    border-radius: 11px;
    background: #fff;
    white-space: nowrap;
}

.wizard-free-tariff-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 10px 14px;
}

.wizard-free-tariff-compact span,
.wizard-free-tariff-compact strong {
    display: inline;
    margin: 0;
}

.wizard-free-tariff-compact strong {
    font-size: 1.1rem;
}

.tp-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-bottom: 14px;
    padding: 8px 14px;
    border: 1px solid #dfe4ec;
    border-radius: 10px;
    color: inherit;
    background: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.tp-back-button:hover {
    background: #f5f7fa;
}

html[data-theme="dark"] .wizard-inline-option,
html[data-theme="dark"] .tp-back-button {
    border-color: var(--tp-border);
    color: var(--tp-text);
    background: var(--tp-surface-muted);
}

@media (max-width: 640px) {
    .wizard-price-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    .wizard-inline-option {
        padding-inline: 10px;
        font-size: .88rem;
    }

    .wizard-free-tariff-compact {
        min-height: 48px;
        padding: 8px 12px;
    }
}


/* Senfesh v1.1.68 - Sticky compact mobile category/filter toolbar */
.mobile-market-tools {
    display: none;
}

@media (max-width: 991px) {
    .senfesh-market-header {
        z-index: 1050;
    }

    .mobile-market-tools {
        position: sticky;
        top: calc(59px + env(safe-area-inset-top));
        z-index: 1040;
        width: 100vw;
        min-height: 28px;
        margin: 0 calc(50% - 50vw);
        padding: 1px 0;
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 0;
        border-top: 1px solid rgb(238, 240, 245);
        border-bottom: 1px solid rgb(238, 240, 245);
        border-inline: 0;
        border-radius: 0;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 4px 12px rgba(25, 28, 38, .06);
        backdrop-filter: blur(10px);
    }

    .mobile-market-tools__button {
        position: relative;
        display: inline-flex;
        min-width: 0;
        min-height: 28px;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 2px 8px;
        border: 0;
        border-radius: 0;
        color: rgb(25, 28, 38);
        background: transparent;
        font: inherit;
        font-size: .82rem;
        font-weight: 850;
        line-height: 1.2;
        text-decoration: none;
        white-space: nowrap;
        cursor: pointer;
    }

    .mobile-market-tools__button +
    .mobile-market-tools__button {
        border-inline-start: 1px solid rgb(238, 240, 245);
        border-start-start-radius: 0;
        border-end-start-radius: 0;
    }

    .mobile-market-tools__button.is-active {
        color: rgb(34, 60, 119);
        background: rgba(34, 60, 119, .06);
    }

    .mobile-market-tools__state {
        width: 5px;
        height: 5px;
        flex: 0 0 5px;
        border-radius: 50%;
        background: rgb(255, 160, 0);
    }

    .mobile-market-tools__count {
        display: inline-flex;
        min-width: 18px;
        height: 18px;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        border-radius: 999px;
        color: #fff;
        background: rgb(34, 60, 119);
        font-size: .66rem;
        font-weight: 900;
        line-height: 1;
    }

    .mobile-market-tools__count[hidden] {
        display: none !important;
    }

    .market-home > .market-shell >
    .mobile-market-tools {
        margin-top: 0;
        margin-bottom: 0;
    }
}

html[data-theme="dark"] .mobile-market-tools {
    border-color: var(--tp-border);
    background: var(--tp-surface);
    box-shadow: none;
}

html[data-theme="dark"]
.mobile-market-tools__button {
    color: var(--tp-text);
}

html[data-theme="dark"]
.mobile-market-tools__button +
.mobile-market-tools__button {
    border-color: var(--tp-border);
}

html[data-theme="dark"]
.mobile-market-tools__button.is-active {
    color: rgb(255, 160, 0);
    background: rgba(255, 160, 0, .10);
}

html[data-theme="dark"]
.mobile-market-tools__count {
    color: #111111;
    background: rgb(255, 160, 0);
}

/* ==========================================================================
   Senfesh 3.5.9 PART1 - Mobile input/focus/zoom foundation
   Scope: all data-entry controls on mobile, public site + admin.
   Reason: iOS Safari zooms focused controls whose computed font size is below
   16px. The project mobile root is 14px, so many inherited controls triggered
   viewport zoom and apparent horizontal layout breakage.
   ========================================================================== */
@media (max-width: 991px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body.senfesh-front-shell,
    body.admin-body,
    main,
    form,
    fieldset {
        min-width: 0;
        max-width: 100%;
    }

    input,
    select,
    textarea,
    [contenteditable="true"],
    .form-control,
    .form-select {
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px !important;
    }

    input,
    select,
    textarea,
    .form-control,
    .form-select {
        min-width: 0;
    }
}

/* ==========================================================================
   Senfesh 3.5.9 PART3 - Mobile conversation composer
   Scope: conversation details page only.
   - mobile bottom navigation is hidden by the view;
   - composer stays above the viewport/safe area/keyboard;
   - message field and send action remain one stable row;
   - no horizontal expansion while the keyboard is open.
   ========================================================================== */
@media (max-width: 767px) {
    .conversation-details-page {
        --senfesh-chat-keyboard-offset: 0px;
        width: 100%;
        max-width: 100%;
        padding-bottom:
            calc(
                86px +
                env(safe-area-inset-bottom) +
                var(--senfesh-chat-keyboard-offset)
            );
        overflow-x: clip;
    }

    .conversation-details-page .conversation-container {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-right: 12px;
        padding-left: 12px;
    }

    .conversation-details-page .chat-thread {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 52dvh;
        padding: 14px 12px;
        overflow-x: hidden;
    }

    .conversation-details-page .chat-bubble,
    .conversation-details-page .chat-bubble > div {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .conversation-details-page .chat-compose {
        position: fixed;
        z-index: 1480;
        right: 0;
        bottom: var(--senfesh-chat-keyboard-offset);
        left: 0;
        display: grid;
        width: 100%;
        max-width: 100vw;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 8px;
        margin: 0;
        padding:
            8px
            12px
            calc(8px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--senfesh-border);
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 -8px 24px rgba(17, 24, 39, .07);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-sizing: border-box;
    }

    .conversation-details-page .chat-compose textarea {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 46px;
        max-height: 112px;
        margin: 0;
        padding: 10px 12px;
        resize: none;
        overflow-y: auto;
        font-size: 16px !important;
        line-height: 1.65;
        box-sizing: border-box;
    }

    .conversation-details-page .chat-compose button {
        width: auto;
        min-width: 70px;
        min-height: 46px;
        margin: 0;
        padding: 8px 14px;
        white-space: nowrap;
    }
}

html[data-theme="dark"] body.senfesh-front-shell
.conversation-details-page .chat-compose {
    border-color: var(--tp-border) !important;
    background: rgba(16, 17, 18, .97) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.conversation-details-page .chat-compose textarea {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: var(--tp-control) !important;
}



/* ==========================================================================
   Senfesh 3.5.9 PART6 - Home category top-gap correction
   Scope: homepage only.
   Desktop: category sidebar starts in the first row beside the search toolbar.
   Mobile/tablet: remove the unused top gutter and vertical toolbar gap.
   ========================================================================== */
@media (min-width: 992px) {
    .market-home > .market-shell {
        display: grid;
        grid-template-columns: 260px minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 20px;
        row-gap: 18px;
        align-items: start;
        padding-top: 0;
    }

    .market-home > .market-shell >
    .market-toolbar {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        margin-bottom: 0;
    }

    .market-home > .market-shell >
    .market-layout {
        display: contents;
    }

    .market-home
    .market-sidebar {
        grid-column: 1;
        grid-row: 1 / span 2;
        min-width: 0;
    }

    .market-home
    .market-content {
        grid-column: 2;
        grid-row: 2;
        min-width: 0;
    }
}

@media (max-width: 991px) {
    .market-home > .market-shell {
        padding-top: 0;
    }

    .market-home > .market-shell >
    .market-toolbar {
        margin-top: 0;
        margin-bottom: 0;
    }

    .market-home > .market-shell >
    .mobile-market-tools {
        margin-top: 0;
        margin-bottom: 0;
    }

    .market-home
    .market-layout {
        margin-top: 0;
    }
}


/* ==========================================================================
   Senfesh 3.5.9 PART8 - advertisement card consistency
   ========================================================================== */

/* Every advertisement-card title is one visual line. */
.divar-mobile-content h2,
.market-ad-body h2,
.my-advertisement-card__title,
.category-public-ad-card__body h3,
.storefront-card__overlay strong,
.storefront-card__caption strong {
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
}

.market-ad-body h2 a {
    display: block;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Keep identity text away from the lower card edge. */
.divar-mobile-identity {
    margin-bottom: 6px;
}

/* Public urgent service naming/visual: "عجله‌ای". */
.market-badge-urgent,
.senfesh-urgent-badge {
    color: #ffffff !important;
    background: rgb(255, 138, 0) !important;
    border-color: rgb(255, 138, 0) !important;
}

.market-badge-urgent {
    top: 6px !important;
    left: 6px !important;
    padding: 3px 7px !important;
    border-radius: 8px !important;
    font-size: .68rem !important;
    line-height: 1.3 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .14);
}

/* Details page urgent state belongs to the media corner, not the text area. */
.mobile-advertisement-media,
.desktop-advertisement-media {
    position: relative;
}

.advertisement-urgent-image-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: rgb(255, 138, 0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .16);
    font-size: .72rem;
    font-weight: 900;
    line-height: 1.3;
    white-space: nowrap;
    pointer-events: none;
}
