:root {
    --primary-green: #0c9267;
    --secondary-gold: #e8ae00;
    --primary-teal: #002f34;
    --text-dark: #002f34;
    --text-gray: #5b7b7d;
    --bg-light: #f7f8f8;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(12, 146, 103, 0.1);
    --shadow-hover: 0 8px 24px rgba(12, 146, 103, 0.2);
    --border-radius: 10px;
    --border-radius-lg: 14px;
    --transition: all 0.3s ease;
    --section-spacing: 48px;
    --header-height: 56px;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --touch-min: 44px;
    --font-size-sm: 13px;
    --font-size-base: 15px;
    --font-size-lg: 18px;
    --font-size-xl: 22px;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Pagination - brand colors (green) */
.pagination .page-link {
    color: var(--text-dark);
    border-color: #dee2e6;
    background: #fff;
}
.pagination .page-link:hover {
    color: var(--primary-green);
    background: #f0fdf9;
    border-color: var(--primary-green);
}
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-green) 0%, #097d58 100%);
    border-color: var(--primary-green);
    color: #fff;
}
.pagination .page-item.disabled .page-link {
    color: #adb5bd;
    background: #fff;
}

.ads-sidebar-vertical {
    display: none;
}

.ads-sidebar-inner {
    padding: 20px 10px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ads-sidebar-item {
    width: 100%;
    max-width: 110px;
}

.ads-sidebar-link {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

.ads-sidebar-slider {
    position: relative;
    width: 100%;
    min-height: 40px;
}

.ads-sidebar-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.45s ease;
}

.ads-sidebar-slide.is-active {
    opacity: 1;
    position: relative;
}

.ads-sidebar-link:hover img {
    opacity: 0.92;
}

.ads-sidebar-img {
    width: 100%;
    height: auto;
    max-height: 280px;
    display: block;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    transition: opacity 0.2s;
}

.ads-sidebar-item img {
    width: 100%;
    height: auto;
    max-height: 280px;
    display: block;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
}

.ads-sidebar-promo {
    padding: 0 4px;
}

.ads-sidebar-promo-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: rgba(12,146,103,0.06);
    border: 1px dashed rgba(12,146,103,0.35);
    border-radius: 8px;
    color: var(--primary-green);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
}

.ads-sidebar-promo-link:hover {
    background: rgba(12,146,103,0.1);
    color: #097d58;
}

.ads-sidebar-promo-link i {
    font-size: 20px;
}

@media (max-width: 991px) {
    body:has(.ads-sidebar-vertical),
    [dir="rtl"] body:has(.ads-sidebar-vertical) {
        padding-left: 0;
        padding-right: 0;
    }
    .ads-sidebar-vertical {
        display: none;
    }
}

.container,
.header-inner,
.footer-inner,
.footer-bottom-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 1400px) {
    .container,
    .header-inner,
    .footer-inner,
    .footer-bottom-inner {
        max-width: 1360px;
        padding: 0 32px;
    }
}

/* Mobile: fix padding - prevent text hidden in corners, use safe-area for notched devices */
@media (max-width: 767px) {
    .container,
    .header-inner,
    .footer-inner,
    .footer-bottom-inner {
        padding-inline-start: max(16px, env(safe-area-inset-left));
        padding-inline-end: max(16px, env(safe-area-inset-right));
        width: 100%;
        box-sizing: border-box;
    }
    .main-content.container {
        padding-inline-start: max(16px, env(safe-area-inset-left));
        padding-inline-end: max(16px, env(safe-area-inset-right));
    }
}

@media (max-width: 480px) {
    .container,
    .header-inner {
        padding-inline-start: max(12px, env(safe-area-inset-left));
        padding-inline-end: max(12px, env(safe-area-inset-right));
    }
}

/* Header - Sidalhag-style compact */
.main-header {
    background: var(--white);
    border-bottom: 1px solid #e8e8e8;
    padding: 10px 0 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Currency Bar - RTL for Arabic */
.currency-bar {
    background: linear-gradient(135deg, #e8f2ef 0%, #dcebe6 100%);
    border-bottom: 1px solid rgba(12, 146, 103, 0.15);
    padding: 10px 16px;
    position: relative;
    overflow: hidden;
    z-index: 99;
    box-shadow: 0 1px 3px rgba(0, 47, 52, 0.04);
    direction: rtl;
    display: flex;
    align-items: center;
}

.currency-bar-desktop {
    flex: 1;
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: center;
}

.currency-bar-mobile {
    display: none;
    width: 100%;
}

.currency-bar-inner {
    overflow: hidden;
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* Desktop: static title + scrolling rates */
.currency-bar-desktop-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px 14px;
    width: 100%;
    min-width: 0;
    direction: rtl;
}

.currency-bar-title-static {
    flex: 0 0 auto;
    max-width: min(42%, 340px);
    min-width: 0;
}

.currency-bar-title-static .currency-bar-label-item {
    white-space: normal;
    line-height: 1.35;
    font-size: 11px;
    display: inline-block;
    max-width: 100%;
}

.currency-bar-desktop-row .currency-bar-viewport {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    overflow: hidden;
}

/* Mobile: infinite ticker (same pattern as desktop) */
.currency-bar-mobile-head {
    margin-bottom: 8px;
    padding-inline: 2px;
}

.currency-bar-mobile-title {
    font-size: 10px;
    font-weight: 800;
    color: var(--primary-green);
    letter-spacing: 0.02em;
    line-height: 1.4;
    white-space: normal;
    display: block;
}

.currency-bar-mobile-viewport {
    overflow: hidden;
    width: 100%;
    direction: ltr;
}

.currency-bar-mobile-train {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    will-change: transform;
    animation: currency-bar-ticker 38s linear infinite;
}

.currency-bar-mobile-strip {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    flex-shrink: 0;
    direction: rtl;
    box-sizing: border-box;
    padding-inline-end: 8px;
}

.currency-bar-mobile-chip {
    flex: 0 0 auto;
    width: auto;
    min-width: 118px;
    max-width: 140px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(12, 146, 103, 0.14);
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0, 47, 52, 0.05);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 5px;
    direction: rtl;
    unicode-bidi: isolate;
}

.currency-bar-mobile-flag {
    width: 16px;
    height: 12px;
    display: inline-block;
    flex-shrink: 0;
    border-radius: 2px;
    margin-top: 1px;
    object-fit: cover;
}

.currency-bar-mobile-chip-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.currency-bar-mobile-currency-code {
    font-size: 10px;
    font-weight: 800;
    color: #0c9267;
    letter-spacing: 0.04em;
    line-height: 1.1;
}

.currency-bar-mobile-rate-line {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 3px;
    font-size: 10px;
    font-weight: 700;
    color: #002f34;
    line-height: 1.35;
}

.currency-bar-mobile-sdg-amt {
    font-variant-numeric: tabular-nums;
}

.currency-bar-mobile-equals {
    opacity: 0.5;
    font-weight: 700;
    font-size: 8px;
    padding: 0 1px;
}

.currency-bar-mobile-unit {
    direction: ltr;
    unicode-bidi: embed;
    font-variant-numeric: tabular-nums;
    font-size: 10px;
}

.currency-bar-mobile-fallback {
    margin: 0;
    padding: 6px 4px 2px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #0c9267;
}

@media (max-width: 768px) {
    .currency-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 12px 12px;
        padding-inline-start: max(12px, env(safe-area-inset-left, 0px));
        padding-inline-end: max(12px, env(safe-area-inset-right, 0px));
        overflow: visible;
    }

    .currency-bar-desktop {
        display: none !important;
    }

    .currency-bar-mobile {
        display: block;
    }

}

@media (min-width: 769px) {
    .currency-bar-mobile {
        display: none !important;
    }
}

/* Infinite ticker: LTR train, identical RTL strips; animation is exactly -50% of train width */
.currency-bar-viewport {
    direction: ltr;
}

.currency-bar-train {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    will-change: transform;
    animation: currency-bar-ticker 55s linear infinite;
}

.currency-bar-strip {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
    direction: rtl;
    box-sizing: border-box;
    padding-inline-end: 24px;
}

/* When only regional currency is configured (no USD, SAR, …) */
.currency-bar-static {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 16px;
    padding: 4px 0;
    text-align: center;
    direction: rtl;
}

.currency-bar.currency-bar-ticker--fallback .currency-bar-viewport,
.currency-bar.currency-bar-ticker--fallback .currency-bar-mobile-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.currency-bar.currency-bar-ticker--fallback .currency-bar-train,
.currency-bar.currency-bar-ticker--fallback .currency-bar-mobile-train {
    animation: none;
    transform: none;
}

/* Desktop marquee: title + rate pills */
.currency-bar-label-item {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-green);
    white-space: nowrap;
    padding: 4px 12px;
    background: rgba(12, 146, 103, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(12, 146, 103, 0.2);
    unicode-bidi: isolate;
}

@media (min-width: 769px) and (max-width: 991.98px) {
    .currency-bar-train {
        animation-duration: 50s;
    }
    .currency-bar-strip {
        gap: 18px;
        padding-inline-end: 18px;
    }
}

@media (min-width: 992px) {
    .currency-bar-strip {
        gap: 24px;
        padding-inline-end: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .currency-bar-train,
    .currency-bar-mobile-train {
        animation: none;
        transform: none;
    }
    .currency-bar-desktop .currency-bar-viewport,
    .currency-bar-mobile .currency-bar-mobile-viewport {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
}

@keyframes currency-bar-ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

.currency-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(12, 146, 103, 0.12);
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 47, 52, 0.04);
    direction: rtl;
    unicode-bidi: isolate;
}

.currency-bar-rate {
    display: inline-flex;
    align-items: center;
    flex-direction: row;
    direction: rtl;
    unicode-bidi: isolate;
    gap: 0.15em;
    color: var(--text-dark);
    font-weight: 600;
}

.currency-bar-rate-rtl {
    font-variant-numeric: tabular-nums;
}

.currency-bar-rate-sep {
    padding: 0 0.1em;
    opacity: 0.85;
}

.currency-bar-rate-unit {
    font-variant-numeric: tabular-nums;
    unicode-bidi: embed;
}

.currency-bar-flag {
    width: 20px;
    height: 15px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    border-radius: 2px;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.header-messages-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    color: #002f34;
    text-decoration: none;
}

.header-messages-link:hover {
    color: #0c9267;
}

.header-notif-badge {
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    padding: 2px 6px;
    min-width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-messages-link .header-notif-badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
}

.logo-area {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.logo-img {
    height: 88px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

@media (min-width: 1024px) {
    .logo-img {
        height: 112px;
    }
}

.sub-logo {
    font-size: 10px;
    color: var(--text-gray);
    font-weight: 600;
}

.top-nav-links {
    display: flex;
    gap: 20px;
}

.top-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.top-link:hover {
    background: var(--bg-light);
    color: var(--primary-green);
}

.top-link i {
    background: var(--bg-light);
    width: var(--touch-min);
    min-width: var(--touch-min);
    height: var(--touch-min);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary-green);
}

/* Hamburger - visible only on mobile (overridden in @media max-width 768px) */
.hamburger-btn {
    display: none;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border: none;
    background: transparent;
    color: var(--text-dark);
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
    padding: 0;
}

.hamburger-btn:hover {
    background: var(--bg-light);
    color: var(--primary-green);
}

/* Header category shortcuts (Motors/Properties) - visible only on mobile */
.header-category-shortcuts {
    display: none;
    align-items: center;
    gap: 8px;
}

.header-cat-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 11px;
    min-width: 52px;
    padding: 6px 4px;
    border-radius: 8px;
    transition: var(--transition);
}

.header-cat-link i {
    font-size: 22px;
    color: var(--primary-green);
    margin-bottom: 2px;
}

.header-cat-link:hover {
    background: var(--bg-light);
    color: var(--primary-green);
}

.header-cat-link:hover i {
    color: var(--primary-green);
}

/* Mobile Drawer (Sidalhag-style slide-out menu) */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10050;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    width: min(320px, 88vw);
    max-width: 320px;
    height: 100%;
    background: var(--white);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 10051;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-overflow-scrolling: touch;
}

[dir="rtl"] .mobile-drawer {
    inset-inline-end: auto;
    inset-inline-start: 0;
    transform: translateX(-100%);
}

.mobile-drawer-overlay.active .mobile-drawer {
    transform: translateX(0);
}

[dir="rtl"] .mobile-drawer-overlay.active .mobile-drawer {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-drawer-logo img {
    height: 40px;
    width: auto;
}

.mobile-drawer-close {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-light);
    color: var(--text-dark);
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-drawer-close:hover {
    background: #e8ebec;
    color: var(--primary-green);
}

.mobile-drawer-nav {
    padding: 12px 0 32px;
}

/* Account dropdown in drawer (cd-user-trigger / site-user-trigger — inline panel, no clipping) */
.mobile-drawer-account-row {
    padding: 4px 16px 14px;
    border-bottom: 1px solid #edf3f3;
}

.mobile-drawer-site-user-menu {
    width: 100%;
}

.mobile-drawer-site-user-trigger {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
}

.mobile-drawer-site-user-trigger .site-user-trigger-icon {
    margin-inline-start: auto;
    flex-shrink: 0;
}

.mobile-drawer-user-name-line {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 800;
    color: #002f34;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-drawer-account-row .mobile-drawer-site-user-dropdown {
    position: static;
    width: 100%;
    max-width: none;
    inset-inline-end: auto;
    margin-top: 10px;
    top: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition: none;
    box-shadow: 0 4px 18px rgba(0, 47, 52, 0.08);
    display: none;
}

.mobile-drawer-account-row .site-user-menu.open .mobile-drawer-site-user-dropdown {
    display: block;
}

.mobile-drawer-section {
    padding: 8px 0;
}

.mobile-drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
}

.mobile-drawer-link i:first-child {
    font-size: 20px;
    color: var(--primary-green);
    width: 24px;
    text-align: center;
}

.mobile-drawer-link .fa-chevron-left {
    margin-inline-start: auto;
    font-size: 12px;
    color: var(--text-gray);
}

.mobile-drawer-link:hover,
.mobile-drawer-link.active {
    background: rgba(12, 146, 103, 0.08);
    color: var(--primary-green);
}

.mobile-drawer-link:hover i:first-child,
.mobile-drawer-link.active i:first-child {
    color: var(--primary-green);
}

.mobile-drawer-add {
    background: linear-gradient(135deg, rgba(12, 146, 103, 0.12) 0%, rgba(12, 146, 103, 0.06) 100%);
    color: var(--primary-green);
    font-weight: 800;
    margin: 8px 12px;
    border-radius: 10px;
}

.mobile-drawer-children {
    padding: 4px 20px 8px 56px;
    display: none;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-drawer-cat-section.expanded .mobile-drawer-children {
    display: flex;
}

.mobile-drawer-cat-toggle .mobile-drawer-chevron {
    margin-inline-start: auto;
    transition: transform 0.2s;
}

.mobile-drawer-cat-section.expanded .mobile-drawer-chevron {
    transform: rotate(180deg);
}

.mobile-drawer-cat-toggle {
    width: 100%;
    text-align: right;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

.mobile-drawer-child-all {
    font-weight: 700;
    color: var(--primary-green) !important;
}

.mobile-drawer-child {
    padding: 6px 12px;
    background: var(--bg-light);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
}

.mobile-drawer-child:hover {
    background: rgba(12, 146, 103, 0.1);
    color: var(--primary-green);
}

.mobile-drawer-divider {
    height: 1px;
    background: #eee;
    margin: 12px 20px;
}

/* Mobile drawer top actions: Sign up, Login, Chat, My ads, Post your ads */
.mobile-drawer-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px 20px 20px;
}

.mobile-drawer-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: var(--transition);
    min-height: 72px;
    text-align: center;
    word-break: keep-all;
    /* Avoid browser default link blue/purple (e.g. إعلاناتي / المحفوظات) */
    color: #1f3a3d;
    background: linear-gradient(180deg, #f9fdfb 0%, #eef6f3 100%);
    border: 1px solid #cfe8dd;
    box-sizing: border-box;
}

.mobile-drawer-action-btn:visited {
    color: #1f3a3d;
}

button.mobile-drawer-action-btn {
    border: none;
    width: 100%;
    font: inherit;
    color: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.mobile-drawer-action-btn--disabled,
button.mobile-drawer-action-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    pointer-events: none;
    background: rgba(0, 47, 52, 0.06);
    color: var(--text-gray);
}

.mobile-drawer-action-btn i {
    font-size: 22px;
    flex-shrink: 0;
    color: var(--primary-green);
}

.mobile-drawer-signup i,
.mobile-drawer-login i,
.mobile-drawer-post i {
    color: inherit;
}


.mobile-drawer-signup {
    background: var(--primary-green);
    color: #fff;
}

.mobile-drawer-signup:hover {
    background: #097d58;
    color: #fff;
}

.mobile-drawer-login {
    background: var(--bg-light);
    color: var(--text-dark);
}

.mobile-drawer-login:hover {
    background: #e8ebec;
    color: var(--primary-green);
}

.mobile-drawer-post {
    background: linear-gradient(135deg, rgba(12, 146, 103, 0.15) 0%, rgba(12, 146, 103, 0.08) 100%);
    color: var(--primary-green);
}

.mobile-drawer-post:hover {
    background: rgba(12, 146, 103, 0.2);
    color: var(--primary-green);
}

/* Logged-in quick tiles (إعلاناتي، المحفوظات): hover without affecting signup/login/post */
a.mobile-drawer-action-btn:not(.mobile-drawer-signup):not(.mobile-drawer-login):not(.mobile-drawer-post):hover {
    border-color: #b5dccf;
    color: #0c9267;
}

a.mobile-drawer-action-btn:not(.mobile-drawer-signup):not(.mobile-drawer-login):not(.mobile-drawer-post):hover i {
    color: #097d58;
}

.mobile-drawer-section-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-gray);
    padding: 16px 20px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search Row - Sidalhag-style compact single row */
.search-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

/* Search field + favorites (Dubizzle-style); desktop order restored via media query */
.search-row-find {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.header-favorites-shortcut {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #e6eceb;
    background: #fff;
    color: #0d3136;
    text-decoration: none;
    font-size: 20px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 47, 52, 0.05);
}

.header-favorites-shortcut:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
    background: #f4fbf8;
}

@media (min-width: 769px) {
    .search-row .location-box {
        order: 1;
    }
    .search-row-find {
        order: 2;
    }
    .search-row .user-actions {
        order: 3;
    }
}

.location-box {
    position: relative;
    flex: 0 0 auto;
    min-width: 100px;
}

@media (min-width: 640px) {
    .location-box {
        min-width: 120px;
    }
}

.location-current {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d1d2d3;
    border-radius: 4px;
    padding: 0 10px;
    height: 36px;
    cursor: pointer;
    background: var(--white);
    transition: var(--transition);
    font-size: 13px;
}

.location-current:hover {
    border-color: var(--primary-teal);
}

.location-current span {
    flex: 1;
    font-weight: 700;
}

.location-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: 100%;
    min-width: 300px;
    background: var(--white);
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: none;
    padding: 15px 0;
    border: 1px solid #e0e0e0;
}

/* Mobile: Location as full-screen modal */
@media (max-width: 768px) {
    .location-dropdown {
        position: fixed;
        inset: 0;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        min-width: 0;
        max-width: none;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        z-index: 10060;
        padding: 0;
        display: none;
        flex-direction: column;
        box-shadow: none;
        border: none;
        background: var(--white);
    }

    .location-dropdown.active {
        display: flex;
    }

    .location-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid #eee;
        flex-shrink: 0;
    }

    .location-modal-close {
        display: flex;
    }

    .location-dropdown .dropdown-search {
        padding: 12px 16px;
        flex-shrink: 0;
    }

    .mobile-location-dual {
        display: flex;
        flex-shrink: 0;
    }

    .location-dropdown .location-list {
        flex: 1;
        max-height: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.location-dropdown.active {
    display: block;
}

/* Location modal header - visible on mobile only */
.location-modal-header {
    display: none;
}

.location-modal-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
}

.location-modal-close {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    color: var(--text-dark);
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.location-modal-close:hover {
    background: #e8ebec;
    color: var(--primary-green);
}

.dropdown-search {
    padding: 0 15px 15px;
}

.dropdown-search input {
    width: 100%;
    height: 40px;
    border: 1px solid #d1d2d3;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
}

.mobile-location-dual {
    display: none;
    gap: 8px;
    padding: 0 15px 12px;
}

.mobile-location-dual-inline {
    padding: 0;
    width: 100%;
}

.mobile-location-select {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    height: 40px;
    border: 1px solid #d1d2d3;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #14353a;
    padding-inline: 10px 28px;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-location-select:disabled {
    background: #f6f8f8;
    color: #98a8aa;
}

.current-location-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #0b5f66;
    background: #eef5f6;
    cursor: pointer;
    border-bottom: 1px solid #f2f4f5;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.current-location-btn:hover {
    color: #002f34;
    background: #e2eef0;
}

.location-list {
    max-height: 400px;
    overflow-y: auto;
}

.location-section-title {
    padding: 15px 15px 10px;
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 700;
}

.location-all-egypt {
    padding: 12px 15px;
    color: var(--primary-green);
    font-weight: 700;
    cursor: pointer;
}

.location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: var(--transition);
}

.location-item:hover {
    background: #f7f8f8;
}

.location-item i {
    font-size: 12px;
    color: var(--text-gray);
}

.location-group-header,
.location-subgroup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    background: #f7f8f8;
}

.location-group-header:hover,
.location-subgroup-header:hover {
    background: #eef0f0;
}

.location-group-chevron {
    font-size: 10px;
    transition: transform 0.2s;
}

.location-group-children,
.location-subgroup-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
}

.location-group-children.expanded,
.location-subgroup-children.expanded {
    max-height: 500px;
}

.location-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 600;
    background: #f7f8f8;
    transition: var(--transition);
}

.location-toggle:hover {
    background: #eef0f0;
}

.location-toggle .location-chevron {
    font-size: 10px;
    transition: transform 0.2s;
}

.location-toggle.expanded .location-chevron {
    transform: rotate(180deg);
}

.location-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
}

.location-children.expanded {
    max-height: 800px;
}

.location-subgroup .location-item,
.location-children .location-item {
    padding-right: 24px;
    border-right: 2px solid rgba(12, 146, 103, 0.2);
}

.location-subgroup .location-subgroup .location-item {
    padding-right: 36px;
}

/* Parent rows in location tree (state + city with districts) */
.location-group > .location-toggle,
.location-subgroup > .location-toggle {
    font-weight: 700;
}

/* Rows under an expanded parent: pick options, not the toggle row */
.location-children.expanded > .location-item {
    font-style: italic;
    justify-content: center;
    text-align: center;
    gap: 10px;
}

.search-box-main {
    display: flex;
    border: 1px solid #d1d2d3;
    border-radius: 4px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    transition: var(--transition);
    background: var(--white);
}

.search-box-main:focus-within {
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 1px var(--primary-teal);
}

.search-box-main input {
    border: none;
    padding: 0 12px;
    height: 36px;
    width: 100%;
    outline: none;
    font-weight: 500;
    font-size: 13px;
}

.search-box-main input::placeholder {
    color: #9ca3a4;
}

.search-btn-red {
    background: var(--primary-green);
    color: var(--white);
    border: none;
    min-width: 36px;
    min-height: 36px;
    width: 36px;
    flex-shrink: 0;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-btn-red:hover {
    background: #097d58;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.site-user-menu {
    position: relative;
}

/* User menu in top header - visible for logged-in users */
.site-user-menu-header {
    margin-inline-start: auto;
    flex-shrink: 0;
}

.site-user-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 8px 14px 8px 10px;
    border: 1px solid #dfe8e8;
    border-radius: 16px;
    background: #fff;
    color: var(--text-dark);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 47, 52, 0.08);
    transition: var(--transition);
}

/* Top header user trigger - prominent, professional account dropdown */
.site-user-trigger-header {
    min-height: 52px;
    padding: 10px 18px 10px 14px;
    gap: 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f5faf8 100%);
    border: 1.5px solid rgba(12, 146, 103, 0.25);
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0, 47, 52, 0.1);
}

.site-user-trigger-header:hover,
.site-user-menu.open .site-user-trigger-header {
    background: linear-gradient(135deg, #f8fcfb 0%, #eff8f5 100%);
    border-color: rgba(12, 146, 103, 0.4);
    box-shadow: 0 6px 20px rgba(12, 146, 103, 0.15);
}

.site-user-avatar-header {
    width: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
}

.site-user-trigger-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    line-height: 1.25;
}

.site-user-trigger-name {
    font-size: 15px;
    font-weight: 800;
    color: #002f34;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-user-trigger-meta {
    font-size: 12px;
    font-weight: 600;
    color: #0c9267;
    margin-top: 1px;
}

.site-user-trigger-header .site-user-trigger-icon {
    font-size: 13px;
    color: #5b7b7d;
}

.site-user-trigger-label {
    font-size: 14px;
    font-weight: 800;
    color: #002f34;
    white-space: nowrap;
}

/* Login link - in search row near search (guest only). Old position & design. */
.header-login-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    height: 36px;
    border-radius: 6px;
    border: 2px solid var(--secondary-gold);
    background: var(--primary-green);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(12, 146, 103, 0.2);
}

.header-login-link:hover {
    background: #097d58;
    color: var(--white);
    transform: translateY(-2px);
}

.header-login-link i {
    font-size: 14px;
}

.site-user-trigger:hover,
.site-user-menu.open .site-user-trigger {
    border-color: rgba(12, 146, 103, 0.28);
    box-shadow: 0 10px 22px rgba(0, 47, 52, 0.12);
}

.site-user-trigger-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    line-height: 1.2;
}

.site-user-trigger-copy strong {
    font-size: 13px;
    font-weight: 800;
    color: #002f34;
}

.site-user-trigger-copy small {
    font-size: 11px;
    color: #6c7f81;
    margin-top: 2px;
}

.site-user-trigger-icon {
    font-size: 12px;
    color: #607375;
    transition: transform 0.18s ease;
}

.site-user-menu.open .site-user-trigger-icon {
    transform: rotate(180deg);
}

.site-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0c9267 0%, #0a6f52 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.18);
    flex-shrink: 0;
}

.site-user-avatar-lg {
    width: 44px;
    height: 44px;
    font-size: 18px;
}

.site-user-badge,
.site-user-link-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.site-user-badge {
    position: absolute;
    top: -5px;
    inset-inline-start: -4px;
    box-shadow: 0 0 0 3px #fff;
}

.site-user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    inset-inline-end: 0;
    width: 290px;
    max-width: min(90vw, 290px);
    padding: 12px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e3ebeb;
    box-shadow: 0 18px 40px rgba(0, 47, 52, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 110;
}

.site-user-menu.open .site-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.site-user-dropdown-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 4px 12px;
    border-bottom: 1px solid #edf3f3;
    margin-bottom: 8px;
}

.site-user-summary {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.site-user-summary strong {
    font-size: 14px;
    font-weight: 800;
    color: #002f34;
}

.site-user-summary span {
    font-size: 12px;
    color: #687c7e;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-user-dropdown-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-user-dropdown-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: #002f34;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.18s ease, color 0.18s ease;
}

.site-user-dropdown-links a:hover {
    background: #f5f9f9;
    color: #0c9267;
}

.site-user-dropdown-links a i {
    width: 18px;
    text-align: center;
    color: #638082;
    flex-shrink: 0;
}

.site-user-dropdown-links a span {
    flex: 1;
}

.lang-switch,
.login-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 800;
    font-size: 14px;
}

.post-ad-btn {
    background: var(--primary-green);
    color: var(--white);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 14px;
    border: 2px solid var(--secondary-gold);
    box-shadow: 0 2px 8px rgba(12, 146, 103, 0.2);
    transition: var(--transition);
    white-space: nowrap;
}

.post-ad-btn:hover {
    background: #097d58;
    transform: translateY(-2px);
}

.user-actions .mobile-icon {
    display: none;
}

.user-actions .user-actions-text {
    display: inline;
}

/* Secondary Nav - Sidalhag-style horizontal links with dropdown */
.secondary-nav > ul {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    list-style: none;
    padding: 10px 0;
    border-top: 1px solid #f2f4f5;
}

.secondary-nav-item {
    position: relative;
}

.secondary-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

.secondary-nav a:hover {
    background: var(--bg-light);
    color: var(--primary-green);
}

.secondary-nav-chevron {
    font-size: 10px;
    margin-inline-start: 4px;
    opacity: 0.8;
}

.secondary-nav-dropdown {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    min-width: 200px;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid #e8e8e8;
    list-style: none;
    padding: 8px 0;
    margin: 4px 0 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1000;
}

.secondary-nav-item:hover .secondary-nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.secondary-nav-dropdown li {
    margin: 0;
}

.secondary-nav-dropdown a {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0;
}

.secondary-nav-dropdown a:hover {
    background: #f0fdf9;
    color: var(--primary-green);
}

.more-cats {
    font-weight: 800 !important;
}

/* Top Banners - Sidalhag-style: constrained width, reasonable dimensions */
.home-categories-banners-wrap {
    display: flex;
    flex-direction: column;
    background: var(--bg-light);
}

/* Main slider banner always on top (PC and mobile) */
.home-categories-banners-wrap .home-banners {
    order: -1;
}

/* Same width as main container (below ads section) - 1280px / 1360px */
.home-banners {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 14px 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

.sidalhag-banner {
    width: 100%;
    overflow: hidden;
    background: #e8e8e8;
    border-radius: 22px;
    border: 1px solid #e6eeee;
    box-shadow: 0 12px 30px rgba(0, 47, 52, 0.08);
    position: relative;
}

@media (min-width: 768px) {
    .home-banners {
        padding: 18px 20px 22px;
        gap: 18px;
    }
}

@media (min-width: 1024px) {
    .home-banners {
        padding: 20px 24px 26px;
    }
}
@media (min-width: 1400px) {
    .home-banners {
        max-width: 1360px;
        padding-left: 32px;
        padding-right: 32px;
    }
}

.sidalhag-banner-link,
.sidalhag-banner-inner {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
    position: relative;
}

.sidalhag-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Ad banner slider container - same as ad-space-below-promo: 822x305 */
.sidalhag-banner.ad-banner {
    position: relative;
    min-height: 305px;
    height: 305px;
    background: linear-gradient(135deg, #f4faf8 0%, #eff6f6 100%);
}

.banner-hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0c9267;
    border-radius: 18px;
}

.banner-hero-track {
    position: relative;
    display: block;
    height: 100%;
    min-width: 100%;
    transition: none;
}

.banner-hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0c9267;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--banner-slide-transition, 500ms) ease, visibility var(--banner-slide-transition, 500ms) ease;
}

.banner-hero-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.banner-slide-with-bg {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.banner-hero-link,
.banner-hero-inner {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
    position: relative;
}

.banner-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Promo slide - when no paid ads */
.banner-hero-promo {
    background: linear-gradient(140deg, #0c9267 0%, #087a55 35%, #002f34 100%);
}

.banner-hero-promo-card {
    text-align: center;
    padding: 34px 24px;
    max-width: 470px;
}

.banner-hero-promo-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.banner-hero-promo-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.banner-hero-promo-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    line-height: 1.5;
}

.banner-hero-promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #fff;
    color: var(--primary-green);
    font-weight: 700;
    font-size: 15px;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.banner-hero-promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: #097d58;
}

@media (min-width: 768px) {
    .sidalhag-banner.ad-banner {
        min-height: 305px;
        height: 305px;
    }

    .banner-hero-promo-card {
        padding: 30px 28px;
    }
    .banner-hero-promo-icon {
        width: 64px;
        height: 64px;
        font-size: 28px;
        margin-bottom: 20px;
    }
    .banner-hero-promo-title {
        font-size: 26px;
        margin-bottom: 10px;
    }
    .banner-hero-promo-desc {
        font-size: 16px;
        margin-bottom: 24px;
    }
}

/* Prev/Next arrows */
.banner-hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-green);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}

.banner-hero-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.05);
}

.banner-hero-prev {
    right: 12px;
}

.banner-hero-next {
    left: 12px;
}

@media (min-width: 768px) {
    .banner-hero-nav {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    .banner-hero-prev {
        right: 20px;
    }
    .banner-hero-next {
        left: 20px;
    }
}

/* Dots indicator */
.banner-hero-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.banner-hero-dot {
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
    transition: background 0.25s, transform 0.25s;
}

.banner-hero-dot:hover,
.banner-hero-dot.active {
    background: #fff;
    transform: scale(1.25);
}

.banner-hero-dot.active {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.banner-card-head {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    pointer-events: none;
}

.banner-card-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(0, 47, 52, 0.14);
}

.banner-card-badge-paid {
    background: rgba(0, 47, 52, 0.82);
    color: #fff;
}

.banner-card-badge-brand {
    background: rgba(255, 255, 255, 0.92);
    color: #0c9267;
}

.banner-card-note {
    display: none;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    backdrop-filter: blur(10px);
    font-size: 11px;
    font-weight: 700;
}

.paid-banner-card {
    padding: 12px;
}

/* Company self commercial ad: same size as banner-hero-slider (305px) */
.owner-banner-card {
    min-height: 305px;
    height: 305px;
    background: linear-gradient(145deg, #ffffff 0%, #f6fbf9 100%);
    padding: 12px;
}

.owner-banner-link {
    border-radius: 12px;
    overflow: hidden;
    min-height: 0;
    height: 100%;
}

.owner-banner-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 47, 52, 0.05) 0%, rgba(0, 47, 52, 0.62) 100%);
    z-index: 1;
}

.owner-banner-overlay {
    position: absolute;
    inset-inline: 12px;
    bottom: 10px;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}

.owner-banner-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #fff;
    line-height: 1.3;
}

.owner-banner-copy strong {
    font-size: 13px;
    font-weight: 800;
}

.owner-banner-copy small {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.86);
}

.owner-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #0c9267;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.banner-hero-overlay {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.banner-hero-overlay-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    backdrop-filter: blur(10px);
    font-size: 11px;
    font-weight: 800;
}

.banner-hero-overlay-title {
    max-width: min(90%, 520px);
    padding: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.32);
}

.banner-hero-overlay-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #002f34;
    font-size: 12px;
    font-weight: 800;
}

.banner-hero-link::after,
.banner-hero-inner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 47, 52, 0.05) 0%, rgba(0, 47, 52, 0.72) 100%);
}

@media (min-width: 768px) {
    .banner-card-head {
        top: 18px;
        left: 18px;
        right: 18px;
    }

    .banner-card-note {
        display: inline-flex;
    }

    .banner-hero-overlay {
        left: 20px;
        right: 20px;
        bottom: 18px;
    }

    .banner-hero-overlay-title {
        font-size: 24px;
        max-width: min(68%, 520px);
    }

    .owner-banner-card {
        min-height: 305px;
        height: 305px;
    }

    .owner-banner-link {
        min-height: 0;
        height: 100%;
    }

    .owner-banner-overlay {
        inset-inline: 14px;
        bottom: 12px;
        align-items: center;
    }

    .owner-banner-copy strong {
        font-size: 14px;
    }

    .owner-banner-copy small {
        font-size: 11px;
    }
}

@media (max-width: 767px) {
    .home-banners {
        padding-top: 16px;
    }

    .paid-banner-card {
        min-height: 200px;
    }
    .sidalhag-banner.ad-banner {
        min-height: 200px;
        height: 200px;
    }
    .owner-banner-card {
        min-height: 305px;
        height: 305px;
    }
    .owner-banner-link {
        min-height: 0;
        height: 100%;
    }

    .banner-card-head {
        top: 10px;
        left: 10px;
        right: 10px;
    }

    .banner-card-badge {
        min-height: 28px;
        padding: 0 10px;
        font-size: 11px;
    }

    .banner-hero-overlay-title {
        font-size: 17px;
        max-width: 92%;
    }

    .banner-hero-overlay-cta {
        min-height: 36px;
        font-size: 11px;
        padding: 0 12px;
    }

    .owner-banner-overlay {
        flex-direction: column;
        align-items: flex-start;
    }

    .owner-banner-cta {
        min-height: 26px;
        padding: 0 10px;
        font-size: 11px;
    }

    .banner-hero-nav {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .banner-hero-prev {
        right: 10px;
    }

    .banner-hero-next {
        left: 10px;
    }

    .banner-hero-dots {
        bottom: 12px;
    }
}

/* Ad space below - same container width as main content */
.ad-space-below-slider {
    display: block;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}

.ad-space-below-slider.banner-hero-slider {
    min-height: 305px;
    height: 305px;
}

.ad-space-below-slider .banner-hero-track {
    height: 305px;
}
.ad-space-below-item {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    height: 305px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.ad-space-below-item img {
    width: 100%;
    height: 305px;
    object-fit: cover;
    display: block;
}

.ad-space-below-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.ad-space-below-overlay-title {
    position: absolute;
    left: 62px;
    right: 62px;
    bottom: 18px;
    z-index: 12;
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(0, 47, 52, 0.62);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 991px) {
    .home-banners { max-width: 100%; }
    .sidalhag-banner.ad-banner { min-height: 200px; height: 200px; }
    .owner-banner-card { min-height: 305px; height: 305px; }
    .owner-banner-link { min-height: 0; height: 100%; }
    .ad-space-below-item { max-width: 100%; height: auto; min-height: 200px; }
    .ad-space-below-item img { height: 200px; }
    .ad-space-below-overlay-title {
        left: 54px;
        right: 54px;
        bottom: 12px;
        font-size: 14px;
        padding: 8px 12px;
    }
    .ad-space-below-slider.banner-hero-slider { min-height: 200px; height: 200px; }
    .ad-space-below-slider .banner-hero-track { height: 200px; }
    .promo-ad-space-inline,
    .promo-content-card.promo-ad-space.promo-ad-space-inline { max-width: 100%; min-height: auto; }
}
@media (max-width: 767px) {
    .home-banners { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}

/* Bottom ad space promo - when no paid ads. No outer container styling */
.ad-space-below-promo {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    margin: 1rem 0;
    background: transparent;
    border: none;
}

.promo-ad-space-inline {
    width: 100%;
    max-width: 100%;
    min-height: 305px;
    text-align: center;
}

.promo-ad-space-inline h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.promo-ad-space-inline p {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 14px;
}

.promo-content-card {
    background: hsla(0, 0%, 100%, 0.95);
    padding: 20px 24px;
    border-radius: 8px;
    max-width: 360px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    text-align: right;
}

/* promo-ad-space promo-ad-space-inline: full width of container (same as below ads) */
.promo-content-card.promo-ad-space.promo-ad-space-inline {
    width: 100%;
    max-width: 100%;
    min-height: 305px;
}

@media (min-width: 768px) {
    .promo-content-card {
        padding: 24px 28px;
        max-width: 400px;
    }
    .promo-content-card.promo-ad-space.promo-ad-space-inline {
        max-width: 100%;
        min-height: 305px;
    }
}

.promo-tag {
    background: var(--primary-green);
    color: white;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 16px;
    display: inline-block;
}

.promo-content-card h2 {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    .promo-content-card h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }
}

.promo-content-card p {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 16px;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .promo-content-card p {
        font-size: 15px;
        margin-bottom: 18px;
    }
}

.promo-btn {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.promo-btn:hover {
    background: #097d58;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(12, 146, 103, 0.3);
}

/* Categories */
.categories-section {
    background: var(--bg-light);
    padding: var(--section-spacing) 0;
}

.section-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 28px;
    color: var(--text-dark);
}

@media (min-width: 768px) {
    .section-title {
        font-size: 26px;
        margin-bottom: 32px;
    }
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (min-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 24px;
    }
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: var(--transition);
    padding: 20px 12px;
    border-radius: var(--border-radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.category-card:hover .category-icon {
    transform: scale(1.08);
    background: rgba(12, 146, 103, 0.08);
}

.category-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--primary-green);
    transition: var(--transition);
}

@media (min-width: 768px) {
    .category-icon {
        width: 72px;
        height: 72px;
        font-size: 30px;
    }
}

.category-card span {
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .category-card span {
        font-size: 15px;
    }
}

/* Popular Categories - column layout (green icons to match logo, sub-list, "All in" link) */
.categories-popular-section {
    background: var(--bg-light);
    padding: var(--section-spacing) 0;
}
.categories-popular-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}
@media (min-width: 600px) {
    .categories-popular-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .categories-popular-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 32px;
    }
}
.category-popular-block {
    margin-bottom: 24px;
}
.category-popular-block:last-child {
    margin-bottom: 0;
}
.category-popular-main {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-dark);
    margin-bottom: 12px;
}
.category-popular-main:hover {
    color: var(--primary-green);
}
.category-popular-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-green);
    flex-shrink: 0;
}
.category-popular-icon i {
    color: inherit;
    display: inline-block;
}
.category-popular-main strong {
    font-size: 15px;
}
.category-popular-children {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    margin-inline-start: 48px;
}
.category-popular-children li {
    margin-bottom: 6px;
}
.category-popular-children a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
}
.category-popular-children a:hover {
    color: var(--text-dark);
}
.category-popular-all {
    display: inline-block;
    color: var(--primary-green);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-inline-start: 48px;
}
.category-popular-all:hover {
    color: #097d58;
}

/* ── Mobile: horizontal scroll icons row ── */

/* Show/hide helpers */
.cats-mob-header  { display: none; }
.cats-hscroll-row { display: none; }
.cats-hscroll     { display: none; }
.cats-desk-title  { display: block; }
.cats-desk-grid   { display: grid; }

/* Mobile-only category strip (used on ads index/section/show - hidden on desktop) */
.featured-categories-mobile-only { display: none; }

@media (max-width: 768px) {
    /* Mobile-only category strip: show on small screens */
    .featured-categories-mobile-only { display: block !important; }

    /* Desktop elements hidden on mobile */
    .cats-desk-title { display: none !important; }
    .cats-desk-grid  { display: none !important; }

    /* Mobile section spacing */
    .categories-popular-section {
        padding: 14px 0 18px;
        background: var(--white);
    }

    /* Mobile header row: title + "see all" button (legacy; strips use .cats-hscroll-row) */
    .cats-mob-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 4px 12px;
    }
    .cats-mob-title {
        font-size: 16px;
        font-weight: 800;
        color: var(--text-dark);
        margin: 0;
    }
    /* Title above strip; two scrollable rows of icons */
    .cats-hscroll-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }
    .cats-hscroll-wrap {
        width: 100%;
        min-width: 0;
    }
    .cats-hscroll-side-title {
        flex-shrink: 0;
        margin: 0;
        font-size: 18px;
        font-weight: 800;
        color: #0d3136;
        line-height: 1.2;
        max-width: none;
        width: 100%;
        text-align: start;
        padding: 0 4px 2px;
    }
    .cats-mob-see-all {
        display: flex;
        align-items: center;
        gap: 4px;
        background: none;
        border: none;
        cursor: pointer;
        font-size: 13px;
        font-weight: 700;
        color: var(--primary-green);
        padding: 0;
    }
    .cats-mob-see-all i {
        font-size: 11px;
    }

    /* Two fixed rows, columns scroll horizontally (RTL-friendly) */
    .cats-hscroll {
        display: grid;
        grid-template-rows: repeat(2, auto);
        grid-auto-flow: column;
        grid-auto-columns: 90px;
        gap: 10px 8px;
        align-items: start;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding: 2px 2px 8px;
        padding-inline: 2px;
        scrollbar-width: none;
    }
    .cats-hscroll::-webkit-scrollbar { display: none; }

    .cats-hscroll-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-decoration: none;
        color: var(--text-dark);
        width: 100%;
        min-width: 0;
        scroll-snap-align: start;
    }
    .cats-hscroll-item-placeholder {
        visibility: hidden;
        pointer-events: none;
    }
    button.cats-hscroll-item.cats-hscroll-item-btn,
    button.cats-hscroll-item.cats-hscroll-item-seeall {
        background: none;
        border: none;
        cursor: pointer;
        font: inherit;
        padding: 0;
    }
    .cats-hscroll-icon {
        width: 80px;
        height: 80px;
        border-radius: 20px;
        background: #fff;
        border: 1px solid #f0f0f0;
        box-shadow: 0 1px 5px rgba(0, 47, 52, 0.06);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 26px;
        color: #10a37f;
        flex-shrink: 0;
        transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
    }
    .cats-hscroll-icon-home {
        width: 80px;
        height: 80px;
        border-radius: 20px;
        background: #fff;
        border: 1px solid #f0f0f0;
        box-shadow: 0 1px 5px rgba(0, 47, 52, 0.06);
    }
    .cats-hscroll-logo {
        width: 48px;
        height: 48px;
        object-fit: contain;
    }
    .cats-hscroll-item.active .cats-hscroll-icon-home {
        background: var(--primary-green, #0c9267);
        border-color: var(--primary-green, #0c9267);
        color: #fff;
        box-shadow: 0 6px 14px rgba(12, 146, 103, 0.22);
    }
    .cats-hscroll-item.active .cats-hscroll-icon-home .cats-hscroll-logo {
        filter: brightness(0) invert(1);
    }
    .cats-hscroll-item:active .cats-hscroll-icon {
        box-shadow: 0 2px 8px rgba(0, 47, 52, 0.1);
    }
    /* Selected category (current page) */
    .cats-hscroll-item.active .cats-hscroll-icon {
        background: var(--primary-green, #0c9267);
        color: #fff;
        border-color: var(--primary-green, #0c9267);
        box-shadow: 0 6px 14px rgba(12, 146, 103, 0.22);
    }
    .cats-hscroll-item.active .cats-hscroll-name {
        color: var(--primary-green, #0c9267);
        font-weight: 700;
    }
    .cats-hscroll-name {
        font-size: 11px;
        font-weight: 600;
        text-align: center;
        line-height: 1.3;
        color: var(--text-dark);
        max-width: 84px;
    }
}

/* ── Mobile: All-Categories Modal ── */
/* ── Mobile: All-Categories Modal (brand UI) ── */
.cats-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10200;
    background: rgba(0, 47, 52, 0.5);
    align-items: flex-end;
    justify-content: stretch;
    backdrop-filter: blur(4px);
}
.cats-modal-overlay.open {
    display: flex;
}
.cats-modal-sheet {
    background: #fff;
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cats-slide-up 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -4px 24px rgba(0, 47, 52, 0.15);
}
@keyframes cats-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.cats-modal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 2px solid #f0f4f5;
    flex-shrink: 0;
    background: linear-gradient(180deg, #f7f8f8 0%, #fff 100%);
}
.cats-modal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cats-modal-logo {
    height: 36px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}
.cats-modal-brand-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark, #002f34);
}
.cats-modal-close {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: #f0f4f5;
    color: #5b7b7d;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.cats-modal-close:hover,
.cats-modal-close:active {
    background: #e8e8e8;
    color: #002f34;
}
.cats-modal-heading {
    font-size: 15px;
    font-weight: 700;
    color: #5b7b7d;
    margin: 0;
    padding: 12px 20px 8px;
    flex-shrink: 0;
}
.cats-modal-back {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-dark);
    padding: 4px 8px 4px 0;
    display: flex;
    align-items: center;
}
.cats-modal-heading {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
}
.cats-modal-body {
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* Each category row */
.cats-modal-row {
    border-bottom: 1px solid #f5f5f5;
}
.cats-modal-main-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: right;
    position: relative;
}
.cats-modal-main-btn:active {
    background: #f0f4f5;
}
.cats-modal-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f0fdf9;
    border: 2px solid rgba(12, 146, 103, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary-green);
    flex-shrink: 0;
}
.cats-modal-row-name {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    text-align: right;
}
.cats-modal-chevron {
    font-size: 12px;
    color: #aaa;
    transition: transform 0.2s;
}
.cats-modal-row.open .cats-modal-chevron {
    transform: rotate(90deg);
}
/* Direct link overlay when no children */
.cats-modal-direct-link {
    position: absolute;
    inset: 0;
}

/* Subcategory list */
.cats-modal-children {
    display: none;
    padding: 4px 0 12px 0;
    background: #fafafa;
}
.cats-modal-row.open .cats-modal-children {
    display: block;
}
.cats-modal-child {
    display: block;
    padding: 11px 78px 11px 20px;
    font-size: 14px;
    color: #444;
    text-decoration: none;
    border-top: 1px solid #f0f0f0;
}
.cats-modal-child:first-child {
    border-top: none;
}
.cats-modal-child:active {
    background: #f0f4f5;
}
.cats-modal-child-all {
    font-weight: 700;
    color: var(--primary-green);
}

/* Two-panel layout (grid + list) with brand header */
.cats-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #0c9267 0%, #097d58 100%);
    color: #fff;
}
.cats-modal-header .cats-modal-close {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.cats-modal-header .cats-modal-close:hover,
.cats-modal-header .cats-modal-close:active {
    background: rgba(255,255,255,0.35);
    color: #fff;
}
.cats-modal-header-logo {
    height: 36px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.cats-modal-header-title {
    flex: 1;
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    text-align: center;
}
.cats-modal-panels {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.cats-modal-list-wrap {
    width: 36%;
    max-width: 156px;
    flex-shrink: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #f3f6f6;
    border-left: 1px solid #e3ebeb;
    position: relative;
}
.cats-modal-list {
    padding: 10px 0;
}
.cats-modal-list-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #002f34;
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: right;
    border-bottom: 1px solid #e3ebeb;
    touch-action: manipulation;
    transition: background 0.18s ease, color 0.18s ease;
}
.cats-modal-list-item:active {
    background: #e7eeee;
}
.cats-modal-list-item-highlight {
    background: #e9f6f1;
    color: #002f34;
    font-weight: 700;
}
.cats-modal-list-item.active {
    background: #fff;
    color: #0c9267;
    box-shadow: inset 0 0 0 1px rgba(12, 146, 103, 0.08);
    border-left: 3px solid #0c9267;
}
[dir="rtl"] .cats-modal-list-item.active {
    border-left: none;
    border-right: 3px solid #0c9267;
}
.cats-modal-grid-wrap {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 14px 20px;
    background: #fff;
}
.cats-modal-grid-meta {
    margin-bottom: 14px;
}
.cats-modal-grid-kicker {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 800;
    color: #0c9267;
}
.cats-modal-grid-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 800;
    color: #002f34;
}
.cats-modal-grid-subtitle {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #5b7b7d;
}
.cats-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 12px;
}
.cats-modal-grid-panel {
    display: none;
}
.cats-modal-grid-panel.active {
    display: grid;
}
.cats-modal-view-all {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: 13px;
    font-weight: 700;
    color: #0c9267;
    text-decoration: none;
    margin-bottom: 2px;
    border: 1px solid rgba(12, 146, 103, 0.18);
    border-radius: 14px;
    background: #f6fbf9;
}
.cats-modal-view-all:active {
    color: #097d58;
}
.cats-modal-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 10px;
    background: #fff;
    border: 1px solid #e8eeee;
    border-radius: 18px;
    text-decoration: none;
    color: #002f34;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 6px 18px rgba(0, 47, 52, 0.06);
}
.cats-modal-card:active {
    background: #fbfdfd;
    border-color: #0c9267;
    transform: translateY(1px);
}
.cats-modal-card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1.15 / 1;
    overflow: hidden;
    border-radius: 14px;
    background: #eef4f4;
    margin-bottom: 10px;
}
.cats-modal-card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cats-modal-card-name {
    font-size: 13px;
    font-weight: 800;
    text-align: right;
    line-height: 1.35;
    margin-bottom: 4px;
}
.cats-modal-card-meta {
    font-size: 11px;
    color: #6f8486;
    line-height: 1.5;
    text-align: right;
}
.cats-modal-empty {
    grid-column: 1 / -1;
    padding: 18px 14px;
    border: 1px dashed #d9e5e5;
    border-radius: 16px;
    background: #fafdfd;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #5b7b7d;
}

/* Old mobile grid styles — no longer used, suppressed */
@media (max-width: 768px) {
    .categories-popular-section .section-title { display: none; }
    .categories-popular-section .categories-popular-grid { display: none !important; }
}

/* Featured Listings */
.featured-section {
    background: var(--bg-light);
    padding: var(--section-spacing) 0;
}

.popular-ads-now-section {
    background: #fff;
    padding: 28px 0 12px;
    border-bottom: 1px solid rgba(0, 47, 52, 0.06);
}

.popular-ads-now-title {
    margin-bottom: 24px;
}

.popular-ads-category-block {
    margin-bottom: 32px;
}

.popular-ads-category-block:last-child {
    margin-bottom: 8px;
}

.popular-ads-category-block .section-subtitle {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark, #002f34);
    margin: 0;
}

.popular-ads-category-block .section-header {
    margin-bottom: 16px;
}

/* Homepage: one row of most-viewed ads per category — not the full listing */
.popular-ads-category-block .popular-ads-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 12px;
    margin: 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    grid-template-columns: none !important;
}
.popular-ads-category-block .popular-ads-row::-webkit-scrollbar {
    display: none;
}
.popular-ads-category-block .popular-ads-row > * {
    flex: 0 0 calc((100% - 48px) / 4);
    max-width: calc((100% - 48px) / 4);
    min-width: 0;
    scroll-snap-align: start;
}
body.home-dubizzle-style .popular-ads-category-block .popular-ads-row > .listing-card.home-listing-card-dubizzle {
    flex: 0 0 calc((100% - 48px) / 4);
    max-width: calc((100% - 48px) / 4);
}
@media (max-width: 1199px) {
    .popular-ads-category-block .popular-ads-row > *,
    body.home-dubizzle-style .popular-ads-category-block .popular-ads-row > .listing-card.home-listing-card-dubizzle {
        flex-basis: calc((100% - 32px) / 3);
        max-width: calc((100% - 32px) / 3);
    }
}
@media (max-width: 991px) {
    .popular-ads-category-block .popular-ads-row > *,
    body.home-dubizzle-style .popular-ads-category-block .popular-ads-row > .listing-card.home-listing-card-dubizzle {
        flex-basis: calc((100% - 16px) / 2);
        max-width: calc((100% - 16px) / 2);
    }
}
@media (max-width: 767px) {
    .popular-ads-category-block .popular-ads-row {
        gap: 12px;
        padding: 4px 0 14px;
    }
    .popular-ads-category-block .popular-ads-row > *,
    body.home-dubizzle-style .popular-ads-category-block .popular-ads-row > .listing-card.home-listing-card-dubizzle {
        flex-basis: min(78vw, 260px);
        max-width: min(78vw, 260px);
    }
}

@media (max-width: 767px) {
    .popular-ads-now-section {
        padding: 20px 0 8px;
    }
    .popular-ads-now-title {
        font-size: 18px;
        margin-bottom: 18px;
    }
    .popular-ads-category-block {
        margin-bottom: 24px;
    }
    .popular-ads-category-block .section-subtitle {
        font-size: 16px;
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 767px) {
    .featured-section {
        padding: 24px 0 28px;
    }
    .section-header {
        margin-bottom: 20px;
        gap: 10px;
    }
    .section-header .section-title {
        font-size: 18px;
        margin-bottom: 0;
    }
    .view-all {
        font-size: 14px;
    }
}

.view-all {
    text-decoration: none;
    color: var(--primary-teal);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    transition: var(--transition);
}

.view-all:hover {
    color: var(--primary-green);
}

/* Mobile: horizontal scroll */
.listings-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 8px 24px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.listings-grid::-webkit-scrollbar {
    display: none;
}

/* Desktop: 4-column grid */
@media (min-width: 768px) {
    .listings-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        overflow: visible;
        padding: 0;
        scroll-snap-type: none;
    }
}

@media (min-width: 992px) {
    .listings-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1200px) {
    .listings-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

.listing-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.listing-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #f8e7a1 0%, #d4a63a 45%, #fff2c6 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

@media (min-width: 768px) {
    .listing-card {
        flex: none;
        border: 1px solid rgba(212, 166, 58, 0.24);
        box-shadow: 0 10px 26px rgba(0, 47, 52, 0.08);
    }
}

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

.listing-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--secondary-gold);
    color: var(--text-dark);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.listing-image {
    position: relative;
    height: 140px;
}

@media (min-width: 480px) {
    .listing-image {
        height: 150px;
    }
}

@media (min-width: 768px) {
    .listing-image {
        height: 155px;
    }
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (min-width: 768px) {
    .listing-card::before {
        opacity: 1;
    }

    .listing-card:hover {
        box-shadow: 0 16px 34px rgba(0, 47, 52, 0.14);
    }

    .listing-image {
        height: 220px;
        overflow: hidden;
        background: #f6f8f9;
    }

    .listing-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: var(--touch-min);
    min-width: var(--touch-min);
    height: var(--touch-min);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.wishlist-btn:hover {
    background: var(--white);
    transform: scale(1.05);
}

/* Home listing cards: price + heart row (Dubizzle-style; all breakpoints) */
.listing-card.home-listing-card-dubizzle .listing-price-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.listing-card.home-listing-card-dubizzle .wishlist-btn-row {
    position: static;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
    background: #f4f8f7;
    border: 1px solid #dce8e4;
    color: #0d3136;
    font-size: 17px;
    flex-shrink: 0;
}

.listing-card.home-listing-card-dubizzle .listing-price {
    margin: 0;
    flex: 1;
    min-width: 0;
}

.listing-chat-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: var(--touch-min);
    min-width: var(--touch-min);
    height: var(--touch-min);
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    color: #0c9267;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.listing-chat-btn:hover {
    background: #fff;
    color: #097d58;
    transform: scale(1.05);
}

.card-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: var(--touch-min);
    width: var(--touch-min);
    height: var(--touch-min);
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    color: var(--primary-green);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.card-chat-btn:hover {
    background: #fff;
    color: #097d58;
    transform: scale(1.05);
}

.listing-details {
    padding: 12px;
}

.listing-price {
    font-size: 16px;
    font-weight: 800;
    font-family: inherit;
    margin-bottom: 6px;
    color: var(--primary-green);
}

@media (min-width: 768px) {
    .listing-price {
        font-size: 18px;
    }
}

.listing-title {
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    color: var(--text-dark);
    margin-bottom: 8px;
    min-height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.listing-location {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    font-size: 13px;
    color: var(--text-gray);
    margin-top: 2px;
}

.listing-location-place,
.listing-location-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-location-time {
    font-size: 12px;
}

/* Promo CTA - How it works / Post ad (web, no app) */
.promo-cta {
    width: 100%;
    background: var(--bg-light);
    padding: 36px 0;
    margin-top: 40px;
}

.promo-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.promo-cta-content {
    flex: 1;
    color: var(--text-dark);
}

.promo-cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(12, 146, 103, 0.12);
    color: var(--primary-green);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.promo-cta-title {
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 8px;
    line-height: 1.2;
    color: var(--text-dark);
}

.promo-cta-desc {
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.5;
}

.promo-cta-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-bottom: 24px;
}

.promo-cta-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.promo-cta-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(12, 146, 103, 0.15);
    color: var(--primary-green);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
}

.promo-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: var(--primary-green);
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.promo-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    background: #fff;
    color: var(--primary-green);
}

.promo-cta-visual {
    flex-shrink: 0;
}

.promo-cta-icon-wrap {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 146, 103, 0.12);
    border-radius: 24px;
    font-size: 44px;
    color: var(--primary-green);
}

@media (min-width: 768px) {
    .promo-cta {
        padding: 44px 0;
        margin-top: 48px;
    }
    .promo-cta-title {
        font-size: 30px;
        margin-bottom: 10px;
    }
    .promo-cta-desc {
        font-size: 16px;
        margin-bottom: 24px;
    }
    .promo-cta-steps {
        margin-bottom: 28px;
    }
    .promo-cta-icon-wrap {
        width: 120px;
        height: 120px;
        font-size: 52px;
    }
}

@media (max-width: 767px) {
    .promo-cta-inner {
        flex-direction: column;
        text-align: center;
    }
    .promo-cta-badge {
        margin-left: auto;
        margin-right: auto;
    }
    .promo-cta-steps {
        justify-content: center;
    }
    .promo-cta-step {
        flex: 1 1 100%;
        justify-content: center;
    }
    .promo-cta-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Footer - Modern attractive UI/UX */
.site-footer {
    margin-top: 0;
    background: linear-gradient(180deg, #002f34 0%, #001a1d 100%);
    color: rgba(255, 255, 255, 0.9);
}

.footer-main {
    padding: 40px 0 32px;
}

.footer-main-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-brand-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
}

.footer-brand-logo {
    height: 42px;
    width: auto;
    display: block;
    object-fit: contain;
}

.footer-brand:hover {
    color: #fff;
    opacity: 0.95;
}

.footer-social-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-social-label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.25s ease;
}

.footer-social-link:hover {
    background: #0c9267;
    color: #fff;
    transform: translateY(-3px);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 28px 40px;
}

@media (min-width: 600px) {
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .footer-links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-block-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-block-title i {
    color: #0c9267;
    font-size: 14px;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: #fff;
    padding-inline-start: 4px;
}

.footer-bottom {
    background: rgba(0,0,0,0.25);
    padding: 16px 0;
}

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

.footer-copyright {
    margin: 0;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
}

.footer-dev {
    color: rgba(255,255,255,0.6);
}

.footer-currency-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-currency-label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.footer-currency-dropdown {
    position: relative;
}

.footer-currency-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.footer-currency-selected {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-currency-flag {
    width: 18px;
    height: 14px;
    flex-shrink: 0;
}

.footer-currency-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
}

.footer-currency-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    min-width: 200px;
    overflow: hidden;
    z-index: 100;
}

.footer-currency-menu.open {
    display: block;
}

.footer-currency-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: none;
    background: none;
    text-align: right;
    font-size: 14px;
    color: #002f34;
    cursor: pointer;
    transition: background 0.2s;
}

.footer-currency-option-flag {
    width: 20px;
    height: 15px;
    flex-shrink: 0;
}

.footer-currency-option:hover {
    background: #f0f4f5;
}

.footer-currency-option.active {
    background: rgba(12,146,103,0.12);
    color: #0c9267;
    font-weight: 600;
}

@media (max-width: 768px) {
    .footer-main {
        padding: 28px 0 24px;
    }

    .footer-brand-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-bottom: 24px;
        margin-bottom: 24px;
    }

    .footer-social-wrap {
        flex-direction: column;
    }

    .footer-links-grid {
        gap: 24px;
    }

    .footer-block-title {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .footer-links a {
        font-size: 13px;
    }

    .footer-bottom {
        padding: 14px 0;
        padding-bottom: max(14px, env(safe-area-inset-bottom));
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-copyright {
        font-size: 12px;
    }

    .footer-currency-menu {
        right: 50%;
        transform: translateX(50%);
    }
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 32px;
    padding: 28px 0 24px;
}

.footer-logo img {
    height: 42px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-social {
    margin-right: auto;
    display: flex;
    gap: 16px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    transition: background 0.2s, transform 0.2s;
}

.footer-social a:hover {
    background: var(--primary-green);
    transform: translateY(-2px);
}

.footer-bar {
    background: rgba(0, 0, 0, 0.2);
    padding: 14px 0;
}

.footer-bar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.footer-bar p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: #fff;
}

/* Sidalhag-style mobile footer */
@media (max-width: 768px) {
    .site-footer {
        margin-top: 0;
        padding-bottom: 92px;
        display: block !important;
    }

    .footer-grid-wrap {
        padding: 24px 0 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }

    .footer-col-social {
        align-items: center;
    }

    .footer-col h4 {
        font-size: 13px;
    }

    .footer-col ul li a {
        font-size: 12px;
    }

    .footer-currency-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-bar-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-bar-right {
        justify-content: center;
    }

    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 0 16px;
        gap: 12px;
    }

    .footer-logo {
        order: 1;
    }

    .footer-logo img {
        height: 36px;
    }

    .footer-nav {
        order: 2;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px 16px;
        justify-items: center;
        max-width: 280px;
    }

    .footer-nav a {
        font-size: 13px;
        padding: 4px 8px;
    }

    .footer-social {
        order: 3;
        margin-right: 0;
        justify-content: center;
        gap: 12px;
    }

    .footer-social a {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .footer-bar {
        padding: 12px 0;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .footer-bar-inner {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        gap: 8px 16px;
    }

    .footer-bar p {
        font-size: 12px;
        margin: 0;
    }

    .footer-legal {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-legal a {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .footer-top {
        padding: 16px 0 12px;
        gap: 10px;
    }

    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px 12px;
        max-width: 100%;
    }

    .footer-nav a {
        font-size: 12px;
    }
}

/* Legacy footer (ads pages, etc.) */
.main-footer {
    background: #ebeeef;
    padding: 40px 0 0;
    color: var(--text-dark);
}

.main-footer .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 32px;
    padding-bottom: 36px;
}

@media (min-width: 640px) {
    .main-footer .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .main-footer .footer-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 32px 40px;
        padding-bottom: 40px;
    }
}

.footer-col h4 {
    margin-bottom: 16px;
    font-weight: 800;
    font-size: 15px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 14px;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary-teal);
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    font-size: 24px;
    color: var(--text-dark);
}

.main-footer .footer-bottom {
    background: var(--primary-teal);
    color: var(--white);
    padding: 16px 0;
    text-align: center;
}

.main-footer .footer-bottom p {
    font-size: 14px;
    margin: 0;
}

/* Sidalhag-style mobile main-footer (ads pages) */
@media (max-width: 768px) {
    .main-footer {
        padding: 24px 0 0;
        padding-bottom: max(80px, env(safe-area-inset-bottom));
    }

    .main-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-bottom: 20px;
        text-align: center;
    }

    .main-footer .footer-col h4 {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .main-footer .footer-col ul li a {
        font-size: 13px;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .promo-banner {
        padding: 0 20px;
        height: auto;
        padding: 40px 20px;
        flex-direction: column;
        text-align: center;
    }

    .promo-stats {
        justify-content: center;
    }
}

/* Sidalhag-style mobile header & layout */
@media (max-width: 768px) {
    .main-header {
        padding: 10px 0 0;
    }

    .main-header .header-inner,
    .main-header .container {
        display: flex;
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }

    .hamburger-btn {
        display: flex;
    }

    .header-category-shortcuts {
        display: flex;
    }

    .header-top {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
        /* Keep edge breathing room on iPhone/notched screens */
        padding-inline-start: max(10px, env(safe-area-inset-right, 0px));
        padding-inline-end: max(16px, env(safe-area-inset-left, 0px));
        padding-bottom: 10px;
        border-bottom: 1px solid #f2f4f5;
        overflow: hidden;
    }

    /* In RTL mobile, account chip is on the visual left; keep it away from edge. */
    .site-user-menu-header {
        margin-inline-end: max(8px, env(safe-area-inset-left, 0px));
        flex: 0 1 160px;
        min-width: 0;
        max-width: 42vw;
    }

    /* Logo: move to the right (RTL start), styled as Sidalhag-style badge */
    .header-top .logo-area {
        order: -1;
        flex: none;
        flex-shrink: 0;
        justify-content: flex-start;
    }

    .header-top .logo-area .logo-link {
        background: #ffffff;
        border: 2.5px solid #0c9267;
        border-radius: 50px;
        padding: 6px 14px;
        box-shadow: 0 2px 12px rgba(12, 146, 103, 0.22);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .header-top .logo-area .logo-link:active {
        box-shadow: 0 1px 6px rgba(12, 146, 103, 0.18);
        transform: scale(0.97);
    }

    .top-nav-links {
        display: none !important;
    }

    .site-user-menu-mobile {
        display: block;
    }

    .logo-img {
        height: 50px;
        margin-bottom: 0;
    }

    .search-row {
        margin-bottom: 10px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        min-width: 0;
    }

    .search-row-find {
        width: 100%;
    }

    /* Mobile: no heart next to search; menu opens from hamburger beside the search field */
    .search-row .header-favorites-shortcut {
        display: none !important;
    }

    .home-strip-hamburger-btn {
        display: none !important;
    }

    .search-row-find .hamburger-btn {
        flex-shrink: 0;
        align-self: center;
    }

    .header-favorites-shortcut {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 22px;
    }

    .location-box {
        flex: 0 0 auto;
        min-width: 0;
        width: 100%;
    }

    .location-current {
        padding: 0 12px;
        height: auto;
        gap: 8px;
        font-size: 14px;
        width: 100%;
        justify-content: flex-start;
        border-radius: 12px;
        border-color: #e6eceb;
        min-height: 44px;
    }

    .location-current.location-current-dual .fa-location-dot,
    .location-current.location-current-dual #currentColor,
    .location-current.location-current-dual #locationChevron {
        display: none;
    }

    .mobile-location-dual-inline {
        display: flex;
        align-items: center;
        width: 100%;
        gap: 8px;
        min-width: 0;
    }

    .mobile-location-dual-inline .mobile-location-select {
        font-size: 12.5px;
    }

    .search-box-main {
        flex: 1;
        min-width: 0;
    }

    .search-box-main input {
        font-size: 14px;
        height: 40px;
    }

    .search-box-main input::placeholder {
        font-size: 13px;
    }

    .user-actions {
        display: flex !important;
        margin-inline-start: 0;
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }

    .user-actions .post-ad-btn {
        display: inline-flex !important;
    }

    .header-login-link {
        padding: 8px 14px;
        font-size: 13px;
    }

    .header-login-link span {
        display: inline;
    }

    /* Compact header user trigger on mobile */
    .site-user-trigger-header {
        min-height: 50px;
        padding: 10px 14px;
        gap: 8px;
        width: 100%;
        max-width: 100%;
    }

    .site-user-trigger-header .site-user-trigger-text {
        min-width: 0;
    }

    .site-user-trigger-header .site-user-trigger-name {
        font-size: 14px;
        max-width: 110px;
    }

    .site-user-trigger-header .site-user-trigger-meta {
        font-size: 12px;
    }

    .site-user-avatar-header {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }

    .site-user-dropdown-header {
        inset-inline-end: 0;
        inset-inline-start: auto;
        top: calc(100% + 10px);
        width: min(88vw, 300px);
    }

    /* Hide secondary-nav on mobile; categories-section occupies its position */
    .secondary-nav {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .header-top {
        padding-inline-start: max(10px, env(safe-area-inset-right, 0px));
        padding-inline-end: max(18px, env(safe-area-inset-left, 0px));
    }

    .logo-img {
        height: 44px;
    }

    .site-user-trigger-header .site-user-trigger-meta {
        margin-top: 0;
        font-size: 12px;
    }

    .site-user-trigger-header {
        padding: 9px 12px;
        min-height: 46px;
        max-width: 100%;
    }

    .site-user-trigger-header .site-user-trigger-name {
        display: block;
        font-size: 13px;
        max-width: 100%;
    }

    .site-user-menu-header {
        flex-basis: 132px;
        max-width: 46vw;
    }

    .header-cat-link {
        min-width: 46px;
        font-size: 10px;
    }

    .header-cat-link i {
        font-size: 20px;
    }

    .site-user-menu-mobile .site-user-dropdown {
        width: min(92vw, 280px);
    }
}

/* Marketplace modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(2px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #fff;
    width: 95%;
    max-width: 800px;
    min-height: 450px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 10001;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
}

.close-modal {
    font-size: 24px;
    color: var(--text-gray);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-green);
}

.modal-body {
    padding: 30px;
}

.post-step {
    display: none;
    padding: 0;
    animation: fadeIn 0.3s ease;
}

.post-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.haraj-btn {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.haraj-btn.primary {
    background: var(--primary-green);
    color: #fff;
}

.haraj-btn.primary:hover {
    background: #097d58;
}

.haraj-btn.secondary {
    background: #e9ecef;
    color: #495057;
}

.haraj-btn.success {
    background: var(--primary-green);
    color: #fff;
}

.haraj-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.haraj-cat-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.haraj-cat-btn:hover {
    border-color: var(--primary-green);
    background: #f0fdf9;
    transform: translateY(-2px);
}

.haraj-cat-btn i {
    font-size: 28px;
    color: var(--primary-green);
}

.haraj-cat-btn span {
    font-size: 14px;
    font-weight: 700;
    color: #444;
}

.step-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.haraj-input,
.haraj-textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 15px;
    outline: none;
}

.haraj-input:focus {
    border-color: var(--primary-green);
}

.haraj-textarea {
    height: 120px;
    resize: none;
}

.image-upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    color: #888;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.image-upload-area:hover {
    border-color: var(--primary-green);
    background: #f8faff;
}

.image-upload-area i {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.preview-wrapper {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.preview-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-img {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.7);
    color: white;
    min-width: 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: background 0.2s;
}

.remove-img:hover {
    background: rgba(255, 0, 0, 0.9);
}

.photo-guidelines {
    background: #fffcf0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ffeeba;
}

.photo-guidelines h5 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
}

.photo-guidelines ul {
    list-style: none;
    padding: 0;
}

.photo-guidelines li {
    font-size: 13px;
    color: #856404;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.photo-guidelines li::before {
    content: "•";
    color: #856404;
    font-weight: bold;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.selection-list {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 20px;
}

.selection-item {
    padding: 15px;
    border-bottom: 1px solid #f9f9f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

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

.selection-item:hover {
    background-color: #f0fdf9;
    padding-right: 20px;
}

.selection-item i {
    color: var(--primary-green);
    font-size: 14px;
}

.selection-item span {
    font-weight: 600;
    color: #444;
}

.selected-path-display {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #eef0f2;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-gray);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.path-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.path-group.location-unit {
    padding-top: 8px;
    border-top: 1px dashed #eee;
}

.selected-path-display b {
    color: var(--primary-green);
    font-weight: 700;
}

.selected-path-display i {
    font-size: 10px;
    color: #ccc;
}

/* Auth Modal Styles */
.auth-container {
    max-width: 550px;
}

.auth-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-view.active {
    display: block;
}

.auth-logo-box {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 10px;
}

.auth-logo-box img {
    height: 50px;
}

.auth-form .input-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.auth-footer p {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.auth-footer a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 800;
}

.forgot-pass {
    display: block;
    font-size: 13px;
    margin-top: 10px;
    color: var(--text-gray) !important;
    font-weight: 500 !important;
}

@media (max-width: 480px) {
    .haraj-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Ad Details Page Styles */
.breadcrumbs-nav {
    background: #fff;
    padding: 12px 0;
    border-bottom: 1px solid #f2f4f5;
    margin-bottom: 20px;
}

.breadcrumbs-nav ul {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;
    font-size: 13px;
    padding: 0;
    margin: 0;
}

.breadcrumbs-nav a {
    text-decoration: none;
    color: #427ede;
    font-weight: 500;
}

.breadcrumbs-nav li i {
    font-size: 10px;
    color: var(--text-gray);
}

.breadcrumbs-nav li.active {
    color: var(--text-dark);
    font-weight: 700;
}

.ad-details-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    margin-bottom: 40px;
}

.ad-card-section {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid #f2f4f5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.section-subtitle {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-dark);
    border-bottom: 1px solid #e8e8e8;
    display: inline-block;
    padding-bottom: 5px;
}

.ad-gallery-card {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.main-image {
    position: relative;
    height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.gallery-nav button:hover {
    background: rgba(255, 255, 255, 0.4);
}

.nav-prev {
    right: 20px;
}

.nav-next {
    left: 20px;
}

.thumbnail-bar {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: #fff;
    border-top: 1px solid #f2f4f5;
    overflow-x: auto;
}

.thumb {
    width: 90px;
    height: 65px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    opacity: 0.7;
}

.thumb:hover {
    opacity: 1;
}

.thumb.active {
    border-color: var(--primary-green);
    opacity: 1;
    transform: scale(1.05);
}

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.attribute-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 0;
}

.attrib-label {
    color: var(--text-gray);
    font-size: 13px;
    font-weight: 600;
}

.attrib-value {
    color: var(--text-dark);
    font-weight: 800;
    font-size: 15px;
}

.sidebar-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #f2f4f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ad-price {
    font-size: 34px;
    font-weight: 900;
    color: var(--primary-green);
    margin-bottom: 10px;
}

.ad-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 16px;
}

.ad-meta {
    display: flex;
    gap: 16px;
    color: var(--text-gray);
    font-size: 13px;
    margin-bottom: 20px;
}

.action-btns-row {
    display: flex;
    gap: 12px;
}

.share-btn,
.fav-btn {
    flex: 1;
    height: 48px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-dark);
    transition: var(--transition);
}

.share-btn:hover,
.fav-btn:hover {
    background: #f7f8f8;
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.fav-btn.active,
.fav-btn.active:hover {
    color: var(--primary-green);
    border-color: var(--primary-green);
    background: rgba(12, 146, 103, 0.08);
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.seller-avatar {
    width: 64px;
    height: 64px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-gray);
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.seller-name {
    font-weight: 900;
    font-size: 18px;
    color: var(--text-dark);
}

.member-since {
    font-size: 12px;
    color: var(--text-gray);
    display: block;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-btn {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
}

.contact-btn.call {
    background: var(--primary-green);
    color: #fff;
}

.contact-btn.chat {
    background: #fff;
    border: 2px solid var(--primary-teal);
    color: var(--primary-teal);
}

.contact-btn.sms {
    background: #f2f4f5;
    color: var(--text-dark);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(12, 146, 103, 0.2);
}

.mobile-fixed-contact {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 12px 20px;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
    z-index: 9999;
}

.mobile-contact-btn {
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
}

.mobile-contact-btn.btn-whatsapp {
    background: #25D366;
}

.mobile-contact-btn.btn-call,
.mobile-contact-btn.btn-chat {
    background: var(--primary-green);
}

@media (max-width: 992px) {
    .ad-details-grid,
    .ad-detail-grid,
    body.is-detail-page .ad-detail-grid {
        grid-template-columns: 1fr;
    }

    .ad-sidebar {
        order: -1;
    }

    /* Mobile: content stacks first, sidebar second (matches DOM order) */
    .ad-detail-sidebar {
        position: static;
    }

    .main-image,
    .gallery-slide {
        height: 400px;
    }

    .ad-price-two-col {
        flex-direction: column;
    }

    .ad-price-left {
        flex-direction: row;
        align-self: flex-end;
        gap: 16px;
    }

    .attributes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-fixed-contact {
        display: grid;
    }

    .ad-details-page,
    .ad-detail-main {
        padding-bottom: 80px;
    }

    .contact-actions {
        display: none;
    }
}

/* Sidalhag-style mobile ad detail */
@media (max-width: 768px) {
    body.is-detail-page {
        overflow-x: hidden;
    }

    /* Force single column - base grid has 2 cols and overrides 992px media */
    body.is-detail-page .ad-detail-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    body.is-detail-page .bottom-nav {
        display: none;
    }

    body.is-detail-page .secondary-nav {
        display: none;
    }

    body.is-detail-page .ad-detail-main {
        padding: 0 0 140px;
    }

    body.is-detail-page .ad-detail-main.container,
    body.is-detail-page main.container {
        padding-left: 0;
        padding-right: 0;
        max-width: 100%;
    }

    body.is-detail-page .ad-breadcrumbs .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    body.is-detail-page .ad-breadcrumbs {
        padding: 10px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.is-detail-page .ad-breadcrumbs ul {
        flex-wrap: nowrap;
        font-size: 13px;
    }

    body.is-detail-page .ad-gallery-slider {
        margin: 0 0 8px 0;
        border-radius: 0;
        border: none;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    body.is-detail-page .gallery-slider-track {
        border-radius: 0;
    }

    body.is-detail-page .gallery-slide {
        height: 75vw;
        max-height: 340px;
        min-height: 240px;
        background: #f7f8f8;
    }
    body.is-detail-page .gallery-slide img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    body.is-detail-page .ad-gallery-slider.ad-gallery-size-small .gallery-slide {
        height: 52vw;
        min-height: 200px;
        max-height: 260px;
    }
    body.is-detail-page .ad-gallery-slider.ad-gallery-size-small .gallery-slide img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 240px;
    }
    body.is-detail-page .ad-gallery-slider.ad-gallery-size-medium .gallery-slide {
        height: 64vw;
        min-height: 220px;
        max-height: 300px;
    }
    body.is-detail-page .ad-gallery-slider.ad-gallery-size-medium .gallery-slide img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 280px;
    }
    body.is-detail-page .ad-gallery-slider.ad-gallery-size-large .gallery-slide {
        height: 75vw;
        min-height: 240px;
        max-height: 360px;
    }
    body.is-detail-page .ad-gallery-slider.ad-gallery-size-large .gallery-slide img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 340px;
    }

    body.is-detail-page .gallery-slider-badge-text {
        display: none;
    }

    body.is-detail-page .gallery-slider-dots {
        bottom: 16px;
    }

    body.is-detail-page .gallery-thumbnails {
        padding: 10px 16px;
        flex-shrink: 0;
    }
    body.is-detail-page .gallery-thumb {
        flex: 0 0 72px;
        width: 72px;
        height: 72px;
    }

    body.is-detail-page .ad-price-block,
    body.is-detail-page .ad-highlights-section,
    body.is-detail-page .ad-details-section,
    body.is-detail-page .ad-description-section,
    body.is-detail-page .ad-location-section {
        margin: 0 16px 16px;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #e8e8e8;
        box-shadow: none;
    }

    body.is-detail-page .ad-price-block {
        padding: 20px 16px;
        background: #fff;
    }

    body.is-detail-page .ad-price-two-col {
        flex-direction: column;
        gap: 16px;
    }

    body.is-detail-page .ad-price-left {
        flex-direction: row;
        align-self: flex-start;
        order: -1;
        gap: 16px;
    }

    body.is-detail-page .ad-price-value {
        font-size: 26px;
        font-weight: 900;
        color: #002f34;
    }

    body.is-detail-page .ad-title-main {
        font-size: 18px;
        margin-bottom: 10px;
    }

    body.is-detail-page .ad-meta-row {
        gap: 8px;
    }

    body.is-detail-page .ad-highlights-section {
        padding: 20px 16px;
    }

    body.is-detail-page .ad-highlights-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    body.is-detail-page .highlight-card {
        min-width: 0;
        padding: 16px 12px;
    }

    body.is-detail-page .highlight-card i {
        font-size: 22px;
        color: var(--primary-green);
    }

    body.is-detail-page .ad-details-section,
    body.is-detail-page .ad-description-section,
    body.is-detail-page .ad-location-section {
        padding: 20px 16px;
    }

    body.is-detail-page .section-heading {
        font-size: 18px;
        margin-bottom: 16px;
    }

    /* Hide redundant sidebar contact buttons - fixed bottom bar covers these */
    body.is-detail-page .sidebar-contact-btns {
        display: none !important;
    }

    body.is-detail-page .ad-detail-sidebar {
        margin: 0 16px 32px;
        padding: 0;
    }

    body.is-detail-page .sidebar-safety-card {
        margin-bottom: 24px;
    }

    body.is-detail-page .similar-ads-section {
        margin: 0 16px;
        padding-top: 24px;
    }

    body.is-detail-page .similar-ads-carousel {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .mobile-fixed-contact-sidalhag {
        display: flex !important;
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 16px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .mobile-fixed-contact-sidalhag .mobile-contact-btn {
        flex: 1;
        min-width: 0;
    }

    .mobile-fixed-contact-sidalhag .mobile-contact-btn.btn-whatsapp {
        background: #def4e7;
        color: #0b8a62;
        border: 1px solid #b9e6ce;
        order: 1;
    }

    .mobile-fixed-contact-sidalhag .mobile-contact-btn.btn-chat,
    .mobile-fixed-contact-sidalhag .mobile-contact-btn.btn-call {
        color: #fff;
        order: 2;
    }

    .mobile-fixed-contact-sidalhag .mobile-contact-btn.btn-chat {
        background: #19a97a;
        border: 1px solid #139266;
    }

    .mobile-fixed-contact-sidalhag .mobile-contact-btn.btn-call {
        background: #0c9267;
        border: 1px solid #0a7a55;
    }

    .mobile-fixed-contact-sidalhag .mobile-contact-btn.btn-call {
        order: 3;
    }

    .mobile-fixed-contact-sidalhag .mobile-contact-btn {
        font-size: 14px;
        font-weight: 700;
    }
}

/* ========== Sidalhag-style Ad Detail Page ========== */
.ad-breadcrumbs {
    background: #f7f8f8;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}

.ad-breadcrumbs ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    direction: rtl;
    unicode-bidi: isolate;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.ad-breadcrumbs li {
    display: flex;
    direction: rtl;
    unicode-bidi: isolate;
    align-items: center;
    gap: 6px;
}

.ad-breadcrumbs .breadcrumb-sep {
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 700;
    line-height: 1;
}

.ad-breadcrumbs a {
    color: var(--text-gray);
    text-decoration: none;
    direction: rtl;
    unicode-bidi: isolate;
}

.ad-breadcrumbs a:hover {
    color: var(--primary-green);
}

.ad-breadcrumbs .active {
    color: var(--text-dark);
    font-weight: 700;
}

.ad-detail-main {
    padding: 24px 0 48px;
}

.ad-detail-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

/* Sidalhag layout: left=content (images, price, etc), right=contact sidebar */
.ad-sidalhag-layout {
    grid-template-columns: 1fr 340px;
}

.ad-sidalhag-layout .ad-detail-content {
    min-width: 0;
}

/* Image Slider */
.ad-gallery-slider {
    margin-bottom: 20px;
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.gallery-slider-track {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.gallery-slider-track::-webkit-scrollbar {
    display: none;
}

.gallery-slide {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    height: 420px;
    background: #f7f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

body.is-detail-page .ad-gallery-slider.ad-gallery-size-small .gallery-slide {
    height: 300px;
}
body.is-detail-page .ad-gallery-slider.ad-gallery-size-small .gallery-slide img {
    width: auto;
    height: auto;
    max-width: 600px;
    max-height: 280px;
}
body.is-detail-page .ad-gallery-slider.ad-gallery-size-medium .gallery-slide {
    height: 380px;
}
body.is-detail-page .ad-gallery-slider.ad-gallery-size-medium .gallery-slide img {
    width: auto;
    height: auto;
    max-width: 800px;
    max-height: 360px;
}
body.is-detail-page .ad-gallery-slider.ad-gallery-size-large .gallery-slide {
    height: 520px;
}
body.is-detail-page .ad-gallery-slider.ad-gallery-size-large .gallery-slide img {
    width: auto;
    height: auto;
    max-width: 1200px;
    max-height: 500px;
}

.gallery-slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
}

.gallery-slider-nav button {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.25);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.gallery-slider-nav button:hover {
    background: rgba(255,255,255,0.45);
}

.gallery-slider-badge {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    z-index: 2;
}

.gallery-slider-badge-text {
    background: #e53935;
    color: #fff;
    top: auto;
    bottom: 12px;
    inset-inline-end: 12px;
    border-radius: 8px;
}

.gallery-badge-elite {
    top: 12px;
    inset-inline-start: 12px;
    inset-inline-end: auto;
    background: rgba(0,0,0,0.85);
    color: #ffeb3b;
}

.gallery-slider-counter {
    position: absolute;
    bottom: 12px;
    inset-inline-end: 12px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gallery-slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.slider-dot:hover,
.slider-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Thumbnail strip */
.gallery-thumbnails {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #f7f8f8;
    border-top: 1px solid #e8e8e8;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-thumbnails::-webkit-scrollbar {
    display: none;
}

.gallery-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: var(--transition);
}

.gallery-thumb:hover {
    border-color: rgba(12, 146, 103, 0.5);
}

.gallery-thumb.active {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(12, 146, 103, 0.3);
}

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

@media (max-width: 768px) {
    .gallery-slide {
        height: 360px;
    }
    .gallery-thumb {
        flex: 0 0 56px;
        width: 56px;
        height: 56px;
    }
}

.ad-price-block {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid #e8e8e8;
}

.ad-price-two-col {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.ad-price-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.ad-price-right {
    flex: 1;
    min-width: 0;
}

.ad-action-icons-inline {
    display: flex;
    gap: 10px;
}

.ad-price-left .ad-posted {
    font-size: 13px;
    color: var(--text-gray);
}

.ad-price-value {
    font-size: 32px;
    font-weight: 900;
    color: #002f34;
    margin: 0 0 8px;
}

.ad-title-main {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 8px;
    line-height: 1.35;
}

.ad-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    color: var(--text-gray);
    font-size: 14px;
}

.ad-badges {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.badge-featured {
    background: #e8ae00;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.badge-urgent {
    background: #dc3545;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.action-icon-btn {
    width: 48px;
    height: 48px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-dark);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.action-icon-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.action-icon-btn.share-btn,
.ad-action-icons-inline .fav-btn,
.ad-action-icons-inline .action-icon-btn {
    width: 44px;
    height: 44px;
}

.ad-action-icons-inline .fav-btn.active {
    border-color: var(--primary-green);
    color: var(--primary-green);
    background: rgba(12, 146, 103, 0.08);
}

/* Highlights - icon on top, value, label (Sidalhag reference) */
.ad-highlights-section {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid #e8e8e8;
}

.ad-highlights-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.highlight-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: #fff;
    border-radius: 8px;
    flex: 1;
    min-width: 120px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.highlight-card i {
    color: var(--text-gray);
    font-size: 24px;
}

.highlight-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
}

.highlight-label {
    font-size: 12px;
    color: var(--text-gray);
}

.ad-details-section,
.ad-description-section,
.ad-location-section {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.section-heading {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e8e8;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 13px;
    color: var(--text-gray);
    font-weight: 600;
}

.detail-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
}

.description-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-dark);
}

.location-text {
    margin: 0 0 16px;
    font-size: 15px;
}

.location-address {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.location-address i {
    color: var(--text-gray);
    font-size: 20px;
    margin-top: 2px;
}

.location-address span {
    display: block;
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 600;
}

.location-address .location-city {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 400;
}

.map-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.map-iframe {
    width: 100%;
    height: 280px;
    border: none;
    display: block;
}

.map-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.map-see-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    background: var(--primary-teal);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.map-see-btn:hover {
    background: var(--primary-green);
    color: #fff;
}

.ad-footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    font-size: 14px;
    color: var(--text-gray);
}

.report-link {
    color: var(--text-gray);
    text-decoration: none;
}

.report-link:hover {
    color: var(--primary-green);
}

/* Sidebar - Sidalhag */
.ad-detail-sidebar {
    position: sticky;
    top: 80px;
}

.sidebar-seller-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sidebar-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 16px;
}

.sidebar-seller-card .seller-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.sidebar-seller-card .seller-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-gray);
}

.sidebar-seller-card .seller-name {
    font-weight: 800;
    font-size: 17px;
    color: var(--text-dark);
    display: block;
}

.sidebar-seller-card .member-since {
    font-size: 12px;
    color: var(--text-gray);
}

.see-profile-link {
    color: var(--primary-green);
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
}

.see-profile-link:hover {
    color: #097d58;
}

.sidebar-contact-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.sidebar-contact-btns .contact-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--transition);
}

.show-phone {
    background: var(--primary-green);
    color: #fff;
}

.show-phone:hover {
    background: #097d58;
    color: #fff;
}

.chat-btn {
    background: rgba(12, 146, 103, 0.15);
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.chat-btn:hover {
    background: var(--primary-green);
    color: #fff;
}

.whatsapp-btn {
    background: #25D366;
    color: #fff;
}

.whatsapp-btn:hover {
    color: #fff;
    opacity: 0.9;
}

.call-btn {
    background: var(--primary-green);
    color: #fff;
}

/* Sidalhag-style sidebar buttons */
.sidebar-contact-sidalhag .contact-btn-red {
    background: #0c9267;
    color: #fff;
}

.sidebar-contact-sidalhag .contact-btn-red:hover {
    background: #097d58;
    color: #fff;
}

.sidebar-contact-sidalhag .contact-btn-pink {
    background: #19a97a;
    color: #fff;
    border: 1px solid #139266;
}

.sidebar-contact-sidalhag .contact-btn-pink:hover {
    background: #159366;
    color: #fff;
}

.sidebar-contact-sidalhag .contact-btn-green {
    background: #def4e7;
    color: #0b8a62;
    border: 1px solid #b9e6ce;
}

.sidebar-contact-sidalhag .contact-btn-green i {
    color: inherit;
    font-size: 1.05em;
}

.sidebar-contact-sidalhag .contact-btn-green .fa-whatsapp {
    font-family: "Font Awesome 6 Brands";
    font-weight: 400;
}

.sidebar-contact-sidalhag .contact-btn-green:hover {
    background: #cbedda;
    color: #08684f;
}

.sidebar-safety-card {
    background: #f0fdf9;
    border: 1px solid rgba(12, 146, 103, 0.2);
    border-radius: 8px;
    padding: 20px;
}

.sidebar-safety-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-safety-card li {
    padding: 8px 0;
    padding-inline-start: 20px;
    position: relative;
    font-size: 14px;
    color: var(--text-dark);
}

.sidebar-safety-card li::before {
    content: '•';
    position: absolute;
    right: 0;
}

/* Similar Ads Carousel */
.similar-ads-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e8e8e8;
}

.similar-ads-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 24px;
}

.similar-ads-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.carousel-prev,
.carousel-next {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-dark);
    transition: var(--transition);
}

.carousel-prev:hover,
.carousel-next:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.similar-ads-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 0;
    flex: 1;
    scrollbar-width: thin;
}

.similar-ad-card {
    flex: 0 0 260px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    transition: var(--transition);
    position: relative;
}

.similar-ad-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.similar-ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.similar-ad-img {
    height: 160px;
    overflow: hidden;
}

.similar-ad-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f7f8f8;
}

.similar-ad-info {
    padding: 14px;
}

.similar-ad-price {
    display: block;
    font-size: 18px;
    font-weight: 800;
    font-family: inherit;
    color: var(--primary-green);
    margin-bottom: 4px;
}

.similar-ad-title {
    font-size: 14px;
    font-weight: 800;
    font-family: inherit;
    color: var(--text-dark);
    line-height: 1.4;
}

.similar-fav-form,
.similar-fav-btn {
    position: absolute;
    top: 12px;
    left: 12px;
}

.similar-fav-btn {
    width: var(--touch-min);
    min-width: var(--touch-min);
    height: var(--touch-min);
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.similar-fav-btn:hover,
.similar-fav-btn.active {
    color: var(--primary-green);
}

@media (max-width: 992px) {
    .gallery-slide {
        height: 400px;
    }
    .details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ad-detail-sidebar {
        position: static;
    }
    .similar-ad-card {
        flex: 0 0 220px;
    }
}

@media (max-width: 480px) {
    .attributes-grid {
        grid-template-columns: 1fr;
    }

    .ad-price {
        font-size: 28px;
    }

    .ad-title {
        font-size: 20px;
    }

    .main-image {
        height: 300px;
    }
}

/* Mobile Bottom Navigation Bar - Sidalhag-style fixed nav */
html.is-in-app .bottom-nav.bottom-nav-dubizzle,
body.is-in-app .bottom-nav.bottom-nav-dubizzle {
    display: flex !important;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-around;
    padding-left: 4px;
    padding-right: 4px;
    gap: 2px;
}

html.is-in-app.is-detail-page .bottom-nav,
body.is-in-app.is-detail-page .bottom-nav,
html.is-in-app body.is-detail-page .bottom-nav {
    display: none !important;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    padding: 6px 4px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    z-index: 9998;
    border-top: 1px solid rgba(0, 47, 52, 0.08);
    box-sizing: border-box;
    overflow: visible;
}

[dir="rtl"] .bottom-nav {
    direction: rtl;
}

.bottom-nav > a,
.bottom-nav > button {
    flex: 1;
    min-width: 0;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    color: var(--text-gray);
    font-size: 11px;
    font-weight: 600;
    gap: 5px;
    padding: 6px 4px;
    transition: var(--transition);
    min-height: 56px;
    width: 100%;
    box-sizing: border-box;
}
button.bottom-nav-item {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

span.bottom-nav-item.bottom-nav-item-disabled {
    cursor: not-allowed;
    opacity: 0.45;
    pointer-events: none;
}

.bottom-nav-item i {
    font-size: 22px;
    transition: transform 0.2s ease;
}

.bottom-nav-item:active i {
    transform: scale(0.92);
}

.bottom-nav-item.active {
    color: var(--primary-green);
}

.bottom-nav-item.active i {
    color: var(--primary-green);
}

/* Add Ad - Centered elevated button (larger, more prominent) */
.bottom-nav-add {
    justify-content: center;
    padding: 0 6px;
    flex: 1;
    min-width: 0;
}

.bottom-nav-add-btn {
    min-width: 90px;
    width: auto;
    height: 48px;
    padding: 0 16px;
    background: linear-gradient(135deg, #0c9267 0%, #0a7a55 100%);
    border-radius: 24px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(12, 146, 103, 0.5);
    border: 3px solid #fff;
    transition: all 0.2s ease;
    margin-top: -20px;
    flex-shrink: 0;
}

.bottom-nav-add-btn span {
    font-size: 12px;
    margin-top: 0;
    font-weight: 700;
}

.bottom-nav-add:hover .bottom-nav-add-btn,
.bottom-nav-add:active .bottom-nav-add-btn {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(12, 146, 103, 0.5);
}

/* Legacy class support */
.bottom-nav-item.post-ad-center {
    position: relative;
}

/* Floating chat widget - logo + text + icon in right corner */
.floating-chat-widget {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.floating-chat-widget.hidden {
    display: none !important;
}

.floating-chat-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 47, 52, 0.8);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.floating-chat-close:hover {
    background: linear-gradient(145deg, #0c9267 0%, #086b4a 100%);
    transform: scale(1.08);
}

.floating-chat-close:active {
    transform: scale(0.95);
}

[dir="rtl"] .floating-chat-widget {
    right: 24px;
    left: auto;
}

.floating-chat-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.floating-chat-logo {
    height: 28px;
    width: auto;
    max-width: 72px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.floating-chat-text {
    font-size: 11px;
    font-weight: 600;
    color: #002f34;
    white-space: nowrap;
}

.floating-chat-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(145deg, #0c9267 0%, #086b4a 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(12, 146, 103, 0.35),
                0 0 0 3px rgba(255, 255, 255, 0.9);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s;
    border: none;
    font-size: 26px;
}

.floating-chat-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 28px rgba(12, 146, 103, 0.5),
                0 0 0 4px rgba(255, 255, 255, 0.95);
    color: #fff;
}

.floating-chat-btn:active {
    transform: scale(0.98);
}

@media (min-width: 769px) {
    .floating-chat-widget {
        bottom: 28px;
        right: 28px;
    }
    [dir="rtl"] .floating-chat-widget {
        right: 28px;
        left: auto;
    }
}

.post-ad-circle {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #0c9267 0%, #0a7a55 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    box-shadow: 0 4px 20px rgba(12, 146, 103, 0.5);
    border: 4px solid #fff;
    margin-top: -24px;
}

.bottom-nav-item.post-ad-center span {
    margin-top: 2px;
}

@media (max-width: 768px) {
    .floating-chat-widget {
        display: flex !important;
        bottom: 100px;
        right: 16px;
    }
    [dir="rtl"] .floating-chat-widget {
        right: 16px;
        left: auto;
    }

    .bottom-nav {
        display: flex !important;
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-around;
        padding-left: 4px;
        padding-right: 4px;
        gap: 2px;
    }

    .user-actions .login-link,
    .user-actions .header-login-link,
    .user-actions .post-ad-btn {
        display: none !important;
    }

    .user-actions {
        gap: 10px;
    }

    .is-detail-page .bottom-nav {
        display: none !important;
    }

    /* Hide floating chat on ad detail - overlaps content; use fixed contact bar instead */
    body.is-detail-page .floating-chat-widget {
        display: none !important;
    }

    body {
        padding-bottom: 92px;
    }

    body.ads-index-page main,
    body.ads-index-page .sidalhag-layout {
        padding-bottom: 92px;
    }

    .bottom-nav.bottom-nav-dubizzle {
        direction: ltr;
    }

    .bottom-nav.bottom-nav-dubizzle .bottom-nav-item {
        font-size: 10px;
        min-height: 52px;
        padding: 5px 2px;
        gap: 4px;
    }

    .bottom-nav.bottom-nav-dubizzle .bottom-nav-item i {
        font-size: 19px;
    }

    .bottom-nav.bottom-nav-dubizzle .bottom-nav-add-btn {
        min-width: 72px;
        height: 44px;
        padding: 0 10px;
        margin-top: -16px;
        gap: 4px;
    }

    .bottom-nav.bottom-nav-dubizzle .bottom-nav-add-btn span {
        font-size: 10px;
    }
}

/* ========== Ads index: Sidebar brands — RTL (right→left), same order as admin sort_order ========== */
.sidalhag-sidebar .sidebar-brands-scroll,
.sidalhag-sidebar .sidebar-brands-scroll .brand-grid,
.sidalhag-sidebar .brand-grid.brand-grid-cars,
.sidalhag-sidebar .brand-grid.brand-grid-sidebar {
    direction: rtl;
}
.sidalhag-sidebar .sidebar-brands-scroll .brand-grid,
.sidalhag-sidebar .brand-grid.brand-grid-cars {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    max-height: 200px;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 8px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}
.sidalhag-sidebar .sidebar-brands-scroll .brand-grid .brand-item,
.sidalhag-sidebar .brand-grid.brand-grid-cars .brand-item {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    font-size: 11px;
    text-align: center;
}
.sidalhag-sidebar .sidebar-brands-scroll .brand-grid .brand-item span,
.sidalhag-sidebar .sidebar-brands-scroll .brand-grid .brand-item .brand-icon,
.sidalhag-sidebar .brand-grid.brand-grid-cars .brand-item span,
.sidalhag-sidebar .brand-grid.brand-grid-cars .brand-item .brand-icon {
    direction: rtl;
}
.sidalhag-sidebar .brand-item img {
    background: #fff;
}

/* Mobile: sidebar brands horizontal scroll (same order as list) */

/* Mobile: sidebar brands horizontal scroll (same order as list) */
@media (max-width: 768px) {
    body.ads-index-page {
        --mobile-brand-gap: 6px;
        --mobile-brand-tile: calc((100vw - 56px - (var(--mobile-brand-gap) * 2)) / 3);
    }
    .sidebar-brands-scroll {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
    }
    .sidebar-brands-scroll::-webkit-scrollbar {
        display: none;
    }
    body.ads-index-page .sidalhag-sidebar .sidebar-brands-scroll .brand-grid,
    body.ads-index-page .sidalhag-sidebar .sidebar-brands-scroll .brand-grid.brand-grid-cars,
    body.ads-index-page .sidalhag-sidebar .sidebar-brands-scroll .brand-grid.brand-grid-sidebar {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        direction: rtl;
        gap: var(--mobile-brand-gap);
        width: max-content !important;
        max-height: none;
        grid-template-rows: unset;
        grid-template-columns: unset !important;
        grid-auto-flow: unset;
        grid-auto-columns: unset;
        overflow: visible !important;
    }
    body.ads-index-page .sidalhag-sidebar .sidebar-brands-scroll .brand-grid .brand-item,
    body.ads-index-page .sidalhag-sidebar .brand-grid.brand-grid-cars .brand-item {
        display: flex !important;
        flex: 0 0 var(--mobile-brand-tile) !important;
        width: var(--mobile-brand-tile) !important;
        min-width: var(--mobile-brand-tile) !important;
        max-width: var(--mobile-brand-tile) !important;
        scroll-snap-align: start;
        padding: 10px 6px;
    }
    .sidebar-brands-scroll .brand-item > span:not(.brand-icon) {
        display: none !important;
    }
    body.ads-index-page .sidalhag-sidebar .sidebar-brands-scroll .brand-grid .brand-item img,
    body.ads-index-page .sidalhag-sidebar .sidebar-brands-scroll .brand-grid .brand-item .brand-icon {
        width: 66px;
        height: 66px;
        min-width: 66px;
        min-height: 66px;
        max-width: 66px;
        max-height: 66px;
        margin-bottom: 0;
    }
    body.ads-index-page .sidalhag-sidebar .sidebar-brands-scroll .brand-grid .brand-item .brand-icon {
        font-size: 18px;
    }
}

/* Ads listing: show full photo (landscape/portrait) */
body.ads-index-page .sidalhag-card .card-img img {
    object-fit: contain !important;
    display: block;
    background: #f7f8f8;
}
/* Mobile: prevent horizontal overflow on ads index */
@media (max-width: 768px) {
    body.ads-index-page main { overflow-x: hidden; max-width: 100%; }
    body.ads-index-page .sidalhag-layout { max-width: 100%; overflow-x: hidden; }
    body.ads-index-page .sidalhag-sidebar { max-width: 100%; }
}

/* Cars sidebar: subcategories (motorcycles, trucks, spare parts, etc.) */
.sidalhag-sidebar .sidebar-subcats-title {
    font-size: 15px;
    font-weight: 800;
    color: #002f34;
    margin: 14px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #0c9267;
}
.sidalhag-sidebar .sidebar-subcat-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sidalhag-sidebar .sidebar-subcat-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f7f8f8;
    border-radius: 8px;
    color: #5b7b7d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all 0.2s;
}
.sidalhag-sidebar .sidebar-subcat-link i {
    font-size: 18px;
    color: #0c9267;
    width: 24px;
    text-align: center;
}
.sidalhag-sidebar .sidebar-subcat-link:hover,
.sidalhag-sidebar .sidebar-subcat-link.active {
    background: #f0fdf9;
    border-color: #0c9267;
    color: #0c9267;
    font-weight: 600;
}

/* Cars: model chips row above filters with horizontal scroll */
.car-models-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    padding: 10px 0 6px;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 8px;
    min-width: 0;
}
.car-models-row-label {
    font-size: 13px;
    font-weight: 600;
    color: #002f34;
    flex-shrink: 0;
}
.car-models-row-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    min-height: 36px;
    align-items: center;
    flex: 1;
    min-width: 0;
    scrollbar-width: none;
}
.car-models-row-scroll::-webkit-scrollbar {
    display: none;
}
.car-model-chip {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 20px;
    background: #f0f0f0;
    color: #002f34;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.car-model-chip:hover {
    background: #e0e0e0;
}
.car-model-chip.active {
    background: #0c9267;
    color: #fff;
}

/* ========== Ad Detail Chat Modal (Messenger-style) ========== */
.ad-chat-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0;
    pointer-events: none;
}

.ad-chat-modal[aria-hidden="false"] {
    pointer-events: auto;
}

.ad-chat-modal-window {
    width: 480px;
    height: 580px;
    max-height: 88vh;
    background: #fff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: height 0.3s ease, width 0.3s ease;
}

[dir="rtl"] .ad-chat-modal-window {
    margin-left: 16px;
    margin-right: 16px;
}

[dir="ltr"] .ad-chat-modal-window {
    margin-right: 16px;
    margin-left: 16px;
}

.ad-chat-modal-window.minimized {
    height: 56px;
    min-height: 56px;
}

.ad-chat-modal-window.minimized .ad-chat-modal-body {
    display: none;
}

.ad-chat-modal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px;
    height: 48px;
    background: var(--primary-green);
    color: #fff;
    flex-shrink: 0;
    cursor: pointer;
}

.ad-chat-modal-logo {
    height: 28px;
    width: auto;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

.ad-chat-modal-bar:hover {
    background: #097d58;
}

.ad-chat-modal-title {
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-chat-modal-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ad-chat-modal-btn {
    width: var(--touch-min);
    min-width: var(--touch-min);
    height: var(--touch-min);
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ad-chat-modal-btn:hover {
    background: rgba(255,255,255,0.2);
}

.ad-chat-modal-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.ad-chat-modal-loading {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-size: 14px;
}

.ad-chat-modal-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-modal-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.chat-modal-header {
    padding: 12px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.chat-modal-ad-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.chat-modal-ad-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-modal-ad-thumb-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    flex-shrink: 0;
}

.chat-modal-ad-info {
    min-width: 0;
}

.chat-modal-ad-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-modal-ad-with {
    font-size: 12px;
    color: var(--text-gray);
}

.chat-modal-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    padding-bottom: 24px;
    background: #f7f8f8;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.chat-modal-bubble {
    max-width: 92%;
    min-width: 120px;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.chat-modal-bubble.sent {
    align-self: flex-end;
    background: var(--primary-green);
    color: #fff;
    border-bottom-left-radius: 4px;
}

.chat-modal-bubble.received {
    align-self: flex-start;
    background: #fff;
    color: var(--text-dark);
    border: 1px solid #e8e8e8;
    border-bottom-right-radius: 4px;
}

.chat-modal-bubble-time {
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.9;
}

.chat-modal-bubble.received .chat-modal-bubble-time {
    color: var(--text-gray);
}

.chat-modal-form {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
    background: #fff;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    align-items: flex-end;
}

.chat-attach-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: none;
    background: #f0f2f5;
    color: #5b7b7d;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.chat-attach-btn:hover {
    background: #e4e6eb;
    color: #002f34;
}

.chat-attach-preview {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
    min-height: 0;
}

.chat-attach-preview-item {
    position: relative;
    width: 60px;
    height: 60px;
}

.chat-attach-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.chat-attach-preview-item .remove-attach {
    position: absolute;
    top: -6px;
    inset-inline-end: -6px;
    width: 20px;
    height: 20px;
    border: none;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-bubble-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.chat-attachment-img {
    max-width: 200px;
    max-height: 180px;
    border-radius: 8px;
    overflow: hidden;
}

.chat-attachment-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-attachment-doc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.06);
    border-radius: 8px;
    font-size: 12px;
    text-decoration: none;
    color: inherit;
}

.chat-attachment-img {
    cursor: pointer;
}

/* Read status: one check = sent, two checks = read */
.chat-read-status {
    margin-inline-start: 6px;
    opacity: 0.9;
    font-size: 0.9em;
}
.chat-read-status i { font-size: inherit; }

/* Chat image gallery lightbox - controls fixed to overlay edges for visibility */
.chat-gallery-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.chat-gallery-overlay.active {
    opacity: 1;
    visibility: visible;
}

.chat-gallery-content {
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 72px 48px;
}

.chat-gallery-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.chat-gallery-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.chat-gallery-close:hover {
    background: rgba(255,255,255,0.35);
}

[dir="rtl"] .chat-gallery-close {
    right: auto;
    left: 12px;
}

.chat-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.chat-gallery-nav:hover {
    background: rgba(255,255,255,0.35);
}

.chat-gallery-nav.prev { left: 12px; }
.chat-gallery-nav.next { right: 12px; }

[dir="rtl"] .chat-gallery-nav.prev { left: auto; right: 12px; }
[dir="rtl"] .chat-gallery-nav.next { right: auto; left: 12px; }

.chat-gallery-counter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.95);
    font-size: 14px;
    z-index: 2;
}

.chat-modal-form textarea {
    flex: 1;
    min-width: 60px;
    padding: 12px 18px;
    border: 2px solid #e4e6eb;
    border-radius: 24px;
    font-size: 15px;
    resize: none;
    min-height: 44px;
    max-height: 160px;
    font-family: inherit;
}

.chat-modal-form textarea:focus {
    outline: none;
    border-color: var(--primary-green);
}

.chat-modal-send-btn {
    background: var(--primary-green);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.chat-modal-send-btn:hover {
    background: #097d58;
}

.chat-modal-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .ad-chat-modal-window {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
    }

    [dir="rtl"] .ad-chat-modal-window,
    [dir="ltr"] .ad-chat-modal-window {
        margin: 0;
    }

    .ad-chat-modal-window.minimized {
        height: 56px;
        min-height: 56px;
        width: auto;
        max-width: 320px;
        border-radius: 12px 12px 0 0;
    }
}

/* ========== Dashboard Messenger Modal - popup above chat icon ========== */
.msg-messenger-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0;
    pointer-events: none;
}

.msg-messenger-overlay[aria-hidden="false"] {
    pointer-events: auto;
}

.msg-messenger-overlay[aria-hidden="false"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 47, 52, 0.35);
}

/* Popup aligned above the floating chat icon (same horizontal position) */
.msg-messenger-window {
    position: fixed;
    bottom: 94px;
    right: 28px;
    width: 520px;
    height: 620px;
    max-height: 88vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: height 0.3s ease, transform 0.3s ease;
}

[dir="rtl"] .msg-messenger-window {
    right: 28px;
    left: auto;
}

.msg-messenger-window.minimized {
    height: 56px;
    min-height: 56px;
}

.msg-messenger-window.minimized .msg-messenger-body {
    display: none;
}

.msg-messenger-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 56px;
    background: linear-gradient(135deg, #0c9267 0%, #097d58 100%);
    color: #fff;
    flex-shrink: 0;
    cursor: pointer;
}

.msg-messenger-bar:hover {
    background: linear-gradient(135deg, #0da375 0%, #086b4a 100%);
}

.msg-messenger-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.msg-messenger-back {
    width: var(--touch-min);
    min-width: var(--touch-min);
    height: var(--touch-min);
    border: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.msg-messenger-back:hover {
    background: rgba(255,255,255,0.3);
}

.msg-messenger-title {
    font-weight: 700;
    font-size: 16px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-messenger-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.msg-messenger-btn {
    width: var(--touch-min);
    min-width: var(--touch-min);
    height: var(--touch-min);
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.msg-messenger-btn:hover {
    background: rgba(255,255,255,0.2);
}

.msg-messenger-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.msg-messenger-panels {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.msg-messenger-conv-list {
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
    border-inline-start: 1px solid #eee;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.msg-messenger-chat {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f0f2f5;
}

.msg-messenger-loading,
.msg-messenger-empty {
    padding: 24px 16px;
    text-align: center;
    color: #5b7b7d;
    font-size: 14px;
}

.msg-messenger-empty i {
    font-size: 40px;
    color: #ddd;
    display: block;
    margin-bottom: 12px;
}

.msg-messenger-empty a {
    color: #0c9267;
    font-weight: 600;
    font-size: 14px;
}

.msg-conv-list-inner {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.msg-conv-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    cursor: pointer;
}

.msg-conv-item:hover {
    background: #f0f2f5;
}

.msg-conv-item.active {
    background: #e7f5ee;
    border-inline-end: 3px solid #0c9267;
}

.msg-conv-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.msg-conv-thumb-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #e4e6eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    flex-shrink: 0;
    font-size: 16px;
}

.msg-conv-support-icon {
    background: rgba(12, 146, 103, 0.15);
    color: #0c9267;
}

.msg-conv-body {
    flex: 1;
    min-width: 0;
}

.msg-conv-ad-title {
    font-weight: 700;
    font-size: 13px;
    color: #002f34;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-conv-with {
    font-size: 11px;
    color: #5b7b7d;
}

.msg-conv-preview {
    font-size: 12px;
    color: #5b7b7d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

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

.msg-conv-time {
    font-size: 10px;
    color: #999;
}

.msg-conv-unread {
    background: #0c9267;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.msg-chat-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
    color: #5b7b7d;
}

.msg-chat-placeholder i {
    font-size: 56px;
    color: #c4c9cc;
    margin-bottom: 16px;
}

.msg-chat-placeholder p {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #002f34;
}

.msg-chat-placeholder small {
    font-size: 13px;
}

.msg-chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.msg-chat-content .chat-modal-inner {
    height: 100%;
}

.msg-chat-content .chat-modal-messages {
    background: #f0f2f5;
}

/* Support/Help Center inside messenger modal */
.msg-chat-content .support-modal {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.msg-chat-content .support-messages {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 24px;
}

@media (max-width: 768px) {
    .msg-messenger-overlay {
        align-items: stretch;
        justify-content: stretch;
    }
    .msg-messenger-window {
        position: relative;
        bottom: auto;
        right: auto;
        width: 100%;
        min-width: 0;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }
    .msg-messenger-panels {
        flex-direction: column;
    }
    .msg-messenger-conv-list {
        width: 100%;
        min-width: 0;
        max-height: 45%;
        border-inline-start: none;
        border-bottom: 1px solid #eee;
    }
    .msg-chat-content .chat-modal-form,
    .msg-chat-content .chat-modal-inner {
        flex-shrink: 0;
    }
}

/* Auth modal tabs (ad show page) */
.auth-tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid #e8e8e8;
    background: #f7f8f8;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: #5b7b7d;
    transition: var(--transition);
}
.auth-tab-btn.active {
    background: var(--primary-green);
    color: #fff;
    border-color: var(--primary-green);
}
.auth-tab-btn:hover:not(.active) {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.auth-modal-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
}

.auth-modal-input.auth-signup-otp-digit {
    padding: 0;
    border: 2px solid #9aa5b1 !important;
    border-radius: 10px;
    background: #f7f9fa !important;
    color: #1a1a1a;
    box-shadow: none;
}

.auth-modal-input.auth-signup-otp-digit:focus {
    outline: none;
    border-color: #0c9267 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(12, 146, 103, 0.18);
}

/* New auth modal - 50% width, no backdrop-filter */
.auth-modal-overlay-new {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(0, 47, 52, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.auth-modal-card-new {
    background: #fff;
    border-radius: 16px;
    width: 50%;
    min-width: 360px;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .auth-modal-overlay-new {
        padding: 0;
        align-items: stretch;
    }

    .auth-modal-card-new {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        max-height: 100%;
        border-radius: 0;
    }
}

.auth-modal-header-new {
    padding: 18px 18px 0;
    border-bottom: none;
    flex-shrink: 0;
    position: relative;
}

.auth-modal-header-inner {
    text-align: center;
    padding-bottom: 12px;
}

.auth-modal-icon-wrap {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #0c9267, #097d58);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-icon-wrap.auth-modal-logo-wrap {
    width: auto;
    height: auto;
    min-width: 72px;
    background: none;
    border-radius: 0;
    padding: 0;
}

.auth-modal-icon-wrap i {
    font-size: 24px;
    color: #fff;
}

.auth-modal-logo-img {
    width: 84px;
    height: auto;
    max-height: 60px;
    object-fit: contain;
    display: block;
}

.auth-modal-title-main {
    font-size: 16px;
    font-weight: 800;
    color: #002f34;
    margin: 0 0 4px;
}

.auth-modal-subtitle {
    font-size: 12px;
    color: #5b7b7d;
    margin: 0;
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 4px;
}

.auth-modal-close:hover {
    color: #0c9267;
}

.auth-modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
}

.auth-tab-btn-new {
    flex: 1;
    padding: 9px 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: #5b7b7d;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.auth-tab-btn-new.active {
    color: #0c9267;
    border-bottom-color: #0c9267;
}

.auth-wizard-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 10px;
}

.auth-wizard-step-line {
    flex: 1 1 24px;
    min-width: 16px;
    height: 2px;
    border-radius: 999px;
    background: #dfe8e9;
}

.auth-wizard-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #98a8aa;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
    transition: color .2s ease;
}

.auth-wizard-step-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #cfd9da;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    background: #fff;
    color: #8a9a9b;
    transition: all .2s ease;
}

.auth-wizard-step.active,
.auth-wizard-step.done {
    color: #0c9267;
}

.auth-wizard-step.active .auth-wizard-step-dot,
.auth-wizard-step.done .auth-wizard-step-dot {
    border-color: #0c9267;
    color: #fff;
    background: linear-gradient(135deg, #0c9267, #097d58);
}

.auth-wizard-step.done .auth-wizard-step-dot::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
}

.auth-wizard-step.done .auth-wizard-step-dot {
    font-size: 0;
}

.auth-register-type-grid {
    display: grid;
    gap: 10px;
}

.auth-register-type-card {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    padding: 0;
    cursor: pointer;
    text-align: right;
    width: 100%;
    background: transparent;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.auth-register-type-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.auth-register-type-card.active {
    outline: 2px solid #0c9267;
    outline-offset: 0;
}

.auth-register-type-card-inner {
    min-height: 102px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    color: #fff;
    gap: 12px;
}

.auth-register-type-card-phone {
    background-image: linear-gradient(120deg, rgba(12, 146, 103, .92), rgba(9, 125, 88, .86)), url('/assets/images/auth/auth-cover-login-bg.svg');
}

.auth-register-type-card-email {
    background-image: linear-gradient(120deg, rgba(30, 64, 175, .92), rgba(37, 99, 235, .86)), url('/assets/images/auth/auth-cover-register-bg.svg');
}

.auth-register-type-card-copy {
    min-width: 0;
}

.auth-register-type-card-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
}

.auth-register-type-card-subtitle {
    opacity: .94;
    font-size: 12px;
    margin-top: 4px;
}

.auth-register-type-card-icon {
    font-size: 28px;
    opacity: .96;
}

@media (max-width: 576px) {
    .auth-wizard-steps {
        gap: 6px;
    }
    .auth-wizard-step-text {
        font-size: 11px;
    }
    .auth-register-type-card-inner {
        min-height: 94px;
        padding: 12px 14px;
    }
    .auth-register-type-card-title {
        font-size: 14px;
    }
}

.auth-modal-body-new {
    padding: 18px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.auth-modal-overlay-new .google-auth-btn {
    width: 100%;
    min-height: 50px;
    border: 1px solid #dfe4ea;
    border-radius: 10px;
    background: #fff;
    color: #14353a;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 700;
    transition: all .2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.auth-modal-overlay-new .google-auth-btn:hover {
    color: #0c9267;
    border-color: #cfd7df;
    background: #fbfcfd;
}

.auth-modal-overlay-new .google-auth-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 4px;
    flex-shrink: 0;
}

.auth-modal-overlay-new .google-auth-btn-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-modal-overlay-new .google-auth-btn-divider {
    width: 1px;
    align-self: stretch;
    background: #e4e9ee;
}

.auth-modal-overlay-new .google-auth-btn-label {
    font-size: 14px;
    letter-spacing: .1px;
}

.auth-modal-divider-or {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 4px;
    color: #98a8aa;
    font-size: 12px;
    font-weight: 600;
}

.auth-modal-divider-or::before,
.auth-modal-divider-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8ecef;
}

.auth-modal-divider-or span {
    flex-shrink: 0;
}

.auth-view-new {
    animation: fadeIn 0.2s ease;
}

.auth-modal-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-modal-form .auth-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.auth-modal-form .auth-field label {
    font-size: 12px;
    font-weight: 600;
    color: #002f34;
}

.auth-modal-form .auth-field input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    text-align: right;
    direction: rtl;
}

.auth-modal-form .auth-field input::placeholder {
    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext;
    color: #98a8aa;
}

.auth-modal-form .auth-error {
    color: #dc3545;
    font-size: 13px;
    margin: 0;
}

.auth-modal-body-new .alert-danger {
    background: #f8d7da;
    color: #842029;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #f5c2c7;
}

.auth-submit-btn {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #0c9267, #097d58);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.auth-modal-phone .phone-row {
    margin-bottom: 12px;
}

/* New auth modal: keep +249 compact and phone field wide */
.auth-modal-overlay-new .auth-modal-phone .phone-sudan-cell {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
    direction: ltr;
    width: 100%;
}

.auth-modal-overlay-new .auth-modal-phone .phone-sudan-prefix {
    width: 78px !important;
    min-width: 78px;
    max-width: 78px;
    padding: 0 8px;
    min-height: 44px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    justify-content: center;
    gap: 6px;
}

.auth-modal-overlay-new .auth-modal-phone .phone-number-input,
.auth-modal-overlay-new .auth-modal-phone .phone-number-input.auth-modal-input {
    width: 100% !important;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    text-align: left;
    direction: ltr;
    flex: 1 1 auto;
}

.auth-modal-overlay-new .auth-modal-phone .phone-number-input::placeholder,
.auth-modal-overlay-new .auth-modal-phone .phone-number-input.auth-modal-input::placeholder {
    direction: rtl;
    text-align: right;
}

.auth-modal-overlay-new .auth-modal-phone .phone-sudan-flag {
    width: 14px;
    height: 10px;
}

.auth-modal-overlay-new .auth-modal-phone .phone-row-inner .form-label {
    font-size: 12px;
}

/* Auth modal: mobile - clearer country code sizing */
@media (max-width: 768px) {
    .auth-modal-overlay-new .auth-modal-phone .phone-sudan-cell {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 8px;
    }

    .auth-modal-overlay-new .auth-modal-phone .phone-sudan-prefix {
        width: 68px !important;
        min-width: 68px;
        max-width: 68px;
        min-height: 42px;
        font-size: 13px;
    }

    .auth-modal-overlay-new .auth-modal-phone .phone-number-input,
    .auth-modal-overlay-new .auth-modal-phone .phone-number-input.auth-modal-input {
        min-height: 42px;
        font-size: 13px;
    }

    .auth-modal-body-new {
        padding: 16px 14px;
    }

    .auth-modal-title-main {
        font-size: 15px;
    }

    .auth-modal-subtitle {
        font-size: 11px;
    }

    .auth-modal-overlay-new .auth-modal-phone.phone-fields-shared.phone-fields-native .phone-native-cell {
        flex-wrap: nowrap;
        gap: 10px;
        min-width: 0;
    }
    .auth-modal-overlay-new .auth-modal-phone.phone-fields-shared.phone-fields-native .phone-native-code-box {
        flex: 1 1 55%;
        min-width: 140px;
        min-height: 46px;
        padding: 8px 12px;
        overflow: visible;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .auth-modal-overlay-new .auth-modal-phone.phone-fields-shared.phone-fields-native .phone-native-select {
        flex: 1 1 auto;
        min-width: 70px;
        max-width: none;
        font-size: 14px;
        font-weight: 600;
        padding: 4px 8px;
        color: #002f34;
    }
    .auth-modal-overlay-new .auth-modal-phone.phone-fields-shared.phone-fields-native .phone-native-search-inline {
        flex: 0 0 auto;
        min-width: 56px;
        max-width: 80px;
        font-size: 13px;
        padding: 4px 8px;
    }
    .auth-modal-overlay-new .auth-modal-phone.phone-fields-shared.phone-fields-native .phone-native-flag {
        width: 22px;
        height: 16px;
        flex-shrink: 0;
    }
    .auth-modal-overlay-new .auth-modal-phone.phone-fields-shared.phone-fields-native .phone-native-cell .phone-number-input {
        flex: 1 1 45%;
        min-width: 0;
        min-height: 46px;
        font-size: 14px;
        padding: 10px 12px;
    }
}

.auth-modal-phone-fields .phone-row {
    display: flex;
    flex-direction: column;
}

.phone-fields-shared .form-label {
    font-size: 15px;
    font-weight: 600;
    color: #002f34;
}

/* Override Bootstrap `.small` size so label matches input text */
.phone-fields-shared .form-label.small {
    font-size: 15px !important;
}

.phone-fields-shared .form-label .text-danger {
    font-size: inherit;
}

.phone-fields-shared .phone-code-number-wrap {
    display: flex;
    gap: 8px;
    align-items: stretch;
    direction: ltr;
}

.phone-fields-shared.phone-fields-native .phone-native-wrap {
    display: flex;
    gap: 8px;
    align-items: stretch;
    direction: ltr;
}

.phone-fields-shared.phone-fields-native .phone-native-wrap .phone-native-select {
    flex-shrink: 0;
}

.phone-fields-shared.phone-fields-native .phone-native-wrap .phone-number-input {
    flex: 1;
    min-width: 0;
}

/* Native mode: code box and phone box equal 50/50 width */
.phone-fields-shared.phone-fields-native .phone-native-cell {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: stretch;
    max-width: 100%;
}
.phone-fields-shared.phone-fields-native .phone-native-code-box {
    flex: 1 1 50%;
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fafbfc;
    direction: ltr;
    overflow: hidden;
}

.phone-fields-shared.phone-fields-native .phone-native-code-box:focus-within {
    border-color: #0c9267;
}

.phone-fields-shared.phone-fields-native .phone-native-search-inline {
    flex: 0 1 auto;
    min-width: 70px;
    max-width: 120px;
    padding: 4px 8px;
    border: none;
    background: transparent;
    font-size: 0.8125rem;
    color: #6b7280;
}

.phone-fields-shared.phone-fields-native .phone-native-search-inline::placeholder {
    opacity: 0.8;
}

.phone-fields-shared.phone-fields-native .phone-native-search-inline:focus {
    outline: none;
}

.phone-fields-shared.phone-fields-native .phone-native-flag {
    flex-shrink: 0;
    width: 18px;
    height: 14px;
    object-fit: contain;
}

.phone-fields-shared.phone-fields-native .phone-native-select {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 4px 8px;
    font-size: 0.9rem;
    direction: ltr;
    text-align: left;
    box-sizing: border-box;
}

.phone-fields-shared.phone-fields-native .phone-native-select:focus {
    outline: none;
}

.phone-fields-shared.phone-fields-native .phone-native-cell .phone-number-input {
    flex: 1 1 50%;
    min-width: 0;
}

@media (max-width: 768px) {
    .phone-fields-shared.phone-fields-native .phone-native-cell {
        flex-wrap: nowrap;
        min-width: 0;
    }
    .phone-fields-shared.phone-fields-native .phone-native-code-box {
        flex: 1 1 55%;
        min-width: 160px;
        overflow: hidden;
        padding: 6px 10px;
    }
    .phone-fields-shared.phone-fields-native .phone-native-search-inline {
        flex: 1 1 auto;
        min-width: 80px;
        max-width: none;
    }
    .phone-fields-shared.phone-fields-native .phone-native-select {
        flex: 0 0 auto;
        max-width: 85px;
        font-size: 0.75rem;
        padding: 2px 4px;
    }
}

.phone-country-code {
    direction: ltr;
}

.phone-fields-shared .phone-country-cell {
    display: flex;
    align-items: stretch;
    flex: 0 0 auto;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    direction: ltr;
}

.phone-fields-shared .phone-country-cell:focus-within {
    border-color: var(--primary-green);
}

.phone-fields-shared .phone-country-picker {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 130px;
}

.phone-fields-shared .phone-country-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px 0 12px;
    cursor: pointer;
    flex: 1;
    min-height: 44px;
}

.phone-fields-shared .phone-country-trigger:hover {
    background: #f7f8f8;
}

.phone-fields-shared .phone-country-code {
    font-weight: 600;
    font-size: 14px;
    color: #002f34;
}

.phone-fields-shared .phone-country-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: auto;
    margin-right: 4px;
    font-size: 11px;
    color: #5b7b7d;
    background: #f0f4f5;
    border-radius: 6px;
    transition: transform 0.2s, background 0.2s;
}

.phone-fields-shared .phone-country-trigger:hover .phone-country-chevron {
    background: #e8ebeb;
}

.phone-fields-shared .phone-country-picker.open .phone-country-chevron {
    transform: rotate(180deg);
    background: rgba(12, 146, 103, 0.1);
    color: var(--primary-green);
}

.phone-fields-shared .phone-country-select {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.phone-fields-shared .phone-flag-img,
.phone-fields-shared .phone-option-flag {
    flex-shrink: 0;
    width: 24px;
    height: 18px;
    object-fit: contain;
}

.phone-fields-shared .phone-country-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    z-index: 10050;
    overflow: hidden;
}

.phone-fields-shared .phone-country-dropdown.open {
    display: block;
}

.phone-fields-shared .phone-country-search-wrap {
    padding: 16px 14px;
    border-bottom: 2px solid #e8e8e8;
}

.phone-fields-shared .phone-country-search {
    width: 100%;
    min-height: 52px;
    padding: 18px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 18px;
    outline: none;
    box-sizing: border-box;
}

.phone-fields-shared .phone-country-search:focus {
    border-color: var(--primary-green);
}

.phone-fields-shared .phone-country-options {
    max-height: 220px;
    overflow-y: auto;
    padding: 6px 0;
}

.phone-fields-shared .phone-country-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}

.phone-fields-shared .phone-country-option:hover {
    background: #f0f4f5;
}

.phone-fields-shared .phone-country-option .phone-option-flag {
    width: 20px;
    height: 15px;
    object-fit: contain;
}

.phone-fields-shared .phone-country-option .phone-option-code {
    font-weight: 600;
    color: #002f34;
    min-width: 42px;
    font-size: 13px;
}

.phone-fields-shared .phone-country-option .phone-option-name {
    color: #5b7b7d;
    font-size: 13px;
}

.phone-fields-shared .phone-country-empty {
    padding: 16px;
    text-align: center;
    color: #5b7b7d;
    font-size: 14px;
}

.phone-fields-shared .phone-number-input {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.phone-fields-shared .phone-row-inner .form-label {
    display: block;
    margin-bottom: 6px;
}

/* ========== Scroll to Top Button ========== */
.scroll-to-top {
    position: fixed;
    bottom: 28px;
    inset-inline-end: 24px;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(145deg, #0c9267 0%, #065a40 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(12, 146, 103, 0.45), 0 2px 8px rgba(0, 47, 52, 0.15);
    z-index: 10010;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.9);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.scroll-to-top:hover {
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(12, 146, 103, 0.55), 0 4px 12px rgba(0, 47, 52, 0.2);
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(145deg, #0da876 0%, #076d4d 100%);
}
.scroll-to-top:active {
    cursor: pointer;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 16px rgba(12, 146, 103, 0.4);
}
.scroll-to-top:focus {
    outline: none;
}
.scroll-to-top:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 3px;
}
.scroll-to-top i {
    font-size: 20px;
    font-weight: 700;
    transition: transform 0.2s ease;
}
.scroll-to-top:hover i {
    transform: translateY(-1px);
}
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 92px;
        inset-inline-end: 18px;
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }
    .scroll-to-top i {
        font-size: 18px;
    }
}

/* Global readability bump */
html {
    font-size: 17px;
}

body {
    font-size: 1rem;
}

/* Login / Register modal: larger typography */
.auth-modal-title-main {
    font-size: 1.5rem;
}

.auth-modal-subtitle {
    font-size: 1rem;
}

.auth-modal-form .auth-field label {
    font-size: 1rem;
}

.auth-modal-form .auth-field input,
.auth-modal-input {
    font-size: 1rem;
}

.auth-register-type-card-title {
    font-size: 1.12rem;
}

.auth-register-type-card-subtitle {
    font-size: 0.95rem;
}

/* PWA install — Dubizzle-style smart banner, RTL, green theme */
.pwa-install-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 11000;
    display: none;
    padding: 0;
    padding-top: env(safe-area-inset-top, 0);
}

.pwa-install-overlay.is-open {
    display: block;
}

.pwa-install-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: #fff;
    border-bottom: 1px solid #e8eaed;
    box-shadow: 0 4px 16px rgba(0, 47, 52, 0.08);
    padding: 10px 12px;
    padding-inline: max(12px, env(safe-area-inset-right));
    padding-inline-end: max(12px, env(safe-area-inset-left));
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border-top: 2px solid #0d3136;
}

.pwa-install-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #5b7b7d;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding: 0;
    transition: color 0.15s ease, background 0.15s ease;
}

.pwa-install-close:hover {
    color: #002f34;
    background: #f3f4f6;
}

.pwa-install-icon {
    flex-shrink: 0;
}

.pwa-install-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    border: 1px solid #e8eaed;
    box-shadow: 0 2px 8px rgba(0, 47, 52, 0.06);
}

.pwa-install-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    flex: 1;
    gap: 2px;
}

.pwa-install-headline {
    font-size: 15px;
    font-weight: 800;
    color: #0d3136;
    line-height: 1.25;
}

.pwa-install-rating-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pwa-install-stars {
    font-size: 13px;
    letter-spacing: 1px;
    color: #e8b000;
    line-height: 1;
}

.pwa-install-score {
    font-size: 14px;
    font-weight: 800;
    color: #0d3136;
}

.pwa-install-reviews {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #5b7b7d;
    line-height: 1.35;
    margin-top: 1px;
}

.pwa-install-continue-web {
    margin-top: 4px;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    color: #0c9267;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pwa-install-continue-web:hover {
    color: #097d58;
}

.pwa-install-btn {
    border: none;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-install-btn-primary {
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, #12b382 0%, #0c9267 45%, #097d58 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(12, 146, 103, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.pwa-install-btn-primary:hover {
    box-shadow: 0 6px 18px rgba(12, 146, 103, 0.42);
}

.pwa-install-btn-primary:active {
    transform: scale(0.98);
}

/* ==========================================================================
   Mobile Home Refresh (Dubizzle-like structure, Sidalhag green theme)
   Primary scope: body.home-dubizzle-style (welcome). Ads listing uses the same
   strip + hides duplicate .header-top via body.ads-index-page (see below).
   ========================================================================== */
@media (max-width: 768px) {
    /* Unified site header (all public pages use the home header look) */
    .main-header .global-market-strip {
        display: block;
    }

    body.home-dubizzle-style,
    body.ads-index-page {
        background: #f5f7f7;
    }

    .main-header .search-row {
        display: flex;
        margin: 5px 10px 8px;
        background: #fff;
        border-radius: 14px;
        border: 1px solid #e6eceb;
        box-shadow: 0 2px 12px rgba(0, 47, 52, 0.05);
        padding: 10px;
    }

    .main-header .search-row-find .search-box-main {
        min-height: 48px;
    }

    .main-header .header-top {
        display: none !important;
    }

    .main-header {
        padding: 6px 0 0;
    }

    .main-header .header-cat-link {
        border-radius: 10px;
        background: #f7fbf9;
        border: 1px solid #d9ebe4;
        min-height: 54px;
        padding: 6px 8px;
    }

    .main-header + .currency-bar,
    body.home-dubizzle-style .currency-bar {
        border-radius: 12px;
        margin: 8px 10px 10px;
        border: 1px solid #d7e5df;
        background: #eaf3ef;
    }

    body.home-dubizzle-style .categories-section,
    .featured-categories-mobile-only.categories-section,
    .categories-popular-section.categories-section-header-mobile {
        background: #fff;
        border: 1px solid #e6eceb;
        border-radius: 14px;
        margin: 0 10px 10px;
        padding: 10px 8px 12px;
        box-shadow: 0 2px 12px rgba(0, 47, 52, 0.04);
    }

    body.home-dubizzle-style .cats-hscroll-side-title,
    .featured-categories-mobile-only .cats-hscroll-side-title,
    .categories-popular-section.categories-section-header-mobile .cats-hscroll-side-title {
        font-size: 18px;
        font-weight: 800;
        color: #0d3136;
    }

    /* Home: two rows, fill columns first, scroll horizontally (avoids 3+ wrapped rows) */
    body.home-dubizzle-style .categories-popular-section .cats-hscroll {
        display: grid;
        grid-template-rows: repeat(2, auto);
        grid-auto-flow: column;
        grid-auto-columns: minmax(80px, 92px);
        align-items: start;
        gap: 12px 10px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding: 4px 2px 10px;
        scrollbar-width: none;
    }
    body.home-dubizzle-style .categories-popular-section .cats-hscroll::-webkit-scrollbar {
        display: none;
    }

    body.home-dubizzle-style .categories-popular-section .cats-hscroll-item {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    body.home-dubizzle-style .categories-popular-section .cats-hscroll-icon,
    body.home-dubizzle-style .categories-popular-section .cats-hscroll-icon-home {
        width: 100%;
        max-width: 78px;
        height: auto;
        aspect-ratio: 1;
        margin-inline: auto;
        border-radius: 14px;
        background: #f3f4f6;
        border: 1px solid #e8eaed;
        box-shadow: none;
        color: #0c9267;
        font-size: 24px;
    }

    body.home-dubizzle-style .categories-popular-section .cats-hscroll-icon-home .cats-hscroll-logo {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }

    body.home-dubizzle-style .categories-popular-section .cats-hscroll-item.active .cats-hscroll-icon,
    body.home-dubizzle-style .categories-popular-section .cats-hscroll-item.active .cats-hscroll-icon-home {
        background: #dff7ec;
        border-color: #0c9267;
        color: #0c9267;
        box-shadow: 0 2px 10px rgba(12, 146, 103, 0.14);
    }

    body.home-dubizzle-style .categories-popular-section .cats-hscroll-item.active .cats-hscroll-icon-home .cats-hscroll-logo {
        filter: none;
    }

    body.home-dubizzle-style .categories-popular-section .cats-hscroll-name {
        color: #1a2e32;
        font-weight: 700;
        font-size: 11px;
    }

    body.home-dubizzle-style .categories-popular-section .cats-hscroll-item.active .cats-hscroll-name {
        color: #0c9267;
    }

    body.home-dubizzle-style .home-banners {
        padding-inline: 10px;
        gap: 10px;
    }

    body.home-dubizzle-style .sidalhag-banner.ad-banner,
    body.home-dubizzle-style .banner-hero-slider {
        border-radius: 16px;
        overflow: hidden;
    }

    body.home-dubizzle-style .main-content.container {
        padding-inline: 10px;
    }

    body.home-dubizzle-style .featured-section {
        background: #fff;
        border: 1px solid #e6eceb;
        border-radius: 14px;
        padding: 10px;
        margin-bottom: 12px;
        box-shadow: 0 2px 10px rgba(0, 47, 52, 0.04);
    }

    body.home-dubizzle-style .section-header {
        margin-bottom: 10px;
    }

    body.home-dubizzle-style .section-title {
        font-size: 30px;
        font-weight: 800;
        color: #0d3136;
    }

    .main-header .secondary-nav {
        display: none !important;
    }

    /* Dubizzle-style top strip + buy/rent (home + ads mobile) */
    .home-dubizzle-strip-wrap {
        padding: 0 8px 6px;
    }

    .home-dubizzle-top-strip {
        direction: rtl;
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        gap: 8px;
        background: #fff;
        border: 1px solid #e8eaed;
        border-radius: 18px;
        padding: 8px;
        box-shadow: 0 4px 18px rgba(0, 47, 52, 0.07);
    }
    /* Dubizzle-style: default = white card + dark icons; selected = dark green + white */
    .home-strip-hamburger-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        min-width: 52px;
        min-height: 72px;
        border: 1px solid #e8eaed;
        border-radius: 14px;
        background: #fff;
        color: #0d3136;
        font-size: 22px;
        cursor: pointer;
        align-self: stretch;
        box-shadow: 0 2px 10px rgba(0, 47, 52, 0.08);
        transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    }
    .home-strip-hamburger-btn:hover,
    .home-strip-hamburger-btn:active {
        background: #f7f9f9;
        border-color: #dce3e2;
    }

    .home-dubizzle-seg {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 6px;
        border-radius: 14px;
        text-decoration: none;
        font-size: 12px;
        font-weight: 700;
        transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        min-height: 72px;
    }

    .home-dubizzle-seg i {
        font-size: 22px;
    }

    /* سيارات / عقارات — default: white tile, dark labels, green icons */
    .home-dubizzle-top-strip > a.home-dubizzle-seg:not(.home-dubizzle-seg-brand) {
        padding: 8px 6px;
        min-height: 72px;
        background: #fff;
        color: #0d3136;
        border: 1px solid #e8eaed;
        box-shadow: 0 2px 10px rgba(0, 47, 52, 0.08);
    }

    .home-dubizzle-top-strip > a.home-dubizzle-seg:not(.home-dubizzle-seg-brand) span {
        color: #0d3136;
    }

    .home-dubizzle-top-strip > a.home-dubizzle-seg:not(.home-dubizzle-seg-brand) i {
        font-size: 28px;
        line-height: 1;
        color: #0c9267;
    }

    .home-dubizzle-top-strip > a.home-dubizzle-seg:not(.home-dubizzle-seg-brand):not(.is-active):hover {
        background: #f7f9f9;
        border-color: #dce8e4;
    }

    .home-dubizzle-top-strip > a.home-dubizzle-seg.is-active:not(.home-dubizzle-seg-brand):hover {
        filter: brightness(1.05);
    }

    /* Selected market: green tile + white icon & label (slightly lighter than deep forest) */
    .home-dubizzle-top-strip > a.home-dubizzle-seg.is-active:not(.home-dubizzle-seg-brand) {
        background: linear-gradient(165deg, #0ea578 0%, #0c9267 45%, #0a6b52 100%);
        color: #fff;
        border: none;
        box-shadow: 0 6px 20px rgba(12, 146, 103, 0.3);
    }

    .home-dubizzle-top-strip > a.home-dubizzle-seg.is-active:not(.home-dubizzle-seg-brand) i,
    .home-dubizzle-top-strip > a.home-dubizzle-seg.is-active:not(.home-dubizzle-seg-brand) span {
        color: #fff;
    }

    .home-dubizzle-seg-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    /* Brand: default white + full-color logo; home = selected (dark green + white logo) */
    .home-dubizzle-seg-brand {
        min-width: 42%;
        background: #fff;
        border: 1px solid #e8eaed;
        padding: 6px 8px;
        box-shadow: 0 2px 10px rgba(0, 47, 52, 0.08);
        color: #0d3136;
    }

    .home-dubizzle-seg-brand .home-dubizzle-seg-logo img {
        height: 50px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
        image-rendering: auto;
        filter: none;
    }

    .home-dubizzle-seg-brand.is-home {
        background: linear-gradient(165deg, #0ea578 0%, #0c9267 45%, #0a6b52 100%);
        border: none;
        box-shadow: 0 6px 20px rgba(12, 146, 103, 0.3);
        color: #fff;
    }

    .home-dubizzle-seg-brand.is-home .home-dubizzle-seg-logo img {
        filter: brightness(0) invert(1) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
    }

    .home-dubizzle-seg-brand:not(.is-home):hover {
        background: #f7f9f9;
        border-color: #dce8e4;
    }

    .home-dubizzle-purpose {
        direction: ltr;
        display: flex;
        margin-top: 8px;
        padding: 5px;
        border-radius: 14px;
        background: #eef1f2;
        border: 1px solid #e3e6e8;
        gap: 6px;
    }

    .home-dubizzle-purpose-btn {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
        border-radius: 11px;
        font-size: 14px;
        font-weight: 800;
        text-decoration: none;
        color: #5b7b7d;
        background: transparent;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .home-dubizzle-purpose-btn.home-dubizzle-purpose-buy {
        background: #dff3e8;
        color: #0c9267;
    }

    .home-dubizzle-purpose-btn:active {
        transform: scale(0.98);
    }

    /* Real estate: text tabs + icon row (Dubizzle property) */
    .home-re-type-tabs {
        display: flex;
        flex-wrap: nowrap;
        gap: 0;
        overflow-x: auto;
        padding: 4px 0 10px;
        margin: 0 -4px 4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        border-bottom: 1px solid #eef3f1;
    }

    .home-re-type-tabs::-webkit-scrollbar {
        display: none;
    }

    .home-re-type-tab {
        flex: 0 0 auto;
        padding: 8px 14px;
        font-size: 14px;
        font-weight: 700;
        color: #5b7b7d;
        text-decoration: none;
        white-space: nowrap;
        border-bottom: 2px solid transparent;
        margin-bottom: -1px;
    }

    .home-re-type-tab:first-child {
        font-weight: 800;
        color: #1f2a2c;
        border-bottom-color: #cc1f26;
    }

    .home-re-sub-icons {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        overflow-x: auto;
        padding: 6px 0 12px;
        margin: 0 -2px 4px;
        scrollbar-width: none;
    }

    .home-re-sub-icons::-webkit-scrollbar {
        display: none;
    }

    .home-re-sub-icon {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-decoration: none;
        color: #365052;
        min-width: 72px;
    }

    .home-re-sub-icon-box {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        background: #eef2f1;
        border: 1px solid #dfe8e5;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #0c9267;
        font-size: 22px;
    }

    .home-re-sub-icon-label {
        font-size: 10px;
        font-weight: 700;
        text-align: center;
        line-height: 1.25;
        max-width: 76px;
    }

    /* Horizontal property-style carousel */
    body.home-dubizzle-style .listings-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 12px;
        overflow-x: auto;
        padding: 8px 4px 18px;
        margin: 0 -4px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    body.home-dubizzle-style .listings-grid::-webkit-scrollbar {
        display: none;
    }

    body.home-dubizzle-style .listing-card.home-listing-card-dubizzle {
        flex: 0 0 min(82vw, 300px);
        scroll-snap-align: start;
        max-width: min(82vw, 300px);
        border: 1px solid #e6eceb;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 18px rgba(0, 47, 52, 0.07);
    }

    body.home-dubizzle-style .home-listing-card-dubizzle .listing-image {
        height: 168px;
        border-bottom: 1px solid #eef3f1;
        background: #f0f4f3;
    }

    body.home-dubizzle-style .home-listing-card-dubizzle .listing-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
        background: #f0f4f3;
    }

    body.home-dubizzle-style .home-listing-card-dubizzle .listing-details {
        padding: 10px 12px 12px;
    }

    body.home-dubizzle-style .home-listing-card-dubizzle .listing-price-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 4px;
    }

    body.home-dubizzle-style .home-listing-card-dubizzle .listing-price {
        font-size: 16px;
        color: #0c9267;
        font-weight: 800;
        margin: 0;
        flex: 1;
        min-width: 0;
    }

    body.home-dubizzle-style .home-listing-card-dubizzle .wishlist-btn-row {
        position: static;
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 12px;
        background: #f4f8f7;
        border: 1px solid #dce8e4;
        color: #0d3136;
        font-size: 17px;
        flex-shrink: 0;
    }

    body.home-dubizzle-style .home-listing-card-dubizzle .listing-title {
        font-size: 13px;
        font-weight: 800;
        font-family: inherit;
        color: #1f3a3d;
        line-height: 1.35;
    }

    .main-header .search-box-main {
        border-radius: 14px;
        border: 1px solid #dfe8e5;
    }
}

@media (min-width: 769px) {
    .global-market-strip {
        display: none;
    }
    .hamburger-btn,
    .home-strip-hamburger-btn {
        display: none !important;
    }

    .home-dubizzle-strip-wrap {
        display: none;
    }

    /* Desktop: keep real-estate tabs readable and wrapped as pills */
    .home-re-type-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        overflow: visible;
        padding: 0;
        margin: 6px 0 12px;
        border-bottom: 0;
    }

    .home-re-type-tab {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 14px;
        border: 1px solid #dce8e4;
        border-radius: 999px;
        background: #f4f8f7;
        color: #375053;
        font-size: 14px;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
        margin-bottom: 0;
    }

    .home-re-type-tab:first-child {
        border-color: #0c9267;
        background: #e4f4ee;
        color: #0a704f;
    }

    .home-re-sub-icons {
        display: none;
    }

    /* Desktop: ensure heart button is shown in price row */
    .listing-card.home-listing-card-dubizzle .wishlist-btn-row {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media (max-width: 768px) {
    .pwa-install-card {
        padding: 8px 10px;
        gap: 8px;
    }

    .pwa-install-headline {
        font-size: 14px;
    }

    .pwa-install-btn-primary {
        min-height: 40px;
        padding: 0 14px;
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .pwa-install-reviews {
        display: none;
    }

    .pwa-install-continue-web {
        display: none;
    }

    .pwa-install-icon img {
        width: 44px;
        height: 44px;
    }
}
