:root {
  --blue-950: #071d49;
  --blue-900: #0a285f;
  --blue-800: #0c3d91;
  --blue-700: #075dd8;
  --blue-600: #0878f9;
  --blue-500: #2589ff;
  --blue-100: #eaf4ff;
  --blue-50: #f4f9ff;
  --theme-border: color-mix(in srgb, var(--blue-500) 38%, white);
  --theme-shadow: color-mix(in srgb, var(--blue-900) 18%, transparent);
  --theme-hero: linear-gradient(124deg, var(--blue-950) 0%, var(--blue-800) 55%, var(--blue-600) 120%);
  --ink: #14213d;
  --muted: #68758d;
  --line: #e4eaf2;
  --white: #fff;
  --surface: #f8fafc;
  --shadow: 0 18px 45px rgba(15, 50, 105, .11);
  --radius: 18px;
}

/* The active market gets a flag-inspired palette while retaining accessible
   contrast and the same component hierarchy across countries. */
html[data-country-theme="TN"] {
  --blue-950: #5b0b1b; --blue-900: #7f1026; --blue-800: #a91432;
  --blue-700: #c8102e; --blue-600: #e21d3b; --blue-500: #ef5a70;
  --blue-100: #fff0f2; --blue-50: #fff8f9;
}
html[data-country-theme="QA"] {
  --blue-950: #3d0d26; --blue-900: #5a1237; --blue-800: #731845;
  --blue-700: #8e2157; --blue-600: #a9366c; --blue-500: #cc7098;
  --blue-100: #f5edff; --blue-50: #fbf7ff;
}
html[data-country-theme="DZ"],
html[data-country-theme="MA"],
html[data-country-theme="MR"],
html[data-country-theme="LY"] {
  --blue-950: #063b25; --blue-900: #075b35; --blue-800: #087443;
  --blue-700: #0b8f4d; --blue-600: #12aa5d; --blue-500: #4dcc88;
  --blue-100: #eaf9f0; --blue-50: #f5fcf7;
}
html[data-country-theme="EG"],
html[data-country-theme="AE"],
html[data-country-theme="KW"],
html[data-country-theme="BH"],
html[data-country-theme="OM"] {
  --blue-950: #64121a; --blue-900: #861b25; --blue-800: #a9222e;
  --blue-700: #c8323f; --blue-600: #df4d59; --blue-500: #f08089;
  --blue-100: #fff0f1; --blue-50: #fff8f8;
}
html[data-country-theme="SA"] {
  --blue-950: #063b25; --blue-900: #075b35; --blue-800: #087443;
  --blue-700: #0b8f4d; --blue-600: #12aa5d; --blue-500: #4dcc88;
  --blue-100: #eaf9f0; --blue-50: #f5fcf7;
}
html[data-country-theme="FR"] {
  --blue-950: #071d49; --blue-900: #123b78; --blue-800: #1558a6;
  --blue-700: #1e65b7; --blue-600: #2876cc; --blue-500: #5d9be2;
  --blue-100: #edf4ff; --blue-50: #f7faff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--white); font: 400 15px/1.6 "DM Sans", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.hidden { display: none !important; }

.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(228,234,242,.8); backdrop-filter: blur(14px); }
.nav { position: relative; height: 74px; display: flex; align-items: center; gap: 42px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--blue-900); font: 800 24px/1 "Manrope", sans-serif; letter-spacing: -.8px; }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; color: white; background: linear-gradient(145deg, var(--blue-500), var(--blue-800)); border-radius: 11px; font: 800 20px/1 "Manrope", sans-serif; box-shadow: 0 7px 16px var(--theme-shadow); }
.nav-links { display: flex; gap: 30px; margin-right: auto; color: #3f4d65; font-weight: 600; }
.nav-links a, .nav-links button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.nav-links a:hover, .nav-links button:hover { color: var(--blue-600); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 12px; font-weight: 700; transition: .2s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: linear-gradient(135deg, var(--blue-600), var(--blue-700)); box-shadow: 0 8px 20px var(--theme-shadow); }
.button-primary:hover { box-shadow: 0 11px 24px var(--theme-shadow); }
.button-ghost { color: var(--ink); background: transparent; }
.button-outline { min-width: 200px; color: var(--blue-700); background: white; border: 1.5px solid var(--theme-border); }
.button-outline:hover { background: var(--blue-50); border-color: var(--blue-500); }
.button-white { min-height: 50px; color: var(--blue-800); background: white; box-shadow: 0 8px 25px rgba(0,28,80,.2); }
.button-full { width: 100%; min-height: 50px; }
.mobile-menu { display: none; color: var(--ink); background: transparent; border: 0; font-size: 25px; }

.hero { position: relative; overflow: hidden; color: white; background: var(--theme-hero); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 55px; background: linear-gradient(to bottom right, transparent 49%, white 50%); }
.hero-content { position: relative; z-index: 2; padding: 82px 0 104px; text-align: center; }
.hero-copy { max-width: 780px; margin: auto; }
.eyebrow { display: inline-flex; width: max-content; max-width: 100%; align-items: center; gap: 9px; margin: 0 auto 18px; padding: 7px 13px; color: #d8eaff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.17); border-radius: 99px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.eyebrow span { width: 7px; height: 7px; background: #4dffbc; border-radius: 50%; box-shadow: 0 0 0 4px rgba(77,255,188,.13); }
.hero h1 { margin: 0; font: 800 clamp(40px, 5vw, 66px)/1.1 "Manrope", sans-serif; letter-spacing: -3px; }
.hero h1 strong { color: var(--blue-500); font-weight: 800; }
.hero-copy > p { max-width: 650px; margin: 20px auto 34px; color: #cbddf7; font-size: 18px; }
.search-bar { display: flex; max-width: 870px; min-height: 66px; margin: auto; padding: 7px; background: white; border-radius: 17px; box-shadow: 0 22px 45px rgba(0,20,58,.28); }
.search-field { display: flex; flex: 1; align-items: center; gap: 10px; padding: 0 18px; color: var(--blue-600); }
.search-field input { width: 100%; height: 100%; color: var(--ink); border: 0; outline: 0; }
.search-field input::placeholder { color: #8f9aab; }
.search-location { max-width: 250px; border-left: 1px solid var(--line); }
.button-search { min-width: 130px; color: white; background: var(--blue-600); border-radius: 11px; }
.popular-searches { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 18px; color: #b7d0f2; font-size: 13px; }
.popular-searches button { padding: 2px 8px; color: #e6f2ff; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; font-size: 12px; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .3; }
.hero-orb-one { width: 400px; height: 400px; top: -180px; right: -90px; border: 70px solid color-mix(in srgb, var(--blue-500) 35%, transparent); }
.hero-orb-two { width: 260px; height: 260px; bottom: -170px; left: -100px; border: 48px solid rgba(255,255,255,.13); }

.section { padding: 72px 0; }
.categories-section { padding-top: 45px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; }
.section-heading h2 { margin: 4px 0 0; font: 800 30px/1.25 "Manrope", sans-serif; letter-spacing: -1px; }
.section-kicker { color: var(--blue-600); font-size: 12px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; }
.text-link { color: var(--blue-700); background: transparent; border: 0; font-weight: 700; }
.text-link span { margin-left: 5px; font-size: 19px; }
.category-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; }
.category-card { padding: 19px 8px; text-align: center; background: white; border: 1px solid var(--line); border-radius: 16px; transition: .2s ease; }
.category-card:hover, .category-card.active { transform: translateY(-4px); border-color: var(--theme-border); box-shadow: 0 13px 28px var(--theme-shadow); }
.category-card.active { background: var(--blue-50); }
.category-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px; color: var(--blue-700); background: var(--blue-100); border-radius: 14px; font-size: 23px; }
.category-icon svg { width: 27px; height: 27px; }
.category-card strong { display: block; font-size: 13px; line-height: 1.3; }

.listings-section { background: var(--surface); }
.sort-control { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.sort-control select { padding: 9px 34px 9px 12px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 10px; outline: 0; }
.type-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.type-filter-option { padding: 8px 16px; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 99px; font-weight: 700; font-size: 12px; cursor: pointer; transition: .2s ease; }
.type-filter-option:hover { border-color: var(--theme-border); }
.type-filter-option.active { color: white; background: linear-gradient(135deg, var(--blue-600), var(--blue-700)); border-color: transparent; }
.active-filter { display: inline-flex; align-items: center; gap: 8px; margin: -8px 0 20px; padding: 7px 10px 7px 13px; color: var(--blue-800); background: var(--blue-100); border-radius: 99px; font-weight: 600; font-size: 13px; }
.active-filter button { color: var(--blue-800); background: transparent; border: 0; font-size: 19px; line-height: 1; }
.listing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.listing-card { overflow: hidden; background: white; border: 1px solid #e8edf4; border-radius: var(--radius); box-shadow: 0 5px 14px rgba(24,52,90,.04); transition: .25s ease; cursor: pointer; }
.listing-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.listing-image { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #eaf0f7; }
.listing-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.listing-card:hover img { transform: scale(1.035); }
.listing-badge { position: absolute; top: 12px; left: 12px; padding: 4px 9px; color: var(--blue-800); background: rgba(255,255,255,.92); border-radius: 7px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.favorite { position: absolute; top: 11px; right: 11px; display: grid; place-items: center; width: 34px; height: 34px; color: #52627b; background: rgba(255,255,255,.94); border: 0; border-radius: 50%; font-size: 19px; }
.favorite.active { color: #ef476f; }
.listing-body { padding: 17px; }
.listing-tags { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.listing-type-tag { padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.listing-type-tag.sell { color: var(--blue-700); background: var(--blue-100); }
.listing-type-tag.rent { color: #0f7a4a; background: #e9fbf1; }
.listing-category { color: var(--blue-600); font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.listing-body h3 { overflow: hidden; margin: 5px 0 8px; font-size: 16px; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
.listing-price { margin: 0 0 13px; color: var(--blue-800); font: 800 20px/1.2 "Manrope", sans-serif; }
.listing-meta { display: flex; justify-content: space-between; padding-top: 12px; color: #7e899c; border-top: 1px solid #edf0f4; font-size: 11px; }
.card-skeleton { min-height: 340px; background: linear-gradient(90deg, #edf1f5 25%, #f7f9fb 40%, #edf1f5 65%); background-size: 400% 100%; animation: loading 1.4s infinite; border-radius: var(--radius); }
@keyframes loading { to { background-position: -100% 0; } }
.center-action { margin-top: 34px; text-align: center; }
.empty-state { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty-state > div { font-size: 50px; color: var(--blue-500); }
.empty-state h3 { margin-bottom: 4px; color: var(--ink); }

.trust-strip { padding: 29px 0; color: white; background: var(--blue-950); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-grid article { display: flex; align-items: center; justify-content: center; gap: 13px; border-right: 1px solid rgba(255,255,255,.13); }
.trust-grid article:last-child { border-right: 0; }
.trust-grid article > span { display: grid; place-items: center; width: 38px; height: 38px; color: #8bc8ff; background: rgba(255,255,255,.08); border-radius: 11px; font-size: 19px; }
.trust-grid strong, .trust-grid small { display: block; }
.trust-grid strong { font-size: 14px; }
.trust-grid small { color: #96a9c8; font-size: 11px; }
.centered { display: block; text-align: center; }
.centered p { margin-top: 7px; color: var(--muted); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 940px; margin: 45px auto 0; text-align: center; }
.steps-grid article { position: relative; padding: 30px; }
.step-number { position: absolute; top: 5px; right: 25px; color: #e6edf7; font: 800 46px/1 "Manrope", sans-serif; }
.step-icon { position: relative; display: grid; place-items: center; width: 64px; height: 64px; margin: auto; color: var(--blue-700); background: var(--blue-100); border-radius: 19px; font-size: 27px; }
.steps-grid h3 { margin: 20px 0 7px; font-size: 17px; }
.steps-grid p { margin: 0; color: var(--muted); font-size: 13px; }
.faq-list { max-width: 760px; margin: 40px auto 0; display: grid; gap: 12px; }
.faq-item { padding: 18px 22px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--ink); font-weight: 700; font-size: 15px; line-height: 1.4; list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; display: grid; place-items: center; width: 26px; height: 26px; color: var(--blue-700); background: var(--blue-100); border-radius: 50%; font-size: 16px; font-weight: 800; transition: transform .2s ease; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 75px; padding: 45px 55px; color: white; background: linear-gradient(125deg, var(--blue-800), var(--blue-600)); border-radius: 24px; box-shadow: 0 22px 50px rgba(8,89,193,.22); }
.cta-badge { display: inline-block; margin-bottom: 8px; padding: 4px 10px; color: #bfe1ff; background: rgba(255,255,255,.1); border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.cta h2 { margin: 0; font: 800 29px/1.3 "Manrope", sans-serif; }
.cta p { margin: 7px 0 0; color: #d5e8ff; }

footer { padding: 55px 0 22px; color: #9aa9c3; background: #06152f; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 65px; padding-bottom: 40px; }
.brand-light { color: white; }
.footer-brand p { max-width: 280px; margin-top: 18px; font-size: 13px; }
footer h4 { margin: 4px 0 17px; color: white; font-size: 14px; }
footer a:not(.brand) { display: block; margin: 9px 0; font-size: 12px; }
footer a:hover { color: white; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(1,16,42,.68); backdrop-filter: blur(5px); }
.modal { position: fixed; z-index: 61; top: 50%; left: 50%; width: min(430px, calc(100% - 30px)); max-height: calc(100vh - 30px); overflow-y: auto; padding: 34px; background: white; border-radius: 22px; box-shadow: 0 30px 80px rgba(0,18,55,.35); transform: translate(-50%, -50%); }
.modal-wide { width: min(760px, calc(100% - 30px)); }
.modal-detail { width: min(850px, calc(100% - 30px)); padding: 0; overflow: hidden auto; }
.modal-close { position: absolute; z-index: 2; top: 15px; right: 15px; display: grid; place-items: center; width: 34px; height: 34px; color: #6b778d; background: #f1f4f8; border: 0; border-radius: 50%; font-size: 22px; }
.modal-header { text-align: center; }
.modal-header .brand-mark { margin-bottom: 12px; }
.modal-header h2 { margin: 2px 0 6px; font: 800 24px/1.3 "Manrope", sans-serif; }
.modal-header p { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.modal-header.align-left { text-align: left; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 20px; padding: 4px; background: #f1f4f8; border-radius: 11px; }
.auth-tabs button { padding: 9px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font-weight: 700; font-size: 13px; }
.auth-tabs button.active { color: var(--blue-700); background: white; box-shadow: 0 3px 8px rgba(20,50,90,.08); }
.modal-form { display: grid; gap: 15px; }
.form-field { display: grid; gap: 6px; }
.form-field span { font-size: 12px; font-weight: 700; }
.form-field input, .form-field select, .form-field textarea { width: 100%; padding: 12px 13px; color: var(--ink); background: white; border: 1px solid #dce3ec; border-radius: 10px; outline: 0; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(37,137,255,.11); }
.listing-type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.listing-type-option { padding: 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; transition: .2s ease; }
.listing-type-option:hover { border-color: var(--theme-border); }
.listing-type-option.active { color: white; background: linear-gradient(135deg, var(--blue-600), var(--blue-700)); border-color: transparent; box-shadow: 0 8px 18px var(--theme-shadow); }
.photo-upload { display: grid; place-items: center; min-height: 135px; padding: 20px; color: var(--blue-700); background: var(--blue-50); border: 1.5px dashed #91c3fc; border-radius: 12px; text-align: center; cursor: pointer; transition: .2s ease; }
.photo-upload:hover { background: #e9f4ff; border-color: var(--blue-600); }
.photo-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-upload-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 7px; color: white; background: var(--blue-600); border-radius: 11px; font-size: 24px; }
.photo-upload strong { font-size: 13px; }
.photo-upload small { color: var(--muted); font-size: 11px; }
.photo-preview { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.photo-preview-item { position: relative; overflow: hidden; aspect-ratio: 1; background: #e8eef5; border-radius: 10px; }
.photo-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview-item span { position: absolute; right: 5px; bottom: 5px; padding: 2px 6px; color: white; background: rgba(6,29,73,.75); border-radius: 5px; font-size: 9px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-three { grid-template-columns: repeat(3, 1fr); }
.guest-notice { display: flex; gap: 10px; padding: 12px; color: #45617e; background: var(--blue-50); border: 1px solid #d5e9ff; border-radius: 10px; font-size: 11px; }
.guest-notice p { margin: 0; }
.guest-notice > span { color: var(--blue-600); font-size: 17px; }
.form-error { margin: 0; padding: 9px 11px; color: #a82641; background: #fff0f3; border-radius: 8px; font-size: 12px; }
.form-success { margin: 0; padding: 9px 11px; color: #0f7a4a; background: #e9fbf1; border-radius: 8px; font-size: 12px; }
.form-success p { margin: 0 0 10px; }
.auth-forgot-link { justify-self: end; margin-top: -6px; padding: 0; font-size: 12px; }
#backToLoginLink { justify-self: center; margin-top: 4px; }
.google-signin-container { display: flex; justify-content: center; min-height: 40px; }
.google-signin-container.hidden { display: none; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-divider.hidden { display: none; }
.detail-layout { display: grid; grid-template-columns: 1.15fr 1fr; }
.detail-image { min-height: 430px; background: #e8eef5; }
.detail-image { position: relative; }
.detail-image img#galleryMain { width: 100%; height: 100%; min-height: 430px; object-fit: cover; }
.gallery-arrow { position: absolute; top: 45%; z-index: 3; display: grid; place-items: center; width: 38px; height: 38px; color: var(--blue-800); background: rgba(255,255,255,.9); border: 0; border-radius: 50%; font-size: 22px; line-height: 1; box-shadow: 0 6px 16px rgba(0,20,58,.2); }
.gallery-arrow:hover { background: white; }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-counter { position: absolute; top: 12px; right: 12px; z-index: 3; padding: 4px 10px; color: white; background: rgba(0,20,58,.55); border-radius: 20px; font-size: 11px; font-weight: 700; }
.gallery-thumbs { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; gap: 8px; padding: 12px; overflow-x: auto; background: linear-gradient(to top, rgba(0,10,30,.55), transparent); }
.gallery-thumb { flex: 0 0 auto; width: 54px; height: 54px; padding: 0; overflow: hidden; background: #dbe4ee; border: 2px solid transparent; border-radius: 9px; opacity: .75; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { border-color: var(--blue-500); opacity: 1; }
.detail-info { padding: 40px 32px 30px; }
.detail-info .listing-category { font-size: 11px; }
.detail-info h1 { margin: 8px 0; font: 800 26px/1.3 "Manrope", sans-serif; }
.detail-price { margin: 10px 0 20px; color: var(--blue-700); font: 800 28px/1 "Manrope", sans-serif; }
.detail-location { color: var(--muted); font-size: 13px; }
.detail-description { margin: 22px 0; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-description h4 { margin: 0 0 7px; }
.detail-description p { margin: 0; color: #526079; font-size: 13px; white-space: pre-line; }
.seller-box { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; padding: 13px; background: var(--surface); border-radius: 12px; }
.seller-avatar { display: grid; place-items: center; width: 42px; height: 42px; color: white; background: var(--blue-600); border-radius: 50%; font-weight: 800; }
.seller-box strong, .seller-box small { display: block; }
.seller-box small { color: var(--muted); }
.phone-button { text-decoration: none; }
.safety-box { display: flex; gap: 12px; margin-top: 15px; padding: 14px; color: #6b5a15; background: #fff9e8; border: 1px solid #f3e3ac; border-radius: 12px; font-size: 12px; }
.safety-box > span { font-size: 18px; }
.safety-box strong { display: block; margin-bottom: 6px; color: #5c4a10; }
.safety-box ul { margin: 0; padding-left: 16px; }
.safety-box li { margin-bottom: 3px; }
.share-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.share-section strong { display: block; margin-bottom: 10px; font-size: 13px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.share-button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; color: white; border: 0; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; transition: .2s ease; }
.share-button svg { width: 17px; height: 17px; flex-shrink: 0; }
.share-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.share-button-facebook { background: #1877f2; }
.share-button-linkedin { background: #0a66c2; }
.share-button-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af, #515bd4); }
.toast { position: fixed; z-index: 80; right: 25px; bottom: 25px; max-width: 360px; padding: 14px 18px; color: white; background: #13366e; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; }

.picker { position: relative; }
.picker-trigger { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 10px; color: var(--blue-800); background: var(--blue-50); border: 1px solid #dce7f7; border-radius: 9px; font-size: 12px; font-weight: 700; }
.picker-trigger:hover { border-color: var(--blue-500); }
.picker-trigger[aria-expanded="true"] { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(37,137,255,.15); }
.picker-flag { font-size: 16px; line-height: 1; }
.picker-label { white-space: nowrap; }
.picker-caret { color: var(--muted); font-size: 10px; transition: transform .15s ease; }
.picker-trigger[aria-expanded="true"] .picker-caret { transform: rotate(180deg); }
.picker-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 55; width: max-content; min-width: 220px; max-height: 340px; overflow-y: auto; padding: 8px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 45px rgba(10,40,90,.18); }
.picker-option { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; color: var(--ink); background: transparent; border: 0; border-radius: 9px; font-size: 13px; font-weight: 600; text-align: left; }
.picker-option:hover { background: var(--blue-50); }
.picker-option.active { color: var(--blue-700); background: var(--blue-100); }
.picker-option .picker-flag { font-size: 18px; }
.picker-option-meta { margin-left: auto; color: var(--muted); font-size: 11px; font-weight: 700; }

.form-locked { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 13px; color: var(--blue-800); background: var(--blue-50); border: 1px solid #dce3ec; border-radius: 10px; font-weight: 700; }
.form-locked span:first-child { font-size: 17px; }
.form-hint { margin: -8px 0 4px; color: var(--muted); font-size: 11px; }

.ad-page { padding: 24px 0 60px; }
.ad-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--blue-700); font-weight: 700; font-size: 13px; text-decoration: none; }
.ad-back:hover { color: var(--blue-600); }
#adContent .detail-layout { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.ad-skeleton { min-height: 430px; border-radius: 18px; }

@media (max-width: 680px) {
  .nav-actions .picker-label { display: none; }
  .picker-trigger { padding: 0 8px; }
  .picker-menu { right: -40px; }
}

/* RTL support */
html[dir="rtl"] body { font-family: "Noto Kufi Arabic", "DM Sans", sans-serif; }
html[dir="rtl"] .gallery-prev { right: 12px; left: auto; }
html[dir="rtl"] .gallery-next { left: 12px; right: auto; }
html[dir="rtl"] .gallery-counter { left: 12px; right: auto; }
html[dir="rtl"] .safety-box ul { padding-left: 0; padding-right: 16px; }
html[dir="rtl"] .photo-preview-item span { left: 5px; right: auto; }
html[dir="rtl"] .listing-badge { right: auto; left: 12px; }
html[dir="rtl"] .favorite { left: 12px; right: auto; }
html[dir="rtl"] .ad-back { flex-direction: row-reverse; }
html[dir="rtl"] .picker-menu { right: auto; left: 0; }
html[dir="rtl"] .picker-option { text-align: right; }
html[dir="rtl"] .picker-option-meta { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .nav-links.mobile-open a, html[dir="rtl"] .nav-links.mobile-open button { text-align: right; }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-links.mobile-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    flex-direction: column;
    gap: 0;
    margin-top: 6px;
    padding: 6px 16px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(10,30,70,.14);
  }
  .nav-links.mobile-open a, .nav-links.mobile-open button { padding: 13px 0; border-bottom: 1px solid var(--line); text-align: left; }
  .nav-links.mobile-open a:last-child, .nav-links.mobile-open button:last-child { border-bottom: 0; }
  .nav-actions { margin-left: auto; }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .container { width: min(100% - 28px, 1160px); }
  .nav { height: 66px; }
  .nav-actions .button-ghost, .nav-actions .button-primary span { display: none; }
  .nav-actions .button-primary { min-height: 38px; padding: 0 12px; font-size: 12px; }
  .mobile-menu { display: block; }
  .hero-content { padding: 58px 0 92px; }
  .hero h1 { font-size: 39px; letter-spacing: -2px; }
  .hero-copy > p { font-size: 15px; }
  .search-bar { display: grid; padding: 8px; }
  .search-field { min-height: 48px; }
  .search-location { max-width: none; border-top: 1px solid var(--line); border-left: 0; }
  .button-search { min-height: 48px; }
  .section { padding: 55px 0; }
  .section-heading { align-items: flex-start; gap: 12px; }
  .section-heading h2 { font-size: 24px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .listing-grid { grid-template-columns: 1fr; }
  .listing-card { display: grid; grid-template-columns: 42% 58%; }
  .listing-image { aspect-ratio: auto; min-height: 180px; }
  .listing-body { min-width: 0; }
  .listings-heading { display: block; }
  .sort-control { margin-top: 16px; }
  .trust-grid, .steps-grid { grid-template-columns: 1fr; }
  .trust-grid article { justify-content: flex-start; padding: 14px 30px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .steps-grid { gap: 5px; }
  .faq-item { padding: 15px 16px; }
  .faq-item summary { font-size: 14px; }
  .cta { display: block; margin-bottom: 40px; padding: 32px 25px; text-align: center; }
  .cta .button { margin-top: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { display: block; text-align: center; }
  .footer-bottom span { display: block; margin: 6px; }
  .modal { padding: 27px 20px; }
  .form-row, .form-row-three { grid-template-columns: 1fr; }
  .photo-preview { grid-template-columns: repeat(3, 1fr); }
  .detail-layout { grid-template-columns: minmax(0, 1fr); border-radius: 14px; }
  .detail-image, .detail-info { min-width: 0; }
  .detail-image { min-height: 0; height: auto; max-height: none; }
  .detail-image img#galleryMain { display: block; width: 100%; height: min(74vw, 360px); min-height: 0; max-height: 360px; object-fit: contain; background: #e8eef5; }
  .gallery-arrow { top: 42%; width: 42px; height: 42px; }
  .gallery-counter { top: 10px; right: 10px; padding: 5px 9px; font-size: 12px; }
  .gallery-thumbs { position: static; min-width: 0; gap: 8px; padding: 10px; overflow-x: auto; background: #f4f7fb; -webkit-overflow-scrolling: touch; }
  .gallery-thumb { width: 62px; height: 62px; border-color: #d4deea; opacity: 1; }
  .detail-info { padding: 22px 18px 26px; }
  .detail-info h1 { margin: 7px 0 10px; font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
  .detail-price { margin: 8px 0 14px; font-size: clamp(25px, 7vw, 32px); line-height: 1.15; overflow-wrap: anywhere; }
  .detail-location { font-size: 13px; line-height: 1.5; }
  .detail-description { margin: 18px 0; padding-top: 16px; }
  .detail-description p { font-size: 14px; line-height: 1.7; }
  .seller-box { margin-top: 18px; }
  .phone-button { min-height: 48px; }
}
